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

Timothy Arceri timothy.arceri at collabora.com
Wed Jul 13 02:48:16 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 437e22e..c661557 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -949,6 +949,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);
@@ -1018,6 +1022,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