mesa: Use bitmask/ffs to iterate color material attributes.
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:54 +0000 (05:50 +0200)
commitd8a3ac90df67ab1b397b59acdaf4f8e5dc27203a
tree7142c8d577265a862f90651d5621f9e7ed49b5b3
parentd4eb2f9cda1fa08949f8e28ef414bbb41e150459
mesa: Use bitmask/ffs to iterate color material attributes.

Replaces an iterate and test bit in a bitmask loop by a
loop only iterating over the bits set in the 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/light.c
src/mesa/tnl/t_vb_light.c