From dee8b50cad57eb570194257a5b35744c5d79dd73 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Fri, 3 Sep 2021 16:02:46 -0700 Subject: [PATCH] llvmpipe: Free CS shader images on context destroy. Cc: mesa-stable Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/llvmpipe/lp_state_cs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index e11b67b01f0..f70e7da98fc 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -1443,6 +1443,9 @@ lp_csctx_destroy(struct lp_cs_context *csctx) for (i = 0; i < ARRAY_SIZE(csctx->ssbos); i++) { pipe_resource_reference(&csctx->ssbos[i].current.buffer, NULL); } + for (i = 0; i < ARRAY_SIZE(csctx->images); i++) { + pipe_resource_reference(&csctx->images[i].current.resource, NULL); + } FREE(csctx); }