glsl: fix setting compiled_source_sha1 without a shader cache
We need to set it even if Cache == NULL. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13966>
This commit is contained in:
parent
2785141c16
commit
e2a1883337
|
@ -2316,9 +2316,10 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
|
|||
delete state->symbols;
|
||||
ralloc_free(state);
|
||||
|
||||
if (ctx->Cache && shader->CompileStatus == COMPILE_SUCCESS) {
|
||||
if (shader->CompileStatus == COMPILE_SUCCESS)
|
||||
memcpy(shader->compiled_source_sha1, source_sha1, SHA1_DIGEST_LENGTH);
|
||||
|
||||
if (ctx->Cache && shader->CompileStatus == COMPILE_SUCCESS) {
|
||||
char sha1_buf[41];
|
||||
disk_cache_put_key(ctx->Cache, shader->disk_cache_sha1);
|
||||
if (ctx->_Shader->Flags & GLSL_CACHE_INFO) {
|
||||
|
|
Loading…
Reference in New Issue