Mesa (main): radeonsi: unreference framebuffer state after use

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 10:16:54 UTC 2021


Module: Mesa
Branch: main
Commit: 56382ec0711d5531da038346d7ce759c2833e13a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=56382ec0711d5531da038346d7ce759c2833e13a

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Wed Nov 17 15:40:31 2021 +0100

radeonsi: unreference framebuffer state after use

util_copy_framebuffer_state increases refcounts, so we have
to decrement them afterwards.

Fixes: b1b491cdbba ("radeonsi: add a faster clear path for glClearTexImage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5631
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13838>

---

 src/gallium/drivers/radeonsi/si_clear.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c
index 8aa192e197b..d502eecfd70 100644
--- a/src/gallium/drivers/radeonsi/si_clear.c
+++ b/src/gallium/drivers/radeonsi/si_clear.c
@@ -1102,6 +1102,9 @@ static bool si_try_normal_clear(struct si_context *sctx, struct pipe_surface *ds
       ctx->set_framebuffer_state(ctx, &fb);
       ctx->clear(ctx, buffers, NULL, color, depth, stencil);
       ctx->set_framebuffer_state(ctx, &saved_fb);
+
+      util_copy_framebuffer_state(&saved_fb, NULL);
+
       return true;
    }
 



More information about the mesa-commit mailing list