[Mesa-dev] [PATCH 21/37] glsl: cache some more image metadata

Timothy Arceri t_arceri at yahoo.com.au
Mon Jan 23 23:13:00 UTC 2017


From: Timothy Arceri <timothy.arceri at collabora.com>

---
 src/compiler/glsl/shader_cache.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 9db4f25..358eb4f 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1056,6 +1056,11 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
                     sizeof(glprog->sh.SamplerTargets));
    blob_write_uint32(metadata, glprog->ShadowSamplers);
 
+   blob_write_bytes(metadata, glprog->sh.ImageAccess,
+                    sizeof(glprog->sh.ImageAccess));
+   blob_write_bytes(metadata, glprog->sh.ImageUnits,
+                    sizeof(glprog->sh.ImageUnits));
+
    write_shader_parameters(metadata, glprog->Parameters);
 }
 
@@ -1074,6 +1079,11 @@ read_shader_metadata(struct blob_reader *metadata,
                    sizeof(glprog->sh.SamplerTargets));
    glprog->ShadowSamplers = blob_read_uint32(metadata);
 
+   blob_copy_bytes(metadata, (uint8_t *) glprog->sh.ImageAccess,
+                   sizeof(glprog->sh.ImageAccess));
+   blob_copy_bytes(metadata, (uint8_t *) glprog->sh.ImageUnits,
+                   sizeof(glprog->sh.ImageUnits));
+
    glprog->Parameters = _mesa_new_parameter_list();
    read_shader_parameters(metadata, glprog->Parameters);
 }
-- 
2.9.3



More information about the mesa-dev mailing list