gallium/ntt: Fix leak of the per-instr liveness information.
Fixes: 34cc6a804ec9 ("gallium: Add a nir-to-TGSI pass.")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>
(cherry picked from commit 0367bdbdc465d4568733099dae9f2cc2e3eb2021)
diff --git a/.pick_status.json b/.pick_status.json
index c61d517..5659aa5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -148,7 +148,7 @@
"description": "gallium/ntt: Fix leak of the per-instr liveness information.",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "34cc6a804ec92b5e74cde5b346828874737276a8"
},
diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c
index 35477e1..58dd275 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c
@@ -2185,6 +2185,9 @@
ntt_setup_registers(c, &impl->registers);
ntt_emit_cf_list(c, &impl->body);
+
+ ralloc_free(c->liveness);
+ c->liveness = NULL;
}
static int