[clang] 5e8b44c - [OpenCL] Add cl_ext_image_raw10_raw12 extension
Sven van Haastregt via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 26 03:59:39 PDT 2023
Author: Sven van Haastregt
Date: 2023-07-26T11:59:12+01:00
New Revision: 5e8b44cc447e9b901c8168825f0c77491d9111e8
URL: https://github.com/llvm/llvm-project/commit/5e8b44cc447e9b901c8168825f0c77491d9111e8
DIFF: https://github.com/llvm/llvm-project/commit/5e8b44cc447e9b901c8168825f0c77491d9111e8.diff
LOG: [OpenCL] Add cl_ext_image_raw10_raw12 extension
Add the defines for the `cl_ext_image_raw10_raw12` extension.
Differential Revision: https://reviews.llvm.org/D151339
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 af3deae892c7c9..2494f6213fc569 100644
--- a/clang/lib/Headers/opencl-c-base.h
+++ b/clang/lib/Headers/opencl-c-base.h
@@ -45,6 +45,7 @@
#define __opencl_c_ext_fp32_local_atomic_add 1
#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
#endif // defined(__SPIR__) || defined(__SPIRV__)
#endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
@@ -477,6 +478,10 @@ typedef enum memory_order
#if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
#define CLK_UNORM_INT_101010_2 0x10E0
#endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
+#ifdef __opencl_c_ext_image_raw10_raw12
+#define CLK_UNSIGNED_INT_RAW10_EXT 0x10E3
+#define CLK_UNSIGNED_INT_RAW12_EXT 0x10E4
+#endif // __opencl_c_ext_image_raw10_raw12
// 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 8242798106ac30..15b52ec04e667b 100644
--- a/clang/test/Headers/opencl-c-header.cl
+++ b/clang/test/Headers/opencl-c-header.cl
@@ -187,6 +187,9 @@ global atomic_int z = ATOMIC_VAR_INIT(99);
#if __opencl_c_ext_fp64_local_atomic_min_max != 1
#error "Incorrectly defined __opencl_c_ext_fp64_local_atomic_min_max"
#endif
+#if __opencl_c_ext_image_raw10_raw12 != 1
+#error "Incorrectly defined __opencl_c_ext_image_raw10_raw12"
+#endif
#else
@@ -271,6 +274,9 @@ global atomic_int z = ATOMIC_VAR_INIT(99);
#ifdef __opencl_c_ext_fp64_local_atomic_min_max
#error "Incorrectly __opencl_c_ext_fp64_local_atomic_min_max defined"
#endif
+#ifdef __opencl_c_ext_image_raw10_raw12
+#error "Incorrect __opencl_c_ext_image_raw10_raw12 define"
+#endif
#endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
More information about the cfe-commits
mailing list