[Mesa-dev] [PATCH 0/7] Push shine tables into the tnl module

Mathias Fröhlich Mathias.Froehlich at gmx.net
Wed Feb 29 10:45:00 PST 2012


Hi,

The main change of this series it to push the shininess lookup tables 
currently stored in the mesa context down into the swtnl context.
With this change thesse shininess values are no longer needlessly recomputed 
and allocated for all contexts. Instead these tables are only present and 
maintained if they are used in the tnl module.
This change improoves rendering speed for my favorite OpenSceneGraph model by 
about 25% on r600g. Obviously, this model contains too much different shininess 
values for the shininess table cache so that this tables are recomputed so 
often, even if they are no needed at all for any computation in r600g/any 
gallium driver.

Also included are some minor cleanups to variables that are stored in 
main/lighting state but never referenced. These were just noticed while 
thinking about the shininess tables pushdown.

The complete series passes piglit quick on swrast, swrastg and r600g with no 
regressions.

Please Review

Thanks

Mathias


Mathias Fröhlich (7):
  mesa: Remove _CosCutoffNeg from light state.
  mesa: Remove gl_light_attrib::_Flags.
  mesa: Avoid explicit invalidation of shine tables.
  mesa: Avoid using the shine table for _tnl_RasterPos
  mesa: Avoid revalidating shine tables in _tnl_RasterPos.
  mesa: Do not invalidate shine tables in compute light positions.
  mesa: Push the shine table into the tnl module.

 src/mesa/drivers/dri/r200/r200_tcl.c     |    4 +-
 src/mesa/drivers/dri/radeon/radeon_tcl.c |    4 +-
 src/mesa/main/light.c                    |  169 +----------------------------
 src/mesa/main/light.h                    |   23 ----
 src/mesa/main/mtypes.h                   |   21 ----
 src/mesa/tnl/t_context.c                 |   21 ++++-
 src/mesa/tnl/t_context.h                 |   18 +++
 src/mesa/tnl/t_rasterpos.c               |    8 +-
 src/mesa/tnl/t_vb_light.c                |  134 +++++++++++++++++++++++-
 src/mesa/tnl/t_vb_lighttmp.h             |   12 +-
 src/mesa/tnl/tnl.h                       |    3 +
 src/mesa/x86/gen_matypes.c               |    1 -
 12 files changed, 194 insertions(+), 224 deletions(-)

-- 
1.7.7.6


More information about the mesa-dev mailing list