diff options
author | Marek Olšák <[email protected]> | 2017-01-25 00:09:24 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-01-30 13:27:14 +0100 |
commit | ac059f1c238ff8f9a6a1852ec9c89858e7276700 (patch) | |
tree | 9f06a4e94884b22ed7451dc2c4ea9fd64a2c8b96 /src/gallium/drivers/radeonsi/si_pm4.c | |
parent | 802fcdc0d2997bbcda794ffe8b78d45d29e3ed47 (diff) |
radeonsi: use a bitmask for looping over dirty PM4 states
also move it to draw_vbo, because it should be 0 in most cases
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pm4.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pm4.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c index 97b6799f361..2680439d35e 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -29,8 +29,6 @@ #include "si_pipe.h" #include "sid.h" -#define NUMBER_OF_STATES (sizeof(union si_state) / sizeof(struct si_pm4_state *)) - void si_pm4_cmd_begin(struct si_pm4_state *state, unsigned opcode) { state->last_opcode = opcode; @@ -157,22 +155,10 @@ void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state) } } -void si_pm4_emit_dirty(struct si_context *sctx) -{ - for (int i = 0; i < NUMBER_OF_STATES; ++i) { - struct si_pm4_state *state = sctx->queued.array[i]; - - if (!state || sctx->emitted.array[i] == state) - continue; - - si_pm4_emit(sctx, state); - sctx->emitted.array[i] = state; - } -} - void si_pm4_reset_emitted(struct si_context *sctx) { memset(&sctx->emitted, 0, sizeof(sctx->emitted)); + sctx->dirty_states |= u_bit_consecutive(0, SI_NUM_STATES); } void si_pm4_upload_indirect_buffer(struct si_context *sctx, |