diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/util/u_math.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test.h | 3 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_compiler.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 10f158b7086..4e58e505572 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -50,6 +50,10 @@ #include <strings.h> /* for ffs */ #endif +#if defined(_MSC_VER) +#include <intrin.h> +#endif + #ifdef __cplusplus extern "C" { @@ -357,8 +361,6 @@ util_half_inf_sign(int16_t x) #define FFS_DEFINED 1 #if defined(_MSC_VER) && (_M_IX86 || _M_AMD64 || _M_IA64) -unsigned char _BitScanForward(unsigned long* Index, unsigned long Mask); -#pragma intrinsic(_BitScanForward) static inline unsigned long ffs( unsigned long u ) { diff --git a/src/gallium/drivers/llvmpipe/lp_test.h b/src/gallium/drivers/llvmpipe/lp_test.h index e1b51c9c9a6..3d00b01253c 100644 --- a/src/gallium/drivers/llvmpipe/lp_test.h +++ b/src/gallium/drivers/llvmpipe/lp_test.h @@ -71,8 +71,7 @@ test_all(unsigned verbose, FILE *fp); #if defined(PIPE_CC_MSVC) -unsigned __int64 __rdtsc(); -#pragma intrinsic(__rdtsc) +#include <intrin.h> #define rdtsc() __rdtsc() #elif defined(PIPE_CC_GCC) && (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)) diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index c48a55e22fc..832dd659d55 100644 --- a/src/gallium/include/pipe/p_compiler.h +++ b/src/gallium/include/pipe/p_compiler.h @@ -48,6 +48,8 @@ #if defined(_MSC_VER) +#include <intrin.h> + /* Avoid 'expression is always true' warning */ #pragma warning(disable: 4296) @@ -174,8 +176,6 @@ typedef unsigned char boolean; #elif defined(_MSC_VER) -void _ReadWriteBarrier(void); -#pragma intrinsic(_ReadWriteBarrier) #define PIPE_READ_WRITE_BARRIER() _ReadWriteBarrier() #else |