vulkan: Migrate shader module hash to BLAKE3.

Shaders are the largest thing we hash now, so they benefit from a faster
hash.

Change the field name from `sha1` to `hash` to avoid tying the definition
to a particular algorithm. This doubles down as a precaution against
callers still assuming a 20-byte hash (in which case the compilation will
error out).

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22571>
This commit is contained in:
Tatsuyuki Ishi
2023-04-19 14:43:47 +09:00
committed by Marge Bot
parent e5173e62d7
commit b69a1b4153
4 changed files with 15 additions and 14 deletions

View File

@@ -1099,7 +1099,7 @@ radv_copy_shader_stage_create_info(struct radv_device *device, uint32_t stageCou
vk_object_base_init(&device->vk, &new_module->base, VK_OBJECT_TYPE_SHADER_MODULE);
new_module->nir = NULL;
memcpy(new_module->sha1, module->sha1, sizeof(module->sha1));
memcpy(new_module->hash, module->hash, sizeof(module->hash));
new_module->size = module->size;
memcpy(new_module->data, module->data, module->size);