summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-11-09 16:23:08 -0800
committerDylan Baker <[email protected]>2019-11-05 16:39:55 +0000
commitee4f1bc187536d32c30f4505247750754e27f6e4 (patch)
treee389172df07d3e9ea6f7228ded7e9abbc4a2a105 /src/gallium
parent6b6897a9f9bdf813709a223e31e1eb5a6563686b (diff)
util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIAN
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_soa.c4
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c10
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_gather.c6
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_pack.c12
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_swizzle.c6
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py2
-rw-r--r--src/gallium/auxiliary/util/u_pwr8.h22
-rw-r--r--src/gallium/auxiliary/vl/vl_vlc.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_tri.c8
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c4
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_fragprog.c2
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_vbo.c2
-rw-r--r--src/gallium/drivers/r300/r300_state.c2
-rw-r--r--src/gallium/drivers/r600/r600_pipe_common.h2
-rw-r--r--src/gallium/drivers/r600/r600_texture.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_clear.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h10
-rw-r--r--src/gallium/include/pipe/p_defines.h4
-rw-r--r--src/gallium/include/pipe/p_format.h4
-rw-r--r--src/gallium/state_trackers/osmesa/osmesa.c6
25 files changed, 63 insertions, 63 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 689da73d55d..7c4d49e760e 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -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;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
index 4de75006bf4..938a16519cd 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
@@ -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;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c b/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
index 5adf2815034..fafa67c2619 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
@@ -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), "");
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
index 782d1d907fd..e991b0dc375 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
@@ -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), "");
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 32d6074b994..efc0096a744 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -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
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index b47baa8b32d..e80676d5062 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -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
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_pack.c b/src/gallium/auxiliary/gallivm/lp_bld_pack.c
index 614d582a396..e1f652a9342 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_pack.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_pack.c
@@ -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
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
index ada7af44f01..f89d5fd7433 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
@@ -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;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
index 03194288d44..f3253cf04a2 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
@@ -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);
}
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index ffa28b230ff..6f058475bfe 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -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)
diff --git a/src/gallium/auxiliary/util/u_pwr8.h b/src/gallium/auxiliary/util/u_pwr8.h
index 3dc3611a954..7eb52efd6f5 100644
--- a/src/gallium/auxiliary/util/u_pwr8.h
+++ b/src/gallium/auxiliary/util/u_pwr8.h
@@ -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_ */
diff --git a/src/gallium/auxiliary/vl/vl_vlc.h b/src/gallium/auxiliary/vl/vl_vlc.h
index f5ea6f8fcc2..4c3a5400945 100644
--- a/src/gallium/auxiliary/vl/vl_vlc.h
+++ b/src/gallium/auxiliary/vl/vl_vlc.h
@@ -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
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
index f50afabf723..c479c91dff6 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
@@ -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
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 18771cb05ba..d24a4b4afe7 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -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;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 7a19d4eddab..19a9e427694 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -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;
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c b/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
index 3692d4a665c..065a39921a4 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_fragprog.c
@@ -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
{
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c
index 595db095d91..47797cae726 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c
@@ -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)) {
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 7ac65019467..6396577f03c 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -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;
diff --git a/src/gallium/drivers/r600/r600_pipe_common.h b/src/gallium/drivers/r600/r600_pipe_common.h
index 1fbfeb7971a..2ecd03845e6 100644
--- a/src/gallium/drivers/r600/r600_pipe_common.h
+++ b/src/gallium/drivers/r600/r600_pipe_common.h
@@ -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
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 48fdb5bca37..fea8e609799 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -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
diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c
index 18729470456..63f73e189e0 100644
--- a/src/gallium/drivers/radeonsi/si_clear.c
+++ b/src/gallium/drivers/radeonsi/si_clear.c
@@ -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
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 2606052f378..f313e565d5f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -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;
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 05dd92c0da7..ca98ee55e97 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -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
};
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 273abf85941..910b158cecf 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -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
diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/state_trackers/osmesa/osmesa.c
index 660b4c860fc..36f0f98fbe8 100644
--- a/src/gallium/state_trackers/osmesa/osmesa.c
+++ b/src/gallium/state_trackers/osmesa/osmesa.c
@@ -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;