Re: [Mesa-dev] [PATCH] mesa: save/restore SSO flag when using ARB_get_program_binary

2019-07-11 Thread Jordan Justen
Reviewed-by: Jordan Justen 

On 2019-07-10 17:39:24, Timothy Arceri wrote:
> Ping! The spec bug was updated and they have agreed to update the spec 
> to define this behavior.
> 
> I've also sent a piglit test for this:
> 
> https://patchwork.freedesktop.org/patch/317112/
> 
> On 1/7/19 12:25 pm, Timothy Arceri wrote:
> > Without this the restored program will fail the pipeline validation
> > checks when we attempt to use an SSO program.
> > 
> > Fixes: c20fd744fef1 ("mesa: Add Mesa ARB_get_program_binary helper 
> > functions")
> > 
> > Cc: Jordan Justen 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111010
> > ---
> >   src/mesa/main/program_binary.c | 4 
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/src/mesa/main/program_binary.c b/src/mesa/main/program_binary.c
> > index 7390fef5887..39537cfccce 100644
> > --- a/src/mesa/main/program_binary.c
> > +++ b/src/mesa/main/program_binary.c
> > @@ -178,6 +178,8 @@ write_program_payload(struct gl_context *ctx, struct 
> > blob *blob,
> > shader->Program);
> >  }
> >   
> > +   blob_write_uint32(blob, sh_prog->SeparateShader);
> > +
> >  serialize_glsl_program(blob, ctx, sh_prog);
> >   
> >  for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {
> > @@ -195,6 +197,8 @@ static bool
> >   read_program_payload(struct gl_context *ctx, struct blob_reader *blob,
> >GLenum binary_format, struct gl_shader_program 
> > *sh_prog)
> >   {
> > +   sh_prog->SeparateShader = blob_read_uint32(blob);
> > +
> >  if (!deserialize_glsl_program(blob, ctx, sh_prog))
> > return false;
> >   
> > 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa: save/restore SSO flag when using ARB_get_program_binary

2019-07-10 Thread Timothy Arceri
Ping! The spec bug was updated and they have agreed to update the spec 
to define this behavior.


I've also sent a piglit test for this:

https://patchwork.freedesktop.org/patch/317112/

On 1/7/19 12:25 pm, Timothy Arceri wrote:

Without this the restored program will fail the pipeline validation
checks when we attempt to use an SSO program.

Fixes: c20fd744fef1 ("mesa: Add Mesa ARB_get_program_binary helper functions")

Cc: Jordan Justen 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111010
---
  src/mesa/main/program_binary.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/program_binary.c b/src/mesa/main/program_binary.c
index 7390fef5887..39537cfccce 100644
--- a/src/mesa/main/program_binary.c
+++ b/src/mesa/main/program_binary.c
@@ -178,6 +178,8 @@ write_program_payload(struct gl_context *ctx, struct blob 
*blob,
shader->Program);
 }
  
+   blob_write_uint32(blob, sh_prog->SeparateShader);

+
 serialize_glsl_program(blob, ctx, sh_prog);
  
 for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {

@@ -195,6 +197,8 @@ static bool
  read_program_payload(struct gl_context *ctx, struct blob_reader *blob,
   GLenum binary_format, struct gl_shader_program *sh_prog)
  {
+   sh_prog->SeparateShader = blob_read_uint32(blob);
+
 if (!deserialize_glsl_program(blob, ctx, sh_prog))
return false;
  


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa: save/restore SSO flag when using ARB_get_program_binary

2019-06-30 Thread Timothy Arceri

On 1/7/19 2:24 pm, Timothy Arceri wrote:
FYI since the spec doesn't specifically cover what to do in this case I 
have filed a spec bug suggesting it be updated to follow this behavior.


https://gitlab.khronos.org/opengl/GLSL/issues/46


Whoops filed that one against GLSL rather than the API here is the 
correct link:


https://gitlab.khronos.org/opengl/API/issues/114



On 1/7/19 12:25 pm, Timothy Arceri wrote:

Without this the restored program will fail the pipeline validation
checks when we attempt to use an SSO program.

Fixes: c20fd744fef1 ("mesa: Add Mesa ARB_get_program_binary helper 
functions")


Cc: Jordan Justen 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111010
---
  src/mesa/main/program_binary.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/program_binary.c 
b/src/mesa/main/program_binary.c

index 7390fef5887..39537cfccce 100644
--- a/src/mesa/main/program_binary.c
+++ b/src/mesa/main/program_binary.c
@@ -178,6 +178,8 @@ write_program_payload(struct gl_context *ctx, 
struct blob *blob,

    shader->Program);
 }
+   blob_write_uint32(blob, sh_prog->SeparateShader);
+
 serialize_glsl_program(blob, ctx, sh_prog);
 for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {
@@ -195,6 +197,8 @@ static bool
  read_program_payload(struct gl_context *ctx, struct blob_reader *blob,
   GLenum binary_format, struct gl_shader_program 
*sh_prog)

  {
+   sh_prog->SeparateShader = blob_read_uint32(blob);
+
 if (!deserialize_glsl_program(blob, ctx, sh_prog))
    return false;


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa: save/restore SSO flag when using ARB_get_program_binary

2019-06-30 Thread Timothy Arceri
FYI since the spec doesn't specifically cover what to do in this case I 
have filed a spec bug suggesting it be updated to follow this behavior.


https://gitlab.khronos.org/opengl/GLSL/issues/46

On 1/7/19 12:25 pm, Timothy Arceri wrote:

Without this the restored program will fail the pipeline validation
checks when we attempt to use an SSO program.

Fixes: c20fd744fef1 ("mesa: Add Mesa ARB_get_program_binary helper functions")

Cc: Jordan Justen 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111010
---
  src/mesa/main/program_binary.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/program_binary.c b/src/mesa/main/program_binary.c
index 7390fef5887..39537cfccce 100644
--- a/src/mesa/main/program_binary.c
+++ b/src/mesa/main/program_binary.c
@@ -178,6 +178,8 @@ write_program_payload(struct gl_context *ctx, struct blob 
*blob,
shader->Program);
 }
  
+   blob_write_uint32(blob, sh_prog->SeparateShader);

+
 serialize_glsl_program(blob, ctx, sh_prog);
  
 for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {

@@ -195,6 +197,8 @@ static bool
  read_program_payload(struct gl_context *ctx, struct blob_reader *blob,
   GLenum binary_format, struct gl_shader_program *sh_prog)
  {
+   sh_prog->SeparateShader = blob_read_uint32(blob);
+
 if (!deserialize_glsl_program(blob, ctx, sh_prog))
return false;
  


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] mesa: save/restore SSO flag when using ARB_get_program_binary

2019-06-30 Thread Timothy Arceri
Without this the restored program will fail the pipeline validation
checks when we attempt to use an SSO program.

Fixes: c20fd744fef1 ("mesa: Add Mesa ARB_get_program_binary helper functions")

Cc: Jordan Justen 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111010
---
 src/mesa/main/program_binary.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/program_binary.c b/src/mesa/main/program_binary.c
index 7390fef5887..39537cfccce 100644
--- a/src/mesa/main/program_binary.c
+++ b/src/mesa/main/program_binary.c
@@ -178,6 +178,8 @@ write_program_payload(struct gl_context *ctx, struct blob 
*blob,
   shader->Program);
}
 
+   blob_write_uint32(blob, sh_prog->SeparateShader);
+
serialize_glsl_program(blob, ctx, sh_prog);
 
for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {
@@ -195,6 +197,8 @@ static bool
 read_program_payload(struct gl_context *ctx, struct blob_reader *blob,
  GLenum binary_format, struct gl_shader_program *sh_prog)
 {
+   sh_prog->SeparateShader = blob_read_uint32(blob);
+
if (!deserialize_glsl_program(blob, ctx, sh_prog))
   return false;
 
-- 
2.21.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev