util: Set cpu endianness too.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Oct 2009 17:09:37 +0000 (18:09 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Oct 2009 18:12:13 +0000 (19:12 +0100)
src/gallium/auxiliary/util/u_cpu_detect.c
src/gallium/auxiliary/util/u_cpu_detect.h

index 7330d5dbd07b5c6840720fe8d759e3e201f7c166..c93e0db23c3349cc7e036481d906be2e2ef597b1 100644 (file)
@@ -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
index 7ea0121c07f27d89f1b023440b8bfde83dddb0eb..4b3dc39c3428d610956cd631ef851fdc975b5fa8 100644 (file)
@@ -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;