[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension
Dmitry Sidorov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 29 00:08:59 PDT 2018
sidorovd created this revision.
sidorovd added reviewers: yaxunl, Anastasia.
Herald added a subscriber: cfe-commits.
Just adding a preprocessor #define for the extension.
Patch by Alexey Sotkin
Repository:
rC Clang
https://reviews.llvm.org/D51402
Files:
include/clang/Basic/OpenCLExtensions.def
test/SemaOpenCL/extension-version.cl
Index: test/SemaOpenCL/extension-version.cl
===================================================================
--- test/SemaOpenCL/extension-version.cl
+++ test/SemaOpenCL/extension-version.cl
@@ -300,3 +300,11 @@
#endif
#pragma OPENCL EXTENSION cl_intel_subgroups_short : enable
+#if (__OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_planar_yuv
+#error "Missing cl_intel_planar_yuv define"
+#endif
+#else
+// expected-warning at +2{{unsupported OpenCL extension 'cl_intel_planar_yuv' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_intel_planar_yuv : enable
Index: include/clang/Basic/OpenCLExtensions.def
===================================================================
--- include/clang/Basic/OpenCLExtensions.def
+++ include/clang/Basic/OpenCLExtensions.def
@@ -85,6 +85,7 @@
// Intel OpenCL extensions
OPENCLEXT_INTERNAL(cl_intel_subgroups, 120, ~0U)
OPENCLEXT_INTERNAL(cl_intel_subgroups_short, 120, ~0U)
+OPENCLEXT_INTERNAL(cl_intel_planar_yuv, 120, ~0U)
#undef OPENCLEXT_INTERNAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51402.163015.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180829/878d4b0c/attachment.bin>
More information about the cfe-commits
mailing list