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_state.h | |
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_state.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 915a8eb8e53..bdcfb5b2a3f 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -129,6 +129,8 @@ union si_state { struct si_pm4_state *array[0]; }; +#define SI_NUM_STATES (sizeof(union si_state) / sizeof(struct si_pm4_state *)) + union si_state_atoms { struct { /* The order matters. */ @@ -267,6 +269,7 @@ struct si_buffer_resources { #define si_pm4_bind_state(sctx, member, value) \ do { \ (sctx)->queued.named.member = (value); \ + (sctx)->dirty_states |= 1 << si_pm4_block_idx(member); \ } while(0) #define si_pm4_delete_state(sctx, member, value) \ |