From 7eda3da983a32f47862b69ff12beaf3336fbd867 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 13 Jan 2024 15:29:01 -0400 Subject: [PATCH] asahi: plug passthrough tcs leak Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 838caef3b66..aef936217ea 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -2652,6 +2652,11 @@ agx_delete_shader_state(struct pipe_context *ctx, void *cso) } } + for (unsigned i = 0; i < ARRAY_SIZE(so->passthrough_tcs); ++i) { + if (so->passthrough_tcs[i]) + agx_delete_shader_state(ctx, so->passthrough_tcs[i]); + } + ralloc_free(so); }