Mesa (staging/20.2): radeonsi: fix a memory leak in si_create_dcc_retile_cs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 3 18:54:42 UTC 2020


Module: Mesa
Branch: staging/20.2
Commit: 2f493068ecf9d28dee4155ae2223deb0a83201a6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f493068ecf9d28dee4155ae2223deb0a83201a6

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Nov 22 03:18:18 2020 -0500

radeonsi: fix a memory leak in si_create_dcc_retile_cs

Fixes: 1f21396431a - radeonsi: add support for displayable DCC for multi-RB chips

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
(cherry picked from commit e64d5cc4d6c0b950883be0882f9b7ad3401965c1)

---

 .pick_status.json                                | 2 +-
 src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 25d4a9ef33c..5d31550846c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1039,7 +1039,7 @@
         "description": "radeonsi: fix a memory leak in si_create_dcc_retile_cs",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "1f21396431a03dc4e5a542628d7d8370973c967f"
     },
diff --git a/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c b/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c
index c1a150d6ab3..e27a94a2e25 100644
--- a/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c
+++ b/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c
@@ -278,6 +278,7 @@ void *si_create_dcc_retile_cs(struct pipe_context *ctx)
 
    void *cs = ctx->create_compute_state(ctx, &state);
    ureg_destroy(ureg);
+   ureg_free_tokens(state.prog);
    return cs;
 }
 



More information about the mesa-commit mailing list