From: Marek Olšák Date: Thu, 25 Jul 2019 01:49:36 +0000 (-0400) Subject: radeonsi: release NIR in the right place to fix crashes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=665989d98b0ec88cff50f27cab21943193a828a1;p=mesa.git radeonsi: release NIR in the right place to fix crashes --- diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 4d701e1b81f..360b5a1b510 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -953,6 +953,7 @@ void si_destroy_compute(struct si_compute *program) } si_shader_destroy(&program->shader); + ralloc_free(program->sel.nir); FREE(program); } @@ -969,7 +970,6 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){ if (program == sctx->cs_shader_state.emitted_program) sctx->cs_shader_state.emitted_program = NULL; - ralloc_free(program->sel.nir); si_compute_reference(&program, NULL); }