From 7cfe2ecb33e6d2d6e1096b14887e7379336f3af6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 9 Oct 2023 07:47:38 -0400 Subject: [PATCH] compiler: Make shader_enums.h CL-safe macros.h is not safe for CL for a bunch of reasons but shader_enums.h barely uses its functionality. Stub out the minimum for CL. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Antonino Maniscalco Part-of: --- src/compiler/shader_enums.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index ce1dbbb1137..28022b7d5d6 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -26,9 +26,15 @@ #ifndef SHADER_ENUMS_H #define SHADER_ENUMS_H -#include "util/macros.h" - +#ifndef __OPENCL_VERSION__ #include +#include "util/macros.h" +#include "util/u_debug.h" +#else +#define ENUM_PACKED +#define BITFIELD_BIT(b) (1u << (b)) +#define debug_printf(x, ...) +#endif /* Project-wide (GL and Vulkan) maximum. */ #define MAX_DRAW_BUFFERS 8