From b1449e3e673db8e2d1b149681f7b57e4efae7620 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 24 Apr 2023 16:24:56 -0400 Subject: [PATCH] i915: use util_unreference_framebuffer_state to unref fb state MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: f5bde99cbdd ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state") Reviewed-by: José Roberto de Souza Reviewed-by: Emma Anholt Part-of: --- src/gallium/drivers/i915/i915_context.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index dfaa111..5c8bcbe 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -152,10 +152,7 @@ i915_destroy(struct pipe_context *pipe) i915->iws->batchbuffer_destroy(i915->batch); /* unbind framebuffer */ - for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { - pipe_surface_reference(&i915->framebuffer.cbufs[i], NULL); - } - pipe_surface_reference(&i915->framebuffer.zsbuf, NULL); + util_unreference_framebuffer_state(&i915->framebuffer); /* unbind constant buffers */ for (i = 0; i < PIPE_SHADER_TYPES; i++) { -- 2.7.4