Module: Mesa Branch: master Commit: 28e419f00117b223337eaef56067d657342b19c9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28e419f00117b223337eaef56067d657342b19c9
Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Jan 9 08:10:13 2021 -0500 radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653> --- src/gallium/drivers/radeonsi/si_pm4.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c index 6918ae5a11f..c710a1e2e7a 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -142,5 +142,9 @@ void si_pm4_reset_emitted(struct si_context *sctx, bool first_cs) } memset(&sctx->emitted, 0, sizeof(sctx->emitted)); - sctx->dirty_states |= u_bit_consecutive(0, SI_NUM_STATES); + + for (unsigned i = 0; i < SI_NUM_STATES; i++) { + if (sctx->queued.array[i]) + sctx->dirty_states |= BITFIELD_BIT(i); + } } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit