aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-10-22 18:09:37 +0100
committerJosé Fonseca <[email protected]>2009-10-22 19:12:13 +0100
commit4797ce0d194720369b46d51733536d02b4a14473 (patch)
treea4752010d0e194a23da94c91a43dcd066eca1eb0 /src
parent1acd891ed31b14ac6c81fd869a681c4b89c7d901 (diff)
util: Set cpu endianness too.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.c2
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.h2
2 files changed, 4 insertions, 0 deletions
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;