diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 056e2df6e9a..ecdd4da73ca 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -766,6 +766,7 @@ anv_device_upload_nir(struct anv_device *device, */ entry = _mesa_hash_table_search(cache->nir_cache, sha1_key); if (entry) { + blob_finish(&blob); pthread_mutex_unlock(&cache->mutex); return; } @@ -776,6 +777,8 @@ anv_device_upload_nir(struct anv_device *device, snir->size = blob.size; memcpy(snir->data, blob.data, blob.size); + blob_finish(&blob); + _mesa_hash_table_insert(cache->nir_cache, snir->sha1_key, snir); pthread_mutex_unlock(&cache->mutex);