From 665989d98b0ec88cff50f27cab21943193a828a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 24 Jul 2019 21:49:36 -0400 Subject: [PATCH] radeonsi: release NIR in the right place to fix crashes --- src/gallium/drivers/radeonsi/si_compute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2