radeon/r200: 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:54 +0000 (05:50 +0200)
commitf0391ba6c1eebb9647032f27da7a94559141992b
tree40cada7ae146c52f3ee4b861bf017a0cb925ffba
parentf69a4005132e6e343ed210f288f752587c97f2f4
radeon/r200: Use bitmask/ffs to iterate enabled lights

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/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/radeon/radeon_state.c