[Mesa-dev] [PATCH] radeonsi: stop leaking nir

Nicolai Hähnle nhaehnle at gmail.com
Mon Aug 28 08:32:45 UTC 2017


Thanks!

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


On 28.08.2017 07:02, Timothy Arceri wrote:
> ---
>   src/gallium/drivers/radeonsi/si_state_shaders.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
> index 35bc0db74e..71d798749c 100644
> --- a/src/gallium/drivers/radeonsi/si_state_shaders.c
> +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
> @@ -2477,20 +2477,21 @@ void si_destroy_shader_selector(struct si_context *sctx,
>   	if (sel->main_shader_part_ls)
>   		si_delete_shader(sctx, sel->main_shader_part_ls);
>   	if (sel->main_shader_part_es)
>   		si_delete_shader(sctx, sel->main_shader_part_es);
>   	if (sel->gs_copy_shader)
>   		si_delete_shader(sctx, sel->gs_copy_shader);
>   
>   	util_queue_fence_destroy(&sel->ready);
>   	mtx_destroy(&sel->mutex);
>   	free(sel->tokens);
> +	ralloc_free(sel->nir);
>   	free(sel);
>   }
>   
>   static void si_delete_shader_selector(struct pipe_context *ctx, void *state)
>   {
>   	struct si_context *sctx = (struct si_context *)ctx;
>   	struct si_shader_selector *sel = (struct si_shader_selector *)state;
>   
>   	si_shader_selector_reference(sctx, &sel, NULL);
>   }
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list