From befe2ff3a610c468fb0bbb67624cc5b531a3fefe Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 15 Apr 2020 10:45:47 +1000 Subject: [PATCH] llvmpipe/nir: free the nir shader Fixes: 18f896e55d96 (llvmpipe: add initial nir support) Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index cb1627849d0..f55cfa9a85d 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -3138,6 +3138,8 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs) /* Delete draw module's data */ draw_delete_fragment_shader(llvmpipe->draw, shader->draw_data); + if (shader->base.ir.nir) + ralloc_free(shader->base.ir.nir); assert(shader->variants_cached == 0); FREE((void *) shader->base.tokens); FREE(shader); -- 2.30.2