anv/pipeline: honor the pipeline_cache_enabled run-time flag
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 4 Jul 2018 08:40:15 +0000 (10:40 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 9 Jul 2018 06:40:26 +0000 (08:40 +0200)
v2: merge both conditions to reduce the diff (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_pipeline_cache.c

index d4c7262dc05a3788b569b10f1878079d8936541d..3efa427279d6b29d0c685de9d37c86c8b0a91658 100644 (file)
@@ -571,7 +571,7 @@ anv_device_search_for_kernel(struct anv_device *device,
 
 #ifdef ENABLE_SHADER_CACHE
    struct disk_cache *disk_cache = device->instance->physicalDevice.disk_cache;
-   if (disk_cache) {
+   if (disk_cache && device->instance->pipeline_cache_enabled) {
       cache_key cache_key;
       disk_cache_compute_key(disk_cache, key_data, key_size, cache_key);