From c8d2614113e9ec577b20681d9c43fac0b86b2b65 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 2 Jan 2025 16:33:13 +0100 Subject: [PATCH] radv/meta: fix loading the meta pipeline cache This has been removed by mistake. Fixes: f528c9e8f54 ("radv/meta: stop initializing RT accel structs") Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/meta/radv_meta.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/amd/vulkan/meta/radv_meta.c b/src/amd/vulkan/meta/radv_meta.c index d6f72698bb9..00d01333d58 100644 --- a/src/amd/vulkan/meta/radv_meta.c +++ b/src/amd/vulkan/meta/radv_meta.c @@ -331,16 +331,13 @@ num_cache_entries(VkPipelineCache cache) return s->entries; } -static bool +static void radv_load_meta_pipeline(struct radv_device *device) { -#ifdef _WIN32 - return false; -#else +#ifndef _WIN32 char path[PATH_MAX + 1]; struct stat st; void *data = NULL; - bool ret = false; int fd = -1; struct vk_pipeline_cache *cache = NULL; @@ -376,13 +373,11 @@ fail: if (cache) { device->meta_state.cache = vk_pipeline_cache_to_handle(cache); device->meta_state.initial_cache_entries = num_cache_entries(device->meta_state.cache); - ret = device->meta_state.initial_cache_entries > 0; } free(data); if (fd >= 0) close(fd); - return ret; #endif } @@ -444,6 +439,8 @@ radv_device_init_meta(struct radv_device *device) .pfnFree = meta_free, }; + radv_load_meta_pipeline(device); + result = vk_meta_device_init(&device->vk, &device->meta_state.device); if (result != VK_SUCCESS) return result;