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>
This commit is contained in:
Lionel Landwerlin 2022-07-21 15:11:20 +03:00 committed by Marge Bot
parent 6558ecf3eb
commit cea113c977

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