From 67ccf01ff5e6a74bae11623dc74957a21510a3ce 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=UTF-8 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: (cherry picked from commit b1449e3e673db8e2d1b149681f7b57e4efae7620) --- .pick_status.json | 2 +- src/gallium/drivers/i915/i915_context.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 21b40343e6d..4c05e1c0b93 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -679,7 +679,7 @@ "description": "i915: use util_unreference_framebuffer_state to unref fb state", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f5bde99cbdd208916795dc463663ddd97428ecc1" }, diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index dfaa111e725..5c8bcbe1169 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++) {