[Mesa-dev] [PATCH 81/88] glsl: cache tess control shader VerticesOut

Timothy Arceri timothy.arceri at collabora.com
Sat Sep 24 05:26:02 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 849854a..4eb5c37 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1025,6 +1025,10 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
       blob_write_bytes(metadata, shader->ImageUnits,
                        sizeof(shader->ImageUnits));
 
+      if (shader->Stage == MESA_SHADER_TESS_CTRL) {
+         blob_write_uint32(metadata, shader->info.TessCtrl.VerticesOut);
+      }
+
       if (shader->Stage == MESA_SHADER_TESS_EVAL) {
          blob_write_uint32(metadata, shader->info.TessEval.PrimitiveMode);
          blob_write_uint32(metadata, shader->info.TessEval.Spacing);
@@ -1094,6 +1098,10 @@ read_shader_metadata(struct blob_reader *metadata,
       blob_copy_bytes(metadata, (uint8_t *) linked->ImageUnits,
                       sizeof(linked->ImageUnits));
 
+      if (linked->Stage == MESA_SHADER_TESS_CTRL) {
+         linked->info.TessCtrl.VerticesOut = blob_read_uint32(metadata);
+      }
+
       /* Here we load values into both structs. The program struct is used by
        * backends for codegen and the shader struct is used for api queries.
        */
-- 
2.7.4



More information about the mesa-dev mailing list