From d349448717dd92a04e23bba85644f85740a88e55 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sat, 14 Aug 2021 23:11:10 +1200 Subject: [PATCH] panfrost: Free TGSI tokens Part-of: --- src/gallium/drivers/panfrost/pan_context.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 5206d17..d9636df 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -327,9 +327,8 @@ panfrost_delete_shader_state( { struct panfrost_shader_variants *cso = (struct panfrost_shader_variants *) so; - if (cso->base.type == PIPE_SHADER_IR_TGSI) { - /* TODO: leaks TGSI tokens! */ - } + if (cso->base.type == PIPE_SHADER_IR_TGSI) + tgsi_free_tokens(cso->base.tokens); for (unsigned i = 0; i < cso->variant_count; ++i) { struct panfrost_shader_state *shader_state = &cso->variants[i]; -- 2.7.4