From cea113c97705ea659821a8cc8c330ded4c2e477a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 21 Jul 2022 15:11:20 +0300 Subject: [PATCH] vulkan/runtime: don't lookup the pipeline disk cache if disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the Anv pipeline got migrated to the runtime, we gain/lost a bit of functionality which is that the disk cache is always read regardless of VK_ENABLE_PIPELINE_CACHE=0. This change brings the old behavior back. Signed-off-by: Lionel Landwerlin Fixes: 591da9877900c ("vulkan: Add a common VkPipelineCache implementation") Reviewed-by: Emma Anholt Reviewed-by: Tapani Pälli Part-of: --- src/vulkan/runtime/vk_pipeline_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index 6fa9b3ff632..f837ed3d482 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -337,7 +337,7 @@ vk_pipeline_cache_lookup_object(struct vk_pipeline_cache *cache, if (object == NULL) { #ifdef ENABLE_SHADER_CACHE struct disk_cache *disk_cache = cache->base.device->physical->disk_cache; - if (disk_cache != NULL) { + if (disk_cache != NULL && cache->object_cache != NULL) { cache_key cache_key; disk_cache_compute_key(disk_cache, key_data, key_size, cache_key);