[Mesa-dev] [PATCH 00/29] Make more use of bitmasks

Mathias.Froehlich at gmx.net Mathias.Froehlich at gmx.net
Tue May 24 06:41:56 UTC 2016


From: Mathias Fröhlich <Mathias.Froehlich at gmx.net>

Hi all,

following a series with performance improvements
for cpu/draw bound applications. This part makes
more use of the bitmask/ffs technique for iterating
a set of enabled items. The gains are not huge
but they are noticable for some of my favourite
workloads.

Please review!

Thanks

Mathias



Mathias Fröhlich (29):
  mesa: Add gl_point_attrib::CoordReplaceBits bitfield.
  swrast: Convert swrast to use CoordsReplaceBits.
  gallium: Convert the state_tracker to use CoordsReplaceBits.
  r200: convert r200 to use CoordsReplaceBits.
  i915: Convert i915 to use CoordsReplaceBits.
  i965: Convert i965 to use CoordsReplaceBits.
  mesa: Remove the now unused CoordsReplace array.
  mesa: Rename CoordReplaceBits back to CoordReplace.
  mesa: Track enabled lights in a bitmask
  mesa: Use bitmask/ffs to iterate enabled lights
  mesa: Use bitmask/ffs to iterate enabled lights for building ff shader
    keys.
  tnl: Use bitmask/ffs to iterate enabled lights
  nouveau: Use bitmask/ffs to iterate enabled lights
  radeon/r200: Use bitmask/ffs to iterate enabled lights
  mesa: Switch to bitmask based enabled lights in gen_matypes.c
  mesa: Remove the linked list of enabled lights
  mesa: Use bitmask/ffs to build ff vertex shader keys.
  mesa: Use bitmask/ffs to build ff fragment shader keys.
  mesa: Use bitmask/ffs to iterate color material attributes.
  mesa: Use bitmask/ffs to iterate enabled clip planes.
  radeon/r200: Use bitmask/ffs to iterate enabled clip planes.
  i965: Use bitmask/ffs to iterate enabled clip planes.
  i965: Use bitmask/ffs to iterate used vertex attributes.
  mesa: Use bitmask/ffs to iterate SamplersUsed
  mesa: Use designated bool value to check texture unit completeness.
  mesa: Use bitmask/ffs to iterate the enabled textures.
  mesa: Use bitmask/ffs to iterate the active_samplers bitmask.
  vbo: Use a bitmask to track the active arrays in vbo_exec*.
  vbo: Use a bitmask to track the active arrays in vbo_save*.

 src/mesa/drivers/common/meta.c                |  23 ++--
 src/mesa/drivers/dri/i915/i915_state.c        |  17 ++-
 src/mesa/drivers/dri/i965/brw_curbe.c         |  21 ++--
 src/mesa/drivers/dri/i965/brw_draw.c          |  10 +-
 src/mesa/drivers/dri/i965/brw_sf.c            |   7 +-
 src/mesa/drivers/dri/i965/brw_vs.c            |   6 +-
 src/mesa/drivers/dri/i965/gen6_sf_state.c     |   2 +-
 src/mesa/drivers/dri/nouveau/nouveau_state.c  |  10 +-
 src/mesa/drivers/dri/nouveau/nv10_state_tnl.c |  29 +++--
 src/mesa/drivers/dri/nouveau/nv20_state_tnl.c |  29 +++--
 src/mesa/drivers/dri/r200/r200_state.c        |  67 ++++++------
 src/mesa/drivers/dri/radeon/radeon_state.c    |  66 ++++++------
 src/mesa/main/attrib.c                        |   2 +-
 src/mesa/main/context.c                       |  11 +-
 src/mesa/main/enable.c                        |   6 +-
 src/mesa/main/ff_fragment_shader.cpp          |  10 +-
 src/mesa/main/ffvertex_prog.c                 |  37 ++++---
 src/mesa/main/light.c                         |  72 +++++++++----
 src/mesa/main/matrix.c                        |  19 ++--
 src/mesa/main/mtypes.h                        |   8 +-
 src/mesa/main/points.c                        |   6 +-
 src/mesa/main/rastpos.c                       |  30 +++---
 src/mesa/main/texenv.c                        |  32 +++---
 src/mesa/main/texstate.c                      |  34 +++---
 src/mesa/main/uniform_query.cpp               |   8 +-
 src/mesa/main/uniforms.c                      |  42 ++++----
 src/mesa/state_tracker/st_atom_rasterizer.c   |   8 +-
 src/mesa/swrast/s_points.c                    |   4 +-
 src/mesa/tnl/t_vb_cliptmp.h                   |  54 +++++-----
 src/mesa/tnl/t_vb_light.c                     |  13 ++-
 src/mesa/tnl/t_vb_lighttmp.h                  |  27 +++--
 src/mesa/tnl/t_vb_program.c                   |  65 ++++++-----
 src/mesa/tnl/t_vb_vertex.c                    |  58 +++++-----
 src/mesa/vbo/vbo_exec.h                       |   1 +
 src/mesa/vbo/vbo_exec_api.c                   | 149 ++++++++++++++------------
 src/mesa/vbo/vbo_exec_draw.c                  |   2 +
 src/mesa/vbo/vbo_save.h                       |   2 +
 src/mesa/vbo/vbo_save_api.c                   |  70 +++++++-----
 src/mesa/vbo/vbo_save_draw.c                  |  55 +++++-----
 src/mesa/x86/gen_matypes.c                    |   4 +-
 40 files changed, 598 insertions(+), 518 deletions(-)

-- 
2.5.5



More information about the mesa-dev mailing list