radeonsi: release NIR in the right place to fix crashes

This commit is contained in:
Marek Olšák 2019-07-24 21:49:36 -04:00
parent 9ac7d0a0e2
commit 665989d98b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}