aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/shader_cache.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-02-17 10:16:16 +1100
committerTimothy Arceri <[email protected]>2017-02-17 11:18:43 +1100
commit6602d0401c23211af122f4ef5a86acf5dd9665e7 (patch)
treecc98dc21d0d7438c2be32cdb49667bee81fbe81a /src/compiler/glsl/shader_cache.cpp
parented6153012167fc7176a23f23ee4cccce9cbaee4a (diff)
st/mesa/glsl: build string of dri options and use as input to building sha for shaders
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/shader_cache.cpp')
-rw-r--r--src/compiler/glsl/shader_cache.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index d95f136074e..6e56d86f2ff 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1318,7 +1318,13 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
ctx->API, ctx->Const.GLSLVersion,
ctx->Const.ForceGLSLVersion);
+ /* DRI config options may also change the output from the compiler so
+ * include them as an input to sha1 creation.
+ */
char sha1buf[41];
+ _mesa_sha1_format(sha1buf, ctx->Const.dri_config_options_sha1);
+ ralloc_strcat(&buf, sha1buf);
+
for (unsigned i = 0; i < prog->NumShaders; i++) {
struct gl_shader *sh = prog->Shaders[i];
ralloc_asprintf_append(&buf, "%s: %s\n",