From 95354d8285c7282858aef98501cb582eda1a17bb Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 24 Apr 2023 16:24:56 -0400 Subject: [PATCH] iris: 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 7a3deb05a6b4d44d5137706b6eef8dd8b6dc2427) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_state.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4c05e1c0b93..46bd4b06c7d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -670,7 +670,7 @@ "description": "iris: 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/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index c888b7690e7..748bea90986 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -7886,10 +7886,7 @@ iris_destroy_state(struct iris_context *ice) pipe_so_target_reference(&ice->state.so_target[i], NULL); } - for (unsigned i = 0; i < ice->state.framebuffer.nr_cbufs; i++) { - pipe_surface_reference(&ice->state.framebuffer.cbufs[i], NULL); - } - pipe_surface_reference(&ice->state.framebuffer.zsbuf, NULL); + util_unreference_framebuffer_state(&ice->state.framebuffer); for (int stage = 0; stage < MESA_SHADER_STAGES; stage++) { struct iris_shader_state *shs = &ice->state.shaders[stage];