mesa/gallium: Move u_bit_scan{,64} from gallium to util.
authorMathias Fröhlich <mathias.froehlich@web.de>
Thu, 9 Jun 2016 04:35:34 +0000 (06:35 +0200)
committerMathias Fröhlich <mathias.froehlich@web.de>
Tue, 14 Jun 2016 03:19:10 +0000 (05:19 +0200)
commitc3b66566760dd44eaeed9e4df13687dc3ee69bd9
treebf72312b4b8cf9e9c5b31909c5a866b8a3c08343
parentfafe026dbe0680c971bf3ba2452954eea84287f2
mesa/gallium: Move u_bit_scan{,64} from gallium to util.

The functions are also useful for mesa.
Introduce src/util/bitscan.{h,c}. Move ffs function
implementations from src/mesa/main/imports.{h,c}.
Move bit scan related functions from
src/gallium/auxiliary/util/u_math.h. Merge platform
handling with what is available from within mesa.

v2: Try to fix MSVC compile.

Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/gallium/auxiliary/util/u_math.h
src/mesa/main/imports.c
src/mesa/main/imports.h
src/util/Makefile.sources
src/util/bitscan.c [new file with mode: 0644]
src/util/bitscan.h [new file with mode: 0644]