Rename sha words to blake3

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
This commit is contained in:
Marek Olšák 2026-03-12 22:09:29 -04:00 committed by Marge Bot
parent d4831aaf5f
commit 282bd2e6db
3 changed files with 5 additions and 5 deletions

View file

@ -169,7 +169,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
}
/* SSO has an effect on the linked program so include this when generating
* the sha also.
* the blake3 also.
*/
ralloc_asprintf_append(&buf, "sso: %s\n",
prog->SeparateShader ? "T" : "F");

View file

@ -331,7 +331,7 @@ iris_disk_cache_init(struct iris_screen *screen)
if (INTEL_DEBUG(DEBUG_DISK_CACHE_DISABLE_MASK))
return;
/* array length = strlen("iris_") + sha + nul char */
/* array length = strlen("iris_") + blake3 + nul char */
char renderer[5 + 40 + 1] = {0};
if (screen->brw) {

View file

@ -80,7 +80,7 @@ impl DiskCacheBorrowed {
impl DiskCache {
pub fn new(name: &CStr, func_ptrs: &[*mut c_void], flags: u64) -> Option<Self> {
let mut blake3_ctx = blake3_hasher::default();
let mut sha = [0; BLAKE3_KEY_LEN as usize];
let mut blake3 = [0; BLAKE3_KEY_LEN as usize];
let mut cache_id = [0; BLAKE3_HEX_LEN as usize];
let cache = unsafe {
@ -91,8 +91,8 @@ impl DiskCache {
return None;
}
}
_mesa_blake3_final(&mut blake3_ctx, &mut sha);
mesa_bytes_to_hex(cache_id.as_mut_ptr(), sha.as_ptr(), sha.len() as u32);
_mesa_blake3_final(&mut blake3_ctx, &mut blake3);
mesa_bytes_to_hex(cache_id.as_mut_ptr(), blake3.as_ptr(), blake3.len() as u32);
disk_cache_create(name.as_ptr(), cache_id.as_ptr(), flags)
};