radeonsi: unreference framebuffer state after use

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

Fixes: b1b491cdbb ("radeonsi: add a faster clear path for glClearTexImage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5631
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13838>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-11-17 15:40:31 +01:00
parent 5e536c97a9
commit 56382ec071

View file

@ -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;
}