From 1accc0df6401f0253289138e1907b3e3d191fab7 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Fri, 11 Nov 2022 19:04:14 +0800 Subject: [PATCH] tree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use grep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should be the last commit, and should be take care that can only in comment block or version Exclude files: src/util/detect_*.h From: PIPE_(OS|ARCH|CC)_([0-9A-Z_]+) To: DETECT_$1_$2 Signed-off-by: Yonggang Luo Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_sse.h | 2 +- .../drivers/llvmpipe/lp_linear_interp.c | 4 +-- .../drivers/llvmpipe/lp_linear_sampler.c | 4 +-- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 2 +- src/gallium/winsys/svga/drm/vmw_msg.c | 4 +-- src/util/format/u_format_unpack_neon.c | 2 +- src/util/u_cpu_detect.c | 32 +++++++++---------- src/util/u_debug_stack.c | 2 +- src/util/u_debug_symbol.c | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/gallium/auxiliary/util/u_sse.h b/src/gallium/auxiliary/util/u_sse.h index 8916d4bc6c5..4566a2d8b85 100644 --- a/src/gallium/auxiliary/util/u_sse.h +++ b/src/gallium/auxiliary/util/u_sse.h @@ -585,6 +585,6 @@ util_sse2_stretch_row_8unorm(__m128i * restrict dst, -#endif /* PIPE_ARCH_SSE */ +#endif /* DETECT_ARCH_SSE */ #endif /* U_SSE_H_ */ diff --git a/src/gallium/drivers/llvmpipe/lp_linear_interp.c b/src/gallium/drivers/llvmpipe/lp_linear_interp.c index bbbf5a47a07..728531d6d57 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_interp.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_interp.c @@ -228,7 +228,7 @@ lp_linear_init_interp(struct lp_linear_interp *interp, return TRUE; } -#else //PIPE_ARCH_SSE +#else //DETECT_ARCH_SSE boolean lp_linear_init_interp(struct lp_linear_interp *interp, @@ -243,4 +243,4 @@ lp_linear_init_interp(struct lp_linear_interp *interp, return FALSE; } -#endif //PIPE_ARCH_SSE +#endif //DETECT_ARCH_SSE diff --git a/src/gallium/drivers/llvmpipe/lp_linear_sampler.c b/src/gallium/drivers/llvmpipe/lp_linear_sampler.c index 59e324a2fc1..24093f04b15 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_sampler.c @@ -988,7 +988,7 @@ lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, return TRUE; } -#else // PIPE_ARCH_SSE +#else // DETECT_ARCH_SSE boolean lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, @@ -997,4 +997,4 @@ lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, return FALSE; } -#endif // PIPE_ARCH_SSE +#endif // DETECT_ARCH_SSE diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 7525da5f280..9097fbb70e4 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -1026,7 +1026,7 @@ calc_fixed_position(struct lp_setup_context *setup, { float pixel_offset = setup->multisample ? 0.0 : setup->pixel_offset; /* - * The rounding may not be quite the same with PIPE_ARCH_SSE + * The rounding may not be quite the same with DETECT_ARCH_SSE * (util_iround right now only does nearest/even on x87, * otherwise nearest/away-from-zero). * Both should be acceptable, I think. diff --git a/src/gallium/winsys/svga/drm/vmw_msg.c b/src/gallium/winsys/svga/drm/vmw_msg.c index cacd8d53ccd..0ecb7390b9a 100644 --- a/src/gallium/winsys/svga/drm/vmw_msg.c +++ b/src/gallium/winsys/svga/drm/vmw_msg.c @@ -61,7 +61,7 @@ #define HIGH_WORD(X) ((X & 0xFFFF0000) >> 16) -#if DETECT_CC_GCC && (PIPE_CC_GCC_VERSION > 502) && (DETECT_ARCH_X86 || DETECT_ARCH_X86_64) +#if DETECT_CC_GCC && (DETECT_CC_GCC_VERSION > 502) && (DETECT_ARCH_X86 || DETECT_ARCH_X86_64) /** * Hypervisor-specific bi-directional communication channel. Should never @@ -273,7 +273,7 @@ typedef uint32_t VMW_REG; (void) ax; (void) bx; (void) cx; \ (void) dx; (void) si; (void) di; -#endif /* #if PIPE_CC_GCC */ +#endif /* #if DETECT_CC_GCC */ enum rpc_msg_type { diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c index f4711374386..f0e3502d357 100644 --- a/src/util/format/u_format_unpack_neon.c +++ b/src/util/format/u_format_unpack_neon.c @@ -76,4 +76,4 @@ util_format_unpack_description_neon(enum pipe_format format) return &util_format_unpack_descriptions_neon[format]; } -#endif /* PIPE_ARCH_AARCH64 | PIPE_ARCH_ARM */ +#endif /* DETECT_ARCH_AARCH64 | DETECT_ARCH_ARM */ diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index d324e95dbd1..496509d7c70 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -155,7 +155,7 @@ check_os_altivec_support(void) util_cpu_caps.has_altivec = 1; } } -#elif DETECT_OS_FREEBSD /* !PIPE_OS_APPLE && !PIPE_OS_NETBSD && !PIPE_OS_OPENBSD */ +#elif DETECT_OS_FREEBSD /* !DETECT_OS_APPLE && !DETECT_OS_NETBSD && !DETECT_OS_OPENBSD */ unsigned long hwcap = 0; #ifdef HAVE_ELF_AUX_INFO elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); @@ -167,7 +167,7 @@ check_os_altivec_support(void) util_cpu_caps.has_altivec = 1; if (hwcap & PPC_FEATURE_HAS_VSX) util_cpu_caps.has_vsx = 1; -#elif DETECT_OS_LINUX /* !PIPE_OS_FREEBSD */ +#elif DETECT_OS_LINUX /* !DETECT_OS_FREEBSD */ #if DETECT_ARCH_PPC_64 Elf64_auxv_t aux; #else @@ -188,7 +188,7 @@ check_os_altivec_support(void) } close(fd); } -#else /* !PIPE_OS_APPLE && !PIPE_OS_BSD && !PIPE_OS_LINUX */ +#else /* !DETECT_OS_APPLE && !DETECT_OS_BSD && !DETECT_OS_LINUX */ /* not on Apple/Darwin or Linux, do it the brute-force way */ /* this is borrowed from the libmpeg2 library */ signal(SIGILL, sigill_handler); @@ -233,9 +233,9 @@ check_os_altivec_support(void) util_cpu_caps.has_altivec = 0; } } -#endif /* !PIPE_OS_APPLE && !PIPE_OS_LINUX */ +#endif /* !DETECT_OS_APPLE && !DETECT_OS_LINUX */ } -#endif /* PIPE_ARCH_PPC */ +#endif /* DETECT_ARCH_PPC */ #if DETECT_ARCH_X86 || DETECT_ARCH_X86_64 @@ -400,7 +400,7 @@ check_os_arm_support(void) * On Android, the cpufeatures library is preferred way of checking * CPU capabilities. However, it is not available for standalone Mesa * builds, i.e. when Android build system (Android.mk-based) is not - * used. Because of this we cannot use PIPE_OS_ANDROID here, but rather + * used. Because of this we cannot use DETECT_OS_ANDROID here, but rather * have a separate macro that only gets enabled from respective Android.mk. */ #if defined(__ARM_NEON) || defined(__ARM_NEON__) @@ -434,7 +434,7 @@ check_os_arm_support(void) } close (fd); } -#endif /* PIPE_OS_LINUX */ +#endif /* DETECT_OS_LINUX */ } #elif DETECT_ARCH_AARCH64 @@ -443,7 +443,7 @@ check_os_arm_support(void) { util_cpu_caps.has_neon = true; } -#endif /* PIPE_ARCH_ARM || PIPE_ARCH_AARCH64 */ +#endif /* DETECT_ARCH_ARM || DETECT_ARCH_AARCH64 */ #if DETECT_ARCH_MIPS64 static void @@ -465,9 +465,9 @@ check_os_mips64_support(void) } close (fd); } -#endif /* PIPE_OS_LINUX */ +#endif /* DETECT_OS_LINUX */ } -#endif /* PIPE_ARCH_MIPS64 */ +#endif /* DETECT_ARCH_MIPS64 */ static void @@ -609,7 +609,7 @@ void check_cpu_caps_override(void) util_cpu_caps.has_sse3 = 0; } #endif -#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ +#endif /* DETECT_ARCH_X86 || DETECT_ARCH_X86_64 */ if (override_cpu_caps != NULL) { #if DETECT_ARCH_X86 || DETECT_ARCH_X86_64 @@ -628,7 +628,7 @@ void check_cpu_caps_override(void) } else if (!strcmp(override_cpu_caps, "avx")) { util_cpu_caps.has_avx512f = 0; } -#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ +#endif /* DETECT_ARCH_X86 || DETECT_ARCH_X86_64 */ } #if DETECT_ARCH_X86 || DETECT_ARCH_X86_64 @@ -665,7 +665,7 @@ void check_cpu_caps_override(void) util_cpu_caps.has_avx512vl = 0; util_cpu_caps.has_avx512vbmi = 0; } -#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ +#endif /* DETECT_ARCH_X86 || DETECT_ARCH_X86_64 */ } static @@ -896,7 +896,7 @@ _util_cpu_detect_once(void) util_cpu_caps.cacheline = cacheline; } } -#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ +#endif /* DETECT_ARCH_X86 || DETECT_ARCH_X86_64 */ #if DETECT_ARCH_ARM || DETECT_ARCH_AARCH64 check_os_arm_support(); @@ -904,11 +904,11 @@ _util_cpu_detect_once(void) #if DETECT_ARCH_PPC check_os_altivec_support(); -#endif /* PIPE_ARCH_PPC */ +#endif /* DETECT_ARCH_PPC */ #if DETECT_ARCH_MIPS64 check_os_mips64_support(); -#endif /* PIPE_ARCH_MIPS64 */ +#endif /* DETECT_ARCH_MIPS64 */ #if DETECT_ARCH_S390 util_cpu_caps.family = CPU_S390X; diff --git a/src/util/u_debug_stack.c b/src/util/u_debug_stack.c index 0600006c826..9cfb61a32e6 100644 --- a/src/util/u_debug_stack.c +++ b/src/util/u_debug_stack.c @@ -250,7 +250,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace, #endif #if DETECT_ARCH_X86 -#if DETECT_CC_GCC && (PIPE_CC_GCC_VERSION > 404) || defined(__clang__) +#if DETECT_CC_GCC && (DETECT_CC_GCC_VERSION > 404) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wframe-address" const void **frame_pointer = ((const void **)__builtin_frame_address(1)); diff --git a/src/util/u_debug_symbol.c b/src/util/u_debug_symbol.c index cd841a1fc41..df3c886a425 100644 --- a/src/util/u_debug_symbol.c +++ b/src/util/u_debug_symbol.c @@ -227,7 +227,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) return true; } -#endif /* PIPE_OS_WINDOWS */ +#endif /* DETECT_OS_WINDOWS */ void debug_symbol_name(const void *addr, char* buf, unsigned size)