diff options
author | Marek Olšák <[email protected]> | 2019-11-01 21:37:47 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-11-05 23:28:43 -0500 |
commit | abb8011f9d584bc4198d7475d279a6136a9b0403 (patch) | |
tree | 314169aba4147914a55c83f8c5780c3a2b39f5e6 /src/gallium/drivers/radeonsi/si_compute.c | |
parent | 62229e89490efd3ce2208571c4c4ef7ae8741760 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_compute.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 56af2aedbb7..4cadf3e808d 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -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); } |