Mesa (staging/20.3): gallium/ntt: Fix leak of the per-instr liveness information.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 13 00:04:28 UTC 2021


Module: Mesa
Branch: staging/20.3
Commit: ed87818eddb890f2bd281a44b86c6f229b7a3a71
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed87818eddb890f2bd281a44b86c6f229b7a3a71

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 11 10:40:21 2021 -0800

gallium/ntt: Fix leak of the per-instr liveness information.

Fixes: 34cc6a804ec9 ("gallium: Add a nir-to-TGSI pass.")
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>
(cherry picked from commit 0367bdbdc465d4568733099dae9f2cc2e3eb2021)

---

 .pick_status.json                       | 2 +-
 src/gallium/auxiliary/nir/nir_to_tgsi.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index c61d5176396..5659aa5a64c 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 35477e11e89..58dd275d03b 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c
@@ -2185,6 +2185,9 @@ ntt_emit_impl(struct ntt_compile *c, nir_function_impl *impl)
 
    ntt_setup_registers(c, &impl->registers);
    ntt_emit_cf_list(c, &impl->body);
+
+   ralloc_free(c->liveness);
+   c->liveness = NULL;
 }
 
 static int



More information about the mesa-commit mailing list