Module: Mesa
Branch: master
Commit: 3043908ccb9c7030add1f34f9a947a787949a399
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3043908ccb9c7030add1f34f9a947a787949a399

Author: Timothy Arceri <[email protected]>
Date:   Mon Jul  1 12:25:19 2019 +1000

mesa: save/restore SSO flag when using ARB_get_program_binary

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")

Reviewed-by: Jordan Justen <[email protected]>
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-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to