From: José Fonseca Date: Thu, 22 Oct 2009 17:09:37 +0000 (+0100) Subject: util: Set cpu endianness too. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4797ce0d194720369b46d51733536d02b4a14473;p=mesa.git util: Set cpu endianness too. --- diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c index 7330d5dbd07..c93e0db23c3 100644 --- a/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/src/gallium/auxiliary/util/u_cpu_detect.c @@ -394,8 +394,10 @@ util_cpu_detect(void) util_cpu_caps.arch = UTIL_CPU_ARCH_SPARC; #elif defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) util_cpu_caps.arch = UTIL_CPU_ARCH_X86; + util_cpu_caps.little_endian = 1; #elif defined(PIPE_ARCH_PPC) util_cpu_caps.arch = UTIL_CPU_ARCH_POWERPC; + util_cpu_caps.little_endian = 0; #else util_cpu_caps.arch = UTIL_CPU_ARCH_UNKNOWN; #endif diff --git a/src/gallium/auxiliary/util/u_cpu_detect.h b/src/gallium/auxiliary/util/u_cpu_detect.h index 7ea0121c07f..4b3dc39c342 100644 --- a/src/gallium/auxiliary/util/u_cpu_detect.h +++ b/src/gallium/auxiliary/util/u_cpu_detect.h @@ -54,6 +54,8 @@ struct util_cpu_caps { int x86_cpu_type; unsigned cacheline; + unsigned little_endian:1; + unsigned has_tsc:1; unsigned has_mmx:1; unsigned has_mmx2:1;