From 0426227b68be9ad4ab7ed3591e77f31f3e21fbec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 27 Oct 2009 20:29:19 +0000 Subject: [PATCH] util: Fix cpuid on MSVC. --- src/gallium/auxiliary/util/u_cpu_detect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 +#if defined(MSVC) +#include +#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 -- 2.30.2