pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/parallel/ocl-icd
Module Name: pkgsrc
Committed By: nia
Date: Thu Jun 10 05:55:42 UTC 2021
Added Files:
pkgsrc/parallel/ocl-icd: DESCR Makefile PLIST buildlink3.mk distinfo
pkgsrc/parallel/ocl-icd/patches: patch-icd__generator.rb
patch-khronos-headers_CL_cl.h patch-khronos-headers_CL_cl__d3d10.h
patch-khronos-headers_CL_cl__d3d11.h
patch-khronos-headers_CL_cl__dx9__media__sharing.h
patch-khronos-headers_CL_cl__egl.h
patch-khronos-headers_CL_cl__ext.h
patch-khronos-headers_CL_cl__gl.h
patch-khronos-headers_CL_cl__gl__ext.h
patch-khronos-headers_CL_cl__icd.h
patch-khronos-headers_CL_cl__layer.h
patch-khronos-headers_CL_cl__platform.h
patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h
patch-khronos-headers_CL_opencl.h patch-ocl__interface.yaml
patch-run__dummy__icd.c
Log Message:
add parallel/ocl-icd
This package aims at creating an Open Source alternative to vendor specific
OpenCL ICD loaders.
The main difficulties to create such software is that the order of function
pointers in a structure is not publicy available.
This software maintains a YAML database of all known and guessed entries.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/parallel/ocl-icd/DESCR \
pkgsrc/parallel/ocl-icd/Makefile pkgsrc/parallel/ocl-icd/PLIST \
pkgsrc/parallel/ocl-icd/buildlink3.mk pkgsrc/parallel/ocl-icd/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/parallel/ocl-icd/patches/patch-icd__generator.rb \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d10.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d11.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__dx9__media__sharing.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__egl.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__ext.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl__ext.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__icd.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__layer.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__platform.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h \
pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_opencl.h \
pkgsrc/parallel/ocl-icd/patches/patch-ocl__interface.yaml \
pkgsrc/parallel/ocl-icd/patches/patch-run__dummy__icd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/parallel/ocl-icd/DESCR
diff -u /dev/null pkgsrc/parallel/ocl-icd/DESCR:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/DESCR Thu Jun 10 05:55:42 2021
@@ -0,0 +1,7 @@
+This package aims at creating an Open Source alternative to vendor specific
+OpenCL ICD loaders.
+
+The main difficulties to create such software is that the order of function
+pointers in a structure is not publicy available.
+
+This software maintains a YAML database of all known and guessed entries.
Index: pkgsrc/parallel/ocl-icd/Makefile
diff -u /dev/null pkgsrc/parallel/ocl-icd/Makefile:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/Makefile Thu Jun 10 05:55:42 2021
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+DISTNAME= ocl-icd-2.3.0
+CATEGORIES= parallel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=OCL-dev/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/OCL-dev/ocl-icd
+COMMENT= OpenCL ICD Loader
+LICENSE= 2-clause-bsd
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+
+USE_TOOLS+= autoconf autoreconf automake
+USE_TOOLS+= gmake
+
+TOOL_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
+TOOL_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
+
+PKGCONFIG_OVERRIDE+= OpenCL.pc.in
+PKGCONFIG_OVERRIDE+= ocl-icd.pc.in
+
+pre-configure:
+ cd ${WRKSRC} && autoreconf -fi
+
+.include "../../parallel/opencl-headers/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/parallel/ocl-icd/PLIST
diff -u /dev/null pkgsrc/parallel/ocl-icd/PLIST:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/PLIST Thu Jun 10 05:55:42 2021
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2021/06/10 05:55:42 nia Exp $
+include/ocl_icd.h
+lib/libOpenCL.la
+lib/pkgconfig/OpenCL.pc
+lib/pkgconfig/ocl-icd.pc
+man/man7/libOpenCL.7
+man/man7/libOpenCL.so.7
+share/doc/ocl-icd/examples/ocl_icd_bindings.c
+share/doc/ocl-icd/html/libOpenCL.html
Index: pkgsrc/parallel/ocl-icd/buildlink3.mk
diff -u /dev/null pkgsrc/parallel/ocl-icd/buildlink3.mk:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/buildlink3.mk Thu Jun 10 05:55:42 2021
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+BUILDLINK_TREE+= ocl-icd
+
+.if !defined(OCL_ICD_BUILDLINK3_MK)
+OCL_ICD_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.ocl-icd+= ocl-icd>=2.3.0
+BUILDLINK_PKGSRCDIR.ocl-icd?= ../../parallel/ocl-icd
+
+.include "../../parallel/opencl-headers/buildlink3.mk"
+.endif # OCL_ICD_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -ocl-icd
Index: pkgsrc/parallel/ocl-icd/distinfo
diff -u /dev/null pkgsrc/parallel/ocl-icd/distinfo:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/distinfo Thu Jun 10 05:55:42 2021
@@ -0,0 +1,22 @@
+$NetBSD: distinfo,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+SHA1 (ocl-icd-2.3.0.tar.gz) = 4ccf5706c8cf09c63dd56fef57c2bf9c70a5288f
+RMD160 (ocl-icd-2.3.0.tar.gz) = d72a75a2ff12c9cf30f8b91c65782473947ee633
+SHA512 (ocl-icd-2.3.0.tar.gz) = 003f3661b7086a7364e79d1058591f12a7095aa2c3decfc4b496f00a0863a91cd81080f33b9308e3948045f8aca5856868ed2725f478654230e51a60d654e613
+Size (ocl-icd-2.3.0.tar.gz) = 100848 bytes
+SHA1 (patch-icd__generator.rb) = d4522e8b264a3eb944f019e7139598e3ac6dc371
+SHA1 (patch-khronos-headers_CL_cl.h) = 016b3e07fc529b104530d29826b1375e8b0c4745
+SHA1 (patch-khronos-headers_CL_cl__d3d10.h) = efbd00d2ffae3e24a2d5671835d474f7c813da20
+SHA1 (patch-khronos-headers_CL_cl__d3d11.h) = 8865f5e4fafbf7216a212fc91e372a0f76772025
+SHA1 (patch-khronos-headers_CL_cl__dx9__media__sharing.h) = c70eec07f90db0b034c4c8e8761051a6967606c3
+SHA1 (patch-khronos-headers_CL_cl__egl.h) = 2426e022486e39f5e418d7d509fb7fe98c3c8697
+SHA1 (patch-khronos-headers_CL_cl__ext.h) = aa19f68954d390348dc4c85058d8b78e91d943c3
+SHA1 (patch-khronos-headers_CL_cl__gl.h) = 21707229aea5e2268af6ff49e5fc9ac834f7579b
+SHA1 (patch-khronos-headers_CL_cl__gl__ext.h) = 6daced51363b5157f66025c119ec9a08d68bfb2d
+SHA1 (patch-khronos-headers_CL_cl__icd.h) = ed0a46b8c1260b43f1578e07e34e0a5dbe53b5e6
+SHA1 (patch-khronos-headers_CL_cl__layer.h) = d1b0ae935c4eed12076d7e4da956626e38e93841
+SHA1 (patch-khronos-headers_CL_cl__platform.h) = 4010d874b9c25a8701c52460c8de822cf579c8c2
+SHA1 (patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h) = 98a6605f15a7e583eacae59fd522f94ca01a51e6
+SHA1 (patch-khronos-headers_CL_opencl.h) = 2aa2d9b484252906f0ed82d176a95bb86614c617
+SHA1 (patch-ocl__interface.yaml) = 41a400fdb541220de5a296e099bb646b00f189a3
+SHA1 (patch-run__dummy__icd.c) = b60c3b48730402ed8434dd2434e013dd1c26388e
Index: pkgsrc/parallel/ocl-icd/patches/patch-icd__generator.rb
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-icd__generator.rb:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-icd__generator.rb Thu Jun 10 05:55:42 2021
@@ -0,0 +1,26 @@
+$NetBSD: patch-icd__generator.rb,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- icd_generator.rb.orig 2021-03-30 16:10:38.000000000 +0000
++++ icd_generator.rb
+@@ -57,7 +57,7 @@ module IcdGenerator
+ "clGetGLContextInfoKHR", "clUnloadCompiler",
+ "clCreateContext", "clCreateContextFromType", "clWaitForEvents"]
+ $header_files = ["/usr/include/CL/cl.h", "/usr/include/CL/cl_gl.h", "/usr/include/CL/cl_egl.h",
+- "/usr/include/CL/cl_ext.h", "/usr/include/CL/cl_gl_ext.h"]
++ "/usr/include/CL/cl_ext.h"]
+ $windows_header_files = ["/usr/include/CL/cl_dx9_media_sharing.h", "/usr/include/CL/cl_d3d11.h", "/usr/include/CL/cl_d3d10.h"]
+ $cl_data_type_error = { "cl_platform_id" => "CL_INVALID_PLATFORM",
+ "cl_device_id" => "CL_INVALID_DEVICE",
+@@ -246,7 +246,7 @@ EOF
+ run_dummy_icd += "\n\n"
+ $api_entries.each_key { |func_name|
+ next if $forbidden_funcs.include?(func_name)
+- run_dummy_icd += $api_entries[func_name]+";\n"
++ run_dummy_icd += $api_entries[func_name]+"\n"
+ }
+ run_dummy_icd += "\n\n"
+ run_dummy_icd += "void call_all_OpenCL_functions(cl_platform_id chosen_platform) {\n"
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,112 @@
+$NetBSD: patch-khronos-headers_CL_cl.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl.h
+@@ -1311,11 +1311,11 @@ clLinkProgram(cl_context conte
+
+ #ifdef CL_VERSION_2_2
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_2_DEPRECATED cl_int CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_2_2_DEPRECATED cl_int CL_API_CALL
+ clSetProgramReleaseCallback(cl_program program,
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
+ void * user_data),
+- void * user_data) CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED;
++ void * user_data) CL_API_SUFFIX__VERSION_2_2_DEPRECATED;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clSetProgramSpecializationConstant(cl_program program,
+@@ -1857,11 +1857,11 @@ clGetExtensionFunctionAddressForPlatform
+ clSetCommandQueueProperty(cl_command_queue command_queue,
+ cl_command_queue_properties properties,
+ cl_bool enable,
+- cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
++ cl_command_queue_properties * old_properties) CL_API_SUFFIX__VERSION_1_0_DEPRECATED;
+ #endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
+
+ /* Deprecated OpenCL 1.1 APIs */
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+ clCreateImage2D(cl_context context,
+ cl_mem_flags flags,
+ const cl_image_format * image_format,
+@@ -1869,9 +1869,9 @@ clCreateImage2D(cl_context
+ size_t image_height,
+ size_t image_row_pitch,
+ void * host_ptr,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+ clCreateImage3D(cl_context context,
+ cl_mem_flags flags,
+ const cl_image_format * image_format,
+@@ -1881,46 +1881,46 @@ clCreateImage3D(cl_context
+ size_t image_row_pitch,
+ size_t image_slice_pitch,
+ void * host_ptr,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+ clEnqueueMarker(cl_command_queue command_queue,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+ clEnqueueWaitForEvents(cl_command_queue command_queue,
+ cl_uint num_events,
+- const cl_event * event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ const cl_event * event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+-clEnqueueBarrier(cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
++clEnqueueBarrier(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+-clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
++clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
+-clGetExtensionFunctionAddress(const char * func_name) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
++clGetExtensionFunctionAddress(const char * func_name) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+ /* Deprecated OpenCL 2.0 APIs */
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
+ clCreateCommandQueue(cl_context context,
+ cl_device_id device,
+ cl_command_queue_properties properties,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
+ clCreateSampler(cl_context context,
+ cl_bool normalized_coords,
+ cl_addressing_mode addressing_mode,
+ cl_filter_mode filter_mode,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
+ clEnqueueTask(cl_command_queue command_queue,
+ cl_kernel kernel,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
+
+ #ifdef __cplusplus
+ }
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d10.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d10.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d10.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,58 @@
+$NetBSD: patch-khronos-headers_CL_cl__d3d10.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_d3d10.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_d3d10.h
+@@ -75,7 +75,7 @@ typedef cl_uint cl_d3d10_device_set_khr;
+
+ /******************************************************************************/
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
++typedef cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
+ cl_platform_id platform,
+ cl_d3d10_device_source_khr d3d_device_source,
+ void * d3d_object,
+@@ -84,27 +84,27 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
+ cl_device_id * devices,
+ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ ID3D10Buffer * resource,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ ID3D10Texture2D * resource,
+ UINT subresource,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ ID3D10Texture3D * resource,
+ UINT subresource,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+@@ -112,7 +112,7 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d11.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d11.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__d3d11.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,58 @@
+$NetBSD: patch-khronos-headers_CL_cl__d3d11.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_d3d11.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_d3d11.h
+@@ -75,7 +75,7 @@ typedef cl_uint cl_d3d11_device_set_khr;
+
+ /******************************************************************************/
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
++typedef cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
+ cl_platform_id platform,
+ cl_d3d11_device_source_khr d3d_device_source,
+ void * d3d_object,
+@@ -84,27 +84,27 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
+ cl_device_id * devices,
+ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ ID3D11Buffer * resource,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ ID3D11Texture2D * resource,
+ UINT subresource,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ ID3D11Texture3D * resource,
+ UINT subresource,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+@@ -112,7 +112,7 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__dx9__media__sharing.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__dx9__media__sharing.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__dx9__media__sharing.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,121 @@
+$NetBSD: patch-khronos-headers_CL_cl__dx9__media__sharing.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_dx9_media_sharing.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_dx9_media_sharing.h
+@@ -76,7 +76,7 @@ typedef struct _cl_dx9_surface_info_khr
+
+ /******************************************************************************/
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
++typedef cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
+ cl_platform_id platform,
+ cl_uint num_media_adapters,
+ cl_dx9_media_adapter_type_khr * media_adapter_type,
+@@ -86,7 +86,7 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
+ cl_device_id * devices,
+ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ cl_dx9_media_adapter_type_khr adapter_type,
+@@ -94,7 +94,7 @@ typedef CL_API_ENTRY cl_mem (CL_API_CALL
+ cl_uint plane,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+@@ -102,7 +102,7 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+@@ -159,16 +159,16 @@ clGetDeviceIDsFromDX9INTEL(
+ cl_dx9_device_set_intel dx9_device_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+- cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
++typedef cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
+ cl_platform_id platform,
+ cl_dx9_device_source_intel dx9_device_source,
+ void* dx9_object,
+ cl_dx9_device_set_intel dx9_device_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+- cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
+
+ extern CL_API_ENTRY cl_mem CL_API_CALL
+ clCreateFromDX9MediaSurfaceINTEL(
+@@ -177,15 +177,15 @@ clCreateFromDX9MediaSurfaceINTEL(
+ IDirect3DSurface9* resource,
+ HANDLE sharedHandle,
+ UINT plane,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ IDirect3DSurface9* resource,
+ HANDLE sharedHandle,
+ UINT plane,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueAcquireDX9ObjectsINTEL(
+@@ -194,15 +194,15 @@ clEnqueueAcquireDX9ObjectsINTEL(
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueReleaseDX9ObjectsINTEL(
+@@ -211,15 +211,15 @@ clEnqueueReleaseDX9ObjectsINTEL(
+ cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
+
+ #ifdef __cplusplus
+ }
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__egl.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__egl.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__egl.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,44 @@
+$NetBSD: patch-khronos-headers_CL_cl__egl.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_egl.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_egl.h
+@@ -56,7 +56,7 @@ clCreateFromEGLImageKHR(cl_context
+ const cl_egl_image_properties_khr * properties,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
++typedef cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
+ cl_context context,
+ CLeglDisplayKHR egldisplay,
+ CLeglImageKHR eglimage,
+@@ -73,7 +73,7 @@ clEnqueueAcquireEGLObjectsKHR(cl_command
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+@@ -90,7 +90,7 @@ clEnqueueReleaseEGLObjectsKHR(cl_command
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+@@ -107,7 +107,7 @@ clCreateEventFromEGLSyncKHR(cl_context
+ CLeglDisplayKHR display,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
++typedef cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
+ cl_context context,
+ CLeglSyncKHR sync,
+ CLeglDisplayKHR display,
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__ext.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__ext.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__ext.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,574 @@
+$NetBSD: patch-khronos-headers_CL_cl__ext.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_ext.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_ext.h
+@@ -54,9 +54,9 @@ extern "C" {
+ * before using.
+ */
+ #define cl_APPLE_SetMemObjectDestructor 1
+-cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
++extern CL_API_ENTRY cl_int CL_API_CALL clSetMemObjectDestructorAPPLE( cl_mem memobj,
+ void (* pfn_notify)(cl_mem memobj, void * user_data),
+- void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
++ void * user_data) CL_API_SUFFIX__VERSION_1_0;
+
+
+ /* Context Logging Functions
+@@ -68,22 +68,22 @@ cl_int CL_API_ENTRY clSetMemObjectDestr
+ * clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
+ */
+ #define cl_APPLE_ContextLoggingFunctions 1
+-extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
++extern CL_API_ENTRY void CL_API_CALL clLogMessagesToSystemLogAPPLE( const char * errstr,
+ const void * private_info,
+ size_t cb,
+- void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
++ void * user_data) CL_API_SUFFIX__VERSION_1_0;
+
+ /* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
+-extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
++extern CL_API_ENTRY void CL_API_CALL clLogMessagesToStdoutAPPLE( const char * errstr,
+ const void * private_info,
+ size_t cb,
+- void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
++ void * user_data) CL_API_SUFFIX__VERSION_1_0;
+
+ /* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
+-extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
++extern CL_API_ENTRY void CL_API_CALL clLogMessagesToStderrAPPLE( const char * errstr,
+ const void * private_info,
+ size_t cb,
+- void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
++ void * user_data) CL_API_SUFFIX__VERSION_1_0;
+
+
+ /************************
+@@ -102,7 +102,7 @@ clIcdGetPlatformIDsKHR(cl_uint
+ cl_platform_id * platforms,
+ cl_uint * num_platforms);
+
+-typedef CL_API_ENTRY cl_int
++typedef cl_int
+ (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
+ cl_platform_id * platforms,
+ cl_uint * num_platforms);
+@@ -129,11 +129,11 @@ clCreateProgramWithILKHR(cl_context co
+ size_t length,
+ cl_int * errcode_ret);
+
+-typedef CL_API_ENTRY cl_program
++typedef cl_program
+ (CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
+ const void * il,
+ size_t length,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+ /* Extension: cl_khr_image2d_from_buffer
+ *
+@@ -176,10 +176,10 @@ typedef CL_API_ENTRY cl_program
+
+ #define cl_khr_terminate_context 1
+ extern CL_API_ENTRY cl_int CL_API_CALL
+-clTerminateContextKHR(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
++clTerminateContextKHR(cl_context context) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int
+-(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
++typedef cl_int
++(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_API_SUFFIX__VERSION_1_2;
+
+
+ /*
+@@ -204,13 +204,13 @@ extern CL_API_ENTRY cl_command_queue CL_
+ clCreateCommandQueueWithPropertiesKHR(cl_context context,
+ cl_device_id device,
+ const cl_queue_properties_khr* properties,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_command_queue
++typedef cl_command_queue
+ (CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
+ cl_device_id device,
+ const cl_queue_properties_khr* properties,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+
+ /******************************************
+@@ -268,16 +268,16 @@ typedef CL_API_ENTRY cl_command_queue
+ #define cl_ext_device_fission 1
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+-clReleaseDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
++clReleaseDeviceEXT(cl_device_id device) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int
+-(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
++typedef cl_int
++(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_API_SUFFIX__VERSION_1_1;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+-clRetainDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
++clRetainDeviceEXT(cl_device_id device) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int
+-(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
++typedef cl_int
++(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_API_SUFFIX__VERSION_1_1;
+
+ typedef cl_ulong cl_device_partition_property_ext;
+ extern CL_API_ENTRY cl_int CL_API_CALL
+@@ -285,14 +285,14 @@ clCreateSubDevicesEXT(cl_device_id in_
+ const cl_device_partition_property_ext * properties,
+ cl_uint num_entries,
+ cl_device_id * out_devices,
+- cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int
++typedef cl_int
+ (CL_API_CALL * clCreateSubDevicesEXT_fn)(cl_device_id in_device,
+ const cl_device_partition_property_ext * properties,
+ cl_uint num_entries,
+ cl_device_id * out_devices,
+- cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_1;
+
+ /* cl_device_partition_property_ext */
+ #define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
+@@ -346,7 +346,7 @@ clEnqueueMigrateMemObjectEXT(cl_command_
+ const cl_event * event_wait_list,
+ cl_event * event);
+
+-typedef CL_API_ENTRY cl_int
++typedef cl_int
+ (CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
+ cl_uint num_mem_objects,
+ const cl_mem * mem_objects,
+@@ -490,7 +490,7 @@ clEnqueueAcquireGrallocObjectsIMG(cl_com
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
+@@ -498,7 +498,7 @@ clEnqueueReleaseGrallocObjectsIMG(cl_com
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ /******************************************
+ * cl_img_generate_mipmap extension *
+@@ -523,7 +523,7 @@ clEnqueueGenerateMipmapIMG(cl_command_qu
+ const size_t *mip_region,
+ cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+- cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+ /******************************************
+ * cl_img_mem_properties extension *
+@@ -564,9 +564,9 @@ clGetKernelSubGroupInfoKHR(cl_kernel
+ const void * input_value,
+ size_t param_value_size,
+ void * param_value,
+- size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
++ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_int
++typedef cl_int
+ (CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel in_kernel,
+ cl_device_id in_device,
+ cl_kernel_sub_group_info param_name,
+@@ -574,7 +574,7 @@ typedef CL_API_ENTRY cl_int
+ const void * input_value,
+ size_t param_value_size,
+ void * param_value,
+- size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
++ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0_DEPRECATED;
+
+
+ /*********************************
+@@ -694,6 +694,46 @@ typedef struct _cl_name_version_khr
+ #define CL_DEVICE_NODE_MASK_KHR 0x106E
+
+
++/***************************************************************
++* cl_khr_pci_bus_info
++***************************************************************/
++#define cl_khr_pci_bus_info 1
++
++typedef struct _cl_device_pci_bus_info_khr {
++ cl_uint pci_domain;
++ cl_uint pci_bus;
++ cl_uint pci_device;
++ cl_uint pci_function;
++} cl_device_pci_bus_info_khr;
++
++/* cl_device_info */
++#define CL_DEVICE_PCI_BUS_INFO_KHR 0x410F
++
++
++/***************************************************************
++* cl_khr_suggested_local_work_size
++***************************************************************/
++#define cl_khr_suggested_local_work_size 1
++
++extern CL_API_ENTRY cl_int CL_API_CALL
++clGetKernelSuggestedLocalWorkSizeKHR(
++ cl_command_queue command_queue,
++ cl_kernel kernel,
++ cl_uint work_dim,
++ const size_t* global_work_offset,
++ const size_t* global_work_size,
++ size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_0;
++
++typedef cl_int (CL_API_CALL *
++clGetKernelSuggestedLocalWorkSizeKHR_fn)(
++ cl_command_queue command_queue,
++ cl_kernel kernel,
++ cl_uint work_dim,
++ const size_t* global_work_offset,
++ const size_t* global_work_size,
++ size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_0;
++
++
+ /**********************************
+ * cl_arm_import_memory extension *
+ **********************************/
+@@ -719,6 +759,12 @@ typedef intptr_t cl_import_properties_ar
+ /* Data consistency with host property */
+ #define CL_IMPORT_DMA_BUF_DATA_CONSISTENCY_WITH_HOST_ARM 0x41E3
+
++/* Index of plane in a multiplanar hardware buffer */
++#define CL_IMPORT_ANDROID_HARDWARE_BUFFER_PLANE_INDEX_ARM 0x41EF
++
++/* Index of layer in a multilayer hardware buffer */
++#define CL_IMPORT_ANDROID_HARDWARE_BUFFER_LAYER_INDEX_ARM 0x41F0
++
+ /* Import memory size value to indicate a size for the whole buffer */
+ #define CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM SIZE_MAX
+
+@@ -744,7 +790,7 @@ clImportMemoryARM( cl_context context,
+ const cl_import_properties_arm *properties,
+ void *memory,
+ size_t size,
+- cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
++ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+
+ /******************************************
+@@ -787,11 +833,11 @@ extern CL_API_ENTRY void * CL_API_CALL
+ clSVMAllocARM(cl_context context,
+ cl_svm_mem_flags_arm flags,
+ size_t size,
+- cl_uint alignment) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_uint alignment) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY void CL_API_CALL
+ clSVMFreeARM(cl_context context,
+- void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
++ void * svm_pointer) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueSVMFreeARM(cl_command_queue command_queue,
+@@ -804,7 +850,7 @@ clEnqueueSVMFreeARM(cl_command_queue co
+ void * user_data,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
+@@ -814,7 +860,7 @@ clEnqueueSVMMemcpyARM(cl_command_queue
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueSVMMemFillARM(cl_command_queue command_queue,
+@@ -824,7 +870,7 @@ clEnqueueSVMMemFillARM(cl_command_queue
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueSVMMapARM(cl_command_queue command_queue,
+@@ -834,25 +880,25 @@ clEnqueueSVMMapARM(cl_command_queue com
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueSVMUnmapARM(cl_command_queue command_queue,
+ void * svm_ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+- cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clSetKernelArgSVMPointerARM(cl_kernel kernel,
+ cl_uint arg_index,
+- const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
++ const void * arg_value) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clSetKernelExecInfoARM(cl_kernel kernel,
+ cl_kernel_exec_info_arm param_name,
+ size_t param_value_size,
+- const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
++ const void * param_value) CL_API_SUFFIX__VERSION_1_2;
+
+ /********************************
+ * cl_arm_get_core_id extension *
+@@ -1060,14 +1106,14 @@ clCreateAcceleratorINTEL(
+ cl_accelerator_type_intel accelerator_type,
+ size_t descriptor_size,
+ const void* descriptor,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
++typedef cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
+ cl_context context,
+ cl_accelerator_type_intel accelerator_type,
+ size_t descriptor_size,
+ const void* descriptor,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clGetAcceleratorInfoINTEL(
+@@ -1075,28 +1121,28 @@ clGetAcceleratorInfoINTEL(
+ cl_accelerator_info_intel param_name,
+ size_t param_value_size,
+ void* param_value,
+- size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
++typedef cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
+ cl_accelerator_intel accelerator,
+ cl_accelerator_info_intel param_name,
+ size_t param_value_size,
+ void* param_value,
+- size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clRetainAcceleratorINTEL(
+- cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_accelerator_intel accelerator) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
+- cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
++typedef cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
++ cl_accelerator_intel accelerator) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clReleaseAcceleratorINTEL(
+- cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_accelerator_intel accelerator) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
+- cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
++typedef cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
++ cl_accelerator_intel accelerator) CL_API_SUFFIX__VERSION_1_2;
+
+ /******************************************
+ * cl_intel_simultaneous_sharing extension *
+@@ -1368,7 +1414,7 @@ clHostMemAllocINTEL(
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+-typedef CL_API_ENTRY void* (CL_API_CALL *
++typedef void* (CL_API_CALL *
+ clHostMemAllocINTEL_fn)(
+ cl_context context,
+ const cl_mem_properties_intel* properties,
+@@ -1385,7 +1431,7 @@ clDeviceMemAllocINTEL(
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+-typedef CL_API_ENTRY void* (CL_API_CALL *
++typedef void* (CL_API_CALL *
+ clDeviceMemAllocINTEL_fn)(
+ cl_context context,
+ cl_device_id device,
+@@ -1403,7 +1449,7 @@ clSharedMemAllocINTEL(
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+-typedef CL_API_ENTRY void* (CL_API_CALL *
++typedef void* (CL_API_CALL *
+ clSharedMemAllocINTEL_fn)(
+ cl_context context,
+ cl_device_id device,
+@@ -1417,7 +1463,7 @@ clMemFreeINTEL(
+ cl_context context,
+ void* ptr);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clMemFreeINTEL_fn)(
+ cl_context context,
+ void* ptr);
+@@ -1427,7 +1473,7 @@ clMemBlockingFreeINTEL(
+ cl_context context,
+ void* ptr);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clMemBlockingFreeINTEL_fn)(
+ cl_context context,
+ void* ptr);
+@@ -1441,7 +1487,7 @@ clGetMemAllocInfoINTEL(
+ void* param_value,
+ size_t* param_value_size_ret);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clGetMemAllocInfoINTEL_fn)(
+ cl_context context,
+ const void* ptr,
+@@ -1456,7 +1502,7 @@ clSetKernelArgMemPointerINTEL(
+ cl_uint arg_index,
+ const void* arg_value);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clSetKernelArgMemPointerINTEL_fn)(
+ cl_kernel kernel,
+ cl_uint arg_index,
+@@ -1472,7 +1518,7 @@ clEnqueueMemsetINTEL( /* Deprecate
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clEnqueueMemsetINTEL_fn)( /* Deprecated */
+ cl_command_queue command_queue,
+ void* dst_ptr,
+@@ -1493,7 +1539,7 @@ clEnqueueMemFillINTEL(
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clEnqueueMemFillINTEL_fn)(
+ cl_command_queue command_queue,
+ void* dst_ptr,
+@@ -1515,7 +1561,7 @@ clEnqueueMemcpyINTEL(
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clEnqueueMemcpyINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_bool blocking,
+@@ -1541,7 +1587,7 @@ clEnqueueMigrateMemINTEL(
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clEnqueueMigrateMemINTEL_fn)(
+ cl_command_queue command_queue,
+ const void* ptr,
+@@ -1563,7 +1609,7 @@ clEnqueueMemAdviseINTEL(
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *
++typedef cl_int (CL_API_CALL *
+ clEnqueueMemAdviseINTEL_fn)(
+ cl_command_queue command_queue,
+ const void* ptr,
+@@ -1586,16 +1632,16 @@ clCreateBufferWithPropertiesINTEL(
+ cl_mem_flags flags,
+ size_t size,
+ void * host_ptr,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL *
++typedef cl_mem (CL_API_CALL *
+ clCreateBufferWithPropertiesINTEL_fn)(
+ cl_context context,
+ const cl_mem_properties_intel* properties,
+ cl_mem_flags flags,
+ size_t size,
+ void * host_ptr,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ /******************************************
+ * cl_intel_mem_channel_property extension *
+@@ -1612,6 +1658,48 @@ clCreateBufferWithPropertiesINTEL_fn)(
+ /* cl_mem_flags */
+ #define CL_MEM_FORCE_HOST_MEMORY_INTEL (1 << 20)
+
++/***************************************************************
++* cl_intel_command_queue_families
++***************************************************************/
++#define cl_intel_command_queue_families 1
++
++typedef cl_bitfield cl_command_queue_capabilities_intel;
++
++#define CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL 64
++
++typedef struct _cl_queue_family_properties_intel {
++ cl_command_queue_properties properties;
++ cl_command_queue_capabilities_intel capabilities;
++ cl_uint count;
++ char name[CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL];
++} cl_queue_family_properties_intel;
++
++/* cl_device_info */
++#define CL_DEVICE_QUEUE_FAMILY_PROPERTIES_INTEL 0x418B
++
++/* cl_queue_properties */
++#define CL_QUEUE_FAMILY_INTEL 0x418C
++#define CL_QUEUE_INDEX_INTEL 0x418D
++
++/* cl_command_queue_capabilities_intel */
++#define CL_QUEUE_DEFAULT_CAPABILITIES_INTEL 0
++#define CL_QUEUE_CAPABILITY_CREATE_SINGLE_QUEUE_EVENTS_INTEL (1 << 0)
++#define CL_QUEUE_CAPABILITY_CREATE_CROSS_QUEUE_EVENTS_INTEL (1 << 1)
++#define CL_QUEUE_CAPABILITY_SINGLE_QUEUE_EVENT_WAIT_LIST_INTEL (1 << 2)
++#define CL_QUEUE_CAPABILITY_CROSS_QUEUE_EVENT_WAIT_LIST_INTEL (1 << 3)
++#define CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_INTEL (1 << 8)
++#define CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_RECT_INTEL (1 << 9)
++#define CL_QUEUE_CAPABILITY_MAP_BUFFER_INTEL (1 << 10)
++#define CL_QUEUE_CAPABILITY_FILL_BUFFER_INTEL (1 << 11)
++#define CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_INTEL (1 << 12)
++#define CL_QUEUE_CAPABILITY_MAP_IMAGE_INTEL (1 << 13)
++#define CL_QUEUE_CAPABILITY_FILL_IMAGE_INTEL (1 << 14)
++#define CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_IMAGE_INTEL (1 << 15)
++#define CL_QUEUE_CAPABILITY_TRANSFER_IMAGE_BUFFER_INTEL (1 << 16)
++#define CL_QUEUE_CAPABILITY_MARKER_INTEL (1 << 24)
++#define CL_QUEUE_CAPABILITY_BARRIER_INTEL (1 << 25)
++#define CL_QUEUE_CAPABILITY_KERNEL_INTEL (1 << 26)
++
+ #ifdef __cplusplus
+ }
+ #endif
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,66 @@
+$NetBSD: patch-khronos-headers_CL_cl__gl.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_gl.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_gl.h
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2008-2020 The Khronos Group Inc.
++ * Copyright (c) 2008-2021 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.
+@@ -102,21 +102,21 @@ clEnqueueReleaseGLObjects(cl_command_que
+
+
+ /* Deprecated OpenCL 1.1 APIs */
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+ clCreateFromGLTexture2D(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
++extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+ clCreateFromGLTexture3D(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+ /* cl_khr_gl_sharing extension */
+
+@@ -145,13 +145,23 @@ clGetGLContextInfoKHR(const cl_context_p
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
++typedef cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
+ const cl_context_properties * properties,
+ cl_gl_context_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret);
+
++/*
++ * cl_khr_gl_event extension
++ */
++#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
++
++extern CL_API_ENTRY cl_event CL_API_CALL
++clCreateEventFromGLsyncKHR(cl_context context,
++ cl_GLsync sync,
++ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1;
++
+ #ifdef __cplusplus
+ }
+ #endif
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl__ext.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl__ext.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__gl__ext.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,44 @@
+$NetBSD: patch-khronos-headers_CL_cl__gl__ext.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_gl_ext.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_gl_ext.h
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2008-2020 The Khronos Group Inc.
++ * Copyright (c) 2008-2021 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.
+@@ -14,27 +14,5 @@
+ * limitations under the License.
+ ******************************************************************************/
+
+-#ifndef __OPENCL_CL_GL_EXT_H
+-#define __OPENCL_CL_GL_EXT_H
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+ #include <CL/cl_gl.h>
+-
+-/*
+- * cl_khr_gl_event extension
+- */
+-#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
+-
+-extern CL_API_ENTRY cl_event CL_API_CALL
+-clCreateEventFromGLsyncKHR(cl_context context,
+- cl_GLsync sync,
+- cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-#endif /* __OPENCL_CL_GL_EXT_H */
++#pragma message("All OpenGL-related extensions have been moved into cl_gl.h. Please include cl_gl.h directly.")
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__icd.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__icd.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__icd.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,997 @@
+$NetBSD: patch-khronos-headers_CL_cl__icd.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_icd.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_icd.h
+@@ -41,35 +41,35 @@ extern "C" {
+ /* API function pointer definitions */
+
+ // Platform APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetPlatformIDs)(
++typedef cl_int(CL_API_CALL *cl_api_clGetPlatformIDs)(
+ cl_uint num_entries, cl_platform_id *platforms,
+ cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetPlatformInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetPlatformInfo)(
+ cl_platform_id platform, cl_platform_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ // Device APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceIDs)(
++typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDs)(
+ cl_platform_id platform, cl_device_type device_type, cl_uint num_entries,
+ cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetDeviceInfo)(
+ cl_device_id device, cl_device_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCreateSubDevices)(
++typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevices)(
+ cl_device_id in_device,
+ const cl_device_partition_property *partition_properties,
+ cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainDevice)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainDevice)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseDevice)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseDevice)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+ #else
+@@ -81,36 +81,36 @@ typedef void *cl_api_clReleaseDevice;
+ #endif
+
+ // Context APIs
+-typedef CL_API_ENTRY cl_context(CL_API_CALL *cl_api_clCreateContext)(
++typedef cl_context(CL_API_CALL *cl_api_clCreateContext)(
+ const cl_context_properties *properties, cl_uint num_devices,
+ const cl_device_id *devices,
+ void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_context(CL_API_CALL *cl_api_clCreateContextFromType)(
++typedef cl_context(CL_API_CALL *cl_api_clCreateContextFromType)(
+ const cl_context_properties *properties, cl_device_type device_type,
+ void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainContext)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainContext)(
+ cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseContext)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseContext)(
+ cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetContextInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetContextInfo)(
+ cl_context context, cl_context_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ // Command Queue APIs
+-typedef CL_API_ENTRY cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueue)(
++typedef cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueue)(
+ cl_context context, cl_device_id device,
+ cl_command_queue_properties properties,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_2_0
+
+-typedef CL_API_ENTRY
++typedef
+ cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueueWithProperties)(
+ cl_context /* context */, cl_device_id /* device */,
+ const cl_queue_properties * /* properties */,
+@@ -122,25 +122,25 @@ typedef void *cl_api_clCreateCommandQueu
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainCommandQueue)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainCommandQueue)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseCommandQueue)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseCommandQueue)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetCommandQueueInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetCommandQueueInfo)(
+ cl_command_queue command_queue, cl_command_queue_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ // Memory Object APIs
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateBuffer)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateBuffer)(
+ cl_context context, cl_mem_flags flags, size_t size, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateImage)(
+ cl_context context, 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_1_2;
+@@ -153,17 +153,17 @@ typedef void *cl_api_clCreateImage;
+
+ #ifdef CL_VERSION_3_0
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateBufferWithProperties)(
++typedef cl_mem(CL_API_CALL *cl_api_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;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImageWithProperties)(
++typedef cl_mem(CL_API_CALL *cl_api_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;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)(
++typedef cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)(
+ cl_context context,
+ void(CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
+ void* user_data) CL_API_SUFFIX__VERSION_3_0;
+@@ -176,43 +176,43 @@ typedef void *cl_api_clSetContextDestruc
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainMemObject)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainMemObject)(
+ cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseMemObject)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseMemObject)(
+ cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetSupportedImageFormats)(
++typedef cl_int(CL_API_CALL *cl_api_clGetSupportedImageFormats)(
+ cl_context context, cl_mem_flags flags, cl_mem_object_type image_type,
+ cl_uint num_entries, cl_image_format *image_formats,
+ cl_uint *num_image_formats) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetMemObjectInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetMemObjectInfo)(
+ cl_mem memobj, cl_mem_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetImageInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetImageInfo)(
+ cl_mem image, cl_image_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_2_0
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreatePipe)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreatePipe)(
+ cl_context /* context */, cl_mem_flags /* flags */,
+ cl_uint /* pipe_packet_size */, cl_uint /* pipe_max_packets */,
+ const cl_pipe_properties * /* properties */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetPipeInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetPipeInfo)(
+ cl_mem /* pipe */, cl_pipe_info /* param_name */,
+ size_t /* param_value_size */, void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clSVMAlloc)(
++typedef void *(CL_API_CALL *cl_api_clSVMAlloc)(
+ cl_context /* context */, cl_svm_mem_flags /* flags */, size_t /* size */,
+ unsigned int /* alignment */)CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY void(CL_API_CALL *cl_api_clSVMFree)(
++typedef void(CL_API_CALL *cl_api_clSVMFree)(
+ cl_context /* context */,
+ void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0;
+
+@@ -226,24 +226,24 @@ typedef void *cl_api_clSVMFree;
+ #endif
+
+ // Sampler APIs
+-typedef CL_API_ENTRY cl_sampler(CL_API_CALL *cl_api_clCreateSampler)(
++typedef cl_sampler(CL_API_CALL *cl_api_clCreateSampler)(
+ cl_context context, cl_bool normalized_coords,
+ cl_addressing_mode addressing_mode, cl_filter_mode filter_mode,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainSampler)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainSampler)(
+ cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseSampler)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseSampler)(
+ cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetSamplerInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetSamplerInfo)(
+ cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_2_0
+
+-typedef CL_API_ENTRY
++typedef
+ cl_sampler(CL_API_CALL *cl_api_clCreateSamplerWithProperties)(
+ cl_context /* context */,
+ const cl_sampler_properties * /* sampler_properties */,
+@@ -256,18 +256,18 @@ typedef void *cl_api_clCreateSamplerWith
+ #endif
+
+ // Program Object APIs
+-typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clCreateProgramWithSource)(
++typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithSource)(
+ cl_context context, cl_uint count, const char **strings,
+ const size_t *lengths, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clCreateProgramWithBinary)(
++typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithBinary)(
+ cl_context context, cl_uint num_devices, const cl_device_id *device_list,
+ const size_t *lengths, const unsigned char **binaries,
+ cl_int *binary_status, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY
++typedef
+ cl_program(CL_API_CALL *cl_api_clCreateProgramWithBuiltInKernels)(
+ cl_context context, cl_uint num_devices, const cl_device_id *device_list,
+ const char *kernel_names, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+@@ -278,13 +278,13 @@ typedef void *cl_api_clCreateProgramWith
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainProgram)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainProgram)(
+ cl_program program) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseProgram)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseProgram)(
+ cl_program program) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clBuildProgram)(
++typedef cl_int(CL_API_CALL *cl_api_clBuildProgram)(
+ cl_program program, cl_uint num_devices, const cl_device_id *device_list,
+ const char *options,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+@@ -292,14 +292,14 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCompileProgram)(
++typedef cl_int(CL_API_CALL *cl_api_clCompileProgram)(
+ cl_program program, cl_uint num_devices, const cl_device_id *device_list,
+ const char *options, cl_uint num_input_headers,
+ const cl_program *input_headers, const char **header_include_names,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+ void *user_data) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clLinkProgram)(
++typedef cl_program(CL_API_CALL *cl_api_clLinkProgram)(
+ cl_context context, cl_uint num_devices, const cl_device_id *device_list,
+ const char *options, cl_uint num_input_programs,
+ const cl_program *input_programs,
+@@ -315,12 +315,12 @@ typedef void *cl_api_clLinkProgram;
+
+ #ifdef CL_VERSION_2_2
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clSetProgramSpecializationConstant)(
+ cl_program program, cl_uint spec_id, size_t spec_size,
+ const void *spec_value) CL_API_SUFFIX__VERSION_2_2;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetProgramReleaseCallback)(
++typedef cl_int(CL_API_CALL *cl_api_clSetProgramReleaseCallback)(
+ cl_program program,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+ void *user_data) CL_API_SUFFIX__VERSION_2_2;
+@@ -334,7 +334,7 @@ typedef void *cl_api_clSetProgramRelease
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clUnloadPlatformCompiler)(
++typedef cl_int(CL_API_CALL *cl_api_clUnloadPlatformCompiler)(
+ cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
+
+ #else
+@@ -343,41 +343,41 @@ typedef void *cl_api_clUnloadPlatformCom
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetProgramInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetProgramInfo)(
+ cl_program program, cl_program_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetProgramBuildInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetProgramBuildInfo)(
+ cl_program program, cl_device_id device, cl_program_build_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ // Kernel Object APIs
+-typedef CL_API_ENTRY cl_kernel(CL_API_CALL *cl_api_clCreateKernel)(
++typedef cl_kernel(CL_API_CALL *cl_api_clCreateKernel)(
+ cl_program program, const char *kernel_name,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCreateKernelsInProgram)(
++typedef cl_int(CL_API_CALL *cl_api_clCreateKernelsInProgram)(
+ cl_program program, cl_uint num_kernels, cl_kernel *kernels,
+ cl_uint *num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainKernel)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainKernel)(
+ cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseKernel)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseKernel)(
+ cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetKernelArg)(
++typedef cl_int(CL_API_CALL *cl_api_clSetKernelArg)(
+ cl_kernel kernel, cl_uint arg_index, size_t arg_size,
+ const void *arg_value) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetKernelInfo)(
+ cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelArgInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetKernelArgInfo)(
+ cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
+@@ -388,28 +388,28 @@ typedef void *cl_api_clGetKernelArgInfo;
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelWorkGroupInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetKernelWorkGroupInfo)(
+ cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_2_0
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetKernelArgSVMPointer)(
++typedef cl_int(CL_API_CALL *cl_api_clSetKernelArgSVMPointer)(
+ cl_kernel /* kernel */, cl_uint /* arg_index */,
+ const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetKernelExecInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clSetKernelExecInfo)(
+ cl_kernel /* kernel */, cl_kernel_exec_info /* param_name */,
+ size_t /* param_value_size */,
+ const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfoKHR)(
++typedef cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfoKHR)(
+ cl_kernel /* in_kernel */, cl_device_id /*in_device*/,
+ cl_kernel_sub_group_info /* param_name */, size_t /*input_value_size*/,
+ const void * /*input_value*/, size_t /*param_value_size*/,
+ void * /*param_value*/,
+- size_t * /*param_value_size_ret*/) CL_EXT_SUFFIX__VERSION_2_0;
++ size_t * /*param_value_size_ret*/) CL_API_SUFFIX__VERSION_2_0;
+
+ #else
+
+@@ -420,33 +420,33 @@ typedef void *cl_api_clGetKernelSubGroup
+ #endif
+
+ // Event Object APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clWaitForEvents)(
++typedef cl_int(CL_API_CALL *cl_api_clWaitForEvents)(
+ cl_uint num_events, const cl_event *event_list) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetEventInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetEventInfo)(
+ cl_event event, cl_event_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainEvent)(cl_event event)
++typedef cl_int(CL_API_CALL *cl_api_clRetainEvent)(cl_event event)
+ CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseEvent)(cl_event event)
++typedef cl_int(CL_API_CALL *cl_api_clReleaseEvent)(cl_event event)
+ CL_API_SUFFIX__VERSION_1_0;
+
+ // Profiling APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetEventProfilingInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetEventProfilingInfo)(
+ cl_event event, cl_profiling_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+ // Flush and Finish APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clFlush)(
++typedef cl_int(CL_API_CALL *cl_api_clFlush)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clFinish)(
++typedef cl_int(CL_API_CALL *cl_api_clFinish)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+ // Enqueued Commands APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReadBuffer)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
+ size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+@@ -454,7 +454,7 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+
+ #ifdef CL_VERSION_1_1
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReadBufferRect)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadBufferRect)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
+ const size_t *buffer_origin, const size_t *host_origin,
+ const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
+@@ -468,7 +468,7 @@ typedef void *cl_api_clEnqueueReadBuffer
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWriteBuffer)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write,
+ size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+@@ -476,7 +476,7 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+
+ #ifdef CL_VERSION_1_1
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWriteBufferRect)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteBufferRect)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
+ const size_t *buffer_origin, const size_t *host_origin,
+ const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
+@@ -492,7 +492,7 @@ typedef void *cl_api_clEnqueueWriteBuffe
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueFillBuffer)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueFillBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, const void *pattern,
+ size_t pattern_size, size_t offset, size_t cb,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+@@ -504,7 +504,7 @@ typedef void *cl_api_clEnqueueFillBuffer
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyBuffer)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBuffer)(
+ cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
+ size_t src_offset, size_t dst_offset, size_t cb,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+@@ -512,7 +512,7 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+
+ #ifdef CL_VERSION_1_1
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferRect)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferRect)(
+ cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
+ const size_t *src_origin, const size_t *dst_origin, const size_t *region,
+ size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch,
+@@ -526,14 +526,14 @@ typedef void *cl_api_clEnqueueCopyBuffer
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReadImage)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadImage)(
+ cl_command_queue command_queue, cl_mem image, cl_bool blocking_read,
+ const size_t *origin, const size_t *region, size_t row_pitch,
+ size_t slice_pitch, void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWriteImage)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteImage)(
+ cl_command_queue command_queue, cl_mem image, cl_bool blocking_write,
+ const size_t *origin, const size_t *region, size_t input_row_pitch,
+ size_t input_slice_pitch, const void *ptr, cl_uint num_events_in_wait_list,
+@@ -542,7 +542,7 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueFillImage)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueFillImage)(
+ cl_command_queue command_queue, cl_mem image, const void *fill_color,
+ const size_t origin[3], const size_t region[3],
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+@@ -554,45 +554,45 @@ typedef void *cl_api_clEnqueueFillImage;
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyImage)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyImage)(
+ cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image,
+ const size_t *src_origin, const size_t *dst_origin, const size_t *region,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyImageToBuffer)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyImageToBuffer)(
+ cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer,
+ const size_t *src_origin, const size_t *region, size_t dst_offset,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferToImage)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferToImage)(
+ cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image,
+ size_t src_offset, const size_t *dst_origin, const size_t *region,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clEnqueueMapBuffer)(
++typedef void *(CL_API_CALL *cl_api_clEnqueueMapBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map,
+ cl_map_flags map_flags, size_t offset, size_t cb,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clEnqueueMapImage)(
++typedef void *(CL_API_CALL *cl_api_clEnqueueMapImage)(
+ cl_command_queue command_queue, cl_mem image, cl_bool blocking_map,
+ cl_map_flags map_flags, const size_t *origin, const size_t *region,
+ size_t *image_row_pitch, size_t *image_slice_pitch,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueUnmapMemObject)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueUnmapMemObject)(
+ cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMigrateMemObjects)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueMigrateMemObjects)(
+ cl_command_queue command_queue, cl_uint num_mem_objects,
+ const cl_mem *mem_objects, cl_mem_migration_flags flags,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+@@ -604,19 +604,19 @@ typedef void *cl_api_clEnqueueMigrateMem
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueNDRangeKernel)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueNDRangeKernel)(
+ cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim,
+ const size_t *global_work_offset, const size_t *global_work_size,
+ const size_t *local_work_size, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueTask)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueTask)(
+ cl_command_queue command_queue, cl_kernel kernel,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueNativeKernel)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueNativeKernel)(
+ cl_command_queue command_queue, void(CL_CALLBACK *user_func)(void *),
+ void *args, size_t cb_args, cl_uint num_mem_objects, const cl_mem *mem_list,
+ const void **args_mem_loc, cl_uint num_events_in_wait_list,
+@@ -625,17 +625,17 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+
+ #ifdef CL_VERSION_1_2
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMarkerWithWaitList)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueMarkerWithWaitList)(
+ cl_command_queue command_queue, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueBarrierWithWaitList)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueBarrierWithWaitList)(
+ cl_command_queue command_queue, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY void *(
++typedef void *(
+ CL_API_CALL *cl_api_clGetExtensionFunctionAddressForPlatform)(
+ cl_platform_id platform,
+ const char *function_name)CL_API_SUFFIX__VERSION_1_2;
+@@ -652,7 +652,7 @@ typedef void *cl_api_clGetExtensionFunct
+
+ #ifdef CL_VERSION_2_0
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMFree)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMFree)(
+ cl_command_queue /* command_queue */, cl_uint /* num_svm_pointers */,
+ void ** /* svm_pointers */,
+ void(CL_CALLBACK *pfn_free_func)(cl_command_queue /* queue */,
+@@ -663,28 +663,28 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemcpy)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemcpy)(
+ cl_command_queue /* command_queue */, cl_bool /* blocking_copy */,
+ void * /* dst_ptr */, const void * /* src_ptr */, size_t /* size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemFill)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemFill)(
+ cl_command_queue /* command_queue */, void * /* svm_ptr */,
+ const void * /* pattern */, size_t /* pattern_size */, size_t /* size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMap)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMap)(
+ cl_command_queue /* command_queue */, cl_bool /* blocking_map */,
+ cl_map_flags /* map_flags */, void * /* svm_ptr */, size_t /* size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMUnmap)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMUnmap)(
+ cl_command_queue /* command_queue */, void * /* svm_ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+@@ -701,119 +701,119 @@ typedef void *cl_api_clEnqueueSVMUnmap;
+ #endif
+
+ // Deprecated APIs
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetCommandQueueProperty)(
++typedef cl_int(CL_API_CALL *cl_api_clSetCommandQueueProperty)(
+ cl_command_queue command_queue, cl_command_queue_properties properties,
+ cl_bool enable, cl_command_queue_properties *old_properties)
+- CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
++ CL_API_SUFFIX__VERSION_1_0_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage2D)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateImage2D)(
+ cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
+ size_t image_width, size_t image_height, size_t image_row_pitch,
+- void *host_ptr, cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage3D)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateImage3D)(
+ cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
+ size_t image_width, size_t image_height, size_t image_depth,
+ size_t image_row_pitch, size_t image_slice_pitch, void *host_ptr,
+- cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clUnloadCompiler)(void)
+- CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++typedef cl_int(CL_API_CALL *cl_api_clUnloadCompiler)(void)
++ CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMarker)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueMarker)(
+ cl_command_queue command_queue,
+- cl_event *event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ cl_event *event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWaitForEvents)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueWaitForEvents)(
+ cl_command_queue command_queue, cl_uint num_events,
+- const cl_event *event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++ const cl_event *event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueBarrier)(
+- cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueBarrier)(
++ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+-typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clGetExtensionFunctionAddress)(
+- const char *function_name)CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
++typedef void *(CL_API_CALL *cl_api_clGetExtensionFunctionAddress)(
++ const char *function_name)CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
+
+ // GL and other APIs
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLBuffer)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLBuffer)(
+ cl_context context, cl_mem_flags flags, cl_GLuint bufobj,
+ int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture)(
+ cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
+ cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture2D)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture2D)(
+ cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
+ cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture3D)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture3D)(
+ cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
+ cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLRenderbuffer)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLRenderbuffer)(
+ cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetGLObjectInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetGLObjectInfo)(
+ cl_mem memobj, cl_gl_object_type *gl_object_type,
+ cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetGLTextureInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetGLTextureInfo)(
+ cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueAcquireGLObjects)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueAcquireGLObjects)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReleaseGLObjects)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueReleaseGLObjects)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+ /* cl_khr_gl_sharing */
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetGLContextInfoKHR)(
++typedef cl_int(CL_API_CALL *cl_api_clGetGLContextInfoKHR)(
+ const cl_context_properties *properties, cl_gl_context_info param_name,
+ size_t param_value_size, void *param_value, size_t *param_value_size_ret);
+
+ /* cl_khr_gl_event */
+-typedef CL_API_ENTRY cl_event(CL_API_CALL *cl_api_clCreateEventFromGLsyncKHR)(
++typedef cl_event(CL_API_CALL *cl_api_clCreateEventFromGLsyncKHR)(
+ cl_context context, cl_GLsync sync, cl_int *errcode_ret);
+
+ #if defined(_WIN32)
+
+ /* cl_khr_d3d10_sharing */
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D10KHR)(
++typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D10KHR)(
+ cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source,
+ void *d3d_object, cl_d3d10_device_set_khr d3d_device_set,
+ cl_uint num_entries, cl_device_id *devices,
+ cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10BufferKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10BufferKHR)(
+ cl_context context, cl_mem_flags flags, ID3D10Buffer *resource,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture2DKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture2DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture3DKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture3DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D10ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D10ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+@@ -848,32 +848,32 @@ extern CL_API_ENTRY cl_int CL_API_CALL c
+ const cl_event *event_wait_list, cl_event *event);
+
+ /* cl_khr_d3d11_sharing */
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D11KHR)(
++typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D11KHR)(
+ cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source,
+ void *d3d_object, cl_d3d11_device_set_khr d3d_device_set,
+ cl_uint num_entries, cl_device_id *devices,
+ cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11BufferKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11BufferKHR)(
+ cl_context context, cl_mem_flags flags, ID3D11Buffer *resource,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture2DKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture2DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture3DKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture3DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D11ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D11ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+@@ -881,26 +881,26 @@ cl_int(CL_API_CALL *cl_api_clEnqueueRele
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+ /* cl_khr_dx9_media_sharing */
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR)(
+ cl_platform_id platform, cl_uint num_media_adapters,
+ cl_dx9_media_adapter_type_khr *media_adapters_type, void *media_adapters,
+ cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries,
+ cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromDX9MediaSurfaceKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromDX9MediaSurfaceKHR)(
+ cl_context context, cl_mem_flags flags,
+ cl_dx9_media_adapter_type_khr adapter_type, void *surface_info,
+ cl_uint plane, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+@@ -987,29 +987,29 @@ typedef void *cl_api_clGetDeviceIDsFromD
+
+ #ifdef CL_VERSION_1_1
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetEventCallback)(
++typedef cl_int(CL_API_CALL *cl_api_clSetEventCallback)(
+ cl_event /* event */, cl_int /* command_exec_callback_type */,
+ void(CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
+ void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateSubBuffer)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateSubBuffer)(
+ cl_mem /* buffer */, cl_mem_flags /* flags */,
+ cl_buffer_create_type /* buffer_create_type */,
+ const void * /* buffer_create_info */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY
++typedef
+ cl_int(CL_API_CALL *cl_api_clSetMemObjectDestructorCallback)(
+ cl_mem /* memobj */,
+ void(CL_CALLBACK * /*pfn_notify*/)(cl_mem /* memobj */,
+ void * /*user_data*/),
+ void * /*user_data */) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_event(CL_API_CALL *cl_api_clCreateUserEvent)(
++typedef cl_event(CL_API_CALL *cl_api_clCreateUserEvent)(
+ cl_context /* context */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetUserEventStatus)(
++typedef cl_int(CL_API_CALL *cl_api_clSetUserEventStatus)(
+ cl_event /* event */,
+ cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
+
+@@ -1023,68 +1023,68 @@ typedef void *cl_api_clSetUserEventStatu
+
+ #endif
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCreateSubDevicesEXT)(
++typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevicesEXT)(
+ cl_device_id in_device,
+ const cl_device_partition_property_ext *partition_properties,
+ cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainDeviceEXT)(
++typedef cl_int(CL_API_CALL *cl_api_clRetainDeviceEXT)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseDeviceEXT)(
++typedef cl_int(CL_API_CALL *cl_api_clReleaseDeviceEXT)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
+
+ /* cl_khr_egl_image */
+-typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromEGLImageKHR)(
++typedef cl_mem(CL_API_CALL *cl_api_clCreateFromEGLImageKHR)(
+ cl_context context, CLeglDisplayKHR display, CLeglImageKHR image,
+ cl_mem_flags flags, const cl_egl_image_properties_khr *properties,
+ cl_int *errcode_ret);
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueAcquireEGLObjectsKHR)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueAcquireEGLObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReleaseEGLObjectsKHR)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueReleaseEGLObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+ /* cl_khr_egl_event */
+-typedef CL_API_ENTRY cl_event(CL_API_CALL *cl_api_clCreateEventFromEGLSyncKHR)(
++typedef cl_event(CL_API_CALL *cl_api_clCreateEventFromEGLSyncKHR)(
+ cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display,
+ cl_int *errcode_ret);
+
+ #ifdef CL_VERSION_2_1
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetDefaultDeviceCommandQueue)(
++typedef cl_int(CL_API_CALL *cl_api_clSetDefaultDeviceCommandQueue)(
+ cl_context context, cl_device_id device,
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1;
+
+-typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clCreateProgramWithIL)(
++typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithIL)(
+ cl_context context, const void *il, size_t length,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfo)(
++typedef cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfo)(
+ cl_kernel kernel, cl_device_id device, cl_kernel_sub_group_info param_name,
+ size_t input_value_size, const void *input_value, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
+
+-typedef CL_API_ENTRY cl_kernel(CL_API_CALL *cl_api_clCloneKernel)(
++typedef cl_kernel(CL_API_CALL *cl_api_clCloneKernel)(
+ cl_kernel source_kernel, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMigrateMem)(
++typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMigrateMem)(
+ cl_command_queue command_queue, cl_uint num_svm_pointers,
+ const void **svm_pointers, const size_t *sizes,
+ cl_mem_migration_flags flags, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_2_1;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceAndHostTimer)(
++typedef cl_int(CL_API_CALL *cl_api_clGetDeviceAndHostTimer)(
+ cl_device_id device, cl_ulong *device_timestamp,
+ cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1;
+
+-typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetHostTimer)(
++typedef cl_int(CL_API_CALL *cl_api_clGetHostTimer)(
+ cl_device_id device, cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1;
+
+ #else
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__layer.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__layer.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__layer.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,26 @@
+$NetBSD: patch-khronos-headers_CL_cl__layer.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_layer.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_layer.h
+@@ -36,7 +36,7 @@ clGetLayerInfo(cl_layer_info param_name
+ void *param_value,
+ size_t *param_value_size_ret);
+
+-CL_API_ENTRY typedef cl_int
++typedef cl_int
+ (CL_API_CALL *pfn_clGetLayerInfo)(cl_layer_info param_name,
+ size_t param_value_size,
+ void *param_value,
+@@ -48,7 +48,7 @@ clInitLayer(cl_uint num_
+ cl_uint *num_entries_ret,
+ const cl_icd_dispatch **layer_dispatch_ret);
+
+-CL_API_ENTRY typedef cl_int
++typedef cl_int
+ (CL_API_CALL *pfn_clInitLayer)(cl_uint num_entries,
+ const cl_icd_dispatch *target_dispatch,
+ cl_uint *num_entries_ret,
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__platform.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__platform.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__platform.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,181 @@
+$NetBSD: patch-khronos-headers_CL_cl__platform.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_platform.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_platform.h
+@@ -24,13 +24,25 @@ extern "C" {
+ #endif
+
+ #if defined(_WIN32)
+- #define CL_API_ENTRY
+- #define CL_API_CALL __stdcall
+- #define CL_CALLBACK __stdcall
++ #if !defined(CL_API_ENTRY)
++ #define CL_API_ENTRY
++ #endif
++ #if !defined(CL_API_CALL)
++ #define CL_API_CALL __stdcall
++ #endif
++ #if !defined(CL_CALLBACK)
++ #define CL_CALLBACK __stdcall
++ #endif
+ #else
+- #define CL_API_ENTRY
+- #define CL_API_CALL
+- #define CL_CALLBACK
++ #if !defined(CL_API_ENTRY)
++ #define CL_API_ENTRY
++ #endif
++ #if !defined(CL_API_CALL)
++ #define CL_API_CALL
++ #endif
++ #if !defined(CL_CALLBACK)
++ #define CL_CALLBACK
++ #endif
+ #endif
+
+ /*
+@@ -41,85 +53,94 @@ extern "C" {
+ * deprecation but is deprecated in versions later than 1.1.
+ */
+
+-#define CL_API_SUFFIX__VERSION_1_0
+-#define CL_EXT_SUFFIX__VERSION_1_0
+-#define CL_API_SUFFIX__VERSION_1_1
+-#define CL_EXT_SUFFIX__VERSION_1_1
+-#define CL_API_SUFFIX__VERSION_1_2
+-#define CL_EXT_SUFFIX__VERSION_1_2
+-#define CL_API_SUFFIX__VERSION_2_0
+-#define CL_EXT_SUFFIX__VERSION_2_0
+-#define CL_API_SUFFIX__VERSION_2_1
+-#define CL_EXT_SUFFIX__VERSION_2_1
+-#define CL_API_SUFFIX__VERSION_2_2
+-#define CL_EXT_SUFFIX__VERSION_2_2
+-#define CL_API_SUFFIX__VERSION_3_0
+-#define CL_EXT_SUFFIX__VERSION_3_0
+-#define CL_API_SUFFIX__EXPERIMENTAL
+-#define CL_EXT_SUFFIX__EXPERIMENTAL
++#ifndef CL_API_SUFFIX_USER
++#define CL_API_SUFFIX_USER
++#endif
++
++#ifndef CL_API_PREFIX_USER
++#define CL_API_PREFIX_USER
++#endif
++
++#define CL_API_SUFFIX_COMMON CL_API_SUFFIX_USER
++#define CL_API_PREFIX_COMMON CL_API_PREFIX_USER
++
++#define CL_API_SUFFIX__VERSION_1_0 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__VERSION_1_1 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__VERSION_1_2 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__VERSION_2_0 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__VERSION_2_1 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__VERSION_2_2 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__VERSION_3_0 CL_API_SUFFIX_COMMON
++#define CL_API_SUFFIX__EXPERIMENTAL CL_API_SUFFIX_COMMON
+
+
+ #ifdef __GNUC__
+- #define CL_EXT_SUFFIX_DEPRECATED __attribute__((deprecated))
+- #define CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX_DEPRECATED __attribute__((deprecated))
++ #define CL_API_PREFIX_DEPRECATED
+ #elif defined(_WIN32)
+- #define CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX_DEPRECATED __declspec(deprecated)
++ #define CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX_DEPRECATED __declspec(deprecated)
+ #else
+- #define CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
+- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_1_0_DEPRECATED CL_API_SUFFIX_COMMON
++ #define CL_API_PREFIX__VERSION_1_0_DEPRECATED CL_API_PREFIX_COMMON
+ #else
+- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_1_0_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX__VERSION_1_0_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
+- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_1_1_DEPRECATED CL_API_SUFFIX_COMMON
++ #define CL_API_PREFIX__VERSION_1_1_DEPRECATED CL_API_PREFIX_COMMON
+ #else
+- #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_1_1_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX__VERSION_1_1_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
+- #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_1_2_DEPRECATED CL_API_SUFFIX_COMMON
++ #define CL_API_PREFIX__VERSION_1_2_DEPRECATED CL_API_PREFIX_COMMON
+ #else
+- #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_1_2_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX__VERSION_1_2_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
+- #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_2_0_DEPRECATED CL_API_SUFFIX_COMMON
++ #define CL_API_PREFIX__VERSION_2_0_DEPRECATED CL_API_PREFIX_COMMON
+ #else
+- #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_2_0_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX__VERSION_2_0_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
+- #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_2_1_DEPRECATED CL_API_SUFFIX_COMMON
++ #define CL_API_PREFIX__VERSION_2_1_DEPRECATED CL_API_PREFIX_COMMON
+ #else
+- #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_2_1_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX__VERSION_2_1_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_2_APIS
+- #define CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_2_2_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_2_2_DEPRECATED CL_API_SUFFIX_COMMON
++ #define CL_API_PREFIX__VERSION_2_2_DEPRECATED CL_API_PREFIX_COMMON
+ #else
+- #define CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+- #define CL_EXT_PREFIX__VERSION_2_2_DEPRECATED CL_EXT_PREFIX_DEPRECATED
++ #define CL_API_SUFFIX__VERSION_2_2_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
++ #define CL_API_PREFIX__VERSION_2_2_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
+ #endif
+
+ #if (defined (_WIN32) && defined(_MSC_VER))
+
++/* intptr_t is used in cl.h and provided by stddef.h in Visual C++, but not in clang */
++/* stdint.h was missing before Visual Studio 2010, include it for later versions and for clang */
++#if defined(__clang__) || _MSC_VER >= 1600
++ #include <stdint.h>
++#endif
++
+ /* scalar types */
+ typedef signed __int8 cl_char;
+ typedef unsigned __int8 cl_uchar;
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,84 @@
+$NetBSD: patch-khronos-headers_CL_cl__va__api__media__sharing__intel.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/cl_va_api_media_sharing_intel.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/cl_va_api_media_sharing_intel.h
+@@ -68,16 +68,16 @@ clGetDeviceIDsFromVA_APIMediaAdapterINTE
+ cl_va_api_device_set_intel media_adapter_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+- cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
++typedef cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
+ cl_platform_id platform,
+ cl_va_api_device_source_intel media_adapter_type,
+ void* media_adapter,
+ cl_va_api_device_set_intel media_adapter_set,
+ cl_uint num_entries,
+ cl_device_id* devices,
+- cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_mem CL_API_CALL
+ clCreateFromVA_APIMediaSurfaceINTEL(
+@@ -85,14 +85,14 @@ clCreateFromVA_APIMediaSurfaceINTEL(
+ cl_mem_flags flags,
+ VASurfaceID* surface,
+ cl_uint plane,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
++typedef cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
+ cl_context context,
+ cl_mem_flags flags,
+ VASurfaceID* surface,
+ cl_uint plane,
+- cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueAcquireVA_APIMediaSurfacesINTEL(
+@@ -101,15 +101,15 @@ clEnqueueAcquireVA_APIMediaSurfacesINTEL
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
+
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clEnqueueReleaseVA_APIMediaSurfacesINTEL(
+@@ -118,15 +118,15 @@ clEnqueueReleaseVA_APIMediaSurfacesINTEL
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
+
+-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
++typedef cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem* mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+- cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
++ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
+
+ #ifdef __cplusplus
+ }
Index: pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_opencl.h
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_opencl.h:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-khronos-headers_CL_opencl.h Thu Jun 10 05:55:42 2021
@@ -0,0 +1,23 @@
+$NetBSD: patch-khronos-headers_CL_opencl.h,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- khronos-headers/CL/opencl.h.orig 2021-03-30 16:10:38.000000000 +0000
++++ khronos-headers/CL/opencl.h
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2008-2020 The Khronos Group Inc.
++ * Copyright (c) 2008-2021 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.
+@@ -23,7 +23,6 @@ extern "C" {
+
+ #include <CL/cl.h>
+ #include <CL/cl_gl.h>
+-#include <CL/cl_gl_ext.h>
+ #include <CL/cl_ext.h>
+
+ #ifdef __cplusplus
Index: pkgsrc/parallel/ocl-icd/patches/patch-ocl__interface.yaml
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-ocl__interface.yaml:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-ocl__interface.yaml Thu Jun 10 05:55:42 2021
@@ -0,0 +1,40 @@
+$NetBSD: patch-ocl__interface.yaml,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- ocl_interface.yaml.orig 2021-03-30 16:10:38.000000000 +0000
++++ ocl_interface.yaml
+@@ -674,18 +674,18 @@
+ const cl_device_partition_property_ext * /* properties */,
+ cl_uint /*num_entries*/,
+ cl_device_id * /*out_devices*/,
+- cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_uint * /*num_devices*/ ) CL_API_SUFFIX__VERSION_1_1;
+ 90: |-
+ CL_API_ENTRY cl_int CL_API_CALL
+- clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
++ clRetainDeviceEXT( cl_device_id /*device*/ ) CL_API_SUFFIX__VERSION_1_1;
+ 91: |-
+ CL_API_ENTRY cl_int CL_API_CALL
+- clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
++ clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_API_SUFFIX__VERSION_1_1;
+ 92: |-
+ CL_API_ENTRY cl_event CL_API_CALL
+ clCreateEventFromGLsyncKHR(cl_context /* context */,
+ cl_GLsync /* cl_GLsync */,
+- cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
++ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
+ 93: |-
+ CL_API_ENTRY cl_int CL_API_CALL
+ clCreateSubDevices(cl_device_id /* in_device */,
+@@ -1016,7 +1016,7 @@
+ const void * /*input_value*/,
+ size_t /*param_value_size*/,
+ void* /*param_value*/,
+- size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
++ size_t* /*param_value_size_ret*/ ) CL_API_SUFFIX__VERSION_2_0;
+ 137: |-
+ CL_API_ENTRY cl_kernel CL_API_CALL
+ clCloneKernel(cl_kernel /* source_kernel */,
Index: pkgsrc/parallel/ocl-icd/patches/patch-run__dummy__icd.c
diff -u /dev/null pkgsrc/parallel/ocl-icd/patches/patch-run__dummy__icd.c:1.1
--- /dev/null Thu Jun 10 05:55:42 2021
+++ pkgsrc/parallel/ocl-icd/patches/patch-run__dummy__icd.c Thu Jun 10 05:55:42 2021
@@ -0,0 +1,16 @@
+$NetBSD: patch-run__dummy__icd.c,v 1.1 2021/06/10 05:55:42 nia Exp $
+
+[PATCH] Updated to support latest Khronos headers.
+
+Signed-off-by: Laurent Carlier <lordheavym%gmail.com@localhost>
+
+--- run_dummy_icd.c.orig 2021-03-30 16:10:38.000000000 +0000
++++ run_dummy_icd.c
+@@ -39,7 +39,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
+ # include <CL/cl_gl.h>
+ # include <CL/cl_egl.h>
+ # include <CL/cl_ext.h>
+-# include <CL/cl_gl_ext.h>
+ #pragma GCC diagnostic pop
+ #include <string.h>
+ #include "ocl_icd_debug.h"
Home |
Main Index |
Thread Index |
Old Index