summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index c93e0db23c3..623b1fd6945 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -67,6 +67,9 @@
#if defined(PIPE_OS_WINDOWS)
#include <windows.h>
+#if defined(MSVC)
+#include <intrin.h>
+#endif
#endif
@@ -337,6 +340,7 @@ static int has_cpuid(void)
/**
* @sa cpuid.h included in gcc-4.3 onwards.
+ * @sa http://msdn.microsoft.com/en-us/library/hskdteyh.aspx
*/
static INLINE int
cpuid(uint32_t ax, uint32_t *p)
@@ -366,7 +370,7 @@ cpuid(uint32_t ax, uint32_t *p)
);
ret = 0;
#elif defined(PIPE_CC_MSVC)
- __cpuid(ax, p);
+ __cpuid(p, ax);
ret = 0;
#endif