mesa: rename gl_shader::sha1 to disk_cache_sha1

there will be more sha1s

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869>
This commit is contained in:
Marek Olšák
2021-11-18 08:40:29 -05:00
committed by Marge Bot
parent 0bb580754c
commit d473b31fe7
4 changed files with 11 additions and 10 deletions
+5 -5
View File
@@ -2153,11 +2153,11 @@ can_skip_compile(struct gl_context *ctx, struct gl_shader *shader,
if (ctx->Cache) {
char buf[41];
disk_cache_compute_key(ctx->Cache, source, strlen(source),
shader->sha1);
if (disk_cache_has_key(ctx->Cache, shader->sha1)) {
shader->disk_cache_sha1);
if (disk_cache_has_key(ctx->Cache, shader->disk_cache_sha1)) {
/* We've seen this shader before and know it compiles */
if (ctx->_Shader->Flags & GLSL_CACHE_INFO) {
_mesa_sha1_format(buf, shader->sha1);
_mesa_sha1_format(buf, shader->disk_cache_sha1);
fprintf(stderr, "deferring compile of shader: %s\n", buf);
}
shader->CompileStatus = COMPILE_SKIPPED;
@@ -2295,9 +2295,9 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
if (ctx->Cache && shader->CompileStatus == COMPILE_SUCCESS) {
char sha1_buf[41];
disk_cache_put_key(ctx->Cache, shader->sha1);
disk_cache_put_key(ctx->Cache, shader->disk_cache_sha1);
if (ctx->_Shader->Flags & GLSL_CACHE_INFO) {
_mesa_sha1_format(sha1_buf, shader->sha1);
_mesa_sha1_format(sha1_buf, shader->disk_cache_sha1);
fprintf(stderr, "marking shader: %s\n", sha1_buf);
}
}