aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/shader_cache.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-01-19 10:45:07 +1100
committerTimothy Arceri <[email protected]>2019-01-19 10:45:07 +1100
commit860a9e4849cfcab7ab0b80ab87864815b442c405 (patch)
treef8c397157e6f1299cb434c16f0594d148183498f /src/compiler/glsl/shader_cache.cpp
parent5486c9d526f393eff4b189e0e0a44eafeedf4407 (diff)
Revert "glsl: be much more aggressive when skipping shader compilation"
This reverts commit 64b8c86d37ebb1e1d286c69d642d52b7bcf051d3. Reverting for now as it was causing some segfaults.
Diffstat (limited to 'src/compiler/glsl/shader_cache.cpp')
-rw-r--r--src/compiler/glsl/shader_cache.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 581098b88f0..879511a9d7c 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -121,15 +121,20 @@ shader_cache_write_program_metadata(struct gl_context *ctx,
if (!cache_item_metadata.keys)
goto fail;
+ char sha1_buf[41];
for (unsigned i = 0; i < prog->NumShaders; i++) {
+ disk_cache_put_key(cache, prog->Shaders[i]->sha1);
memcpy(cache_item_metadata.keys[i], prog->Shaders[i]->sha1,
sizeof(cache_key));
+ if (ctx->_Shader->Flags & GLSL_CACHE_INFO) {
+ _mesa_sha1_format(sha1_buf, prog->Shaders[i]->sha1);
+ fprintf(stderr, "marking shader: %s\n", sha1_buf);
+ }
}
disk_cache_put(cache, prog->data->sha1, metadata.data, metadata.size,
&cache_item_metadata);
- char sha1_buf[41];
if (ctx->_Shader->Flags & GLSL_CACHE_INFO) {
_mesa_sha1_format(sha1_buf, prog->data->sha1);
fprintf(stderr, "putting program metadata in cache: %s\n", sha1_buf);