[Mesa-dev] [PATCH 67/77] glsl: cache more fragment shader state
Timothy Arceri
timothy.arceri at collabora.com
Mon Oct 3 06:05:26 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 304f80e..c4ead81 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1061,6 +1061,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);
@@ -1137,6 +1141,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