[PATCH] D22637: [OpenCL] Add extension cl_khr_mipmap_image to clang
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 29 11:00:20 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL277181: [OpenCL] Add extension cl_khr_mipmap_image to clang (authored by yaxunl).
Changed prior to commit:
https://reviews.llvm.org/D22637?vs=65773&id=66150#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22637
Files:
cfe/trunk/include/clang/Basic/OpenCLExtensions.def
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Misc/amdgcn.languageOptsOpenCL.cl
cfe/trunk/test/SemaOpenCL/extension-version.cl
Index: cfe/trunk/include/clang/Basic/OpenCLExtensions.def
===================================================================
--- cfe/trunk/include/clang/Basic/OpenCLExtensions.def
+++ cfe/trunk/include/clang/Basic/OpenCLExtensions.def
@@ -67,6 +67,7 @@
// OpenCL 2.0.
OPENCLEXT_INTERNAL(cl_khr_egl_event, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_egl_image, 200, ~0U)
+OPENCLEXT_INTERNAL(cl_khr_mipmap_image, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_srgb_image_writes, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_subgroups, 200, ~0U)
OPENCLEXT_INTERNAL(cl_khr_terminate_context, 200, ~0U)
Index: cfe/trunk/test/Misc/amdgcn.languageOptsOpenCL.cl
===================================================================
--- cfe/trunk/test/Misc/amdgcn.languageOptsOpenCL.cl
+++ cfe/trunk/test/Misc/amdgcn.languageOptsOpenCL.cl
@@ -181,6 +181,18 @@
#pragma OPENCL EXTENSION cl_khr_egl_image: enable
// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}}
+#if (__OPENCL_C_VERSION__ >= 200)
+#ifndef cl_khr_mipmap_image
+#error "Missing cl_khr_mipmap_image define"
+#endif
+#else
+#ifdef cl_khr_mipmap_image
+#error "Incorrect cl_khr_mipmap_image define"
+#endif
+// expected-warning at +2{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_khr_mipmap_image: enable
+
#ifdef cl_khr_srgb_image_writes
#error "Incorrect cl_khr_srgb_image_writes define"
#endif
Index: cfe/trunk/test/SemaOpenCL/extension-version.cl
===================================================================
--- cfe/trunk/test/SemaOpenCL/extension-version.cl
+++ cfe/trunk/test/SemaOpenCL/extension-version.cl
@@ -222,6 +222,18 @@
#pragma OPENCL EXTENSION cl_khr_egl_image: enable
#if (__OPENCL_C_VERSION__ >= 200)
+#ifndef cl_khr_mipmap_image
+#error "Missing cl_khr_mipmap_image define"
+#endif
+#else
+#ifdef cl_khr_mipmap_image
+#error "Incorrect cl_khr_mipmap_image define"
+#endif
+// expected-warning at +2{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_khr_mipmap_image: enable
+
+#if (__OPENCL_C_VERSION__ >= 200)
#ifndef cl_khr_srgb_image_writes
#error "Missing cl_khr_srgb_image_writes define"
#endif
Index: cfe/trunk/lib/Basic/Targets.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets.cpp
+++ cfe/trunk/lib/Basic/Targets.cpp
@@ -2126,6 +2126,7 @@
Opts.cl_khr_fp16 = 1;
Opts.cl_khr_int64_base_atomics = 1;
Opts.cl_khr_int64_extended_atomics = 1;
+ Opts.cl_khr_mipmap_image = 1;
Opts.cl_khr_3d_image_writes = 1;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22637.66150.patch
Type: text/x-patch
Size: 2614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160729/15b8cd51/attachment-0001.bin>
More information about the cfe-commits
mailing list