[PATCH] D100983: [OpenCL] Fix optional image types
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 21 11:27:52 PDT 2021
Anastasia created this revision.
Anastasia added reviewers: svenvh, azabaznov, yaxunl.
Herald added a subscriber: ebevhan.
Anastasia requested review of this revision.
This change allows the use of identifiers for image types from `cl_khr_gl_msaa_sharing` freely in the kernel code if the extension is not supported since they are not in the list of the reserved identifiers:
https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#keywords
This change also removed the need for pragma for the types in the extensions since the spec doesn't require the pragma uses. For example, there is the following wording for 3d image writes:
> The behavior of write_imagef, write_imagei and write_imageui for image objects with image_channel_data_type values not specified in the description above or with (x, y, z) coordinate values that are not in the range [0, image width-1], [0, image height-1], and [0, image depth-1], respectively, is undefined.
>
> Requires support for OpenCL C 2.0, or OpenCL C 3.0 or newer and the __opencl_c_3d_image_writes feature, or the cl_khr_3d_image_writes extension.
https://reviews.llvm.org/D100983
Files:
clang/include/clang/Basic/OpenCLImageTypes.def
clang/lib/Parse/ParseDecl.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaType.cpp
clang/test/SemaOpenCL/access-qualifier.cl
clang/test/SemaOpenCL/invalid-image.cl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100983.339327.patch
Type: text/x-patch
Size: 5707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210421/42d56881/attachment.bin>
More information about the cfe-commits
mailing list