panfrost: Release the ctx->pipe_framebuffer ref
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 6 Nov 2019 14:52:45 +0000 (15:52 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Thu, 7 Nov 2019 07:33:08 +0000 (08:33 +0100)
ctx->pipe_framebuffer contains the last bound FB state, let's release
resources pointed by this FB state when the context is destroyed.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c

index 46fce94eff58d15cb8f88f9c85a7613fdaab4d40..c9aace9f98268687d33b4c5665cbba60bdebd4bb 100644 (file)
@@ -2448,6 +2448,7 @@ panfrost_destroy(struct pipe_context *pipe)
         if (panfrost->blitter_wallpaper)
                 util_blitter_destroy(panfrost->blitter_wallpaper);
 
+        util_unreference_framebuffer_state(&panfrost->pipe_framebuffer);
         u_upload_destroy(pipe->stream_uploader);
 
         ralloc_free(pipe);