util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIAN
authorDylan Baker <dylan@pnwbakers.com>
Sat, 10 Nov 2018 00:23:08 +0000 (16:23 -0800)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 5 Nov 2019 16:39:55 +0000 (16:39 +0000)
As requested by Tim.

This was generated with:
grep 'PIPE_ARCH_.*_ENDIAN' -rIl | xargs sed -ie 's@PIPE_ARCH_\(.*\)_ENDIAN@UTIL_ARCH_\1_ENDIAN@'g

v2: - add this patch

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
49 files changed:
src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h
src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h
src/amd/addrlib/src/chip/r800/si_gb_reg.h
src/amd/vulkan/vk_format_table.py
src/freedreno/vulkan/vk_format_table.py
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
src/gallium/auxiliary/gallivm/lp_bld_gather.c
src/gallium/auxiliary/gallivm/lp_bld_init.c
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
src/gallium/auxiliary/gallivm/lp_bld_pack.c
src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
src/gallium/auxiliary/util/u_format_pack.py
src/gallium/auxiliary/util/u_pwr8.h
src/gallium/auxiliary/vl/vl_vlc.h
src/gallium/drivers/llvmpipe/lp_rast_tri.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
src/gallium/drivers/nouveau/nv30/nv30_vbo.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r600/r600_pipe_common.h
src/gallium/drivers/r600/r600_texture.c
src/gallium/drivers/radeonsi/si_clear.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_format.h
src/gallium/state_trackers/osmesa/osmesa.c
src/mapi/entry.c
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/r200/r200_blit.c
src/mesa/drivers/dri/r200/r200_texstate.c
src/mesa/drivers/dri/radeon/radeon_blit.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/radeon/radeon_texture.c
src/mesa/drivers/osmesa/osmesa.c
src/mesa/main/format_utils.c
src/mesa/main/formats.c
src/mesa/main/texcompress_bptc.c
src/mesa/main/texcompress_fxt1.c
src/mesa/main/texcompress_s3tc.c
src/mesa/main/texstore.c
src/mesa/swrast/s_renderbuffer.c
src/mesa/swrast/s_triangle.c
src/util/sha1/sha1.c
src/util/u_endian.h
src/util/u_math.h

index a388f4fbac4e4ab2ba2cfb5f35f38f149c28ceef..8526171c7bcda206555b3580137471d7ec36fdf0 100644 (file)
@@ -39,9 +39,9 @@
 //
 #include "util/u_endian.h"
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
 #define LITTLEENDIAN_CPU
-#elif PIPE_ARCH_BIG_ENDIAN
+#elif UTIL_ARCH_BIG_ENDIAN
 #define BIGENDIAN_CPU
 #endif
 
index 3ba49e484350b4b120b2929a32a4bf6e45ead14c..ee49bd883bec4e0336dbf1c526700c6515947df0 100644 (file)
@@ -39,9 +39,9 @@
 //
 #include "util/u_endian.h"
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
 #define LITTLEENDIAN_CPU
-#elif PIPE_ARCH_BIG_ENDIAN
+#elif UTIL_ARCH_BIG_ENDIAN
 #define BIGENDIAN_CPU
 #endif
 
index 3fd69843a3ab03f7c66a9c22a18c35aadd2516e2..e5af4fd2bba4c5a1bb0dc4d367962d1713fba41f 100644 (file)
@@ -40,9 +40,9 @@
 //
 #include "util/u_endian.h"
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
 #define LITTLEENDIAN_CPU
-#elif PIPE_ARCH_BIG_ENDIAN
+#elif UTIL_ARCH_BIG_ENDIAN
 #define BIGENDIAN_CPU
 #endif
 
index 2993b593cc4011757b83b7356fbaae499d4c0ca6..79f51b997b73a4bbc92481ed94fd328819900844 100644 (file)
@@ -80,7 +80,7 @@ def print_channels(format, func):
     if format.nr_channels() <= 1:
         func(format.le_channels, format.le_swizzles)
     else:
-        print('#if PIPE_ARCH_BIG_ENDIAN')
+        print('#if UTIL_ARCH_BIG_ENDIAN')
         func(format.be_channels, format.be_swizzles)
         print('#else')
         func(format.le_channels, format.le_swizzles)
index 7fb685e9cc4f67d15f3e6eeaa11c13867f9e2da1..db9a48ea152105f0b5a7491ddf4b478ffb2a0e1e 100644 (file)
@@ -80,7 +80,7 @@ def print_channels(format, func):
     if format.nr_channels() <= 1:
         func(format.le_channels, format.le_swizzles)
     else:
-        print('#if PIPE_ARCH_BIG_ENDIAN')
+        print('#if UTIL_ARCH_BIG_ENDIAN')
         func(format.be_channels, format.be_swizzles)
         print('#else')
         func(format.le_channels, format.le_swizzles)
index 689da73d55de5addcde5cf829e8b6d1456b412bf..7c4d49e760e26c249821d6f41f54572f8aad7f10 100644 (file)
@@ -926,7 +926,7 @@ static LLVMValueRef
 adjust_mask(struct gallivm_state *gallivm,
             LLVMValueRef mask)
 {
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
    LLVMBuilderRef builder = gallivm->builder;
    LLVMValueRef vertex_id;
    LLVMValueRef clipmask;
index 4de75006bf41fc80b11da995f27fa4360964a2fb..938a16519cd01dab1fa78830b886b1b7249cd95a 100644 (file)
@@ -367,7 +367,7 @@ lp_build_rgba8_to_fi32_soa(struct gallivm_state *gallivm,
 
    /* Decode the input vector components */
    for (chan = 0; chan < 4; ++chan) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       unsigned start = chan*8;
 #else
       unsigned start = (3-chan)*8;
@@ -654,7 +654,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
             unsigned blockbits = type.width;
             unsigned vec_nr;
 
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
             vec_nr = (format_desc->block.bits - (chan_desc.shift + chan_desc.size)) / type.width;
 #else
             vec_nr = chan_desc.shift / type.width;
index 5adf2815034f26bb8a29b2d7093ff215e913333b..fafa67c26192a8b504d657f0eac2758efc6d612e 100644 (file)
@@ -104,7 +104,7 @@ uyvy_to_yuv_soa(struct gallivm_state *gallivm,
 #endif
    {
       LLVMValueRef shift;
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       shift = LLVMBuildMul(builder, i, lp_build_const_int_vec(gallivm, type, 16), "");
       shift = LLVMBuildAdd(builder, shift, lp_build_const_int_vec(gallivm, type, 8), "");
 #else
@@ -114,7 +114,7 @@ uyvy_to_yuv_soa(struct gallivm_state *gallivm,
       *y = LLVMBuildLShr(builder, packed, shift, "");
    }
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    *u = packed;
    *v = LLVMBuildLShr(builder, packed, lp_build_const_int_vec(gallivm, type, 16), "");
 #else
@@ -187,7 +187,7 @@ yuyv_to_yuv_soa(struct gallivm_state *gallivm,
 #endif
    {
       LLVMValueRef shift;
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       shift = LLVMBuildMul(builder, i, lp_build_const_int_vec(gallivm, type, 16), "");
 #else
       shift = LLVMBuildMul(builder, i, lp_build_const_int_vec(gallivm, type, -16), "");
@@ -196,7 +196,7 @@ yuyv_to_yuv_soa(struct gallivm_state *gallivm,
       *y = LLVMBuildLShr(builder, packed, shift, "");
    }
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    *u = LLVMBuildLShr(builder, packed, lp_build_const_int_vec(gallivm, type, 8), "");
    *v = LLVMBuildLShr(builder, packed, lp_build_const_int_vec(gallivm, type, 24), "");
 #else
@@ -334,7 +334,7 @@ rgb_to_rgba_aos(struct gallivm_state *gallivm,
     * Make a 4 x unorm8 vector
     */
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    r = r;
    g = LLVMBuildShl(builder, g, lp_build_const_int_vec(gallivm, type, 8), "");
    b = LLVMBuildShl(builder, b, lp_build_const_int_vec(gallivm, type, 16), "");
index 782d1d907fd8e224336b940ee7785ccefb35e98f..e991b0dc375580dda873afe84dc3dcb904e80f90 100644 (file)
@@ -141,7 +141,7 @@ lp_build_gather_elem(struct gallivm_state *gallivm,
    if (src_width < dst_width) {
       res = LLVMBuildZExt(gallivm->builder, res, dst_elem_type, "");
       if (vector_justify) {
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
          res = LLVMBuildShl(gallivm->builder, res,
                             LLVMConstInt(dst_elem_type, dst_width - src_width, 0), "");
 #endif
@@ -234,7 +234,7 @@ lp_build_gather_elem_vec(struct gallivm_state *gallivm,
           */
          res = LLVMBuildZExt(gallivm->builder, res, dst_elem_type, "");
 
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
          if (vector_justify) {
          res = LLVMBuildShl(gallivm->builder, res,
                             LLVMConstInt(dst_elem_type,
@@ -553,7 +553,7 @@ lp_build_gather(struct gallivm_state *gallivm,
       if (vec_zext) {
          res = LLVMBuildZExt(gallivm->builder, res, res_t, "");
          if (vector_justify) {
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
             unsigned sv = dst_type.width - src_width;
             res = LLVMBuildShl(gallivm->builder, res,
                                lp_build_const_int_vec(gallivm, res_type, sv), "");
index 32d6074b994310f5d9bb3b6e9512a1a901161f0f..efc0096a744be34bc89154058c3bc1674f29bae6 100644 (file)
@@ -369,7 +369,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
       const unsigned pointer_size = 8 * sizeof(void *);
       char layout[512];
       snprintf(layout, sizeof layout, "%c-p:%u:%u:%u-i64:64:64-a0:0:%u-s0:%u:%u",
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                     'e', // little endian
 #else
                     'E', // big endian
index b47baa8b32dc9d9a92a3fc6752cdb241061b22bb..e80676d5062fde756c074e2d0fed9b43c1a0fa74 100644 (file)
@@ -456,7 +456,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
     * when not using MCJIT so no instructions are generated which the old JIT
     * can't handle. Not entirely sure if we really need to do anything yet.
     */
-#if PIPE_ARCH_LITTLE_ENDIAN  && defined(PIPE_ARCH_PPC_64)
+#if UTIL_ARCH_LITTLE_ENDIAN  && defined(PIPE_ARCH_PPC_64)
    /*
     * Versions of LLVM prior to 4.0 lacked a table entry for "POWER8NVL",
     * resulting in (big-endian) "generic" being returned on
index 614d582a396ad059d9a49569d14b1d805ac567c2..e1f652a9342b3fa164c488aadfe6bacdf85332a1 100644 (file)
@@ -166,7 +166,7 @@ lp_build_const_pack_shuffle(struct gallivm_state *gallivm, unsigned n)
    assert(n <= LP_MAX_VECTOR_LENGTH);
 
    for(i = 0; i < n; ++i)
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       elems[i] = lp_build_const_int32(gallivm, 2*i);
 #else
       elems[i] = lp_build_const_int32(gallivm, 2*i+1);
@@ -429,7 +429,7 @@ lp_build_unpack2(struct gallivm_state *gallivm,
       msb = lp_build_zero(gallivm, src_type);
 
    /* Interleave bits */
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    *dst_lo = lp_build_interleave2(gallivm, src_type, src, msb, 0);
    *dst_hi = lp_build_interleave2(gallivm, src_type, src, msb, 1);
 
@@ -483,7 +483,7 @@ lp_build_unpack2_native(struct gallivm_state *gallivm,
       msb = lp_build_zero(gallivm, src_type);
 
    /* Interleave bits */
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    if (src_type.length * src_type.width == 256 && util_cpu_caps.has_avx2) {
       *dst_lo = lp_build_interleave2_half(gallivm, src_type, src, msb, 0);
       *dst_hi = lp_build_interleave2_half(gallivm, src_type, src, msb, 1);
@@ -606,7 +606,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
             } else {
                intrinsic = "llvm.ppc.altivec.vpkuwus";
             }
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             swap_intrinsic_operands = TRUE;
 #endif
          }
@@ -617,7 +617,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
                intrinsic = "llvm.x86.sse2.packsswb.128";
             } else if (util_cpu_caps.has_altivec) {
                intrinsic = "llvm.ppc.altivec.vpkshss";
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                swap_intrinsic_operands = TRUE;
 #endif
             }
@@ -626,7 +626,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
                intrinsic = "llvm.x86.sse2.packuswb.128";
             } else if (util_cpu_caps.has_altivec) {
                intrinsic = "llvm.ppc.altivec.vpkshus";
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                swap_intrinsic_operands = TRUE;
 #endif
             }
index ada7af44f01ad2e4e0ad6170d915a4721a6b1c7f..f89d5fd74331597e9d837ef17e520f7eaa42cf06 100644 (file)
@@ -602,7 +602,7 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
       r_fpart = LLVMBuildBitCast(builder, r_fpart, u8n_vec_type, "");
 
    for (j = 0; j < u8n.type.length; j += 4) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       unsigned subindex = 0;
 #else
       unsigned subindex = 3;
index 03194288d44b402d27bdf536a53682aa3b59434a..f3253cf04a2c9c158266d5f15eacf1e13444c16b 100644 (file)
@@ -222,7 +222,7 @@ lp_build_swizzle_scalar_aos(struct lp_build_context *bld,
        *                        XX XX XX XX if shift right (shift == -1)
        *
        */
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       shift = channel == 0 ? 1 : -1;
 #else
       shift = channel == 0 ? -1 : 1;
@@ -293,7 +293,7 @@ lp_build_swizzle_scalar_aos(struct lp_build_context *bld,
          int shift = shifts[channel][i];
 
          /* See endianness diagram above */
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
          shift = -shift;
 #endif
 
@@ -519,7 +519,7 @@ lp_build_swizzle_aos(struct lp_build_context *bld,
          for (chan = 0; chan < 4; ++chan) {
             if (swizzles[chan] < 4) {
                /* We need to move channel swizzles[chan] into channel chan */
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                if (swizzles[chan] - chan == -shift) {
                   mask |= ((1ULL << type.width) - 1) << (swizzles[chan] * type.width);
                }
index ffa28b230ff827f464a528966134dd4a28f08ca6..6f058475bfe3dca1cab672f7385727d8d835cdb4 100644 (file)
@@ -70,7 +70,7 @@ def print_channels(format, func):
             format.le_swizzles == format.be_swizzles):
             func(format.le_channels, format.le_swizzles)
         else:
-            print('#if PIPE_ARCH_BIG_ENDIAN')
+            print('#if UTIL_ARCH_BIG_ENDIAN')
             func(format.be_channels, format.be_swizzles)
             print('#else')
             func(format.le_channels, format.le_swizzles)
index 3dc3611a95432743d24367009e2392587c9ecd5d..7eb52efd6f50af05dbe23f7ba0ec4630da9922d4 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef U_PWR8_H_
 #define U_PWR8_H_
 
-#if defined(_ARCH_PWR8) && PIPE_ARCH_LITTLE_ENDIAN
+#if defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN
 
 #define VECTOR_ALIGN_16 __attribute__ ((__aligned__ (16)))
 
@@ -53,7 +53,7 @@ vec_set_epi32 (int i3, int i2, int i1, int i0)
 {
    __m128i_union vdst;
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    vdst.i[0] = i0;
    vdst.i[1] = i1;
    vdst.i[2] = i2;
@@ -78,7 +78,7 @@ static inline __m128i
 vec_unpacklo_epi32 (__m128i even, __m128i odd)
 {
    static const __m128i perm_mask =
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       { 0,  1,  2,  3, 16, 17, 18, 19,  4,  5,  6,  7, 20, 21, 22, 23};
 #else
       {24, 25, 26, 27,  8,  9, 10, 11, 28, 29, 30, 31, 12, 13, 14, 15};
@@ -91,7 +91,7 @@ static inline __m128i
 vec_unpackhi_epi32 (__m128i even, __m128i odd)
 {
    static const __m128i perm_mask =
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       { 8,  9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 31};
 #else
       {16, 17, 18, 19,  0,  1,  2,  3, 20, 21, 22, 23,  4,  5,  6,  7};
@@ -104,7 +104,7 @@ static inline __m128i
 vec_unpacklo_epi64 (__m128i even, __m128i odd)
 {
    static const __m128i perm_mask =
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       { 0,  1,  2,  3,  4,  5,  6,  7, 16, 17, 18, 19, 20, 21, 22, 23};
 #else
       {24, 25, 26, 27, 28, 29, 30, 31,  8,  9, 10, 11, 12, 13, 14, 15};
@@ -117,7 +117,7 @@ static inline __m128i
 vec_unpackhi_epi64 (__m128i even, __m128i odd)
 {
    static const __m128i perm_mask =
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       { 8,  9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31};
 #else
       {16, 17, 18, 19, 20, 21, 22, 23,  0,  1,  2,  3,  4,  5,  6,  7};
@@ -236,7 +236,7 @@ vec_loadu_si128 (const uint32_t* src)
 {
    __m128i_union vsrc;
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
 
    vsrc.m128ui = *((vector unsigned int *) src);
 
@@ -280,7 +280,7 @@ vec_movemask_epi8 (__m128i vsrc)
 
    vtemp.m128i = vec_vgbbd(vsrc);
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    result = vtemp.ub[15] << 8 | vtemp.ub[7];
 #else
    result = vtemp.ub[0] << 8 | vtemp.ub[8];
@@ -292,7 +292,7 @@ vec_movemask_epi8 (__m128i vsrc)
 static inline __m128i
 vec_packs_epi16 (__m128i a, __m128i b)
 {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    return (__m128i) vec_packs ((vector signed short) a,
                                (vector signed short) b);
 #else
@@ -304,13 +304,13 @@ vec_packs_epi16 (__m128i a, __m128i b)
 static inline __m128i
 vec_packs_epi32 (__m128i a, __m128i b)
 {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    return (__m128i) vec_packs ((vector signed int) a, (vector signed int) b);
 #else
    return (__m128i) vec_packs ((vector signed int) b, (vector signed int) a);
 #endif
 }
 
-#endif /* _ARCH_PWR8 && PIPE_ARCH_LITTLE_ENDIAN */
+#endif /* _ARCH_PWR8 && UTIL_ARCH_LITTLE_ENDIAN */
 
 #endif /* U_PWR8_H_ */
index f5ea6f8fcc220aef07df57ff537ae97638c6e9e3..4c3a5400945598674b9a1d8370c49ada0b729f64 100644 (file)
@@ -151,7 +151,7 @@ vl_vlc_fillbits(struct vl_vlc *vlc)
          /* enough bytes in buffer, read in a whole dword */
          uint64_t value = *(const uint32_t*)vlc->data;
 
-#if !PIPE_ARCH_BIG_ENDIAN
+#if !UTIL_ARCH_BIG_ENDIAN
          value = util_bswap32(value);
 #endif
 
index f50afabf7234e4c021d0c923905a43c04775425d..c479c91dff6759cf02076268044086e24c11f728 100644 (file)
@@ -436,7 +436,7 @@ lp_rast_triangle_32_3_4(struct lp_rasterizer_task *task,
 
 #else
 
-#if defined(_ARCH_PWR8) && PIPE_ARCH_LITTLE_ENDIAN
+#if defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN
 
 #include <altivec.h>
 #include "util/u_pwr8.h"
@@ -556,7 +556,7 @@ lp_rast_triangle_32_3_16(struct lp_rasterizer_task *task,
    __m128i vshuf_mask1;
    __m128i vshuf_mask2;
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    vshuf_mask0 = (__m128i) vec_splats((unsigned int) 0x03020100);
    vshuf_mask1 = (__m128i) vec_splats((unsigned int) 0x07060504);
    vshuf_mask2 = (__m128i) vec_splats((unsigned int) 0x0B0A0908);
@@ -662,7 +662,7 @@ lp_rast_triangle_32_3_16(struct lp_rasterizer_task *task,
    lp_rast_triangle_32_3(task, arg2);
 }
 
-#endif /* _ARCH_PWR8 && PIPE_ARCH_LITTLE_ENDIAN */
+#endif /* _ARCH_PWR8 && UTIL_ARCH_LITTLE_ENDIAN */
 
 void
 lp_rast_triangle_32_4_16(struct lp_rasterizer_task *task,
@@ -687,7 +687,7 @@ lp_rast_triangle_32_3_4(struct lp_rasterizer_task *task,
 #if defined PIPE_ARCH_SSE
 #define BUILD_MASKS(c, cdiff, dcdx, dcdy, omask, pmask) build_masks_sse((int)c, (int)cdiff, dcdx, dcdy, omask, pmask)
 #define BUILD_MASK_LINEAR(c, dcdx, dcdy) build_mask_linear_sse((int)c, dcdx, dcdy)
-#elif (defined(_ARCH_PWR8) && PIPE_ARCH_LITTLE_ENDIAN)
+#elif (defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN)
 #define BUILD_MASKS(c, cdiff, dcdx, dcdy, omask, pmask) build_masks_ppc((int)c, (int)cdiff, dcdx, dcdy, omask, pmask)
 #define BUILD_MASK_LINEAR(c, dcdx, dcdy) build_mask_linear_ppc((int)c, dcdx, dcdy)
 #else
index 18771cb05bafa9ab3f42cb9bca64c4b5a91817f3..d24a4b4afe74a88a26930357cd9e499224db8e6a 100644 (file)
@@ -46,7 +46,7 @@
 
 #if defined(PIPE_ARCH_SSE)
 #include <emmintrin.h>
-#elif defined(_ARCH_PWR8) && PIPE_ARCH_LITTLE_ENDIAN
+#elif defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN
 #include <altivec.h>
 #include "util/u_pwr8.h"
 #endif
@@ -489,7 +489,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
       eo = _mm_shuffle_epi32(eo, _MM_SHUFFLE(0,0,0,2));
       plane[2].eo = (uint32_t)_mm_cvtsi128_si32(eo);
    } else
-#elif defined(_ARCH_PWR8) && PIPE_ARCH_LITTLE_ENDIAN
+#elif defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN
    /*
     * XXX this code is effectively disabled for all practical purposes,
     * as the allowed fb size is tiny if FIXED_ORDER is 8.
@@ -513,7 +513,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
       __m128i zero = vec_splats((unsigned char) 0);
       PIPE_ALIGN_VAR(16) int32_t temp_vec[4];
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       vshuf_mask.i[0] = 0x07060504;
       vshuf_mask.i[1] = 0x0B0A0908;
       vshuf_mask.i[2] = 0x03020100;
index 7a19d4eddab81e17ab6a5ff0f0f355764ed8c978..19a9e4276943743865d18b0d72c5fce757e7597c 100644 (file)
@@ -1399,7 +1399,7 @@ convert_to_blend_type(struct gallivm_state *gallivm,
       for (j = 0; j < src_fmt->nr_channels; ++j) {
          unsigned mask = 0;
          unsigned sa = src_fmt->channel[j].shift;
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
          unsigned from_lsb = j;
 #else
          unsigned from_lsb = src_fmt->nr_channels - j - 1;
@@ -1581,7 +1581,7 @@ convert_from_blend_type(struct gallivm_state *gallivm,
       for (j = 0; j < src_fmt->nr_channels; ++j) {
          unsigned mask = 0;
          unsigned sa = src_fmt->channel[j].shift;
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
          unsigned from_lsb = j;
 #else
          unsigned from_lsb = src_fmt->nr_channels - j - 1;
index 3692d4a665cea488a435bd8979d0c06b895378e6..065a39921a4517630f5f15a48b610a8e08c8a381 100644 (file)
@@ -41,7 +41,7 @@ nv30_fragprog_upload(struct nv30_context *nv30)
    if (unlikely(!fp->buffer))
       fp->buffer = pipe_buffer_create(pipe->screen, 0, 0, fp->insn_len * 4);
 
-#if !PIPE_ARCH_BIG_ENDIAN
+#if !UTIL_ARCH_BIG_ENDIAN
    pipe_buffer_write(pipe, fp->buffer, 0, fp->insn_len * 4, fp->insn);
 #else
    {
index 595db095d91c48e3636355d2f02e71d527f83605..47797cae726404e575cf2af9902642794377a958 100644 (file)
@@ -192,7 +192,7 @@ nv30_vbo_validate(struct nv30_context *nv30)
    if (!nv30->vertex || nv30->draw_flags)
       return;
 
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
    if (1) { /* Figure out where the buffers are getting messed up */
 #else
    if (unlikely(vertex->need_conversion)) {
index 7ac65019467f0bacd4b7267efa40c9235164f14d..6396577f03ce313d6d3878af087e0337529df033 100644 (file)
@@ -1157,7 +1157,7 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
     rs->rs_draw.offset_tri = 0;
     rs->rs_draw.offset_clamp = 0;
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
     vap_control_status = R300_VC_NO_SWAP;
 #else
     vap_control_status = R300_VC_32BIT_SWAP;
index 1fbfeb7971aa2bff778fed469838047e94588676..2ecd03845e6afad5edd00505c945091cfa442f50 100644 (file)
@@ -118,7 +118,7 @@ enum r600_coherency {
        R600_COHERENCY_CB_META,
 };
 
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
 #define R600_BIG_ENDIAN 1
 #else
 #define R600_BIG_ENDIAN 0
index 48fdb5bca37fcedb6604ecf9768fec6de8ec00a0..fea8e609799dbbf0553e6bf49470525bcb031abe 100644 (file)
@@ -1771,7 +1771,7 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
        int i;
 
        /* This function is broken in BE, so just disable this path for now */
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
        return;
 #endif
 
index 187294704566d49c9c6d8f37ac1182c17b18e5b3..63f73e189e0245dbc9bf53e972785da49f463d75 100644 (file)
@@ -400,7 +400,7 @@ static void si_do_fast_color_clear(struct si_context *sctx,
        int i;
 
        /* This function is broken in BE, so just disable this path for now */
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
        return;
 #endif
 
index 2606052f378981af9ff28ed2c04fc5b55eae6aaa..f313e565d5ff30c721733fd204bb52171544321a 100644 (file)
@@ -32,7 +32,7 @@
 #include "util/u_idalloc.h"
 #include "util/u_threaded_context.h"
 
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
 #define SI_BIG_ENDIAN 1
 #else
 #define SI_BIG_ENDIAN 0
@@ -760,7 +760,7 @@ struct si_shader_ctx_state {
  */
 union si_vgt_param_key {
        struct {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                unsigned prim:4;
                unsigned uses_instancing:1;
                unsigned multi_instances_smaller_than_primgroup:1;
@@ -771,7 +771,7 @@ union si_vgt_param_key {
                unsigned tess_uses_prim_id:1;
                unsigned uses_gs:1;
                unsigned _pad:32 - SI_NUM_VGT_PARAM_KEY_BITS;
-#else /* PIPE_ARCH_BIG_ENDIAN */
+#else /* UTIL_ARCH_BIG_ENDIAN */
                unsigned _pad:32 - SI_NUM_VGT_PARAM_KEY_BITS;
                unsigned uses_gs:1;
                unsigned tess_uses_prim_id:1;
@@ -795,13 +795,13 @@ union si_vgt_param_key {
  */
 union si_vgt_stages_key {
        struct {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                unsigned tess:1;
                unsigned gs:1;
                unsigned ngg:1; /* gfx10+ */
                unsigned streamout:1; /* only used with NGG */
                unsigned _pad:32 - SI_NUM_VGT_STAGES_KEY_BITS;
-#else /* PIPE_ARCH_BIG_ENDIAN */
+#else /* UTIL_ARCH_BIG_ENDIAN */
                unsigned _pad:32 - SI_NUM_VGT_STAGES_KEY_BITS;
                unsigned streamout:1;
                unsigned ngg:1;
index 05dd92c0da78e7784664deeab4ec3b197c3264fc..ca98ee55e9780031bc7614d223dbcf44c874f610 100644 (file)
@@ -929,9 +929,9 @@ enum pipe_endian
 {
    PIPE_ENDIAN_LITTLE = 0,
    PIPE_ENDIAN_BIG = 1,
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_LITTLE
-#elif PIPE_ARCH_BIG_ENDIAN
+#elif UTIL_ARCH_BIG_ENDIAN
    PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_BIG
 #endif
 };
index 273abf85941b7facd1675137917e9b56924169d1..910b158cecf3c14d33a463eeee69fe2f529eb02b 100644 (file)
@@ -431,7 +431,7 @@ enum pipe_format {
    PIPE_FORMAT_COUNT
 };
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
 #define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
 #define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
 #define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
@@ -460,7 +460,7 @@ enum pipe_format {
 #define PIPE_FORMAT_GR1616_UNORM PIPE_FORMAT_G16R16_UNORM
 #define PIPE_FORMAT_RG1616_SNORM PIPE_FORMAT_R16G16_SNORM
 #define PIPE_FORMAT_GR1616_SNORM PIPE_FORMAT_G16R16_SNORM
-#elif PIPE_ARCH_BIG_ENDIAN
+#elif UTIL_ARCH_BIG_ENDIAN
 #define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
 #define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
 #define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
index 660b4c860fc029553e76b53c392606b330cafccf..36f0f98fbe82474251fae768964677b2cdf65e8c 100644 (file)
@@ -191,7 +191,7 @@ osmesa_choose_format(GLenum format, GLenum type)
    switch (format) {
    case OSMESA_RGBA:
       if (type == GL_UNSIGNED_BYTE) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
          return PIPE_FORMAT_R8G8B8A8_UNORM;
 #else
          return PIPE_FORMAT_A8B8G8R8_UNORM;
@@ -209,7 +209,7 @@ osmesa_choose_format(GLenum format, GLenum type)
       break;
    case OSMESA_BGRA:
       if (type == GL_UNSIGNED_BYTE) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
          return PIPE_FORMAT_B8G8R8A8_UNORM;
 #else
          return PIPE_FORMAT_A8R8G8B8_UNORM;
@@ -227,7 +227,7 @@ osmesa_choose_format(GLenum format, GLenum type)
       break;
    case OSMESA_ARGB:
       if (type == GL_UNSIGNED_BYTE) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
          return PIPE_FORMAT_A8R8G8B8_UNORM;
 #else
          return PIPE_FORMAT_B8G8R8A8_UNORM;
index 0105820b06bb986e5a38ef6336e7322f375cfb7a..315829eb30bbd0aed6d07b03ffe4141cdd660a21 100644 (file)
@@ -53,7 +53,7 @@
 #   endif
 #elif defined(USE_X86_64_ASM) && defined(__GNUC__) && defined(USE_ELF_TLS)
 #   include "entry_x86-64_tls.h"
-#elif defined(USE_PPC64LE_ASM) && defined(__GNUC__) && PIPE_ARCH_LITTLE_ENDIAN
+#elif defined(USE_PPC64LE_ASM) && defined(__GNUC__) && UTIL_ARCH_LITTLE_ENDIAN
 #   ifdef USE_ELF_TLS
 #      include "entry_ppc64le_tls.h"
 #   else
index 3fb376c24f0f01aa401c38208001f945195eda58..3a03e4d0b0161fbbad4994268d4e26f78d9bf48e 100644 (file)
@@ -932,7 +932,7 @@ static const struct {
       .image_format = __DRI_IMAGE_FORMAT_R8,
       .mesa_format  =        MESA_FORMAT_L_UNORM8,
    },
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    {
       .image_format = __DRI_IMAGE_FORMAT_GR88,
       .mesa_format  =        MESA_FORMAT_RG_UNORM8,
@@ -958,7 +958,7 @@ static const struct {
       .image_format = __DRI_IMAGE_FORMAT_R16,
       .mesa_format  =        MESA_FORMAT_L_UNORM16,
    },
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    {
       .image_format = __DRI_IMAGE_FORMAT_GR1616,
       .mesa_format  =        MESA_FORMAT_RG_UNORM16,
index 20e8d8a58aedac3460f812e06fc200c81124643a..ae4968fd95e4d32fef8228c432a12169e3c3a0b5 100644 (file)
@@ -43,7 +43,7 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
 {
     /* XXX others? */
     switch (mesa_format) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
     case MESA_FORMAT_B8G8R8A8_UNORM:
     case MESA_FORMAT_B8G8R8X8_UNORM:
     case MESA_FORMAT_B5G6R5_UNORM:
@@ -121,7 +121,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
     assert(height <= 2048);
     assert(offset % 32 == 0);
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
     txformat |= tx_table_le[src_mesa_format].format;
 #else
     txformat |= tx_table_be[src_mesa_format].format;
@@ -170,7 +170,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
            break;
     case MESA_FORMAT_A8B8G8R8_UNORM:
     case MESA_FORMAT_R8G8B8A8_UNORM:
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
        if (dst_mesa_format == MESA_FORMAT_A8B8G8R8_UNORM) {
 #else
        if (dst_mesa_format == MESA_FORMAT_R8G8B8A8_UNORM) {
index 4bbe2c45563da2b7962b62f7075d9f9d4943c2ec..b227fbbfdf925be6e55a7a92a05e19a39630d2b2 100644 (file)
@@ -1308,7 +1308,7 @@ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
 
    if (!t->image_override) {
       if (VALID_FORMAT(firstImage->TexFormat)) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
         const struct tx_table *table = tx_table_le;
 #else
         const struct tx_table *table = tx_table_be;
index 816d624b885e78167c6054ddbed98d719b4a7954..c186e5bbdae52a8eb8ecaea70e037eb08668d330 100644 (file)
@@ -43,7 +43,7 @@ unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
 {
     /* XXX others?  */
     switch (mesa_format) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
     case MESA_FORMAT_B8G8R8A8_UNORM:
     case MESA_FORMAT_B8G8R8X8_UNORM:
     case MESA_FORMAT_B5G6R5_UNORM:
index 2469982ae1390d9cc854fa13c0f57ac500b2a15f..cde35d3abf6047909666a7509375d616efc7274a 100644 (file)
@@ -697,21 +697,21 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
 
     if (mesaVis->redBits == 5)
         rgbFormat =
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
            MESA_FORMAT_B5G6R5_UNORM;
 #else
            MESA_FORMAT_R5G6B5_UNORM;
 #endif
     else if (mesaVis->alphaBits == 0)
         rgbFormat =
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
            MESA_FORMAT_B8G8R8X8_UNORM;
 #else
            MESA_FORMAT_X8R8G8B8_UNORM;
 #endif
     else
         rgbFormat = 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
            MESA_FORMAT_B8G8R8A8_UNORM;
 #else
            MESA_FORMAT_A8R8G8B8_UNORM;
index c8f1b07d31cf57f39903f4411744875a44a43daa..069edc93a42148a18c72dc17f263a7dce03f7a69 100644 (file)
@@ -602,7 +602,7 @@ mesa_format _radeon_texformat_argb1555 = MESA_FORMAT_NONE;
 static void
 radeonInitTextureFormats(void)
 {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
    _radeon_texformat_rgba8888  = MESA_FORMAT_A8B8G8R8_UNORM;
    _radeon_texformat_argb8888  = MESA_FORMAT_B8G8R8A8_UNORM;
    _radeon_texformat_rgb565    = MESA_FORMAT_B5G6R5_UNORM;
index 38a78c7eb39322c478f6135b8c6eef8cc528c9c8..52bd9a148665c5dedd1c46fc481370a5e6f5ff91 100644 (file)
@@ -455,7 +455,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
     */
    if (osmesa->format == OSMESA_RGBA) {
       if (osmesa->DataType == GL_UNSIGNED_BYTE) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
 #else
             rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
@@ -470,7 +470,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    }
    else if (osmesa->format == OSMESA_BGRA) {
       if (osmesa->DataType == GL_UNSIGNED_BYTE) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
 #else
             rb->Format = MESA_FORMAT_A8R8G8B8_UNORM;
@@ -487,7 +487,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    }
    else if (osmesa->format == OSMESA_ARGB) {
       if (osmesa->DataType == GL_UNSIGNED_BYTE) {
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             rb->Format = MESA_FORMAT_A8R8G8B8_UNORM;
 #else
             rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
index f87cbdf11556cb53e0bde106558d17fc84646175..2bdb77c34fccbeaf794819b890df9b76165444f1 100644 (file)
@@ -652,7 +652,7 @@ _mesa_format_convert(void *void_dst, uint32_t dst_format, size_t dst_stride,
 }
 
 static const uint8_t map_identity[7] = { 0, 1, 2, 3, 4, 5, 6 };
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
 static const uint8_t map_3210[7] = { 3, 2, 1, 0, 4, 5, 6 };
 static const uint8_t map_1032[7] = { 1, 0, 3, 2, 4, 5, 6 };
 #endif
@@ -706,14 +706,14 @@ _mesa_format_to_array(mesa_format format, GLenum *type, int *num_components,
             endian = map_identity;
             break;
          case 2:
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             endian = map_identity;
 #else
             endian = map_1032;
 #endif
             break;
          case 4:
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             endian = map_identity;
 #else
             endian = map_3210;
@@ -735,7 +735,7 @@ _mesa_format_to_array(mesa_format format, GLenum *type, int *num_components,
             endian = map_identity;
             break;
          case 2:
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
             endian = map_identity;
 #else
             endian = map_1032;
index 325a1091ac9d801f6c1acbc05cc72ea3a9dbfc5a..77221117dcea15d15338880707aeae190905234f 100644 (file)
@@ -425,7 +425,7 @@ uint32_t
 _mesa_format_to_array_format(mesa_format format)
 {
    const struct mesa_format_info *info = _mesa_get_format_info(format);
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
    if (info->ArrayFormat && info->Layout == MESA_FORMAT_LAYOUT_PACKED)
       return _mesa_array_format_flip_channels(info->ArrayFormat);
    else
@@ -468,7 +468,7 @@ format_array_format_table_init(void)
       if (!info->ArrayFormat)
          continue;
 
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
          array_format = info->ArrayFormat;
 #else
          array_format = _mesa_array_format_flip_channels(info->ArrayFormat);
index d7f4ecf9abb66d19e12eb313c423bf3c6dd884c2..70dc37d889736f871db7f9138b1eed6d035b1e60 100644 (file)
@@ -142,7 +142,7 @@ _mesa_texstore_bptc_rgba_unorm(TEXSTORE_PARAMS)
       tempImageSlices[0] = (GLubyte *) tempImage;
       _mesa_texstore(ctx, dims,
                      baseInternalFormat,
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                      MESA_FORMAT_R8G8B8A8_UNORM,
 #else
                      MESA_FORMAT_A8B8G8R8_UNORM,
index 6642fe7cf0ead3d7a55335a2df743f3869dd51e0..bd284b36113c4182a13cab8649cb899fe66fbb70 100644 (file)
@@ -132,7 +132,7 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS)
       tempImageSlices[0] = (GLubyte *) tempImage;
       _mesa_texstore(ctx, dims,
                      baseInternalFormat,
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                      MESA_FORMAT_R8G8B8A8_UNORM,
 #else
                      MESA_FORMAT_A8B8G8R8_UNORM,
index 3e4b9acd4c6a6ba3397d3b74d64243b32acd9cff..78f03bf29203e36f1015babfbf834e2b26542cc8 100644 (file)
@@ -121,7 +121,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
       tempImageSlices[0] = (GLubyte *) tempImage;
       _mesa_texstore(ctx, dims,
                      baseInternalFormat,
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                      MESA_FORMAT_R8G8B8A8_UNORM,
 #else
                      MESA_FORMAT_A8B8G8R8_UNORM,
@@ -177,7 +177,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
       tempImageSlices[0] = (GLubyte *) tempImage;
       _mesa_texstore(ctx, dims,
                      baseInternalFormat,
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                      MESA_FORMAT_R8G8B8A8_UNORM,
 #else
                      MESA_FORMAT_A8B8G8R8_UNORM,
@@ -232,7 +232,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
       tempImageSlices[0] = (GLubyte *) tempImage;
       _mesa_texstore(ctx, dims,
                      baseInternalFormat,
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
                      MESA_FORMAT_R8G8B8A8_UNORM,
 #else
                      MESA_FORMAT_A8B8G8R8_UNORM,
index 77c4bccbe072d2336a88f02cb7a22ef1b5a45539..9bbac5f1512fb75efdf2165422328a0ffdf10acf 100755 (executable)
@@ -303,7 +303,7 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
    if (srcPacking->SwapBytes ^
        (srcType == GL_UNSIGNED_SHORT_8_8_REV_MESA) ^
        (dstFormat == MESA_FORMAT_YCBCR_REV) ^
-       !PIPE_ARCH_LITTLE_ENDIAN) {
+       !UTIL_ARCH_LITTLE_ENDIAN) {
       GLint img, row;
       for (img = 0; img < srcDepth; img++) {
          GLubyte *dstRow = dstSlices[img];
index 2960a582c27242b50bbcd85ca24a56b7c172dd37..6a0376cfef18c03c6c1c8491dbbf36a1e16f3911 100644 (file)
@@ -78,7 +78,7 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    case GL_RGBA8:
    case GL_RGB10_A2:
    case GL_RGBA12:
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
       rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
 #else
       rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
index cd0897d5e5c8e0a43830d6cfd8b97e414c859faa..e724367ecf0a5f1d974c1de11ce13fc7d74e33bd 100644 (file)
@@ -1108,7 +1108,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
 #if CHAN_BITS != 8
                   USE(general_triangle);
 #else
-                  if (format == MESA_FORMAT_A8B8G8R8_UNORM && !PIPE_ARCH_LITTLE_ENDIAN) {
+                  if (format == MESA_FORMAT_A8B8G8R8_UNORM && !UTIL_ARCH_LITTLE_ENDIAN) {
                      /* We only handle RGBA8888 correctly on little endian
                       * in the optimized code above.
                       */
index 78b3da31d0e00a84c0b0441b111555cbac3c4607..4fe2aa723c5846d9edf96221dc52160a7b841a00 100644 (file)
@@ -25,7 +25,7 @@
  * blk0() and blk() perform the initial expand.
  * I got the idea of expanding during the round function from SSLeay
  */
-#if PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
 # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
     |(rol(block->l[i],8)&0x00FF00FF))
 #else
index 07f8d8cfc850a3ee6f1f1cbae1a612169b0959d8..4e4ba60ca1da308926974f58d2689f965e2de2c4 100644 (file)
 #include <endian.h>
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-# define PIPE_ARCH_LITTLE_ENDIAN 1
-# define PIPE_ARCH_BIG_ENDIAN 0
+# define UTIL_ARCH_LITTLE_ENDIAN 1
+# define UTIL_ARCH_BIG_ENDIAN 0
 #elif __BYTE_ORDER == __BIG_ENDIAN
-# define PIPE_ARCH_LITTLE_ENDIAN 0
-# define PIPE_ARCH_BIG_ENDIAN 1
+# define UTIL_ARCH_LITTLE_ENDIAN 0
+# define UTIL_ARCH_BIG_ENDIAN 1
 #endif
 
 #elif defined(__APPLE__)
 #include <machine/endian.h>
 
 #if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
-# define PIPE_ARCH_LITTLE_ENDIAN 1
-# define PIPE_ARCH_BIG_ENDIAN 0
+# define UTIL_ARCH_LITTLE_ENDIAN 1
+# define UTIL_ARCH_BIG_ENDIAN 0
 #elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
-# define PIPE_ARCH_LITTLE_ENDIAN 0
-# define PIPE_ARCH_BIG_ENDIAN 1
+# define UTIL_ARCH_LITTLE_ENDIAN 0
+# define UTIL_ARCH_BIG_ENDIAN 1
 #endif
 
 #elif defined(__sun)
 #include <sys/isa_defs.h>
 
 #if defined(_LITTLE_ENDIAN)
-# define PIPE_ARCH_LITTLE_ENDIAN 1
-# define PIPE_ARCH_BIG_ENDIAN 0
+# define UTIL_ARCH_LITTLE_ENDIAN 1
+# define UTIL_ARCH_BIG_ENDIAN 0
 #elif defined(_BIG_ENDIAN)
-# define PIPE_ARCH_LITTLE_ENDIAN 0
-# define PIPE_ARCH_BIG_ENDIAN 1
+# define UTIL_ARCH_LITTLE_ENDIAN 0
+# define UTIL_ARCH_BIG_ENDIAN 1
 #endif
 
 #elif defined(__OpenBSD__) || defined(__NetBSD__) || \
 #include <machine/endian.h>
 
 #if _BYTE_ORDER == _LITTLE_ENDIAN
-# define PIPE_ARCH_LITTLE_ENDIAN 1
-# define PIPE_ARCH_BIG_ENDIAN 0
+# define UTIL_ARCH_LITTLE_ENDIAN 1
+# define UTIL_ARCH_BIG_ENDIAN 0
 #elif _BYTE_ORDER == _BIG_ENDIAN
-# define PIPE_ARCH_LITTLE_ENDIAN 0
-# define PIPE_ARCH_BIG_ENDIAN 1
+# define UTIL_ARCH_LITTLE_ENDIAN 0
+# define UTIL_ARCH_BIG_ENDIAN 1
 #endif
 
 #elif defined(_WIN32)
 
-#define PIPE_ARCH_LITTLE_ENDIAN 1
-#define PIPE_ARCH_BIG_ENDIAN 0
+#define UTIL_ARCH_LITTLE_ENDIAN 1
+#define UTIL_ARCH_BIG_ENDIAN 0
 
 #endif
 
index 4c3aafe80ab9e4d366da346d1784d8c440d67a76..4f2658e2897c02926defa9fe47cf79191aac6d2d 100644 (file)
@@ -45,7 +45,7 @@
 #include <stdarg.h>
 
 #include "bitscan.h"
-#include "u_endian.h" /* for PIPE_ARCH_BIG_ENDIAN */
+#include "u_endian.h" /* for UTIL_ARCH_BIG_ENDIAN */
 
 #ifdef __cplusplus
 extern "C" {
@@ -569,7 +569,7 @@ util_bitreverse(unsigned n)
  * Convert from little endian to CPU byte order.
  */
 
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
 #define util_le64_to_cpu(x) util_bswap64(x)
 #define util_le32_to_cpu(x) util_bswap32(x)
 #define util_le16_to_cpu(x) util_bswap16(x)
@@ -627,7 +627,7 @@ util_bswap16(uint16_t n)
 static inline void*
 util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n)
 {
-#if PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
    size_t i, e;
    assert(n % 4 == 0);