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;