[Mesa-dev] [PATCH 37/87] glsl: cache clip distance array size

Timothy Arceri timothy.arceri at collabora.com
Wed Jul 13 02:47:32 UTC 2016


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

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 4b73d04..66007d4 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -895,6 +895,8 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
       blob_write_uint32(metadata, shader->num_samplers);
       blob_write_uint32(metadata, shader->active_samplers);
 
+      blob_write_uint32(metadata, glprog->ClipDistanceArraySize);
+
       if (shader->Stage == MESA_SHADER_FRAGMENT) {
          struct gl_fragment_program *fprog =
             (struct gl_fragment_program *) glprog;
@@ -935,6 +937,8 @@ read_shader_metadata(struct blob_reader *metadata,
       linked->num_samplers = blob_read_uint32(metadata);
       linked->active_samplers = blob_read_uint32(metadata);
 
+      glprog->ClipDistanceArraySize = blob_read_uint32(metadata);
+
       if (linked->Stage == MESA_SHADER_FRAGMENT) {
          struct gl_fragment_program *fprog =
             (struct gl_fragment_program *) glprog;
-- 
2.7.4



More information about the mesa-dev mailing list