Skip to content

Commit 5e8b44c

Browse files
committed
[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
1 parent 05aae08 commit 5e8b44c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

clang/lib/Headers/opencl-c-base.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#define __opencl_c_ext_fp32_local_atomic_add 1
4646
#define __opencl_c_ext_fp32_global_atomic_min_max 1
4747
#define __opencl_c_ext_fp32_local_atomic_min_max 1
48+
#define __opencl_c_ext_image_raw10_raw12 1
4849

4950
#endif // defined(__SPIR__) || defined(__SPIRV__)
5051
#endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
@@ -477,6 +478,10 @@ typedef enum memory_order
477478
#if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
478479
#define CLK_UNORM_INT_101010_2 0x10E0
479480
#endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
481+
#ifdef __opencl_c_ext_image_raw10_raw12
482+
#define CLK_UNSIGNED_INT_RAW10_EXT 0x10E3
483+
#define CLK_UNSIGNED_INT_RAW12_EXT 0x10E4
484+
#endif // __opencl_c_ext_image_raw10_raw12
480485

481486
// Channel order, numbering must be aligned with cl_channel_order in cl.h
482487
//

clang/test/Headers/opencl-c-header.cl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ global atomic_int z = ATOMIC_VAR_INIT(99);
187187
#if __opencl_c_ext_fp64_local_atomic_min_max != 1
188188
#error "Incorrectly defined __opencl_c_ext_fp64_local_atomic_min_max"
189189
#endif
190+
#if __opencl_c_ext_image_raw10_raw12 != 1
191+
#error "Incorrectly defined __opencl_c_ext_image_raw10_raw12"
192+
#endif
190193

191194
#else
192195

@@ -271,6 +274,9 @@ global atomic_int z = ATOMIC_VAR_INIT(99);
271274
#ifdef __opencl_c_ext_fp64_local_atomic_min_max
272275
#error "Incorrectly __opencl_c_ext_fp64_local_atomic_min_max defined"
273276
#endif
277+
#ifdef __opencl_c_ext_image_raw10_raw12
278+
#error "Incorrect __opencl_c_ext_image_raw10_raw12 define"
279+
#endif
274280

275281
#endif //(defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
276282

0 commit comments

Comments
 (0)