diff options
author | Eric Anholt <[email protected]> | 2020-03-17 12:45:46 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2020-03-22 20:49:37 -0700 |
commit | 050ec8ff5344b730c521d07d55aa146eb36185ad (patch) | |
tree | 69b90689692e04137ba74743d389fd22e8701c46 /src/compiler/glsl/serialize.cpp | |
parent | 9e3efa429442ef4529843b9e7267d0d117ffa15b (diff) |
glsl: Restore the IsES flag on the shader when reading from cache.
I found that when trying to MESA_SHADER_CAPTURE_PATH a trace, I was
getting "GLSL >= 3.00" for the ES shaders I was trying to capture.
Keeping this metadata in the cached shader program lets us capture
correctly.
Reviewed-by: Timothy Arceri <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4219>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4219>
Diffstat (limited to 'src/compiler/glsl/serialize.cpp')
-rw-r--r-- | src/compiler/glsl/serialize.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/glsl/serialize.cpp b/src/compiler/glsl/serialize.cpp index 23a13ea38bc..11cae46dd8b 100644 --- a/src/compiler/glsl/serialize.cpp +++ b/src/compiler/glsl/serialize.cpp @@ -1256,6 +1256,7 @@ serialize_glsl_program(struct blob *blob, struct gl_context *ctx, write_hash_tables(blob, prog); blob_write_uint32(blob, prog->data->Version); + blob_write_uint32(blob, prog->IsES); blob_write_uint32(blob, prog->data->linked_stages); for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { @@ -1314,6 +1315,7 @@ deserialize_glsl_program(struct blob_reader *blob, struct gl_context *ctx, read_hash_tables(blob, prog); prog->data->Version = blob_read_uint32(blob); + prog->IsES = blob_read_uint32(blob); prog->data->linked_stages = blob_read_uint32(blob); unsigned mask = prog->data->linked_stages; |