anv/pipeline_cache: free NIR shader cache
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 11 Jan 2019 11:54:16 +0000 (12:54 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 14 Jan 2019 06:59:27 +0000 (07:59 +0100)
Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR'
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_pipeline_cache.c

index f9733c53098b5da1314ca780a18d584d692e4fdb..d96102c287373eab077771985a74baec0c9dcd3f 100644 (file)
@@ -258,6 +258,13 @@ anv_pipeline_cache_finish(struct anv_pipeline_cache *cache)
 
       _mesa_hash_table_destroy(cache->cache, NULL);
    }
+
+   if (cache->nir_cache) {
+      hash_table_foreach(cache->nir_cache, entry)
+         ralloc_free(entry->data);
+
+      _mesa_hash_table_destroy(cache->nir_cache, NULL);
+   }
 }
 
 static struct anv_shader_bin *