glsl: cache some more image metadata
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 30 Mar 2016 23:37:27 +0000 (10:37 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 17 Feb 2017 00:18:43 +0000 (11:18 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/shader_cache.cpp

index 9e55103e50440905a3d65d09019e301ba7aeffd3..2c96966bc31cc6ba8640e8f322b5bc7abcf605ef 100644 (file)
@@ -1095,6 +1095,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);
 }
 
@@ -1113,6 +1118,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);
 }