summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_compiler.h
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2016-04-18 12:08:35 +0100
committerJose Fonseca <[email protected]>2016-04-26 17:17:00 +0100
commitdcc3baf7331f7cb920a73e0349a7622bfe46f647 (patch)
tree5431ad05455a5252f2d37afc014d0c2454f6a9fd /src/gallium/include/pipe/p_compiler.h
parent9a25c8af1b7fad0e7b3f3f3b4cbf6ae6e32e0e4d (diff)
gallium: Include intrin.h instead of defining ourselves.
More portable, particularly when building with Clang, which implements all MSVC intrisincs in its own intrin.h, but doesn't actually support `#pragma instrinsic`. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_compiler.h')
-rw-r--r--src/gallium/include/pipe/p_compiler.h4
1 files changed, 2 insertions, 2 deletions
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