radv: Do not read from the disk cache with RADV_DEBUG=nocache.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 16 Oct 2017 11:54:02 +0000 (13:54 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 18 Oct 2017 18:37:10 +0000 (20:37 +0200)
Otherwise the flag is borderline useless.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_pipeline_cache.c

index 1e8a703ce233956253869e76db1499e80bf0355a..034dc35af87c96d2dcc67ef8c7698ab486407b6d 100644 (file)
@@ -183,7 +183,8 @@ radv_create_shader_variants_from_pipeline_cache(struct radv_device *device,
                entry = radv_pipeline_cache_search(device->mem_cache, sha1);
 
        if (!entry) {
-               if (!device->physical_device->disk_cache)
+               if (!device->physical_device->disk_cache ||
+                   (device->instance->debug_flags & RADV_DEBUG_NO_CACHE))
                        return false;
 
                uint8_t disk_sha1[20];