Mesa (master): radv: Do not read from the disk cache with RADV_DEBUG= nocache.

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Wed Oct 18 18:40:49 UTC 2017


Module: Mesa
Branch: master
Commit: fa226e99332d682c82e9e8892e97ae84077043e6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa226e99332d682c82e9e8892e97ae84077043e6

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Mon Oct 16 13:54:02 2017 +0200

radv: Do not read from the disk cache with RADV_DEBUG=nocache.

Otherwise the flag is borderline useless.
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/vulkan/radv_pipeline_cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c
index 1e8a703ce2..034dc35af8 100644
--- a/src/amd/vulkan/radv_pipeline_cache.c
+++ b/src/amd/vulkan/radv_pipeline_cache.c
@@ -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];




More information about the mesa-commit mailing list