Skip to content

[OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension #113145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clang/lib/Headers/opencl-c-base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
//
Expand Down
6 changes: 6 additions & 0 deletions clang/test/Headers/opencl-c-header.cl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down
Loading