mesa: Use bitmask/ffs to iterate enabled lights for ff shader keys.
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)
commit664aec437088dbee299499f0539adc3fc9a2386f
treec2735de0e1a5459082551853d1e9757eff4c04c9
parentccb1be2fab853c2d82a2159b049d5975d7fc199d
mesa: Use bitmask/ffs to iterate enabled lights for ff shader keys.

Replaces a loop that iterates 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/main/ffvertex_prog.c