Mesa (main): v3d: release all color buffers on context destroy
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 10:23:34 UTC 2022
Module: Mesa
Branch: main
Commit: 2c70b1a21771a4490279dd38fd6744e3c950df58
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c70b1a21771a4490279dd38fd6744e3c950df58
Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date: Tue Jun 7 08:54:34 2022 +0200
v3d: release all color buffers on context destroy
All of them must be released on context destroy, and not only the first
one.
Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16903>
---
src/gallium/drivers/v3d/v3d_context.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c
index c7c6134461d..dd914035643 100644
--- a/src/gallium/drivers/v3d/v3d_context.c
+++ b/src/gallium/drivers/v3d/v3d_context.c
@@ -293,7 +293,9 @@ v3d_context_destroy(struct pipe_context *pctx)
slab_destroy_child(&v3d->transfer_pool);
- pipe_surface_reference(&v3d->framebuffer.cbufs[0], NULL);
+ for (int i = 0; i < v3d->framebuffer.nr_cbufs; i++)
+ pipe_surface_reference(&v3d->framebuffer.cbufs[i], NULL);
+
pipe_surface_reference(&v3d->framebuffer.zsbuf, NULL);
if (v3d->sand8_blit_vs)
More information about the mesa-commit
mailing list