[Mesa-dev] [PATCH] anv/pipeline_cache: free NIR shader cache

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri Jan 11 12:25:54 UTC 2019


On 11/01/2019 12:05, Iago Toral Quiroga wrote:
> Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR'


Thanks a bunch :


Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>


> ---
>   src/intel/vulkan/anv_pipeline_cache.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c
> index f9733c5309..d96102c287 100644
> --- a/src/intel/vulkan/anv_pipeline_cache.c
> +++ b/src/intel/vulkan/anv_pipeline_cache.c
> @@ -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 *




More information about the mesa-dev mailing list