softpipe: use util_unreference_framebuffer_state to unref fb state
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 24 Apr 2023 20:24:56 +0000 (16:24 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 3 May 2023 23:45:36 +0000 (23:45 +0000)
Fixes: f5bde99cbdd ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22673>

src/gallium/drivers/softpipe/sp_context.c

index 4d98f90..ef3c9e1 100644 (file)
@@ -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++) {