radeonsi: prevent u_blitter recursion in si_update_ps_colorbuf0_slot

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17981>
(cherry picked from commit fddb4eda2f)
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2022-08-10 12:31:35 +02:00
committed by Dylan Baker
parent 0766a4ca0d
commit 16dc6872c3
2 changed files with 2 additions and 2 deletions

View File

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

View File

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