vulkan/runtime: don't lookup the pipeline disk cache if disabled

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 <lionel.g.landwerlin@intel.com>
Fixes: 591da98779 ("vulkan: Add a common VkPipelineCache implementation")
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19050>
(cherry picked from commit cea113c977)
This commit is contained in:
Lionel Landwerlin
2022-07-21 15:11:20 +03:00
committed by Dylan Baker
parent 688deb2667
commit 19ac65f5ac
2 changed files with 2 additions and 2 deletions

View File

@@ -472,7 +472,7 @@
"description": "vulkan/runtime: don't lookup the pipeline disk cache if disabled",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "591da9877900c56434f9e23e0ad0058b118b0be8"
},

View File

@@ -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);