diff options
author | marha <marha@users.sourceforge.net> | 2012-09-04 15:26:24 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-04 15:26:24 +0200 |
commit | 67c4614f29188e4af86e1d88ee82759c896b70b5 (patch) | |
tree | d4f1c1d515dae1ead88d52d9c20369d8141de2f8 /mesalib/src/gallium | |
parent | b86e8562b1ddca2a8bc29f22a79451a041bf5293 (diff) | |
download | vcxsrv-67c4614f29188e4af86e1d88ee82759c896b70b5.tar.gz vcxsrv-67c4614f29188e4af86e1d88ee82759c896b70b5.tar.bz2 vcxsrv-67c4614f29188e4af86e1d88ee82759c896b70b5.zip |
mesa git update 4 sep 2012
Diffstat (limited to 'mesalib/src/gallium')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_cpu_detect.c | 9 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_cpu_detect.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c index e0c8f73c7..d7f0be40e 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c @@ -182,7 +182,7 @@ static int has_cpuid(void) static INLINE void cpuid(uint32_t ax, uint32_t *p) { -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) +#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86) __asm __volatile ( "xchgl %%ebx, %1\n\t" "cpuid\n\t" @@ -193,7 +193,7 @@ cpuid(uint32_t ax, uint32_t *p) "=d" (p[3]) : "0" (ax) ); -#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64) +#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64) __asm __volatile ( "cpuid\n\t" : "=a" (p[0]), @@ -286,6 +286,11 @@ util_cpu_detect(void) util_cpu_caps.cacheline = cacheline; } + if (regs[1] == 0x756e6547 && regs[2] == 0x6c65746e && regs[3] == 0x49656e69) { + /* GenuineIntel */ + util_cpu_caps.has_intel = 1; + } + cpuid(0x80000000, regs); if (regs[0] >= 0x80000001) { diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h index b44d9d9a0..acac68658 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h @@ -52,6 +52,7 @@ struct util_cpu_caps { int x86_cpu_type; unsigned cacheline; + unsigned has_intel:1; unsigned has_tsc:1; unsigned has_mmx:1; unsigned has_mmx2:1; |