summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-24 21:49:36 -0400
committerMarek Olšák <[email protected]>2019-07-30 22:06:23 -0400
commit665989d98b0ec88cff50f27cab21943193a828a1 (patch)
treefcb9ba27aaf4d2a0190d6dfe72974263c4b9e782 /src
parent9ac7d0a0e2dedba0f4eb03fcd4a3ffa7b8917eb2 (diff)
radeonsi: release NIR in the right place to fix crashes
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c2
1 files changed, 1 insertions, 1 deletions
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);
}