summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.h
diff options
context:
space:
mode:
authorMathias Fröhlich <mathias.froehlich@web.de>2016-06-09 06:35:34 +0200
committerMathias Fröhlich <mathias.froehlich@web.de>2016-06-14 05:19:10 +0200
commitc3b66566760dd44eaeed9e4df13687dc3ee69bd9 (patch)
treebf72312b4b8cf9e9c5b31909c5a866b8a3c08343 /src/mesa/main/imports.h
parentfafe026dbe0680c971bf3ba2452954eea84287f2 (diff)
downloadexternal_mesa3d-c3b66566760dd44eaeed9e4df13687dc3ee69bd9.zip
external_mesa3d-c3b66566760dd44eaeed9e4df13687dc3ee69bd9.tar.gz
external_mesa3d-c3b66566760dd44eaeed9e4df13687dc3ee69bd9.tar.bz2
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>
Diffstat (limited to 'src/mesa/main/imports.h')
-rw-r--r--src/mesa/main/imports.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index d96d666..4ff5941 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -42,6 +42,7 @@
#include "compiler.h"
#include "glheader.h"
#include "errors.h"
+#include "util/bitscan.h"
#ifdef __cplusplus
extern "C" {
@@ -324,22 +325,6 @@ extern void
_mesa_exec_free( void *addr );
-#ifndef FFS_DEFINED
-#define FFS_DEFINED 1
-#ifdef HAVE___BUILTIN_FFS
-#define ffs __builtin_ffs
-#else
-extern int ffs(int i);
-#endif
-
-#ifdef HAVE___BUILTIN_FFSLL
-#define ffsll __builtin_ffsll
-#else
-extern int ffsll(long long int i);
-#endif
-#endif /* FFS_DEFINED */
-
-
#ifdef HAVE___BUILTIN_POPCOUNT
#define _mesa_bitcount(i) __builtin_popcount(i)
#else