diff options
author | Marek Olšák <[email protected]> | 2015-08-29 00:49:40 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-09-01 21:51:14 +0200 |
commit | 87c1e9e19c6baa8c6fb03b0894c72744a07cde63 (patch) | |
tree | e0cab820884e5a272c876f3fdf0a020fdbbe05aa /src/gallium/drivers/radeonsi/si_pipe.h | |
parent | 2fe040ee61d3c08e8d38c3552ad4e7b5060074a1 (diff) |
radeonsi: use a bitmask for tracking dirty atoms
This mainly removes the cache misses when checking the dirty flags.
Not much else though.
Reviewed-by: Alex Deucher <[email protected]>
Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 5ca83e7a2d2..35104cf7848 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -155,6 +155,7 @@ struct si_context { struct si_shader_selector *fixed_func_tcs_shader; union si_state_atoms atoms; + unsigned dirty_atoms; /* mask */ struct si_framebuffer framebuffer; struct si_vertex_element *vertex_elements; @@ -339,7 +340,12 @@ static inline void si_set_atom_dirty(struct si_context *sctx, struct r600_atom *atom, bool dirty) { - atom->dirty = dirty; + unsigned bit = 1 << (atom->id - 1); + + if (dirty) + sctx->dirty_atoms |= bit; + else + sctx->dirty_atoms &= ~bit; } static inline void |