Author: Sven van Haastregt Date: 2024-10-21T23:55:19+01:00 New Revision: 6201bcc3b5ed8c2dab39b8365cee09018eee8110
URL: https://github.com/llvm/llvm-project/commit/6201bcc3b5ed8c2dab39b8365cee09018eee8110 DIFF: https://github.com/llvm/llvm-project/commit/6201bcc3b5ed8c2dab39b8365cee09018eee8110.diff LOG: [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (#113145) Add the defines for the `cl_ext_image_unorm_int_2_101010_EXT` extension. Added: Modified: clang/lib/Headers/opencl-c-base.h clang/test/Headers/opencl-c-header.cl Removed: ################################################################################ diff --git a/clang/lib/Headers/opencl-c-base.h b/clang/lib/Headers/opencl-c-base.h index 786678b9d8a753..b6bcf32c09c08c 100644 --- a/clang/lib/Headers/opencl-c-base.h +++ b/clang/lib/Headers/opencl-c-base.h @@ -46,6 +46,7 @@ #define __opencl_c_ext_fp32_global_atomic_min_max 1 #define __opencl_c_ext_fp32_local_atomic_min_max 1 #define __opencl_c_ext_image_raw10_raw12 1 +#define __opencl_c_ext_image_unorm_int_2_101010 1 #define cl_khr_kernel_clock 1 #define __opencl_c_kernel_clock_scope_device 1 #define __opencl_c_kernel_clock_scope_work_group 1 @@ -486,6 +487,9 @@ typedef enum memory_order #define CLK_UNSIGNED_INT_RAW10_EXT 0x10E3 #define CLK_UNSIGNED_INT_RAW12_EXT 0x10E4 #endif // __opencl_c_ext_image_raw10_raw12 +#ifdef __opencl_c_ext_image_unorm_int_2_101010 +#define CLK_UNORM_INT_2_101010_EXT 0x10E5 +#endif // __opencl_c_ext_image_unorm_int_2_101010 // Channel order, numbering must be aligned with cl_channel_order in cl.h // diff --git a/clang/test/Headers/opencl-c-header.cl b/clang/test/Headers/opencl-c-header.cl index 7c4c673cf2ee07..7317ff0adaafb3 100644 --- a/clang/test/Headers/opencl-c-header.cl +++ b/clang/test/Headers/opencl-c-header.cl @@ -190,6 +190,9 @@ global atomic_int z = ATOMIC_VAR_INIT(99); #if __opencl_c_ext_image_raw10_raw12 != 1 #error "Incorrectly defined __opencl_c_ext_image_raw10_raw12" #endif +#if __opencl_c_ext_image_unorm_int_2_101010 != 1 +#error "Incorrectly defined __opencl_c_ext_image_unorm_int_2_101010" +#endif #else @@ -277,6 +280,9 @@ global atomic_int z = ATOMIC_VAR_INIT(99); #ifdef __opencl_c_ext_image_raw10_raw12 #error "Incorrect __opencl_c_ext_image_raw10_raw12 define" #endif +#ifdef __opencl_c_ext_image_unorm_int_2_101010 +#error "Incorrect __opencl_c_ext_image_unorm_int_2_101010 define" +#endif #endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits