diff options
author | Marek Olšák <[email protected]> | 2018-10-06 22:44:36 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-10-16 17:23:25 -0400 |
commit | fcc70e4855c3bde3cadce9d0d1abf8da7106f643 (patch) | |
tree | 6c0ccaa5d5dcb71e083930cf5376d2ff57fda8c9 /src/gallium/drivers/radeonsi/si_state.h | |
parent | 25ddb15cfe36ff0d1f47e7b34161b545e6f329a8 (diff) |
radeonsi: track context rolls better for the Vega scissor bug workaround
We should get fewer context rolls with the SET_CONTEXT_REG optimization,
but it would have been for nothing if the scissor state rolled the context
anyway. Don't emit the scissor state if there is no context roll.
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index f52296d1119..83589e6918c 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -171,17 +171,13 @@ union si_state { #define SI_STATE_BIT(name) (1 << SI_STATE_IDX(name)) #define SI_NUM_STATES (sizeof(union si_state) / sizeof(struct si_pm4_state *)) -static inline unsigned si_states_that_roll_context(void) +static inline unsigned si_states_that_always_roll_context(void) { return (SI_STATE_BIT(blend) | SI_STATE_BIT(rasterizer) | SI_STATE_BIT(dsa) | SI_STATE_BIT(poly_offset) | - SI_STATE_BIT(es) | - SI_STATE_BIT(gs) | - SI_STATE_BIT(vgt_shader_config) | - SI_STATE_BIT(vs) | - SI_STATE_BIT(ps)); + SI_STATE_BIT(vgt_shader_config)); } union si_state_atoms { @@ -216,25 +212,18 @@ union si_state_atoms { sizeof(struct si_atom))) #define SI_NUM_ATOMS (sizeof(union si_state_atoms)/sizeof(struct si_atom*)) -static inline unsigned si_atoms_that_roll_context(void) +static inline unsigned si_atoms_that_always_roll_context(void) { return (SI_ATOM_BIT(streamout_begin) | SI_ATOM_BIT(streamout_enable) | SI_ATOM_BIT(framebuffer) | SI_ATOM_BIT(msaa_sample_locs) | - SI_ATOM_BIT(db_render_state) | - SI_ATOM_BIT(dpbb_state) | - SI_ATOM_BIT(msaa_config) | SI_ATOM_BIT(sample_mask) | - SI_ATOM_BIT(cb_render_state) | SI_ATOM_BIT(blend_color) | - SI_ATOM_BIT(clip_regs) | SI_ATOM_BIT(clip_state) | - SI_ATOM_BIT(guardband) | SI_ATOM_BIT(scissors) | SI_ATOM_BIT(viewports) | SI_ATOM_BIT(stencil_ref) | - SI_ATOM_BIT(spi_map) | SI_ATOM_BIT(scratch_state)); } |