From d8b3feeb8a35d52354596a645ed4c2af859850f2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 24 Apr 2023 16:24:56 -0400 Subject: [PATCH] softpipe: use util_unreference_framebuffer_state to unref fb state Fixes: f5bde99cbdd ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state") Reviewed-by: Emma Anholt Part-of: (cherry picked from commit 4809274c18e30b5c714bbf1ffeffd167bb44b270) --- .pick_status.json | 2 +- src/gallium/drivers/softpipe/sp_context.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 46bd4b06c7d..9c5adfafc3f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -661,7 +661,7 @@ "description": "softpipe: 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/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 4d98f904c77..ef3c9e160d2 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -83,11 +83,10 @@ softpipe_destroy( struct pipe_context *pipe ) for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { sp_destroy_tile_cache(softpipe->cbuf_cache[i]); - pipe_surface_reference(&softpipe->framebuffer.cbufs[i], NULL); } sp_destroy_tile_cache(softpipe->zsbuf_cache); - pipe_surface_reference(&softpipe->framebuffer.zsbuf, NULL); + util_unreference_framebuffer_state(&softpipe->framebuffer); for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) { for (i = 0; i < ARRAY_SIZE(softpipe->tex_cache[0]); i++) {