From: Christian Gmeiner Date: Mon, 12 Aug 2019 16:40:17 +0000 (+0200) Subject: etnaviv: split destroy_shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1290cc3e27d32ef1b9dc4902c2276ee46a0b7862;p=mesa.git etnaviv: split destroy_shader Signed-off-by: Christian Gmeiner Reviewed-by: Jonathan Marek --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c index 3b8f43c5c2b..97750c7bd35 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c @@ -2535,9 +2535,6 @@ etna_dump_shader(const struct etna_shader_variant *shader) void etna_destroy_shader(struct etna_shader_variant *shader) { - if (DBG_ENABLED(ETNA_DBG_NIR)) - return etna_destroy_shader_nir(shader); - assert(shader); FREE(shader->code); diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c index 1f0d117eac1..2a3a7569da7 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.c +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c @@ -417,7 +417,11 @@ etna_delete_shader_state(struct pipe_context *pctx, void *ss) v = v->next; if (t->bo) etna_bo_del(t->bo); - etna_destroy_shader(t); + + if (DBG_ENABLED(ETNA_DBG_NIR)) + etna_destroy_shader_nir(t); + else + etna_destroy_shader(t); } ralloc_free(shader->nir);