diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c index 91abc9fd690..9e6b6e45002 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c @@ -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"); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 22d63283881..1782f9dd189 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -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 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 2f87fe82046..a79cbdf3baa 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -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 diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 6b6e1565337..5ff9097fab9 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -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; diff --git a/src/gallium/auxiliary/hud/hud_cpu.c b/src/gallium/auxiliary/hud/hud_cpu.c index 41f63d7c32c..a4313b2c734 100644 --- a/src/gallium/auxiliary/hud/hud_cpu.c +++ b/src/gallium/auxiliary/hud/hud_cpu.c @@ -35,7 +35,7 @@ #include "util/u_queue.h" #include #include -#ifdef PIPE_OS_WINDOWS +#if DETECT_OS_WINDOWS #include #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) diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h index a576c6f70ef..ecf855e4922 100644 --- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h +++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h @@ -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; diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c index 495d62f1b18..4b5ef1ee34a 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c @@ -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" diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c index 4ac3fa4f7b6..365169943e5 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.c +++ b/src/gallium/drivers/nouveau/nouveau_fence.c @@ -26,7 +26,7 @@ #include "nouveau_fence.h" #include "util/os_time.h" -#ifdef PIPE_OS_UNIX +#if DETECT_OS_UNIX #include #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 diff --git a/src/gallium/frontends/nine/nine_buffer_upload.c b/src/gallium/frontends/nine/nine_buffer_upload.c index 38737e71538..2185035d9c5 100644 --- a/src/gallium/frontends/nine/nine_buffer_upload.c +++ b/src/gallium/frontends/nine/nine_buffer_upload.c @@ -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 | diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 343487589f7..eed3b2cbdde 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -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 diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c index 772320ac7b2..f4711374386 100644 --- a/src/util/format/u_format_unpack_neon.c +++ b/src/util/format/u_format_unpack_neon.c @@ -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 diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index 9fc6bf8bc06..d324e95dbd1 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -71,7 +71,7 @@ #include #endif -#ifdef PIPE_OS_UNIX +#if DETECT_OS_UNIX #include #endif diff --git a/src/util/u_debug_stack.c b/src/util/u_debug_stack.c index 6972dc3dbb9..0600006c826 100644 --- a/src/util/u_debug_stack.c +++ b/src/util/u_debug_stack.c @@ -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" diff --git a/src/util/u_debug_symbol.c b/src/util/u_debug_symbol.c index a1de75553c7..cd841a1fc41 100644 --- a/src/util/u_debug_symbol.c +++ b/src/util/u_debug_symbol.c @@ -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. *