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

Brian Paul brianp at vmware.com
Wed Feb 29 11:18:49 PST 2012

On 02/29/2012 11:45 AM, Mathias Fröhlich wrote:
> 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

Looks great!

Reviewed-by: Brian Paul <brianp at vmware.com>

I think there's some other derived light state that could also be 
pushed down into tnl like _BaseColor, _MatAmbient, etc.  But those are 
far cheaper than the shine table stuff.  We could at least have a 
context flag to allow skipping _mesa_update_material().


More information about the mesa-dev mailing list