From 16dc6872c3eb9b456ad3b5d0f08d1629fd32ac8c Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 10 Aug 2022 12:31:35 +0200 Subject: [PATCH] radeonsi: prevent u_blitter recursion in si_update_ps_colorbuf0_slot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When u_blitter calls util_blitter_restore_fragment_states we may end up in si_update_ps_colorbuf0_slot. This commit makes sure we don't call u_blitter from there. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6921 Cc: mesa-stable Reviewed-by: Marek Olšák Part-of: (cherry picked from commit fddb4eda2f9ee3414746a52a6a2cd0be2a852b67) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_descriptors.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1bdf20b32b6..b9b7ea2eb4d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -670,7 +670,7 @@ "description": "radeonsi: prevent u_blitter recursion in si_update_ps_colorbuf0_slot", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 889ec2dff50..e97f094312a 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -947,7 +947,7 @@ void si_update_ps_colorbuf0_slot(struct si_context *sctx) struct pipe_surface *surf = NULL; /* si_texture_disable_dcc can get us here again. */ - if (sctx->in_update_ps_colorbuf0_slot) { + if (sctx->in_update_ps_colorbuf0_slot || sctx->blitter_running) { assert(!sctx->ps_uses_fbfetch || sctx->framebuffer.state.cbufs[0]); return; }