summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/shader_cache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 274bb8c91e7..ea1bc01f028 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1221,7 +1221,8 @@ shader_cache_write_program_metadata(struct gl_context *ctx,
* TODO: In future we should use another method to generate a key for ff
* programs.
*/
- if (*prog->data->sha1 == 0)
+ static const char zero[sizeof(prog->data->sha1)] = {0};
+ if (memcmp(prog->data->sha1, zero, sizeof(prog->data->sha1)) == 0)
return;
struct blob *metadata = blob_create();