radv: compute shader hash for shaders created without internal cache

VK_KHR_pipeline_binary allows the application to take full control on
the cache and internal caches (disk or in-memory) can be disabled.

Though the shader hash should still be computed, otherwise all pipeline
binaries have a key with all zeroes.

Fixes: 8802612458 ("radv: advertise VK_KHR_pipeline_binary"
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31163>
This commit is contained in:
Samuel Pitoiset
2024-09-13 15:55:09 +02:00
committed by Marge Bot
parent ad68c83f92
commit 32567f6a2a
+2
View File
@@ -2578,6 +2578,8 @@ radv_shader_create_uncached(struct radv_device *device, const struct radv_shader
}
simple_mtx_init(&shader->replay_mtx, mtx_plain);
_mesa_blake3_compute(binary, binary->total_size, shader->hash);
vk_pipeline_cache_object_init(&device->vk, &shader->base, &radv_shader_ops, shader->hash, sizeof(shader->hash));
shader->info = binary->info;