anv/pipeline_cache: Allow for an zero-sized cache
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 6 Jun 2016 18:20:44 +0000 (11:20 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 10 Jun 2016 16:43:10 +0000 (09:43 -0700)
This gets ANV_ENABLE_PIPELINE_CACHE=false working again.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_pipeline_cache.c

index f75c4233d47a052854cd1229ba6e7f8e7817b0d4..6af15d440c4e256f45c7bfe7668aeded8ab507c7 100644 (file)
@@ -158,7 +158,10 @@ anv_pipeline_cache_search_unlocked(struct anv_pipeline_cache *cache,
       }
    }
 
-   unreachable("hash table should never be full");
+   /* This can happen if the pipeline cache is disabled via
+    * ANV_ENABLE_PIPELINE_CACHE=false
+    */
+   return NO_KERNEL;
 }
 
 uint32_t