[Mesa-dev] [PATCH 68/77] glsl: cache tess control shader VerticesOut
Timothy Arceri
timothy.arceri at collabora.com
Mon Oct 3 06:05:27 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 c4ead81..18a338c 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1042,6 +1042,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);
@@ -1113,6 +1117,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