mesa: Fix and speedup gl_array_object::_MaxElement computation.
authorMathias Fröhlich <Mathias.Froehlich@web.de>
Thu, 29 Dec 2011 12:10:01 +0000 (13:10 +0100)
committerMathias Fröhlich <Mathias.Froehlich@gmx.net>
Fri, 20 Jan 2012 06:24:20 +0000 (07:24 +0100)
commit7a1e941ebee43cb97a2c77fd2269999b202308a2
treef5fbbc32120ab01c039599236ca628131380a002
parent2a207c4bf95312b68093280b97229cc4316f5724
mesa: Fix and speedup gl_array_object::_MaxElement computation.

Use a bitmask approach to compute gl_array_object::_MaxElement.
To make this work correctly depending on the shader type actually used,
make use of the newly introduced typed bitmask getters.
With this change I gain about 5% draw time on some osgviewer examples.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/arrayobj.c
src/mesa/main/state.c