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@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16903>
This commit is contained in:
Juan A. Suarez Romero 2022-06-07 08:54:34 +02:00 committed by Marge Bot
parent 8381f64251
commit 2c70b1a217
1 changed files with 3 additions and 1 deletions

View File

@ -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)