From a1b1713b43619782ed5b350878d5892ecc355fe0 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Thu, 2 Jan 2025 16:34:59 +0100 Subject: [PATCH] panfrost: Make pan_encoder.h CL safe Will be used for indirect dispatch. Signed-off-by: Mary Guillemard Reviewed-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/lib/pan_encoder.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/panfrost/lib/pan_encoder.h b/src/panfrost/lib/pan_encoder.h index d9dca959dc3..aa683cbeb03 100644 --- a/src/panfrost/lib/pan_encoder.h +++ b/src/panfrost/lib/pan_encoder.h @@ -27,13 +27,17 @@ #ifndef __PAN_ENCODER_H #define __PAN_ENCODER_H +#ifndef __OPENCL_VERSION__ #include "util/macros.h" #include -#include "genxml/gen_macros.h" #include "util/format/u_format.h" - #include "pan_pool.h" +#else +#include "compiler/libcl/libcl.h" +#endif + +#include "genxml/gen_macros.h" /* Tiler structure size computation */ @@ -200,6 +204,7 @@ pan_pack_work_groups_compute(struct mali_invocation_packed *out, unsigned num_x, } #endif +#ifndef __OPENCL_VERSION__ #if PAN_ARCH >= 5 /* Format conversion */ static inline enum mali_z_internal_format @@ -220,9 +225,11 @@ pan_get_z_internal_format(enum pipe_format fmt) } } #endif +#endif #endif /* PAN_ARCH */ +#ifndef __OPENCL_VERSION__ #if PAN_ARCH >= 9 static inline void pan_make_resource_table(struct pan_ptr base, unsigned index, uint64_t address, @@ -238,5 +245,6 @@ pan_make_resource_table(struct pan_ptr base, unsigned index, uint64_t address, } } #endif +#endif #endif