summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/shader_cache.cpp
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2017-03-16 01:09:27 +0200
committerTimothy Arceri <[email protected]>2017-03-21 11:15:52 +1100
commit529a767041c880f90c4465cb34a89430459c7fce (patch)
treeb19c1fcbc36ffe1314155559c7fa52226c8c6e2d /src/compiler/glsl/shader_cache.cpp
parent021c87fa24afe849e51dd0249ec8e7b59e097062 (diff)
util/disk_cache: use a helper to compute cache keys
This will allow to hash additional data into the cache keys or even change the hashing algorithm easily, should we decide to do so. v2: don't try to compute key (and crash) if cache is disabled Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/shader_cache.cpp')
-rw-r--r--src/compiler/glsl/shader_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 4b314d59b0e..dd8c6c0b408 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1331,7 +1331,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
ralloc_asprintf_append(&buf, "%s: %s\n",
_mesa_shader_stage_to_abbrev(sh->Stage), sha1buf);
}
- _mesa_sha1_compute(buf, strlen(buf), prog->data->sha1);
+ disk_cache_compute_key(cache, buf, strlen(buf), prog->data->sha1);
ralloc_free(buf);
size_t size;