[Mesa-dev] [PATCH 69/88] glsl: cache PatchInputsRead and PatchOutputsWritten
Timothy Arceri
timothy.arceri at collabora.com
Sat Sep 24 05:25:50 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 4d0b711..26d1792 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1001,6 +1001,8 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
/* Use the lowest bit to indicate that there is shader_metadata here. */
blob_write_uint64(metadata, glprog->InputsRead << 1 | 1);
blob_write_uint64(metadata, glprog->OutputsWritten);
+ blob_write_uint32(metadata, glprog->PatchInputsRead);
+ blob_write_uint32(metadata, glprog->PatchOutputsWritten);
blob_write_uint32(metadata, glprog->SystemValuesRead);
blob_write_bytes(metadata, glprog->TexturesUsed,
sizeof(glprog->TexturesUsed));
@@ -1057,6 +1059,8 @@ read_shader_metadata(struct blob_reader *metadata,
if (has_shader) {
glprog->InputsRead = has_shader >> 1;
glprog->OutputsWritten = blob_read_uint64(metadata);
+ glprog->PatchInputsRead = blob_read_uint32(metadata);
+ glprog->PatchOutputsWritten = blob_read_uint32(metadata);
glprog->SystemValuesRead = blob_read_uint32(metadata);
blob_copy_bytes(metadata, (uint8_t *) glprog->TexturesUsed,
sizeof(glprog->TexturesUsed));
--
2.7.4
More information about the mesa-dev
mailing list