diff options
author | Dylan Baker <[email protected]> | 2018-11-09 16:23:08 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-11-05 16:39:55 +0000 |
commit | ee4f1bc187536d32c30f4505247750754e27f6e4 (patch) | |
tree | e389172df07d3e9ea6f7228ded7e9abbc4a2a105 /src/gallium/auxiliary/gallivm | |
parent | 6b6897a9f9bdf813709a223e31e1eb5a6563686b (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/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_format_soa.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c | 10 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_gather.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_pack.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_swizzle.c | 6 |
8 files changed, 22 insertions, 22 deletions
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); } |