st/mesa/glsl: build string of dri options and use as input to building sha for shaders

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Timothy Arceri
2017-02-17 10:16:16 +11:00
parent ed61530121
commit 6602d0401c
6 changed files with 66 additions and 0 deletions

View File

@@ -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",