tnl: Use bitmask/ffs to iterate enabled lights
authorMathias Fröhlich <mathias.froehlich@web.de>
Sun, 22 May 2016 12:10:19 +0000 (14:10 +0200)
committerMathias Fröhlich <mathias.froehlich@web.de>
Thu, 16 Jun 2016 03:50:53 +0000 (05:50 +0200)
commit9a3fcb010c8ecbcbae0b7b299b64165051b03b85
treed332fa710bf4c2858cf26b398543ef537c46426e
parent664aec437088dbee299499f0539adc3fc9a2386f
tnl: Use bitmask/ffs to iterate enabled lights

Replaces loops that iterate all lights and test
which of them is enabled by a loop only iterating over
the bits set in the enabled bitmask.

v2: Use _mesa_bit_scan{,64} instead of open coding.
v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/mesa/tnl/t_vb_light.c
src/mesa/tnl/t_vb_lighttmp.h