[Mesa-dev] [PATCH 20/88] glsl: cache SSBO uniform storage values

Timothy Arceri timothy.arceri at collabora.com
Sat Sep 24 05:25:01 UTC 2016


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

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 8b33f0e..dd2babe 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -147,6 +147,10 @@ write_uniforms(struct blob *metadata, struct gl_shader_program *prog)
       blob_write_uint32(metadata, prog->UniformStorage[i].array_stride);
       blob_write_uint32(metadata, prog->UniformStorage[i].matrix_stride);
       blob_write_uint32(metadata, prog->UniformStorage[i].row_major);
+      blob_write_uint32(metadata,
+                        prog->UniformStorage[i].top_level_array_size);
+      blob_write_uint32(metadata,
+                        prog->UniformStorage[i].top_level_array_stride);
    }
 }
 
@@ -183,6 +187,8 @@ read_uniforms(struct blob_reader *metadata, struct gl_shader_program *prog)
       uniforms[i].array_stride = blob_read_uint32(metadata);
       uniforms[i].matrix_stride = blob_read_uint32(metadata);
       uniforms[i].row_major = blob_read_uint32(metadata);
+      uniforms[i].top_level_array_size = blob_read_uint32(metadata);
+      uniforms[i].top_level_array_stride = blob_read_uint32(metadata);
       prog->UniformHash->put(i, uniforms[i].name);
    }
 }
-- 
2.7.4



More information about the mesa-dev mailing list