Mesa (staging/20.1): llvmpipo/nir: free compute shader NIR

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 6 17:43:02 UTC 2020


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue May  5 16:03:34 2020 +1000

llvmpipo/nir: free compute shader NIR

I forgot this in the last round.

Fixes: 18f896e55d96 (llvmpipe: add initial nir support)

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4899>
(cherry picked from commit 870b6a60509e2dd547dc75fee9290224ad306779)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 3b52a19d25c..d2bda8e2cd8 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -724,7 +724,7 @@
         "description": "llvmpipo/nir: free compute shader NIR",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "18f896e55d96c63b11de7ed0cbe484988a1184c5"
     },
diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c
index b57e1068a06..ff767a2a860 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_cs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c
@@ -523,6 +523,8 @@ llvmpipe_delete_compute_state(struct pipe_context *pipe,
       llvmpipe_remove_cs_shader_variant(llvmpipe, li->base);
       li = next;
    }
+   if (shader->base.ir.nir)
+      ralloc_free(shader->base.ir.nir);
    tgsi_free_tokens(shader->base.tokens);
    FREE(shader);
 }



More information about the mesa-commit mailing list