From: José Fonseca Date: Tue, 27 Oct 2009 20:29:19 +0000 (+0000) Subject: util: Fix cpuid on MSVC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0426227b68be9ad4ab7ed3591e77f31f3e21fbec;p=mesa.git util: Fix cpuid on MSVC. --- 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