remove CMake option for OpenCL 3.0 provisional (#121)
authorBen Ashbaugh <ben.ashbaugh@intel.com>
Tue, 6 Oct 2020 15:56:43 +0000 (08:56 -0700)
committerGitHub <noreply@github.com>
Tue, 6 Oct 2020 15:56:43 +0000 (16:56 +0100)
* remove CMake option for OpenCL 3.0 provisional

* generate the OpenCL 3.0 APIs also

14 files changed:
CMakeLists.txt
loader/icd_dispatch.c
loader/icd_dispatch_generated.c
loader/linux/icd_exports.map [new file with mode: 0644]
loader/linux/icd_exports.map.in [deleted file]
loader/windows/OpenCL.def [new file with mode: 0644]
loader/windows/OpenCL.def.in [deleted file]
loader/windows/OpenCL.rc
scripts/icd_dispatch_generated.c.mako
test/driver_stub/cl.c
test/driver_stub/icd.c
test/loader_test/param_struct.h
test/loader_test/test_create_calls.c
test/loader_test/test_platforms.c

index a0da4d332f4e8fa1a5d0ac4c6f1c4c3a2613ed2f..db0346fcb3088c2652ae45762c89421c9d5a93b1 100644 (file)
@@ -34,11 +34,6 @@ find_package (Threads REQUIRED)
 # advance. Use it with discretion.
 option (BUILD_SHARED_LIBS "Build shared libs" ON)
 
-# This option enables support for OpenCL 3.0 Provisional in the ICD loader.  It
-# is currently off by default while the specification is provisional, as it may
-# change.
-option (ENABLE_OPENCL30_PROVISIONAL "Enable 3.0 provisional entry points" OFF)
-
 include(CheckFunctionExists)
 check_function_exists(secure_getenv HAVE_SECURE_GETENV)
 check_function_exists(__secure_getenv HAVE___SECURE_GETENV)
@@ -55,17 +50,6 @@ set (OPENCL_ICD_LOADER_SOURCES
     loader/icd_platform.h)
 
 if (WIN32)
-    # By default don't include OpenCL 3.0 symbol definitions (i.e. comment them
-    # out), but include them for OpenCL 3.0 builds.  Once the symbols are no
-    # longer provisional then they may be included unconditionally.
-    set(ENABLE_OPENCL30_SYMBOLS ";")
-    if (ENABLE_OPENCL30_PROVISIONAL)
-      set(ENABLE_OPENCL30_SYMBOLS "")
-    endif ()
-    configure_file(
-        ${CMAKE_CURRENT_SOURCE_DIR}/loader/windows/OpenCL.def.in
-        ${CMAKE_CURRENT_BINARY_DIR}/loader/windows/OpenCL.def)
-
     list (APPEND OPENCL_ICD_LOADER_SOURCES 
         loader/windows/adapter.h
         loader/windows/icd_windows.c
@@ -77,7 +61,7 @@ if (WIN32)
         loader/windows/icd_windows_hkr.h
         loader/windows/icd_windows_apppackage.cpp
         loader/windows/icd_windows_apppackage.h
-        ${CMAKE_CURRENT_BINARY_DIR}/loader/windows/OpenCL.def
+        loader/windows/OpenCL.def
         loader/windows/OpenCL.rc)
     # Only add the DXSDK include directory if the environment variable is
     # defined.  Since the DXSDK has merged into the Windows SDK, this is
@@ -86,23 +70,10 @@ if (WIN32)
         include_directories ($ENV{DXSDK_DIR}/Include)
     endif ()
 else ()
-    # By default don't include OpenCL 3.0 symbol definitions (i.e. comment them
-    # out), but include them for OpenCL 3.0 builds.  Once the symbols are no
-    # longer provisional then they may be included unconditionally.
-    set(ENABLE_OPENCL30_SYMBOLS_START "/*")
-    set(ENABLE_OPENCL30_SYMBOLS_END "*/")
-    if (ENABLE_OPENCL30_PROVISIONAL)
-      set(ENABLE_OPENCL30_SYMBOLS_START "")
-      set(ENABLE_OPENCL30_SYMBOLS_END "")
-    endif ()
-    configure_file(
-        ${CMAKE_CURRENT_SOURCE_DIR}/loader/linux/icd_exports.map.in
-        ${CMAKE_CURRENT_BINARY_DIR}/loader/linux/icd_exports.map)
-
     list (APPEND OPENCL_ICD_LOADER_SOURCES
         loader/linux/icd_linux.c
         loader/linux/icd_linux_envvars.c
-        ${CMAKE_CURRENT_BINARY_DIR}/loader/linux/icd_exports.map)
+        loader/linux/icd_exports.map)
 endif ()
 
 set (OPENCL_ICD_LOADER_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/inc CACHE PATH "Path to OpenCL Headers")
@@ -133,17 +104,13 @@ else()
     if (APPLE)
         target_link_libraries (OpenCL ${CMAKE_THREAD_LIBS_INIT})
     else ()
-        set_target_properties (OpenCL PROPERTIES LINK_FLAGS "-Wl,--version-script -Wl,${CMAKE_CURRENT_BINARY_DIR}/loader/linux/icd_exports.map")
+        set_target_properties (OpenCL PROPERTIES LINK_FLAGS "-Wl,--version-script -Wl,${CMAKE_CURRENT_SOURCE_DIR}/loader/linux/icd_exports.map")
         target_link_libraries (OpenCL ${CMAKE_THREAD_LIBS_INIT})
     endif ()
 endif ()
 
 include_directories (${OPENCL_ICD_LOADER_HEADERS_DIR})
-if (ENABLE_OPENCL30_PROVISIONAL)
-  add_definitions (-DCL_TARGET_OPENCL_VERSION=300)
-else()
-  add_definitions (-DCL_TARGET_OPENCL_VERSION=220)
-endif()
+add_definitions (-DCL_TARGET_OPENCL_VERSION=300)
 
 target_include_directories (OpenCL PRIVATE ${CMAKE_CURRENT_BINARY_DIR} loader)
 target_link_libraries (OpenCL ${CMAKE_DL_LIBS})
index 878f6e03d5fdbbd397f170f95f60a45c15853906..2d1e4bd4120658003f7115162dff8227007d0174 100644 (file)
@@ -216,63 +216,6 @@ CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddressForPlatform(
         function_name);
 }
 
-#ifdef CL_VERSION_3_0
-/* ICD loader entry points should not normally be ifdef'ed, but prevent
- * OpenCL 3.0 provisional entry points from being in general builds before the
- * specification is finalized. */
-
-CL_API_ENTRY cl_mem CL_API_CALL clCreateBufferWithProperties(
-    cl_context context,
-    const cl_mem_properties* properties,
-    cl_mem_flags flags,
-    size_t size,
-    void* host_ptr,
-    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_3_0
-{
-    KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
-    return context->dispatch->clCreateBufferWithProperties(
-        context,
-        properties,
-        flags,
-        size,
-        host_ptr,
-        errcode_ret);
-}
-
-CL_API_ENTRY cl_mem CL_API_CALL clCreateImageWithProperties(
-    cl_context context,
-    const cl_mem_properties* properties,
-    cl_mem_flags flags,
-    const cl_image_format* image_format,
-    const cl_image_desc* image_desc,
-    void* host_ptr,
-    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_3_0
-{
-    KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
-    return context->dispatch->clCreateImageWithProperties(
-        context,
-        properties,
-        flags,
-        image_format,
-        image_desc,
-        host_ptr,
-        errcode_ret);
-}
-
-CL_API_ENTRY cl_int CL_API_CALL clSetContextDestructorCallback(
-    cl_context context,
-    void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
-    void* user_data) CL_API_SUFFIX__VERSION_3_0
-{
-    KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(context, CL_INVALID_CONTEXT);
-    return context->dispatch->clSetContextDestructorCallback(
-        context,
-        pfn_notify,
-        user_data);
-}
-
-#endif // CL_VERSION_3_0
-
 #ifdef __cplusplus
 }
 #endif
index 8a05935fbadb9ed856ef9891b3ad0da06e7e07ef..8498563b8a0950279acabf071f8b372f0d079146 100644 (file)
@@ -1986,6 +1986,62 @@ CL_API_ENTRY cl_int CL_API_CALL clSetProgramReleaseCallback(
 
 ///////////////////////////////////////////////////////////////////////////////
 
+CL_API_ENTRY cl_int CL_API_CALL clSetContextDestructorCallback(
+    cl_context context,
+    void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
+    void* user_data) CL_API_SUFFIX__VERSION_3_0
+{
+    KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(context, CL_INVALID_CONTEXT);
+    return context->dispatch->clSetContextDestructorCallback(
+        context,
+        pfn_notify,
+        user_data);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+CL_API_ENTRY cl_mem CL_API_CALL clCreateBufferWithProperties(
+    cl_context context,
+    const cl_mem_properties* properties,
+    cl_mem_flags flags,
+    size_t size,
+    void* host_ptr,
+    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_3_0
+{
+    KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
+    return context->dispatch->clCreateBufferWithProperties(
+        context,
+        properties,
+        flags,
+        size,
+        host_ptr,
+        errcode_ret);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+CL_API_ENTRY cl_mem CL_API_CALL clCreateImageWithProperties(
+    cl_context context,
+    const cl_mem_properties* properties,
+    cl_mem_flags flags,
+    const cl_image_format* image_format,
+    const cl_image_desc* image_desc,
+    void* host_ptr,
+    cl_int* errcode_ret) CL_API_SUFFIX__VERSION_3_0
+{
+    KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(context, CL_INVALID_CONTEXT);
+    return context->dispatch->clCreateImageWithProperties(
+        context,
+        properties,
+        flags,
+        image_format,
+        image_desc,
+        host_ptr,
+        errcode_ret);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
 // cl_ext_device_fission
 
 CL_API_ENTRY cl_int CL_API_CALL clReleaseDeviceEXT(
diff --git a/loader/linux/icd_exports.map b/loader/linux/icd_exports.map
new file mode 100644 (file)
index 0000000..f9299c3
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2016-2019 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * OpenCL is a trademark of Apple Inc. used under license by Khronos.
+ */
+
+OPENCL_1.0 {
+    global:
+        clBuildProgram;
+        clCreateBuffer;
+        clCreateCommandQueue;
+        clCreateContext;
+        clCreateContextFromType;
+        clCreateFromGLBuffer;
+        clCreateFromGLRenderbuffer;
+        clCreateFromGLTexture2D;
+        clCreateFromGLTexture3D;
+        clCreateImage2D;
+        clCreateImage3D;
+        clCreateKernel;
+        clCreateKernelsInProgram;
+        clCreateProgramWithBinary;
+        clCreateProgramWithSource;
+        clCreateSampler;
+        clEnqueueAcquireGLObjects;
+        clEnqueueBarrier;
+        clEnqueueCopyBuffer;
+        clEnqueueCopyBufferToImage;
+        clEnqueueCopyImage;
+        clEnqueueCopyImageToBuffer;
+        clEnqueueMapBuffer;
+        clEnqueueMapImage;
+        clEnqueueMarker;
+        clEnqueueNDRangeKernel;
+        clEnqueueNativeKernel;
+        clEnqueueReadBuffer;
+        clEnqueueReadImage;
+        clEnqueueReleaseGLObjects;
+        clEnqueueTask;
+        clEnqueueUnmapMemObject;
+        clEnqueueWaitForEvents;
+        clEnqueueWriteBuffer;
+        clEnqueueWriteImage;
+        clFinish;
+        clFlush;
+        clGetCommandQueueInfo;
+        clGetContextInfo;
+        clGetDeviceIDs;
+        clGetDeviceInfo;
+        clGetEventInfo;
+        clGetEventProfilingInfo;
+        clGetExtensionFunctionAddress;
+        clGetGLObjectInfo;
+        clGetGLTextureInfo;
+        clGetImageInfo;
+        clGetKernelInfo;
+        clGetKernelWorkGroupInfo;
+        clGetMemObjectInfo;
+        clGetPlatformIDs;
+        clGetPlatformInfo;
+        clGetProgramBuildInfo;
+        clGetProgramInfo;
+        clGetSamplerInfo;
+        clGetSupportedImageFormats;
+        clReleaseCommandQueue;
+        clReleaseContext;
+        clReleaseEvent;
+        clReleaseKernel;
+        clReleaseMemObject;
+        clReleaseProgram;
+        clReleaseSampler;
+        clRetainCommandQueue;
+        clRetainContext;
+        clRetainEvent;
+        clRetainKernel;
+        clRetainMemObject;
+        clRetainProgram;
+        clRetainSampler;
+        clSetCommandQueueProperty;
+        clSetKernelArg;
+        clUnloadCompiler;
+        clWaitForEvents;
+
+    local:
+        /* Everything else is local to ICD. */
+        *;
+};
+
+OPENCL_1.1 {
+    global:
+        clCreateSubBuffer;
+        clCreateUserEvent;
+        clEnqueueCopyBufferRect;
+        clEnqueueReadBufferRect;
+        clEnqueueWriteBufferRect;
+        clSetEventCallback;
+        clSetMemObjectDestructorCallback;
+        clSetUserEventStatus;
+} OPENCL_1.0;
+
+OPENCL_1.2 {
+    global:
+        clCompileProgram;
+        clCreateFromGLTexture;
+        clCreateImage;
+        clCreateProgramWithBuiltInKernels;
+        clCreateSubDevices;
+        clEnqueueBarrierWithWaitList;
+        clEnqueueFillBuffer;
+        clEnqueueFillImage;
+        clEnqueueMarkerWithWaitList;
+        clEnqueueMigrateMemObjects;
+        clGetExtensionFunctionAddressForPlatform;
+        clGetKernelArgInfo;
+        clLinkProgram;
+        clReleaseDevice;
+        clRetainDevice;
+        clUnloadPlatformCompiler;
+} OPENCL_1.1;
+
+OPENCL_2.0 {
+    global:
+        clCreateCommandQueueWithProperties;
+        clCreatePipe;
+        clGetPipeInfo;
+        clSVMAlloc;
+        clSVMFree;
+        clEnqueueSVMFree;
+        clEnqueueSVMMemcpy;
+        clEnqueueSVMMemFill;
+        clEnqueueSVMMap;
+        clEnqueueSVMUnmap;
+        clCreateSamplerWithProperties;
+        clSetKernelArgSVMPointer;
+        clSetKernelExecInfo;
+} OPENCL_1.2;
+
+OPENCL_2.1 {
+    global:
+        clCloneKernel;
+        clCreateProgramWithIL;
+        clEnqueueSVMMigrateMem;
+        clGetDeviceAndHostTimer;
+        clGetHostTimer;
+        clGetKernelSubGroupInfo;
+        clSetDefaultDeviceCommandQueue;
+} OPENCL_2.0;
+
+OPENCL_2.2 {
+    global:
+        clSetProgramReleaseCallback;
+        clSetProgramSpecializationConstant;
+} OPENCL_2.1;
+
+OPENCL_3.0 {
+    global:
+        clCreateBufferWithProperties;
+        clCreateImageWithProperties;
+        clSetContextDestructorCallback;
+} OPENCL_2.2;
diff --git a/loader/linux/icd_exports.map.in b/loader/linux/icd_exports.map.in
deleted file mode 100644 (file)
index 8ef522b..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2016-2019 The Khronos Group Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * OpenCL is a trademark of Apple Inc. used under license by Khronos.
- */
-
-OPENCL_1.0 {
-    global:
-        clBuildProgram;
-        clCreateBuffer;
-        clCreateCommandQueue;
-        clCreateContext;
-        clCreateContextFromType;
-        clCreateFromGLBuffer;
-        clCreateFromGLRenderbuffer;
-        clCreateFromGLTexture2D;
-        clCreateFromGLTexture3D;
-        clCreateImage2D;
-        clCreateImage3D;
-        clCreateKernel;
-        clCreateKernelsInProgram;
-        clCreateProgramWithBinary;
-        clCreateProgramWithSource;
-        clCreateSampler;
-        clEnqueueAcquireGLObjects;
-        clEnqueueBarrier;
-        clEnqueueCopyBuffer;
-        clEnqueueCopyBufferToImage;
-        clEnqueueCopyImage;
-        clEnqueueCopyImageToBuffer;
-        clEnqueueMapBuffer;
-        clEnqueueMapImage;
-        clEnqueueMarker;
-        clEnqueueNDRangeKernel;
-        clEnqueueNativeKernel;
-        clEnqueueReadBuffer;
-        clEnqueueReadImage;
-        clEnqueueReleaseGLObjects;
-        clEnqueueTask;
-        clEnqueueUnmapMemObject;
-        clEnqueueWaitForEvents;
-        clEnqueueWriteBuffer;
-        clEnqueueWriteImage;
-        clFinish;
-        clFlush;
-        clGetCommandQueueInfo;
-        clGetContextInfo;
-        clGetDeviceIDs;
-        clGetDeviceInfo;
-        clGetEventInfo;
-        clGetEventProfilingInfo;
-        clGetExtensionFunctionAddress;
-        clGetGLObjectInfo;
-        clGetGLTextureInfo;
-        clGetImageInfo;
-        clGetKernelInfo;
-        clGetKernelWorkGroupInfo;
-        clGetMemObjectInfo;
-        clGetPlatformIDs;
-        clGetPlatformInfo;
-        clGetProgramBuildInfo;
-        clGetProgramInfo;
-        clGetSamplerInfo;
-        clGetSupportedImageFormats;
-        clReleaseCommandQueue;
-        clReleaseContext;
-        clReleaseEvent;
-        clReleaseKernel;
-        clReleaseMemObject;
-        clReleaseProgram;
-        clReleaseSampler;
-        clRetainCommandQueue;
-        clRetainContext;
-        clRetainEvent;
-        clRetainKernel;
-        clRetainMemObject;
-        clRetainProgram;
-        clRetainSampler;
-        clSetCommandQueueProperty;
-        clSetKernelArg;
-        clUnloadCompiler;
-        clWaitForEvents;
-
-    local:
-        /* Everything else is local to ICD. */
-        *;
-};
-
-OPENCL_1.1 {
-    global:
-        clCreateSubBuffer;
-        clCreateUserEvent;
-        clEnqueueCopyBufferRect;
-        clEnqueueReadBufferRect;
-        clEnqueueWriteBufferRect;
-        clSetEventCallback;
-        clSetMemObjectDestructorCallback;
-        clSetUserEventStatus;
-} OPENCL_1.0;
-
-OPENCL_1.2 {
-    global:
-        clCompileProgram;
-        clCreateFromGLTexture;
-        clCreateImage;
-        clCreateProgramWithBuiltInKernels;
-        clCreateSubDevices;
-        clEnqueueBarrierWithWaitList;
-        clEnqueueFillBuffer;
-        clEnqueueFillImage;
-        clEnqueueMarkerWithWaitList;
-        clEnqueueMigrateMemObjects;
-        clGetExtensionFunctionAddressForPlatform;
-        clGetKernelArgInfo;
-        clLinkProgram;
-        clReleaseDevice;
-        clRetainDevice;
-        clUnloadPlatformCompiler;
-} OPENCL_1.1;
-
-OPENCL_2.0 {
-    global:
-        clCreateCommandQueueWithProperties;
-        clCreatePipe;
-        clGetPipeInfo;
-        clSVMAlloc;
-        clSVMFree;
-        clEnqueueSVMFree;
-        clEnqueueSVMMemcpy;
-        clEnqueueSVMMemFill;
-        clEnqueueSVMMap;
-        clEnqueueSVMUnmap;
-        clCreateSamplerWithProperties;
-        clSetKernelArgSVMPointer;
-        clSetKernelExecInfo;
-} OPENCL_1.2;
-
-OPENCL_2.1 {
-    global:
-        clCloneKernel;
-        clCreateProgramWithIL;
-        clEnqueueSVMMigrateMem;
-        clGetDeviceAndHostTimer;
-        clGetHostTimer;
-        clGetKernelSubGroupInfo;
-        clSetDefaultDeviceCommandQueue;
-} OPENCL_2.0;
-
-OPENCL_2.2 {
-    global:
-        clSetProgramReleaseCallback;
-        clSetProgramSpecializationConstant;
-} OPENCL_2.1;
-
-@ENABLE_OPENCL30_SYMBOLS_START@
-OPENCL_3.0 {
-    global:
-        clCreateBufferWithProperties;
-        clCreateImageWithProperties;
-        clSetContextDestructorCallback;
-} OPENCL_2.2;
-@ENABLE_OPENCL30_SYMBOLS_END@
diff --git a/loader/windows/OpenCL.def b/loader/windows/OpenCL.def
new file mode 100644 (file)
index 0000000..ed451bf
--- /dev/null
@@ -0,0 +1,166 @@
+;
+; Copyright (c) 2016-2019 The Khronos Group Inc.
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+;     http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+; OpenCL is a trademark of Apple Inc. used under license by Khronos.
+
+EXPORTS
+
+;
+; Note:
+;
+; 1. Functions are grouped into blocks according to the OpenCL API version they
+; were introduced in.
+;
+; 2. Function blocks are sorted in ascending order of the API version.
+;
+; 3. Functions within a block are sorted alphabetically.
+;
+
+; OpenCL 1.0 API
+clBuildProgram
+clCreateBuffer
+clCreateCommandQueue
+clCreateContext
+clCreateContextFromType
+clCreateFromGLBuffer
+clCreateFromGLRenderbuffer
+clCreateFromGLTexture2D
+clCreateFromGLTexture3D
+clCreateImage2D
+clCreateImage3D
+clCreateKernel
+clCreateKernelsInProgram
+clCreateProgramWithBinary
+clCreateProgramWithSource
+clCreateSampler
+clEnqueueAcquireGLObjects
+clEnqueueBarrier
+clEnqueueCopyBuffer
+clEnqueueCopyBufferToImage
+clEnqueueCopyImage
+clEnqueueCopyImageToBuffer
+clEnqueueMapBuffer
+clEnqueueMapImage
+clEnqueueMarker
+clEnqueueNDRangeKernel
+clEnqueueNativeKernel
+clEnqueueReadBuffer
+clEnqueueReadImage
+clEnqueueReleaseGLObjects
+clEnqueueTask
+clEnqueueUnmapMemObject
+clEnqueueWaitForEvents
+clEnqueueWriteBuffer
+clEnqueueWriteImage
+clFinish
+clFlush
+clGetCommandQueueInfo
+clGetContextInfo
+clGetDeviceIDs
+clGetDeviceInfo
+clGetEventInfo
+clGetEventProfilingInfo
+clGetExtensionFunctionAddress
+clGetGLObjectInfo
+clGetGLTextureInfo
+clGetImageInfo
+clGetKernelInfo
+clGetKernelWorkGroupInfo
+clGetMemObjectInfo
+clGetPlatformIDs
+clGetPlatformInfo
+clGetProgramBuildInfo
+clGetProgramInfo
+clGetSamplerInfo
+clGetSupportedImageFormats
+clReleaseCommandQueue
+clReleaseContext
+clReleaseEvent
+clReleaseKernel
+clReleaseMemObject
+clReleaseProgram
+clReleaseSampler
+clRetainCommandQueue
+clRetainContext
+clRetainEvent
+clRetainKernel
+clRetainMemObject
+clRetainProgram
+clRetainSampler
+clSetCommandQueueProperty
+clSetKernelArg
+clUnloadCompiler
+clWaitForEvents
+
+; OpenCL 1.1 API
+clCreateSubBuffer
+clCreateUserEvent
+clEnqueueCopyBufferRect
+clEnqueueReadBufferRect
+clEnqueueWriteBufferRect
+clSetEventCallback
+clSetMemObjectDestructorCallback
+clSetUserEventStatus
+
+; OpenCL 1.2 API
+clCompileProgram
+clCreateFromGLTexture
+clCreateImage
+clCreateProgramWithBuiltInKernels
+clCreateSubDevices
+clEnqueueBarrierWithWaitList
+clEnqueueFillBuffer
+clEnqueueFillImage
+clEnqueueMarkerWithWaitList
+clEnqueueMigrateMemObjects
+clGetExtensionFunctionAddressForPlatform
+clGetKernelArgInfo
+clLinkProgram
+clReleaseDevice
+clRetainDevice
+clUnloadPlatformCompiler
+
+; OpenCL 2.0 API
+clCreateCommandQueueWithProperties
+clCreatePipe
+clCreateSamplerWithProperties
+clEnqueueSVMFree
+clEnqueueSVMMap
+clEnqueueSVMMemcpy
+clEnqueueSVMMemFill
+clEnqueueSVMUnmap
+clGetPipeInfo
+clSetKernelArgSVMPointer
+clSetKernelExecInfo
+clSVMAlloc
+clSVMFree
+
+; OpenCL 2.1 API
+clCloneKernel
+clCreateProgramWithIL
+clEnqueueSVMMigrateMem
+clGetDeviceAndHostTimer
+clGetHostTimer
+clGetKernelSubGroupInfo
+clSetDefaultDeviceCommandQueue
+
+; OpenCL 2.2 API
+clSetProgramReleaseCallback
+clSetProgramSpecializationConstant
+
+; OpenCL 3.0 API
+clCreateBufferWithProperties
+clCreateImageWithProperties
+clSetContextDestructorCallback
diff --git a/loader/windows/OpenCL.def.in b/loader/windows/OpenCL.def.in
deleted file mode 100644 (file)
index 7fbd39c..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-;
-; Copyright (c) 2016-2019 The Khronos Group Inc.
-;
-; Licensed under the Apache License, Version 2.0 (the "License");
-; you may not use this file except in compliance with the License.
-; You may obtain a copy of the License at
-;
-;     http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing, software
-; distributed under the License is distributed on an "AS IS" BASIS,
-; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-; See the License for the specific language governing permissions and
-; limitations under the License.
-;
-; OpenCL is a trademark of Apple Inc. used under license by Khronos.
-
-EXPORTS
-
-;
-; Note:
-;
-; 1. Functions are grouped into blocks according to the OpenCL API version they
-; were introduced in.
-;
-; 2. Function blocks are sorted in ascending order of the API version.
-;
-; 3. Functions within a block are sorted alphabetically.
-;
-
-; OpenCL 1.0 API
-clBuildProgram
-clCreateBuffer
-clCreateCommandQueue
-clCreateContext
-clCreateContextFromType
-clCreateFromGLBuffer
-clCreateFromGLRenderbuffer
-clCreateFromGLTexture2D
-clCreateFromGLTexture3D
-clCreateImage2D
-clCreateImage3D
-clCreateKernel
-clCreateKernelsInProgram
-clCreateProgramWithBinary
-clCreateProgramWithSource
-clCreateSampler
-clEnqueueAcquireGLObjects
-clEnqueueBarrier
-clEnqueueCopyBuffer
-clEnqueueCopyBufferToImage
-clEnqueueCopyImage
-clEnqueueCopyImageToBuffer
-clEnqueueMapBuffer
-clEnqueueMapImage
-clEnqueueMarker
-clEnqueueNDRangeKernel
-clEnqueueNativeKernel
-clEnqueueReadBuffer
-clEnqueueReadImage
-clEnqueueReleaseGLObjects
-clEnqueueTask
-clEnqueueUnmapMemObject
-clEnqueueWaitForEvents
-clEnqueueWriteBuffer
-clEnqueueWriteImage
-clFinish
-clFlush
-clGetCommandQueueInfo
-clGetContextInfo
-clGetDeviceIDs
-clGetDeviceInfo
-clGetEventInfo
-clGetEventProfilingInfo
-clGetExtensionFunctionAddress
-clGetGLObjectInfo
-clGetGLTextureInfo
-clGetImageInfo
-clGetKernelInfo
-clGetKernelWorkGroupInfo
-clGetMemObjectInfo
-clGetPlatformIDs
-clGetPlatformInfo
-clGetProgramBuildInfo
-clGetProgramInfo
-clGetSamplerInfo
-clGetSupportedImageFormats
-clReleaseCommandQueue
-clReleaseContext
-clReleaseEvent
-clReleaseKernel
-clReleaseMemObject
-clReleaseProgram
-clReleaseSampler
-clRetainCommandQueue
-clRetainContext
-clRetainEvent
-clRetainKernel
-clRetainMemObject
-clRetainProgram
-clRetainSampler
-clSetCommandQueueProperty
-clSetKernelArg
-clUnloadCompiler
-clWaitForEvents
-
-; OpenCL 1.1 API
-clCreateSubBuffer
-clCreateUserEvent
-clEnqueueCopyBufferRect
-clEnqueueReadBufferRect
-clEnqueueWriteBufferRect
-clSetEventCallback
-clSetMemObjectDestructorCallback
-clSetUserEventStatus
-
-; OpenCL 1.2 API
-clCompileProgram
-clCreateFromGLTexture
-clCreateImage
-clCreateProgramWithBuiltInKernels
-clCreateSubDevices
-clEnqueueBarrierWithWaitList
-clEnqueueFillBuffer
-clEnqueueFillImage
-clEnqueueMarkerWithWaitList
-clEnqueueMigrateMemObjects
-clGetExtensionFunctionAddressForPlatform
-clGetKernelArgInfo
-clLinkProgram
-clReleaseDevice
-clRetainDevice
-clUnloadPlatformCompiler
-
-; OpenCL 2.0 API
-clCreateCommandQueueWithProperties
-clCreatePipe
-clCreateSamplerWithProperties
-clEnqueueSVMFree
-clEnqueueSVMMap
-clEnqueueSVMMemcpy
-clEnqueueSVMMemFill
-clEnqueueSVMUnmap
-clGetPipeInfo
-clSetKernelArgSVMPointer
-clSetKernelExecInfo
-clSVMAlloc
-clSVMFree
-
-; OpenCL 2.1 API
-clCloneKernel
-clCreateProgramWithIL
-clEnqueueSVMMigrateMem
-clGetDeviceAndHostTimer
-clGetHostTimer
-clGetKernelSubGroupInfo
-clSetDefaultDeviceCommandQueue
-
-; OpenCL 2.2 API
-clSetProgramReleaseCallback
-clSetProgramSpecializationConstant
-
-; OpenCL 3.0 API
-@ENABLE_OPENCL30_SYMBOLS@clCreateBufferWithProperties
-@ENABLE_OPENCL30_SYMBOLS@clCreateImageWithProperties
-@ENABLE_OPENCL30_SYMBOLS@clSetContextDestructorCallback
index 3353fd4f890124603fe147c447f241a453d981b3..2ebc875e01a486a1fdcad2f924dc34e87e5c19c5 100644 (file)
@@ -18,9 +18,9 @@
 
 #include <windows.h>
 
-#define OPENCL_ICD_LOADER_VERSION_MAJOR 2
-#define OPENCL_ICD_LOADER_VERSION_MINOR 2
-#define OPENCL_ICD_LOADER_VERSION_REV   9
+#define OPENCL_ICD_LOADER_VERSION_MAJOR 3
+#define OPENCL_ICD_LOADER_VERSION_MINOR 0
+#define OPENCL_ICD_LOADER_VERSION_REV   0
 
 #ifdef RC_INVOKED
 
index 5bc9db4bcf1d18354deb6415e9917b9e1db7c10d..cdc4b4ab3688491e1d87ceb09cc5d8de6a9be3e5 100644 (file)
@@ -4,9 +4,6 @@ apiskip = {
     'clGetPlatformIDs',                         # to query platforms
     'clGetExtensionFunctionAddress',            # to return ICD-aware extensions
     'clGetExtensionFunctionAddressForPlatform', # to return ICD-aware extensions
-    'clCreateBufferWithProperties',             # only until OpenCL 3.0 is final
-    'clCreateImageWithProperties',              # only until OpenCL 3.0 is final
-    'clSetContextDestructorCallback',           # only until OpenCL 3.0 is final
     }
 
 # Handles, and mappings to errors when handles are invalid:
index 733a2aa7fa717ba41de4aa4796451686e448bd8f..c82b8a5375cd7dee1ee5d1d8c8da6ad367040cfc 100644 (file)
@@ -355,8 +355,6 @@ clGetContextInfo(cl_context         context,
     return return_value;
 }
 
-#ifdef CL_VERSION_3_0
-
 CL_API_ENTRY cl_int CL_API_CALL
 clSetContextDestructorCallback(cl_context         context,
                                void (CL_CALLBACK* pfn_notify)(cl_context context,
@@ -377,8 +375,6 @@ clSetContextDestructorCallback(cl_context         context,
     return return_value;
 }
 
-#endif
-
 /* Command Queue APIs */
 CL_API_ENTRY cl_command_queue CL_API_CALL
 clCreateCommandQueue(cl_context                     context,
@@ -575,8 +571,6 @@ clCreateImage3D(cl_context              context,
     return obj;
 }
 
-#ifdef CL_VERSION_3_0
-
 CL_API_ENTRY cl_mem CL_API_CALL
 clCreateBufferWithProperties(cl_context                context ,
                              const cl_mem_properties * properties,
@@ -623,8 +617,6 @@ clCreateImageWithProperties(cl_context                context,
     return obj;
 }
 
-#endif  // CL_VERSION_3_0
-
 CL_API_ENTRY cl_int CL_API_CALL
 clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0
 {
index eea86651fcf61fda53ef5a291660e4cee2f5c393..7b58de29b8e6e5e1122381ab3cc7e5e0897d6373 100644 (file)
@@ -230,16 +230,10 @@ cl_int cliIcdDispatchTableCreate(CLIicdDispatchTable **outDispatchTable)
     ICD_DISPATCH_TABLE_ENTRY( NULL );
     ICD_DISPATCH_TABLE_ENTRY( NULL );
 
-#ifdef CL_VERSION_3_0
     /* OpenCL 3.0 */
     ICD_DISPATCH_TABLE_ENTRY ( clCreateBufferWithProperties );
     ICD_DISPATCH_TABLE_ENTRY ( clCreateImageWithProperties );
     ICD_DISPATCH_TABLE_ENTRY ( clSetContextDestructorCallback );
-#else
-    ICD_DISPATCH_TABLE_ENTRY( NULL );
-    ICD_DISPATCH_TABLE_ENTRY( NULL );
-    ICD_DISPATCH_TABLE_ENTRY( NULL );
-#endif  // CL_VERSION_3_0
 
     // return success
     *outDispatchTable = dispatchTable;
index 0e2db512c57d16a4d44eaed8680df3f5a9e3845b..d04e2290f6cce775a0a57919c737640f3401ae5a 100644 (file)
@@ -68,14 +68,12 @@ struct clGetContextInfo_st
     size_t *param_value_size_ret;
 };
 
-#ifdef CL_VERSION_3_0
 struct clSetContextDestructorCallback_st
 {
     cl_context context;
     void (CL_CALLBACK *pfn_notify)(cl_context context, void *user_data);
     void *user_data;
 };
-#endif  // CL_VERSION_3_0
 
 struct clGetPlatformIDs_st 
 {
@@ -185,7 +183,7 @@ struct clCreateBuffer_st
     void *host_ptr;
     cl_int *errcode_ret;
 };
-#ifdef CL_VERSION_3_0
+
 struct clCreateBufferWithProperties_st
 {
     cl_context context;
@@ -195,7 +193,7 @@ struct clCreateBufferWithProperties_st
     void *host_ptr;
     cl_int *errcode_ret;
 };
-#endif  // CL_VERSION_3_0
+
 struct clCreateSubBuffer_st 
 {
     cl_mem buffer;
@@ -517,7 +515,6 @@ struct clCreateImage_st
     cl_int *errcode_ret;
 };
 
-#ifdef CL_VERSION_3_0
 struct clCreateImageWithProperties_st
 {
     cl_context context;
@@ -528,7 +525,6 @@ struct clCreateImageWithProperties_st
     void *host_ptr;
     cl_int *errcode_ret;
 };
-#endif  // CL_VERSION_3_0
 
 struct clCreateImage2D_st 
 {
index f7e899094edd00f581aa29961f14197845a2e69d..9bd351468432a00559bf7c4e60378bb35f9c9d98 100644 (file)
@@ -60,12 +60,10 @@ const struct clCreateBuffer_st clCreateBufferData[NUM_ITEMS_clCreateBuffer] =
     {NULL, 0, 0, NULL, NULL}
 };
 
-#ifdef CL_VERSION_3_0
 const struct clCreateBufferWithProperties_st clCreateBufferWithPropertiesData[NUM_ITEMS_clCreateBufferWithProperties] =
 {
     {NULL, NULL, 0, 0, NULL, NULL}
 };
-#endif  // CL_VERSION_3_0
 
 const struct clCreateSubBuffer_st clCreateSubBufferData[NUM_ITEMS_clCreateSubBuffer] =
 {
@@ -77,12 +75,10 @@ const struct clCreateImage_st clCreateImageData[NUM_ITEMS_clCreateImage] =
     { NULL, 0x0, NULL, NULL, NULL, NULL}
 };
 
-#ifdef CL_VERSION_3_0
 const struct clCreateImageWithProperties_st clCreateImageWithPropertiesData[NUM_ITEMS_clCreateImageWithProperties] =
 {
     { NULL, NULL, 0x0, NULL, NULL, NULL, NULL}
 };
-#endif  // CL_VERSION_3_0
 
 const struct clCreateImage2D_st clCreateImage2DData[NUM_ITEMS_clCreateImage2D] =
 {
@@ -313,7 +309,6 @@ int test_clCreateBuffer(const struct clCreateBuffer_st *data)
 
 }
 
-#ifdef CL_VERSION_3_0
 int test_clCreateBufferWithProperties(const struct clCreateBufferWithProperties_st *data)
 {
     test_icd_app_log("clCreateBufferWithProperties(%p, %p, %x, %u, %p, %p)\n",
@@ -338,7 +333,6 @@ int test_clCreateBufferWithProperties(const struct clCreateBufferWithProperties_
     return 0;
 
 }
-#endif  // CL_VERSION_3_0
 
 int test_clCreateSubBuffer(const struct clCreateSubBuffer_st *data)
 {
@@ -387,7 +381,6 @@ int test_clCreateImage(const struct clCreateImage_st *data)
 
 }
 
-#ifdef CL_VERSION_3_0
 int test_clCreateImageWithProperties(const struct clCreateImageWithProperties_st *data)
 {
     test_icd_app_log("clCreateImageWithProperties(%p, %p, %x, %p, %p, %p, %p)\n",
@@ -413,7 +406,6 @@ int test_clCreateImageWithProperties(const struct clCreateImageWithProperties_st
     return 0;
 
 }
-#endif  // CL_VERSION_3_0
 
 int test_clCreateImage2D(const struct clCreateImage2D_st *data)
 {
@@ -779,17 +771,13 @@ int test_create_calls()
 
     test_clCreateBuffer(clCreateBufferData);
 
-#ifdef CL_VERSION_3_0
     test_clCreateBufferWithProperties(clCreateBufferWithPropertiesData);
-#endif
 
     test_clCreateSubBuffer(clCreateSubBufferData);
 
     test_clCreateImage(clCreateImageData);
 
-#ifdef CL_VERSION_3_0
     test_clCreateImageWithProperties(clCreateImageWithPropertiesData);
-#endif
 
     test_clReleaseMemObject(clReleaseMemObjectDataImage);
 
index 8296e6570d3580e783005a4e5d1a40ef6233d6dd..cb2839b0bebc075eac112904cf3c43ab35321993 100644 (file)
@@ -20,12 +20,10 @@ struct clGetContextInfo_st clGetContextInfoData[NUM_ITEMS_clGetContextInfo] =
     {NULL, 0, 0, NULL, NULL}
 };
 
-#ifdef CL_VERSION_3_0
 struct clSetContextDestructorCallback_st clSetContextDestructorCallbackData[NUM_ITEMS_clSetContextDestructorCallback] =
 {
     {NULL, setcontextdestructor_callback, NULL}
 };
-#endif  // CL_VERSION_3_0
 
 struct clGetPlatformInfo_st clGetPlatformInfoData[NUM_ITEMS_clGetPlatformInfo] =
 {
@@ -87,7 +85,6 @@ int test_clGetContextInfo(const struct clGetContextInfo_st* data)
 }
 
 
-#ifdef CL_VERSION_3_0
 int test_clSetContextDestructorCallback(
     const struct clSetContextDestructorCallback_st* data)
 {
@@ -108,7 +105,6 @@ int test_clSetContextDestructorCallback(
 
     return 0;
 }
-#endif  // CL_VERSION_3_0
 
 
 int test_clGetPlatformInfo(const struct clGetPlatformInfo_st* data)
@@ -199,11 +195,9 @@ int test_platforms()
         test_clRetainContext(&clRetainContextData[i]);
     }
 
-#ifdef CL_VERSION_3_0
     for (i = 0;i<NUM_ITEMS_clSetContextDestructorCallback;i++) {
         test_clSetContextDestructorCallback(&clSetContextDestructorCallbackData[i]);
     }
-#endif  // CL_VERSION_3_0
 
     for (i = 0;i<NUM_ITEMS_clGetContextInfo;i++) {
         test_clGetContextInfo(&clGetContextInfoData[i]);