summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-01-09 08:10:13 -0500
committerMarge Bot <eric+marge@anholt.net>2021-01-22 16:45:30 +0000
commit28e419f00117b223337eaef56067d657342b19c9 (patch)
treeef4595185dadadcd3662bf44665f612de81ac0b3
parent488cd3b93fc894689544b0c9b6436b88adc3559a (diff)
radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
-rw-r--r--src/gallium/drivers/radeonsi/si_pm4.c6
1 files changed, 5 insertions, 1 deletions
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);
+ }
}