[Mesa-dev] [PATCH 79/88] glsl: cache more fragment shader state

Timothy Arceri timothy.arceri at collabora.com
Sat Sep 24 05:26:00 UTC 2016


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

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 746817e..849854a 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1044,6 +1044,10 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
             (struct gl_fragment_program *) glprog;
          blob_write_bytes(metadata, fprog->InterpQualifier,
                           sizeof(fprog->InterpQualifier));
+         blob_write_uint32(metadata, fprog->IsCentroid);
+         blob_write_uint32(metadata, fprog->IsSample);
+         blob_write_uint32(metadata, fprog->UsesDFdy);
+         blob_write_uint32(metadata, fprog->UsesKill);
       }
 
       write_shader_parameters(metadata, glprog->Parameters);
@@ -1118,6 +1122,10 @@ read_shader_metadata(struct blob_reader *metadata,
             (struct gl_fragment_program *) glprog;
          blob_copy_bytes(metadata, (uint8_t *) fprog->InterpQualifier,
                          sizeof(fprog->InterpQualifier));
+         fprog->IsCentroid = blob_read_uint32(metadata);
+         fprog->IsSample = blob_read_uint32(metadata);
+         fprog->UsesDFdy = blob_read_uint32(metadata);
+         fprog->UsesKill = blob_read_uint32(metadata);
       }
 
       glprog->Parameters = _mesa_new_parameter_list();
-- 
2.7.4



More information about the mesa-dev mailing list