[Mesa-dev] [PATCH 00/19] Remove all uses of the register mask

Marek Olšák maraeo at gmail.com
Sun Jan 29 11:51:15 PST 2012


Hi everyone,

This is a cleanup in a series of cleanups I am going to make to improve the horribly over-engineered and slow state management of r600g. This particular patch series brings nothing new or special, it's merely a preparation for future work.

This series removes any uses of the register mask, which was used for partial updates of registers. These patches show that sometimes we used it even when we didn't have to, and the few cases that are valid can be handled separately without much effort anyway. The majority of registers don't need this feature.

Later on when we start using a more direct way to emit immutable states, we should be able to bypass r600_pipe_state and memcpy state vectors into the command stream directly. Getting rid of the register mask is a prerequisite for that.

There are no piglit regressions. Tested with RV670, RV730, and REDWOOD.

The patches are also available at:
  git://people.freedesktop.org/~mareko/mesa r600-kill-regmask

Please review.

Marek Olšák (19):
      r600g: don't use register mask for SQ_GPR_RESOURCE_MGMT_1
      r600g: rework and consolidate stencilref state setting
      r600g: cleanup setting DB_SHADER_CONTROL
      r600g: don't use register mask for DB_RENDER_CONTROL
      r600g: use a more clever way to disable per-vertex point size
      r600g: set full register mask for CB_COLOR_CONTROL on evergreen
      r600g: don't set CB_TARGET_MASK in set_framebuffer_state
      r600g: don't use register mask for CB_COLOR_CONTROL on r6xx-r7xx
      r600g: don't add PA_SC_LINE_STIPPLE to rasterizer_state
      r600g: don't use register mask for PA_SU_SC_MODE_CNTL
      r600g: set full register mask for PA_CL_CLIP_CNTL
      r600g: don't use register mask for PA_CL_VS_OUT_CNTL
      r600g: don't use register mask for PA_CL_CLIP_CNTL
      r600g: don't use register mask for TA_CNTL_AUX
      r600g: get rid of the mask parameter in pipe_state_add_reg
      r600g: get rid of the mask in r600_pipe_reg
      r600g: don't use r600_context_reg on evergreen
      r600g: don't use r600_context_reg on r6xx-r7xx
      r600g: get rid of r600_context_reg

 src/gallium/drivers/r600/evergreen_hw_context.c |   30 +-
 src/gallium/drivers/r600/evergreen_state.c      |  721 +++++++++++------------
 src/gallium/drivers/r600/r600.h                 |    9 +-
 src/gallium/drivers/r600/r600_hw_context.c      |   75 +--
 src/gallium/drivers/r600/r600_hw_context_priv.h |    5 +-
 src/gallium/drivers/r600/r600_pipe.h            |   27 +-
 src/gallium/drivers/r600/r600_shader.c          |    1 +
 src/gallium/drivers/r600/r600_shader.h          |    1 +
 src/gallium/drivers/r600/r600_state.c           |  537 ++++++++----------
 src/gallium/drivers/r600/r600_state_common.c    |  157 ++++--
 10 files changed, 758 insertions(+), 805 deletions(-)

Marek


More information about the mesa-dev mailing list