From fc929d9318cf0e2cf4d2bd4adaf9ceecafbae725 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 29 Jan 2024 16:01:44 -0400 Subject: [PATCH] libagx: use native static_assert on host Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/shaders/libagx.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/asahi/lib/shaders/libagx.h b/src/asahi/lib/shaders/libagx.h index 36bbec93691..30f5e45d272 100644 --- a/src/asahi/lib/shaders/libagx.h +++ b/src/asahi/lib/shaders/libagx.h @@ -10,7 +10,8 @@ #ifndef __OPENCL_VERSION__ #include #include "util/macros.h" -#define GLOBAL(type_) uint64_t +#define GLOBAL(type_) uint64_t +#define AGX_STATIC_ASSERT(_COND) static_assert(_COND, "OpenCL assertion") #else #pragma OPENCL EXTENSION cl_khr_fp16 : enable #define PACKED @@ -37,9 +38,9 @@ uint32_t nir_load_helper_arg_lo_agx(void); uint32_t nir_load_helper_arg_hi_agx(void); uint32_t nir_fence_helper_exit_agx(void); -#endif - #define AGX_STATIC_ASSERT(_COND) \ typedef char static_assertion_##__line__[(_COND) ? 1 : -1] #endif + +#endif