projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
095e66f
)
util: Fix cpuid on MSVC.
author
José Fonseca
<jfonseca@vmware.com>
Tue, 27 Oct 2009 20:29:19 +0000
(20:29 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 28 Oct 2009 11:26:26 +0000
(11:26 +0000)
src/gallium/auxiliary/util/u_cpu_detect.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_cpu_detect.c
b/src/gallium/auxiliary/util/u_cpu_detect.c
index c93e0db23c3349cc7e036481d906be2e2ef597b1..623b1fd69456cbb44eaf930048920f568d5b330e 100644
(file)
--- 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