mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
radeonsi: don't keep compute shader IR after compilation
not needed. We also need to free TGSI in the destroy function for the case when an app is terminated and si_create_compute_state_async is never executed because of util_queue_drop_job. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
62229e8949
commit
abb8011f9d
1 changed files with 5 additions and 2 deletions
|
|
@ -208,8 +208,10 @@ static void si_create_compute_state_async(void *job, int thread_index)
|
|||
simple_mtx_unlock(&sscreen->shader_cache_mutex);
|
||||
}
|
||||
|
||||
if (program->ir_type == PIPE_SHADER_IR_TGSI)
|
||||
FREE(sel->tokens);
|
||||
FREE(sel->tokens);
|
||||
sel->tokens = NULL;
|
||||
ralloc_free(sel->nir);
|
||||
sel->nir = NULL;
|
||||
}
|
||||
|
||||
static void *si_create_compute_state(
|
||||
|
|
@ -974,6 +976,7 @@ void si_destroy_compute(struct si_compute *program)
|
|||
FREE(program->global_buffers);
|
||||
|
||||
si_shader_destroy(&program->shader);
|
||||
FREE(program->sel.tokens);
|
||||
ralloc_free(program->sel.nir);
|
||||
FREE(program);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue