anv: don't use default pipeline cache for hits for VK_EXT_pipeline_creation_feedback
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 10 Apr 2019 17:28:20 +0000 (18:28 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 10 Apr 2019 17:45:04 +0000 (18:45 +0100)
If the user didn't provide a pipeline cache and we're using the
default internal pipeline cache, then we shouldn't consider a cache
hit for VK_EXT_pipeline_creation_feedback as the application did not
provide a cache.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6601e5d6fc68cd ("anv: implement VK_EXT_pipeline_creation_feedback")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_pipeline_cache.c

index a25b56cf9d1614ba59c2319083063a7a2781589f..bc7dd100e2baa8fccaf2872842790e6dafc9678e 100644 (file)
@@ -621,7 +621,7 @@ anv_device_search_for_kernel(struct anv_device *device,
    if (cache) {
       bin = anv_pipeline_cache_search(cache, key_data, key_size);
       if (bin) {
-         *user_cache_hit = true;
+         *user_cache_hit = cache != &device->default_pipeline_cache;
          return bin;
       }
    }