Mesa (staging/20.0): llvmpipe/nir: free the nir shader
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 20 18:56:30 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: 2f5509c44e0849f826fa8eb0821d0c033aec6280
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f5509c44e0849f826fa8eb0821d0c033aec6280
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Apr 15 10:45:47 2020 +1000
llvmpipe/nir: free the nir shader
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/4563>
(cherry picked from commit befe2ff3a610c468fb0bbb67624cc5b531a3fefe)
---
.pick_status.json | 2 +-
src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 8b5b78d2c71..baf3ea1ba20 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2155,7 +2155,7 @@
"description": "llvmpipe/nir: free the nir shader",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "18f896e55d96c63b11de7ed0cbe484988a1184c5"
},
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 846cdd69ae9..1c81155aac5 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -3138,6 +3138,8 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
/* Delete draw module's data */
draw_delete_fragment_shader(llvmpipe->draw, shader->draw_data);
+ if (shader->base.ir.nir)
+ ralloc_free(shader->base.ir.nir);
assert(shader->variants_cached == 0);
FREE((void *) shader->base.tokens);
FREE(shader);
More information about the mesa-commit
mailing list