mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 22:30:40 +02:00
tree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep
From: #ifdef[\s]+PIPE_(OS|ARCH|CC)_([0-9A-Z_]+) To: #if DETECT_$1_$2 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>
This commit is contained in:
parent
eab0da3c64
commit
1817659bb6
14 changed files with 21 additions and 21 deletions
|
|
@ -132,7 +132,7 @@ dd_get_file_stream(struct dd_screen *dscreen, unsigned apitrace_call_number)
|
|||
static void
|
||||
dd_dump_dmesg(FILE *f)
|
||||
{
|
||||
#ifdef PIPE_OS_LINUX
|
||||
#if DETECT_OS_LINUX
|
||||
char line[2000];
|
||||
FILE *p = popen("dmesg | tail -n60", "r");
|
||||
|
||||
|
|
@ -697,7 +697,7 @@ dd_dump_call(FILE *f, struct dd_draw_state *state, struct dd_call *call)
|
|||
static void
|
||||
dd_kill_process(void)
|
||||
{
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
sync();
|
||||
#endif
|
||||
fprintf(stderr, "dd: Aborting the process...\n");
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ lp_build_init(void)
|
|||
lp_native_vector_width = debug_get_num_option("LP_NATIVE_VECTOR_WIDTH",
|
||||
lp_native_vector_width);
|
||||
|
||||
#ifdef PIPE_ARCH_PPC_64
|
||||
#if DETECT_ARCH_PPC_64
|
||||
/* Set the NJ bit in VSCR to 0 so denormalized values are handled as
|
||||
* specified by IEEE standard (PowerISA 2.06 - Section 6.3). This guarantees
|
||||
* that some rounding and half-float to float handling does not round
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||
* can't handle. Not entirely sure if we really need to do anything yet.
|
||||
*/
|
||||
|
||||
#ifdef PIPE_ARCH_PPC_64
|
||||
#if DETECT_ARCH_PPC_64
|
||||
/*
|
||||
* Large programs, e.g. gnome-shell and firefox, may tax the addressability
|
||||
* of the Medium code model once dynamically generated JIT-compiled shader
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ static boolean huds_visible = TRUE;
|
|||
static int hud_scale = 1;
|
||||
|
||||
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
static void
|
||||
signal_visible_handler(int sig, siginfo_t *siginfo, void *context)
|
||||
{
|
||||
|
|
@ -1866,7 +1866,7 @@ hud_create(struct cso_context *cso, struct st_context_iface *st,
|
|||
struct hud_context *hud;
|
||||
unsigned i;
|
||||
const char *env = debug_get_option("GALLIUM_HUD", NULL);
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
unsigned signo = debug_get_num_option("GALLIUM_HUD_TOGGLE_SIGNAL", 0);
|
||||
static boolean sig_handled = FALSE;
|
||||
struct sigaction action;
|
||||
|
|
@ -1953,7 +1953,7 @@ hud_create(struct cso_context *cso, struct st_context_iface *st,
|
|||
list_inithead(&hud->pane_list);
|
||||
|
||||
/* setup sig handler once for all hud contexts */
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
if (!sig_handled && signo != 0) {
|
||||
action.sa_sigaction = &signal_visible_handler;
|
||||
action.sa_flags = SA_SIGINFO;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include "util/u_queue.h"
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#ifdef PIPE_OS_WINDOWS
|
||||
#if DETECT_OS_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#if DETECT_OS_BSD
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef PIPE_OS_WINDOWS
|
||||
#if DETECT_OS_WINDOWS
|
||||
|
||||
static inline uint64_t
|
||||
filetime_to_scalar(FILETIME ft)
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ enum x86_target
|
|||
/* make this read a member of x86_function if target != host is desired */
|
||||
static inline enum x86_target x86_target( struct x86_function* p )
|
||||
{
|
||||
#ifdef PIPE_ARCH_X86
|
||||
#if DETECT_ARCH_X86
|
||||
return X86_32;
|
||||
#elif (DETECT_OS_CYGWIN || DETECT_OS_WINDOWS) && DETECT_ARCH_X86_64
|
||||
return X86_64_WIN64_ABI;
|
||||
|
|
|
|||
|
|
@ -798,7 +798,7 @@ lp_rast_triangle_32_3_4(struct lp_rasterizer_task *task,
|
|||
|
||||
#define TAG(x) x##_32_4
|
||||
#define NR_PLANES 4
|
||||
#ifdef PIPE_ARCH_SSE
|
||||
#if DETECT_ARCH_SSE
|
||||
#define TRI_16 lp_rast_triangle_32_4_16
|
||||
#endif
|
||||
#include "lp_rast_tri_tmp.h"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "nouveau_fence.h"
|
||||
#include "util/os_time.h"
|
||||
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ _nouveau_fence_wait(struct nouveau_fence *fence, struct util_debug_callback *deb
|
|||
if (!spins)
|
||||
NOUVEAU_DRV_STAT(screen, any_non_kernel_fence_sync_count, 1);
|
||||
spins++;
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
if (!(spins % 8)) /* donate a few cycles */
|
||||
sched_yield();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ nine_upload_create_buffer_group(struct nine_buffer_upload *upload,
|
|||
group->map = pipe_buffer_map_range(upload->pipe, group->resource,
|
||||
0, upload->buffers_size,
|
||||
PIPE_MAP_WRITE |
|
||||
#ifdef PIPE_ARCH_X86
|
||||
#if DETECT_ARCH_X86
|
||||
PIPE_MAP_ONCE |
|
||||
#endif
|
||||
PIPE_MAP_PERSISTENT |
|
||||
|
|
@ -231,7 +231,7 @@ nine_upload_create_buffer(struct nine_buffer_upload *upload,
|
|||
buf->map = pipe_buffer_map_range(upload->pipe, buf->resource,
|
||||
0, buffer_size,
|
||||
PIPE_MAP_WRITE |
|
||||
#ifdef PIPE_ARCH_X86
|
||||
#if DETECT_ARCH_X86
|
||||
PIPE_MAP_ONCE |
|
||||
#endif
|
||||
PIPE_MAP_PERSISTENT |
|
||||
|
|
|
|||
|
|
@ -1396,7 +1396,7 @@ enum pipe_perf_counter_data_type
|
|||
#define PIPE_UUID_SIZE 16
|
||||
#define PIPE_LUID_SIZE 8
|
||||
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
#define PIPE_MEMORY_FD
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
/* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
|
||||
* unless you tell it "no really".
|
||||
*/
|
||||
#ifdef PIPE_ARCH_ARM
|
||||
#if DETECT_ARCH_ARM
|
||||
#pragma GCC target ("fpu=neon")
|
||||
#endif
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ const struct util_format_unpack_description *
|
|||
util_format_unpack_description_neon(enum pipe_format format)
|
||||
{
|
||||
/* CPU detect for NEON support. On arm64, it's implied. */
|
||||
#ifdef PIPE_ARCH_ARM
|
||||
#if DETECT_ARCH_ARM
|
||||
if (!util_get_cpu_caps()->has_neon)
|
||||
return NULL;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
#include <elf.h>
|
||||
#endif
|
||||
|
||||
#ifdef PIPE_OS_UNIX
|
||||
#if DETECT_OS_UNIX
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef PIPE_ARCH_X86
|
||||
#if DETECT_ARCH_X86
|
||||
#if DETECT_CC_GCC && (PIPE_CC_GCC_VERSION > 404) || defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wframe-address"
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ getDbgHelpProcAddress(LPCSTR lpProcName)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef PIPE_CC_GCC
|
||||
#if DETECT_CC_GCC
|
||||
/*
|
||||
* DbgHelp does not understand the debug information generated by MinGW toolchain.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue