From 89a97d4ce169f02df16f6c99c3b0ea9b21eb2d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 13 Mar 2026 20:27:30 -0400 Subject: [PATCH] Change remaining SHA-1 occurences to BLAKE3 Acked-by: Alyssa Rosenzweig Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/compiler/glsl/shader_cache.cpp | 2 +- src/util/disk_cache.h | 4 ++-- src/util/tests/cache_test.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index a9ae0eaa839..73479175e6a 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -36,7 +36,7 @@ * such as SSO, attribute bindings, frag data bindings, etc. * * In order to avoid caching any actual IR we use the put_key/get_key support - * in the disk_cache to put the SHA-1 hash for each successfully compiled + * in the disk_cache to put the BLAKE3 hash for each successfully compiled * shader into the cache, and optimisticly return early from glCompileShader * (if the identical shader had been successfully compiled in the past), * in the hope that the final linked shader will be found in the cache. diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h index 172e13b3d6d..94681b78b31 100644 --- a/src/util/disk_cache.h +++ b/src/util/disk_cache.h @@ -156,10 +156,10 @@ disk_cache_get_function_identifier(void *ptr, blake3_hasher *ctx) * a more efficient implementation. * * In all cases, the keys are sequences of 20 bytes. It is anticipated - * that callers will compute appropriate SHA-1 signatures for keys, + * that callers will compute appropriate BLAKE3 signatures for keys, * (though nothing in this implementation directly relies on how the * names are computed). See mesa-blake3.h and _mesa_blake3_compute for - * assistance in computing SHA-1 signatures. + * assistance in computing BLAKE3 signatures. */ struct disk_cache * disk_cache_create(const char *gpu_name, const char *timestamp, diff --git a/src/util/tests/cache_test.cpp b/src/util/tests/cache_test.cpp index ec850a52dc8..f1af9c1bfa7 100644 --- a/src/util/tests/cache_test.cpp +++ b/src/util/tests/cache_test.cpp @@ -331,7 +331,7 @@ test_put_and_get(bool test_cache_size_limit, const char *driver_id) one_KB = (uint8_t *) calloc(1, 1024); - /* Obviously the SHA-1 hash of 1024 zero bytes isn't particularly + /* Obviously the BLAKE3 hash of 1024 zero bytes isn't particularly * interesting. But we do have want to take some special care with * the hash we use here. The issue is that in this artificial case, * (with only three files in the cache), the probability is good