diff --git a/.pick_status.json b/.pick_status.json index c827f26c1bb..26a4c5499d6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1364,7 +1364,7 @@ "description": "radeonsi: disable streamout queries for u_blitter", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 770793afc06..ae1d99e11f2 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -80,6 +80,9 @@ void si_blitter_begin(struct si_context *sctx, enum si_blitter_op op) /* Force-disable fbfetch because there are unsolvable recursion problems with u_blitter. */ si_force_disable_ps_colorbuf0_slot(sctx); + /* This disables streamout queries. See si_get_streamout_enable_state. */ + si_mark_atom_dirty(sctx, &sctx->atoms.s.streamout_enable); + sctx->blitter_running = true; } @@ -108,6 +111,9 @@ void si_blitter_end(struct si_context *sctx) sctx->vertex_buffers_dirty = sctx->num_vertex_elements > 0; si_mark_atom_dirty(sctx, &sctx->atoms.s.gfx_shader_pointers); + /* This re-enables streamout queries. */ + si_mark_atom_dirty(sctx, &sctx->atoms.s.streamout_enable); + /* We force-disabled fbfetch for u_blitter, so recompute the state. */ si_update_ps_colorbuf0_slot(sctx); } diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index c9bc300f714..33b83ed076c 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -1887,6 +1887,9 @@ static inline struct si_shader_ctx_state *si_get_vs(struct si_context *sctx) static inline bool si_get_streamout_enable_state(struct si_context *sctx) { + if (sctx->blitter_running) + return false; + /* For GFX11, return whether NGG streamout queries are enabled. For older gens, return whether * streamout hw is enabled. *