Module: Mesa Branch: main Commit: 8a22f5c3729c2241b69e6f358bdafa0f098d00bb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a22f5c3729c2241b69e6f358bdafa0f098d00bb
Author: Samuel Pitoiset <[email protected]> Date: Mon Jun 5 15:54:09 2023 +0200 radv: initialize the device cache UUID even if on-disk cache is disabled Otherwise the pipeline cache UUID isn't initialized as well, and the RADV meta shaders cache can be corrupted. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9150 Signed-off-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23439> --- src/amd/vulkan/radv_physical_device.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index 27a1dee1aaa..43796ab3202 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -1989,7 +1989,6 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm marketing_name ? marketing_name : "AMD Unknown", device->rad_info.name, radv_get_compiler_string(device)); -#ifdef ENABLE_SHADER_CACHE if (radv_device_get_cache_uuid(device, device->cache_uuid)) { result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, "cannot generate UUID"); goto fail_wsi; @@ -2001,7 +2000,6 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm char buf[VK_UUID_SIZE * 2 + 1]; mesa_bytes_to_hex(buf, device->cache_uuid, VK_UUID_SIZE); device->vk.disk_cache = disk_cache_create(device->name, buf, 0); -#endif if (!radv_is_conformant(device)) vk_warn_non_conformant_implementation("radv"); @@ -2129,9 +2127,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm fail_perfcounters: ac_destroy_perfcounters(&device->ac_perfcounters); disk_cache_destroy(device->vk.disk_cache); -#ifdef ENABLE_SHADER_CACHE fail_wsi: -#endif device->ws->destroy(device->ws); fail_base: vk_physical_device_finish(&device->vk);
