mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
util: Fix cpuid on MSVC.
This commit is contained in:
parent
095e66f695
commit
0426227b68
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue