xref: /aosp_15_r20/external/ComputeLibrary/include/CL/cl_icd.h (revision c217d954acce2dbc11938adb493fc0abd69584f3)
1*c217d954SCole Faust /*******************************************************************************
2*c217d954SCole Faust  * Copyright (c) 2019-2020 The Khronos Group Inc.
3*c217d954SCole Faust  *
4*c217d954SCole Faust  * Licensed under the Apache License, Version 2.0 (the "License");
5*c217d954SCole Faust  * you may not use this file except in compliance with the License.
6*c217d954SCole Faust  * You may obtain a copy of the License at
7*c217d954SCole Faust  *
8*c217d954SCole Faust  *    http://www.apache.org/licenses/LICENSE-2.0
9*c217d954SCole Faust  *
10*c217d954SCole Faust  * Unless required by applicable law or agreed to in writing, software
11*c217d954SCole Faust  * distributed under the License is distributed on an "AS IS" BASIS,
12*c217d954SCole Faust  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*c217d954SCole Faust  * See the License for the specific language governing permissions and
14*c217d954SCole Faust  * limitations under the License.
15*c217d954SCole Faust  ******************************************************************************/
16*c217d954SCole Faust 
17*c217d954SCole Faust #ifndef OPENCL_CL_ICD_H
18*c217d954SCole Faust #define OPENCL_CL_ICD_H
19*c217d954SCole Faust 
20*c217d954SCole Faust #include <CL/cl.h>
21*c217d954SCole Faust #include <CL/cl_egl.h>
22*c217d954SCole Faust #include <CL/cl_ext.h>
23*c217d954SCole Faust #include <CL/cl_gl.h>
24*c217d954SCole Faust 
25*c217d954SCole Faust #if defined(_WIN32)
26*c217d954SCole Faust #include <CL/cl_d3d11.h>
27*c217d954SCole Faust #include <CL/cl_d3d10.h>
28*c217d954SCole Faust #include <CL/cl_dx9_media_sharing.h>
29*c217d954SCole Faust #endif
30*c217d954SCole Faust 
31*c217d954SCole Faust #ifdef __cplusplus
32*c217d954SCole Faust extern "C" {
33*c217d954SCole Faust #endif
34*c217d954SCole Faust 
35*c217d954SCole Faust /*
36*c217d954SCole Faust  * This file contains pointer type definitions for each of the CL API calls as
37*c217d954SCole Faust  * well as a type definition for the dispatch table used by the Khronos ICD
38*c217d954SCole Faust  * loader (see cl_khr_icd extension specification for background).
39*c217d954SCole Faust  */
40*c217d954SCole Faust 
41*c217d954SCole Faust /* API function pointer definitions */
42*c217d954SCole Faust 
43*c217d954SCole Faust // Platform APIs
44*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetPlatformIDs)(
45*c217d954SCole Faust     cl_uint num_entries, cl_platform_id *platforms,
46*c217d954SCole Faust     cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0;
47*c217d954SCole Faust 
48*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetPlatformInfo)(
49*c217d954SCole Faust     cl_platform_id platform, cl_platform_info param_name,
50*c217d954SCole Faust     size_t param_value_size, void *param_value,
51*c217d954SCole Faust     size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
52*c217d954SCole Faust 
53*c217d954SCole Faust // Device APIs
54*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDs)(
55*c217d954SCole Faust     cl_platform_id platform, cl_device_type device_type, cl_uint num_entries,
56*c217d954SCole Faust     cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
57*c217d954SCole Faust 
58*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetDeviceInfo)(
59*c217d954SCole Faust     cl_device_id device, cl_device_info param_name, size_t param_value_size,
60*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
61*c217d954SCole Faust 
62*c217d954SCole Faust #ifdef CL_VERSION_1_2
63*c217d954SCole Faust 
64*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevices)(
65*c217d954SCole Faust     cl_device_id in_device,
66*c217d954SCole Faust     const cl_device_partition_property *partition_properties,
67*c217d954SCole Faust     cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
68*c217d954SCole Faust 
69*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainDevice)(
70*c217d954SCole Faust     cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
71*c217d954SCole Faust 
72*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseDevice)(
73*c217d954SCole Faust     cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
74*c217d954SCole Faust 
75*c217d954SCole Faust #else
76*c217d954SCole Faust 
77*c217d954SCole Faust typedef void *cl_api_clCreateSubDevices;
78*c217d954SCole Faust typedef void *cl_api_clRetainDevice;
79*c217d954SCole Faust typedef void *cl_api_clReleaseDevice;
80*c217d954SCole Faust 
81*c217d954SCole Faust #endif
82*c217d954SCole Faust 
83*c217d954SCole Faust // Context APIs
84*c217d954SCole Faust typedef cl_context(CL_API_CALL *cl_api_clCreateContext)(
85*c217d954SCole Faust     const cl_context_properties *properties, cl_uint num_devices,
86*c217d954SCole Faust     const cl_device_id *devices,
87*c217d954SCole Faust     void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
88*c217d954SCole Faust     void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
89*c217d954SCole Faust 
90*c217d954SCole Faust typedef cl_context(CL_API_CALL *cl_api_clCreateContextFromType)(
91*c217d954SCole Faust     const cl_context_properties *properties, cl_device_type device_type,
92*c217d954SCole Faust     void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
93*c217d954SCole Faust     void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
94*c217d954SCole Faust 
95*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainContext)(
96*c217d954SCole Faust     cl_context context) CL_API_SUFFIX__VERSION_1_0;
97*c217d954SCole Faust 
98*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseContext)(
99*c217d954SCole Faust     cl_context context) CL_API_SUFFIX__VERSION_1_0;
100*c217d954SCole Faust 
101*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetContextInfo)(
102*c217d954SCole Faust     cl_context context, cl_context_info param_name, size_t param_value_size,
103*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
104*c217d954SCole Faust 
105*c217d954SCole Faust // Command Queue APIs
106*c217d954SCole Faust typedef cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueue)(
107*c217d954SCole Faust     cl_context context, cl_device_id device,
108*c217d954SCole Faust     cl_command_queue_properties properties,
109*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
110*c217d954SCole Faust 
111*c217d954SCole Faust #ifdef CL_VERSION_2_0
112*c217d954SCole Faust 
113*c217d954SCole Faust typedef
114*c217d954SCole Faust cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueueWithProperties)(
115*c217d954SCole Faust     cl_context /* context */, cl_device_id /* device */,
116*c217d954SCole Faust     const cl_queue_properties * /* properties */,
117*c217d954SCole Faust     cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
118*c217d954SCole Faust 
119*c217d954SCole Faust #else
120*c217d954SCole Faust 
121*c217d954SCole Faust typedef void *cl_api_clCreateCommandQueueWithProperties;
122*c217d954SCole Faust 
123*c217d954SCole Faust #endif
124*c217d954SCole Faust 
125*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainCommandQueue)(
126*c217d954SCole Faust     cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
127*c217d954SCole Faust 
128*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseCommandQueue)(
129*c217d954SCole Faust     cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
130*c217d954SCole Faust 
131*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetCommandQueueInfo)(
132*c217d954SCole Faust     cl_command_queue command_queue, cl_command_queue_info param_name,
133*c217d954SCole Faust     size_t param_value_size, void *param_value,
134*c217d954SCole Faust     size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
135*c217d954SCole Faust 
136*c217d954SCole Faust // Memory Object APIs
137*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateBuffer)(
138*c217d954SCole Faust     cl_context context, cl_mem_flags flags, size_t size, void *host_ptr,
139*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
140*c217d954SCole Faust 
141*c217d954SCole Faust #ifdef CL_VERSION_1_2
142*c217d954SCole Faust 
143*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateImage)(
144*c217d954SCole Faust     cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
145*c217d954SCole Faust     const cl_image_desc *image_desc, void *host_ptr,
146*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
147*c217d954SCole Faust 
148*c217d954SCole Faust #else
149*c217d954SCole Faust 
150*c217d954SCole Faust typedef void *cl_api_clCreateImage;
151*c217d954SCole Faust 
152*c217d954SCole Faust #endif
153*c217d954SCole Faust 
154*c217d954SCole Faust #ifdef CL_VERSION_3_0
155*c217d954SCole Faust 
156*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateBufferWithProperties)(
157*c217d954SCole Faust     cl_context context, const cl_mem_properties *properties, cl_mem_flags flags,
158*c217d954SCole Faust     size_t size, void *host_ptr,
159*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0;
160*c217d954SCole Faust 
161*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateImageWithProperties)(
162*c217d954SCole Faust     cl_context context, const cl_mem_properties *properties, cl_mem_flags flags,
163*c217d954SCole Faust     const cl_image_format *image_format, const cl_image_desc *image_desc,
164*c217d954SCole Faust     void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0;
165*c217d954SCole Faust 
166*c217d954SCole Faust typedef cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)(
167*c217d954SCole Faust     cl_context context,
168*c217d954SCole Faust     void(CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
169*c217d954SCole Faust     void* user_data) CL_API_SUFFIX__VERSION_3_0;
170*c217d954SCole Faust 
171*c217d954SCole Faust #else
172*c217d954SCole Faust 
173*c217d954SCole Faust typedef void *cl_api_clCreateBufferWithProperties;
174*c217d954SCole Faust typedef void *cl_api_clCreateImageWithProperties;
175*c217d954SCole Faust typedef void *cl_api_clSetContextDestructorCallback;
176*c217d954SCole Faust 
177*c217d954SCole Faust #endif
178*c217d954SCole Faust 
179*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainMemObject)(
180*c217d954SCole Faust     cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
181*c217d954SCole Faust 
182*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseMemObject)(
183*c217d954SCole Faust     cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
184*c217d954SCole Faust 
185*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetSupportedImageFormats)(
186*c217d954SCole Faust     cl_context context, cl_mem_flags flags, cl_mem_object_type image_type,
187*c217d954SCole Faust     cl_uint num_entries, cl_image_format *image_formats,
188*c217d954SCole Faust     cl_uint *num_image_formats) CL_API_SUFFIX__VERSION_1_0;
189*c217d954SCole Faust 
190*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetMemObjectInfo)(
191*c217d954SCole Faust     cl_mem memobj, cl_mem_info param_name, size_t param_value_size,
192*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
193*c217d954SCole Faust 
194*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetImageInfo)(
195*c217d954SCole Faust     cl_mem image, cl_image_info param_name, size_t param_value_size,
196*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
197*c217d954SCole Faust 
198*c217d954SCole Faust #ifdef CL_VERSION_2_0
199*c217d954SCole Faust 
200*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreatePipe)(
201*c217d954SCole Faust     cl_context /* context */, cl_mem_flags /* flags */,
202*c217d954SCole Faust     cl_uint /* pipe_packet_size */, cl_uint /* pipe_max_packets */,
203*c217d954SCole Faust     const cl_pipe_properties * /* properties */,
204*c217d954SCole Faust     cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
205*c217d954SCole Faust 
206*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetPipeInfo)(
207*c217d954SCole Faust     cl_mem /* pipe */, cl_pipe_info /* param_name */,
208*c217d954SCole Faust     size_t /* param_value_size */, void * /* param_value */,
209*c217d954SCole Faust     size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
210*c217d954SCole Faust 
211*c217d954SCole Faust typedef void *(CL_API_CALL *cl_api_clSVMAlloc)(
212*c217d954SCole Faust     cl_context /* context */, cl_svm_mem_flags /* flags */, size_t /* size */,
213*c217d954SCole Faust     unsigned int /* alignment */)CL_API_SUFFIX__VERSION_2_0;
214*c217d954SCole Faust 
215*c217d954SCole Faust typedef void(CL_API_CALL *cl_api_clSVMFree)(
216*c217d954SCole Faust     cl_context /* context */,
217*c217d954SCole Faust     void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0;
218*c217d954SCole Faust 
219*c217d954SCole Faust #else
220*c217d954SCole Faust 
221*c217d954SCole Faust typedef void *cl_api_clCreatePipe;
222*c217d954SCole Faust typedef void *cl_api_clGetPipeInfo;
223*c217d954SCole Faust typedef void *cl_api_clSVMAlloc;
224*c217d954SCole Faust typedef void *cl_api_clSVMFree;
225*c217d954SCole Faust 
226*c217d954SCole Faust #endif
227*c217d954SCole Faust 
228*c217d954SCole Faust // Sampler APIs
229*c217d954SCole Faust typedef cl_sampler(CL_API_CALL *cl_api_clCreateSampler)(
230*c217d954SCole Faust     cl_context context, cl_bool normalized_coords,
231*c217d954SCole Faust     cl_addressing_mode addressing_mode, cl_filter_mode filter_mode,
232*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
233*c217d954SCole Faust 
234*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainSampler)(
235*c217d954SCole Faust     cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
236*c217d954SCole Faust 
237*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseSampler)(
238*c217d954SCole Faust     cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
239*c217d954SCole Faust 
240*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetSamplerInfo)(
241*c217d954SCole Faust     cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size,
242*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
243*c217d954SCole Faust 
244*c217d954SCole Faust #ifdef CL_VERSION_2_0
245*c217d954SCole Faust 
246*c217d954SCole Faust typedef
247*c217d954SCole Faust cl_sampler(CL_API_CALL *cl_api_clCreateSamplerWithProperties)(
248*c217d954SCole Faust     cl_context /* context */,
249*c217d954SCole Faust     const cl_sampler_properties * /* sampler_properties */,
250*c217d954SCole Faust     cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
251*c217d954SCole Faust 
252*c217d954SCole Faust #else
253*c217d954SCole Faust 
254*c217d954SCole Faust typedef void *cl_api_clCreateSamplerWithProperties;
255*c217d954SCole Faust 
256*c217d954SCole Faust #endif
257*c217d954SCole Faust 
258*c217d954SCole Faust // Program Object APIs
259*c217d954SCole Faust typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithSource)(
260*c217d954SCole Faust     cl_context context, cl_uint count, const char **strings,
261*c217d954SCole Faust     const size_t *lengths, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
262*c217d954SCole Faust 
263*c217d954SCole Faust typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithBinary)(
264*c217d954SCole Faust     cl_context context, cl_uint num_devices, const cl_device_id *device_list,
265*c217d954SCole Faust     const size_t *lengths, const unsigned char **binaries,
266*c217d954SCole Faust     cl_int *binary_status, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
267*c217d954SCole Faust 
268*c217d954SCole Faust #ifdef CL_VERSION_1_2
269*c217d954SCole Faust 
270*c217d954SCole Faust typedef
271*c217d954SCole Faust cl_program(CL_API_CALL *cl_api_clCreateProgramWithBuiltInKernels)(
272*c217d954SCole Faust     cl_context context, cl_uint num_devices, const cl_device_id *device_list,
273*c217d954SCole Faust     const char *kernel_names, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
274*c217d954SCole Faust 
275*c217d954SCole Faust #else
276*c217d954SCole Faust 
277*c217d954SCole Faust typedef void *cl_api_clCreateProgramWithBuiltInKernels;
278*c217d954SCole Faust 
279*c217d954SCole Faust #endif
280*c217d954SCole Faust 
281*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainProgram)(
282*c217d954SCole Faust     cl_program program) CL_API_SUFFIX__VERSION_1_0;
283*c217d954SCole Faust 
284*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseProgram)(
285*c217d954SCole Faust     cl_program program) CL_API_SUFFIX__VERSION_1_0;
286*c217d954SCole Faust 
287*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clBuildProgram)(
288*c217d954SCole Faust     cl_program program, cl_uint num_devices, const cl_device_id *device_list,
289*c217d954SCole Faust     const char *options,
290*c217d954SCole Faust     void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
291*c217d954SCole Faust     void *user_data) CL_API_SUFFIX__VERSION_1_0;
292*c217d954SCole Faust 
293*c217d954SCole Faust #ifdef CL_VERSION_1_2
294*c217d954SCole Faust 
295*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clCompileProgram)(
296*c217d954SCole Faust     cl_program program, cl_uint num_devices, const cl_device_id *device_list,
297*c217d954SCole Faust     const char *options, cl_uint num_input_headers,
298*c217d954SCole Faust     const cl_program *input_headers, const char **header_include_names,
299*c217d954SCole Faust     void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
300*c217d954SCole Faust     void *user_data) CL_API_SUFFIX__VERSION_1_2;
301*c217d954SCole Faust 
302*c217d954SCole Faust typedef cl_program(CL_API_CALL *cl_api_clLinkProgram)(
303*c217d954SCole Faust     cl_context context, cl_uint num_devices, const cl_device_id *device_list,
304*c217d954SCole Faust     const char *options, cl_uint num_input_programs,
305*c217d954SCole Faust     const cl_program *input_programs,
306*c217d954SCole Faust     void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
307*c217d954SCole Faust     void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
308*c217d954SCole Faust 
309*c217d954SCole Faust #else
310*c217d954SCole Faust 
311*c217d954SCole Faust typedef void *cl_api_clCompileProgram;
312*c217d954SCole Faust typedef void *cl_api_clLinkProgram;
313*c217d954SCole Faust 
314*c217d954SCole Faust #endif
315*c217d954SCole Faust 
316*c217d954SCole Faust #ifdef CL_VERSION_2_2
317*c217d954SCole Faust 
318*c217d954SCole Faust typedef
319*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clSetProgramSpecializationConstant)(
320*c217d954SCole Faust     cl_program program, cl_uint spec_id, size_t spec_size,
321*c217d954SCole Faust     const void *spec_value) CL_API_SUFFIX__VERSION_2_2;
322*c217d954SCole Faust 
323*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetProgramReleaseCallback)(
324*c217d954SCole Faust     cl_program program,
325*c217d954SCole Faust     void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
326*c217d954SCole Faust     void *user_data) CL_API_SUFFIX__VERSION_2_2;
327*c217d954SCole Faust 
328*c217d954SCole Faust #else
329*c217d954SCole Faust 
330*c217d954SCole Faust typedef void *cl_api_clSetProgramSpecializationConstant;
331*c217d954SCole Faust typedef void *cl_api_clSetProgramReleaseCallback;
332*c217d954SCole Faust 
333*c217d954SCole Faust #endif
334*c217d954SCole Faust 
335*c217d954SCole Faust #ifdef CL_VERSION_1_2
336*c217d954SCole Faust 
337*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clUnloadPlatformCompiler)(
338*c217d954SCole Faust     cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
339*c217d954SCole Faust 
340*c217d954SCole Faust #else
341*c217d954SCole Faust 
342*c217d954SCole Faust typedef void *cl_api_clUnloadPlatformCompiler;
343*c217d954SCole Faust 
344*c217d954SCole Faust #endif
345*c217d954SCole Faust 
346*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetProgramInfo)(
347*c217d954SCole Faust     cl_program program, cl_program_info param_name, size_t param_value_size,
348*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
349*c217d954SCole Faust 
350*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetProgramBuildInfo)(
351*c217d954SCole Faust     cl_program program, cl_device_id device, cl_program_build_info param_name,
352*c217d954SCole Faust     size_t param_value_size, void *param_value,
353*c217d954SCole Faust     size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
354*c217d954SCole Faust 
355*c217d954SCole Faust // Kernel Object APIs
356*c217d954SCole Faust typedef cl_kernel(CL_API_CALL *cl_api_clCreateKernel)(
357*c217d954SCole Faust     cl_program program, const char *kernel_name,
358*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
359*c217d954SCole Faust 
360*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clCreateKernelsInProgram)(
361*c217d954SCole Faust     cl_program program, cl_uint num_kernels, cl_kernel *kernels,
362*c217d954SCole Faust     cl_uint *num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
363*c217d954SCole Faust 
364*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainKernel)(
365*c217d954SCole Faust     cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
366*c217d954SCole Faust 
367*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseKernel)(
368*c217d954SCole Faust     cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
369*c217d954SCole Faust 
370*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetKernelArg)(
371*c217d954SCole Faust     cl_kernel kernel, cl_uint arg_index, size_t arg_size,
372*c217d954SCole Faust     const void *arg_value) CL_API_SUFFIX__VERSION_1_0;
373*c217d954SCole Faust 
374*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetKernelInfo)(
375*c217d954SCole Faust     cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size,
376*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
377*c217d954SCole Faust 
378*c217d954SCole Faust #ifdef CL_VERSION_1_2
379*c217d954SCole Faust 
380*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetKernelArgInfo)(
381*c217d954SCole Faust     cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name,
382*c217d954SCole Faust     size_t param_value_size, void *param_value,
383*c217d954SCole Faust     size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
384*c217d954SCole Faust 
385*c217d954SCole Faust #else
386*c217d954SCole Faust 
387*c217d954SCole Faust typedef void *cl_api_clGetKernelArgInfo;
388*c217d954SCole Faust 
389*c217d954SCole Faust #endif
390*c217d954SCole Faust 
391*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetKernelWorkGroupInfo)(
392*c217d954SCole Faust     cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name,
393*c217d954SCole Faust     size_t param_value_size, void *param_value,
394*c217d954SCole Faust     size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
395*c217d954SCole Faust 
396*c217d954SCole Faust #ifdef CL_VERSION_2_0
397*c217d954SCole Faust 
398*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetKernelArgSVMPointer)(
399*c217d954SCole Faust     cl_kernel /* kernel */, cl_uint /* arg_index */,
400*c217d954SCole Faust     const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0;
401*c217d954SCole Faust 
402*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetKernelExecInfo)(
403*c217d954SCole Faust     cl_kernel /* kernel */, cl_kernel_exec_info /* param_name */,
404*c217d954SCole Faust     size_t /* param_value_size */,
405*c217d954SCole Faust     const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
406*c217d954SCole Faust 
407*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfoKHR)(
408*c217d954SCole Faust     cl_kernel /* in_kernel */, cl_device_id /*in_device*/,
409*c217d954SCole Faust     cl_kernel_sub_group_info /* param_name */, size_t /*input_value_size*/,
410*c217d954SCole Faust     const void * /*input_value*/, size_t /*param_value_size*/,
411*c217d954SCole Faust     void * /*param_value*/,
412*c217d954SCole Faust     size_t * /*param_value_size_ret*/) CL_API_SUFFIX__VERSION_2_0;
413*c217d954SCole Faust 
414*c217d954SCole Faust #else
415*c217d954SCole Faust 
416*c217d954SCole Faust typedef void *cl_api_clSetKernelArgSVMPointer;
417*c217d954SCole Faust typedef void *cl_api_clSetKernelExecInfo;
418*c217d954SCole Faust typedef void *cl_api_clGetKernelSubGroupInfoKHR;
419*c217d954SCole Faust 
420*c217d954SCole Faust #endif
421*c217d954SCole Faust 
422*c217d954SCole Faust // Event Object APIs
423*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clWaitForEvents)(
424*c217d954SCole Faust     cl_uint num_events, const cl_event *event_list) CL_API_SUFFIX__VERSION_1_0;
425*c217d954SCole Faust 
426*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetEventInfo)(
427*c217d954SCole Faust     cl_event event, cl_event_info param_name, size_t param_value_size,
428*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
429*c217d954SCole Faust 
430*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainEvent)(cl_event event)
431*c217d954SCole Faust     CL_API_SUFFIX__VERSION_1_0;
432*c217d954SCole Faust 
433*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseEvent)(cl_event event)
434*c217d954SCole Faust     CL_API_SUFFIX__VERSION_1_0;
435*c217d954SCole Faust 
436*c217d954SCole Faust // Profiling APIs
437*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetEventProfilingInfo)(
438*c217d954SCole Faust     cl_event event, cl_profiling_info param_name, size_t param_value_size,
439*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
440*c217d954SCole Faust 
441*c217d954SCole Faust // Flush and Finish APIs
442*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clFlush)(
443*c217d954SCole Faust     cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
444*c217d954SCole Faust 
445*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clFinish)(
446*c217d954SCole Faust     cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
447*c217d954SCole Faust 
448*c217d954SCole Faust // Enqueued Commands APIs
449*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadBuffer)(
450*c217d954SCole Faust     cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
451*c217d954SCole Faust     size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list,
452*c217d954SCole Faust     const cl_event *event_wait_list,
453*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
454*c217d954SCole Faust 
455*c217d954SCole Faust #ifdef CL_VERSION_1_1
456*c217d954SCole Faust 
457*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadBufferRect)(
458*c217d954SCole Faust     cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
459*c217d954SCole Faust     const size_t *buffer_origin, const size_t *host_origin,
460*c217d954SCole Faust     const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
461*c217d954SCole Faust     size_t host_row_pitch, size_t host_slice_pitch, void *ptr,
462*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
463*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_1;
464*c217d954SCole Faust 
465*c217d954SCole Faust #else
466*c217d954SCole Faust 
467*c217d954SCole Faust typedef void *cl_api_clEnqueueReadBufferRect;
468*c217d954SCole Faust 
469*c217d954SCole Faust #endif
470*c217d954SCole Faust 
471*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteBuffer)(
472*c217d954SCole Faust     cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write,
473*c217d954SCole Faust     size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list,
474*c217d954SCole Faust     const cl_event *event_wait_list,
475*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
476*c217d954SCole Faust 
477*c217d954SCole Faust #ifdef CL_VERSION_1_1
478*c217d954SCole Faust 
479*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteBufferRect)(
480*c217d954SCole Faust     cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
481*c217d954SCole Faust     const size_t *buffer_origin, const size_t *host_origin,
482*c217d954SCole Faust     const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
483*c217d954SCole Faust     size_t host_row_pitch, size_t host_slice_pitch, const void *ptr,
484*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
485*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_1;
486*c217d954SCole Faust 
487*c217d954SCole Faust #else
488*c217d954SCole Faust 
489*c217d954SCole Faust typedef void *cl_api_clEnqueueWriteBufferRect;
490*c217d954SCole Faust 
491*c217d954SCole Faust #endif
492*c217d954SCole Faust 
493*c217d954SCole Faust #ifdef CL_VERSION_1_2
494*c217d954SCole Faust 
495*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueFillBuffer)(
496*c217d954SCole Faust     cl_command_queue command_queue, cl_mem buffer, const void *pattern,
497*c217d954SCole Faust     size_t pattern_size, size_t offset, size_t cb,
498*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
499*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
500*c217d954SCole Faust 
501*c217d954SCole Faust #else
502*c217d954SCole Faust 
503*c217d954SCole Faust typedef void *cl_api_clEnqueueFillBuffer;
504*c217d954SCole Faust 
505*c217d954SCole Faust #endif
506*c217d954SCole Faust 
507*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBuffer)(
508*c217d954SCole Faust     cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
509*c217d954SCole Faust     size_t src_offset, size_t dst_offset, size_t cb,
510*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
511*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
512*c217d954SCole Faust 
513*c217d954SCole Faust #ifdef CL_VERSION_1_1
514*c217d954SCole Faust 
515*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferRect)(
516*c217d954SCole Faust     cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
517*c217d954SCole Faust     const size_t *src_origin, const size_t *dst_origin, const size_t *region,
518*c217d954SCole Faust     size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch,
519*c217d954SCole Faust     size_t dst_slice_pitch, cl_uint num_events_in_wait_list,
520*c217d954SCole Faust     const cl_event *event_wait_list,
521*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_1;
522*c217d954SCole Faust 
523*c217d954SCole Faust #else
524*c217d954SCole Faust 
525*c217d954SCole Faust typedef void *cl_api_clEnqueueCopyBufferRect;
526*c217d954SCole Faust 
527*c217d954SCole Faust #endif
528*c217d954SCole Faust 
529*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadImage)(
530*c217d954SCole Faust     cl_command_queue command_queue, cl_mem image, cl_bool blocking_read,
531*c217d954SCole Faust     const size_t *origin, const size_t *region, size_t row_pitch,
532*c217d954SCole Faust     size_t slice_pitch, void *ptr, cl_uint num_events_in_wait_list,
533*c217d954SCole Faust     const cl_event *event_wait_list,
534*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
535*c217d954SCole Faust 
536*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteImage)(
537*c217d954SCole Faust     cl_command_queue command_queue, cl_mem image, cl_bool blocking_write,
538*c217d954SCole Faust     const size_t *origin, const size_t *region, size_t input_row_pitch,
539*c217d954SCole Faust     size_t input_slice_pitch, const void *ptr, cl_uint num_events_in_wait_list,
540*c217d954SCole Faust     const cl_event *event_wait_list,
541*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
542*c217d954SCole Faust 
543*c217d954SCole Faust #ifdef CL_VERSION_1_2
544*c217d954SCole Faust 
545*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueFillImage)(
546*c217d954SCole Faust     cl_command_queue command_queue, cl_mem image, const void *fill_color,
547*c217d954SCole Faust     const size_t origin[3], const size_t region[3],
548*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
549*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
550*c217d954SCole Faust 
551*c217d954SCole Faust #else
552*c217d954SCole Faust 
553*c217d954SCole Faust typedef void *cl_api_clEnqueueFillImage;
554*c217d954SCole Faust 
555*c217d954SCole Faust #endif
556*c217d954SCole Faust 
557*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyImage)(
558*c217d954SCole Faust     cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image,
559*c217d954SCole Faust     const size_t *src_origin, const size_t *dst_origin, const size_t *region,
560*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
561*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
562*c217d954SCole Faust 
563*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyImageToBuffer)(
564*c217d954SCole Faust     cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer,
565*c217d954SCole Faust     const size_t *src_origin, const size_t *region, size_t dst_offset,
566*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
567*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
568*c217d954SCole Faust 
569*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferToImage)(
570*c217d954SCole Faust     cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image,
571*c217d954SCole Faust     size_t src_offset, const size_t *dst_origin, const size_t *region,
572*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
573*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
574*c217d954SCole Faust 
575*c217d954SCole Faust typedef void *(CL_API_CALL *cl_api_clEnqueueMapBuffer)(
576*c217d954SCole Faust     cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map,
577*c217d954SCole Faust     cl_map_flags map_flags, size_t offset, size_t cb,
578*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
579*c217d954SCole Faust     cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0;
580*c217d954SCole Faust 
581*c217d954SCole Faust typedef void *(CL_API_CALL *cl_api_clEnqueueMapImage)(
582*c217d954SCole Faust     cl_command_queue command_queue, cl_mem image, cl_bool blocking_map,
583*c217d954SCole Faust     cl_map_flags map_flags, const size_t *origin, const size_t *region,
584*c217d954SCole Faust     size_t *image_row_pitch, size_t *image_slice_pitch,
585*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
586*c217d954SCole Faust     cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0;
587*c217d954SCole Faust 
588*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueUnmapMemObject)(
589*c217d954SCole Faust     cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr,
590*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
591*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
592*c217d954SCole Faust 
593*c217d954SCole Faust #ifdef CL_VERSION_1_2
594*c217d954SCole Faust 
595*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueMigrateMemObjects)(
596*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_mem_objects,
597*c217d954SCole Faust     const cl_mem *mem_objects, cl_mem_migration_flags flags,
598*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
599*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
600*c217d954SCole Faust 
601*c217d954SCole Faust #else
602*c217d954SCole Faust 
603*c217d954SCole Faust typedef void *cl_api_clEnqueueMigrateMemObjects;
604*c217d954SCole Faust 
605*c217d954SCole Faust #endif
606*c217d954SCole Faust 
607*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueNDRangeKernel)(
608*c217d954SCole Faust     cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim,
609*c217d954SCole Faust     const size_t *global_work_offset, const size_t *global_work_size,
610*c217d954SCole Faust     const size_t *local_work_size, cl_uint num_events_in_wait_list,
611*c217d954SCole Faust     const cl_event *event_wait_list,
612*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
613*c217d954SCole Faust 
614*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueTask)(
615*c217d954SCole Faust     cl_command_queue command_queue, cl_kernel kernel,
616*c217d954SCole Faust     cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
617*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
618*c217d954SCole Faust 
619*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueNativeKernel)(
620*c217d954SCole Faust     cl_command_queue command_queue, void(CL_CALLBACK *user_func)(void *),
621*c217d954SCole Faust     void *args, size_t cb_args, cl_uint num_mem_objects, const cl_mem *mem_list,
622*c217d954SCole Faust     const void **args_mem_loc, cl_uint num_events_in_wait_list,
623*c217d954SCole Faust     const cl_event *event_wait_list,
624*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
625*c217d954SCole Faust 
626*c217d954SCole Faust #ifdef CL_VERSION_1_2
627*c217d954SCole Faust 
628*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueMarkerWithWaitList)(
629*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_events_in_wait_list,
630*c217d954SCole Faust     const cl_event *event_wait_list,
631*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
632*c217d954SCole Faust 
633*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueBarrierWithWaitList)(
634*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_events_in_wait_list,
635*c217d954SCole Faust     const cl_event *event_wait_list,
636*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
637*c217d954SCole Faust 
638*c217d954SCole Faust typedef void *(
639*c217d954SCole Faust     CL_API_CALL *cl_api_clGetExtensionFunctionAddressForPlatform)(
640*c217d954SCole Faust     cl_platform_id platform,
641*c217d954SCole Faust     const char *function_name)CL_API_SUFFIX__VERSION_1_2;
642*c217d954SCole Faust 
643*c217d954SCole Faust #else
644*c217d954SCole Faust 
645*c217d954SCole Faust typedef void *cl_api_clEnqueueMarkerWithWaitList;
646*c217d954SCole Faust typedef void *cl_api_clEnqueueBarrierWithWaitList;
647*c217d954SCole Faust typedef void *cl_api_clGetExtensionFunctionAddressForPlatform;
648*c217d954SCole Faust 
649*c217d954SCole Faust #endif
650*c217d954SCole Faust 
651*c217d954SCole Faust // Shared Virtual Memory APIs
652*c217d954SCole Faust 
653*c217d954SCole Faust #ifdef CL_VERSION_2_0
654*c217d954SCole Faust 
655*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMFree)(
656*c217d954SCole Faust     cl_command_queue /* command_queue */, cl_uint /* num_svm_pointers */,
657*c217d954SCole Faust     void ** /* svm_pointers */,
658*c217d954SCole Faust     void(CL_CALLBACK *pfn_free_func)(cl_command_queue /* queue */,
659*c217d954SCole Faust                                      cl_uint /* num_svm_pointers */,
660*c217d954SCole Faust                                      void ** /* svm_pointers[] */,
661*c217d954SCole Faust                                      void * /* user_data */),
662*c217d954SCole Faust     void * /* user_data */, cl_uint /* num_events_in_wait_list */,
663*c217d954SCole Faust     const cl_event * /* event_wait_list */,
664*c217d954SCole Faust     cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
665*c217d954SCole Faust 
666*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemcpy)(
667*c217d954SCole Faust     cl_command_queue /* command_queue */, cl_bool /* blocking_copy */,
668*c217d954SCole Faust     void * /* dst_ptr */, const void * /* src_ptr */, size_t /* size */,
669*c217d954SCole Faust     cl_uint /* num_events_in_wait_list */,
670*c217d954SCole Faust     const cl_event * /* event_wait_list */,
671*c217d954SCole Faust     cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
672*c217d954SCole Faust 
673*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemFill)(
674*c217d954SCole Faust     cl_command_queue /* command_queue */, void * /* svm_ptr */,
675*c217d954SCole Faust     const void * /* pattern */, size_t /* pattern_size */, size_t /* size */,
676*c217d954SCole Faust     cl_uint /* num_events_in_wait_list */,
677*c217d954SCole Faust     const cl_event * /* event_wait_list */,
678*c217d954SCole Faust     cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
679*c217d954SCole Faust 
680*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMap)(
681*c217d954SCole Faust     cl_command_queue /* command_queue */, cl_bool /* blocking_map */,
682*c217d954SCole Faust     cl_map_flags /* map_flags */, void * /* svm_ptr */, size_t /* size */,
683*c217d954SCole Faust     cl_uint /* num_events_in_wait_list */,
684*c217d954SCole Faust     const cl_event * /* event_wait_list */,
685*c217d954SCole Faust     cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
686*c217d954SCole Faust 
687*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMUnmap)(
688*c217d954SCole Faust     cl_command_queue /* command_queue */, void * /* svm_ptr */,
689*c217d954SCole Faust     cl_uint /* num_events_in_wait_list */,
690*c217d954SCole Faust     const cl_event * /* event_wait_list */,
691*c217d954SCole Faust     cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
692*c217d954SCole Faust 
693*c217d954SCole Faust #else
694*c217d954SCole Faust 
695*c217d954SCole Faust typedef void *cl_api_clEnqueueSVMFree;
696*c217d954SCole Faust typedef void *cl_api_clEnqueueSVMMemcpy;
697*c217d954SCole Faust typedef void *cl_api_clEnqueueSVMMemFill;
698*c217d954SCole Faust typedef void *cl_api_clEnqueueSVMMap;
699*c217d954SCole Faust typedef void *cl_api_clEnqueueSVMUnmap;
700*c217d954SCole Faust 
701*c217d954SCole Faust #endif
702*c217d954SCole Faust 
703*c217d954SCole Faust // Deprecated APIs
704*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetCommandQueueProperty)(
705*c217d954SCole Faust     cl_command_queue command_queue, cl_command_queue_properties properties,
706*c217d954SCole Faust     cl_bool enable, cl_command_queue_properties *old_properties)
707*c217d954SCole Faust     CL_API_SUFFIX__VERSION_1_0_DEPRECATED;
708*c217d954SCole Faust 
709*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateImage2D)(
710*c217d954SCole Faust     cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
711*c217d954SCole Faust     size_t image_width, size_t image_height, size_t image_row_pitch,
712*c217d954SCole Faust     void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
713*c217d954SCole Faust 
714*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateImage3D)(
715*c217d954SCole Faust     cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
716*c217d954SCole Faust     size_t image_width, size_t image_height, size_t image_depth,
717*c217d954SCole Faust     size_t image_row_pitch, size_t image_slice_pitch, void *host_ptr,
718*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
719*c217d954SCole Faust 
720*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clUnloadCompiler)(void)
721*c217d954SCole Faust     CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
722*c217d954SCole Faust 
723*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueMarker)(
724*c217d954SCole Faust     cl_command_queue command_queue,
725*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
726*c217d954SCole Faust 
727*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueWaitForEvents)(
728*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_events,
729*c217d954SCole Faust     const cl_event *event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
730*c217d954SCole Faust 
731*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueBarrier)(
732*c217d954SCole Faust     cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
733*c217d954SCole Faust 
734*c217d954SCole Faust typedef void *(CL_API_CALL *cl_api_clGetExtensionFunctionAddress)(
735*c217d954SCole Faust     const char *function_name)CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
736*c217d954SCole Faust 
737*c217d954SCole Faust // GL and other APIs
738*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLBuffer)(
739*c217d954SCole Faust     cl_context context, cl_mem_flags flags, cl_GLuint bufobj,
740*c217d954SCole Faust     int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
741*c217d954SCole Faust 
742*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture)(
743*c217d954SCole Faust     cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
744*c217d954SCole Faust     cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
745*c217d954SCole Faust 
746*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture2D)(
747*c217d954SCole Faust     cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
748*c217d954SCole Faust     cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
749*c217d954SCole Faust 
750*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture3D)(
751*c217d954SCole Faust     cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
752*c217d954SCole Faust     cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
753*c217d954SCole Faust 
754*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLRenderbuffer)(
755*c217d954SCole Faust     cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer,
756*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
757*c217d954SCole Faust 
758*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetGLObjectInfo)(
759*c217d954SCole Faust     cl_mem memobj, cl_gl_object_type *gl_object_type,
760*c217d954SCole Faust     cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0;
761*c217d954SCole Faust 
762*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetGLTextureInfo)(
763*c217d954SCole Faust     cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size,
764*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
765*c217d954SCole Faust 
766*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueAcquireGLObjects)(
767*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
768*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
769*c217d954SCole Faust     const cl_event *event_wait_list,
770*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
771*c217d954SCole Faust 
772*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueReleaseGLObjects)(
773*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
774*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
775*c217d954SCole Faust     const cl_event *event_wait_list,
776*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
777*c217d954SCole Faust 
778*c217d954SCole Faust /* cl_khr_gl_sharing */
779*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetGLContextInfoKHR)(
780*c217d954SCole Faust     const cl_context_properties *properties, cl_gl_context_info param_name,
781*c217d954SCole Faust     size_t param_value_size, void *param_value, size_t *param_value_size_ret);
782*c217d954SCole Faust 
783*c217d954SCole Faust /* cl_khr_gl_event */
784*c217d954SCole Faust typedef cl_event(CL_API_CALL *cl_api_clCreateEventFromGLsyncKHR)(
785*c217d954SCole Faust     cl_context context, cl_GLsync sync, cl_int *errcode_ret);
786*c217d954SCole Faust 
787*c217d954SCole Faust #if defined(_WIN32)
788*c217d954SCole Faust 
789*c217d954SCole Faust /* cl_khr_d3d10_sharing */
790*c217d954SCole Faust 
791*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D10KHR)(
792*c217d954SCole Faust     cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source,
793*c217d954SCole Faust     void *d3d_object, cl_d3d10_device_set_khr d3d_device_set,
794*c217d954SCole Faust     cl_uint num_entries, cl_device_id *devices,
795*c217d954SCole Faust     cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
796*c217d954SCole Faust 
797*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10BufferKHR)(
798*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D10Buffer *resource,
799*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
800*c217d954SCole Faust 
801*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture2DKHR)(
802*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource,
803*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
804*c217d954SCole Faust 
805*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture3DKHR)(
806*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource,
807*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
808*c217d954SCole Faust 
809*c217d954SCole Faust typedef
810*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D10ObjectsKHR)(
811*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
812*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
813*c217d954SCole Faust     const cl_event *event_wait_list,
814*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
815*c217d954SCole Faust 
816*c217d954SCole Faust typedef
817*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D10ObjectsKHR)(
818*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
819*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
820*c217d954SCole Faust     const cl_event *event_wait_list,
821*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_0;
822*c217d954SCole Faust 
823*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR(
824*c217d954SCole Faust     cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source,
825*c217d954SCole Faust     void *d3d_object, cl_d3d10_device_set_khr d3d_device_set,
826*c217d954SCole Faust     cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices);
827*c217d954SCole Faust 
828*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL
829*c217d954SCole Faust clCreateFromD3D10BufferKHR(cl_context context, cl_mem_flags flags,
830*c217d954SCole Faust                            ID3D10Buffer *resource, cl_int *errcode_ret);
831*c217d954SCole Faust 
832*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR(
833*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource,
834*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret);
835*c217d954SCole Faust 
836*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR(
837*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource,
838*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret);
839*c217d954SCole Faust 
840*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR(
841*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
842*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
843*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
844*c217d954SCole Faust 
845*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR(
846*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
847*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
848*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
849*c217d954SCole Faust 
850*c217d954SCole Faust /* cl_khr_d3d11_sharing */
851*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D11KHR)(
852*c217d954SCole Faust     cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source,
853*c217d954SCole Faust     void *d3d_object, cl_d3d11_device_set_khr d3d_device_set,
854*c217d954SCole Faust     cl_uint num_entries, cl_device_id *devices,
855*c217d954SCole Faust     cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
856*c217d954SCole Faust 
857*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11BufferKHR)(
858*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D11Buffer *resource,
859*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
860*c217d954SCole Faust 
861*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture2DKHR)(
862*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource,
863*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
864*c217d954SCole Faust 
865*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture3DKHR)(
866*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource,
867*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
868*c217d954SCole Faust 
869*c217d954SCole Faust typedef
870*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D11ObjectsKHR)(
871*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
872*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
873*c217d954SCole Faust     const cl_event *event_wait_list,
874*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
875*c217d954SCole Faust 
876*c217d954SCole Faust typedef
877*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D11ObjectsKHR)(
878*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
879*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
880*c217d954SCole Faust     const cl_event *event_wait_list,
881*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
882*c217d954SCole Faust 
883*c217d954SCole Faust /* cl_khr_dx9_media_sharing */
884*c217d954SCole Faust typedef
885*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR)(
886*c217d954SCole Faust     cl_platform_id platform, cl_uint num_media_adapters,
887*c217d954SCole Faust     cl_dx9_media_adapter_type_khr *media_adapters_type, void *media_adapters,
888*c217d954SCole Faust     cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries,
889*c217d954SCole Faust     cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
890*c217d954SCole Faust 
891*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromDX9MediaSurfaceKHR)(
892*c217d954SCole Faust     cl_context context, cl_mem_flags flags,
893*c217d954SCole Faust     cl_dx9_media_adapter_type_khr adapter_type, void *surface_info,
894*c217d954SCole Faust     cl_uint plane, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
895*c217d954SCole Faust 
896*c217d954SCole Faust typedef
897*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR)(
898*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
899*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
900*c217d954SCole Faust     const cl_event *event_wait_list,
901*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
902*c217d954SCole Faust 
903*c217d954SCole Faust typedef
904*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR)(
905*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
906*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
907*c217d954SCole Faust     const cl_event *event_wait_list,
908*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_1_2;
909*c217d954SCole Faust 
910*c217d954SCole Faust /* cl_khr_d3d11_sharing */
911*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR(
912*c217d954SCole Faust     cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source,
913*c217d954SCole Faust     void *d3d_object, cl_d3d11_device_set_khr d3d_device_set,
914*c217d954SCole Faust     cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices);
915*c217d954SCole Faust 
916*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL
917*c217d954SCole Faust clCreateFromD3D11BufferKHR(cl_context context, cl_mem_flags flags,
918*c217d954SCole Faust                            ID3D11Buffer *resource, cl_int *errcode_ret);
919*c217d954SCole Faust 
920*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR(
921*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource,
922*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret);
923*c217d954SCole Faust 
924*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR(
925*c217d954SCole Faust     cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource,
926*c217d954SCole Faust     UINT subresource, cl_int *errcode_ret);
927*c217d954SCole Faust 
928*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR(
929*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
930*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
931*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
932*c217d954SCole Faust 
933*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR(
934*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
935*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
936*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
937*c217d954SCole Faust 
938*c217d954SCole Faust /* cl_khr_dx9_media_sharing */
939*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR(
940*c217d954SCole Faust     cl_platform_id platform, cl_uint num_media_adapters,
941*c217d954SCole Faust     cl_dx9_media_adapter_type_khr *media_adapter_type, void *media_adapters,
942*c217d954SCole Faust     cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries,
943*c217d954SCole Faust     cl_device_id *devices, cl_uint *num_devices);
944*c217d954SCole Faust 
945*c217d954SCole Faust extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR(
946*c217d954SCole Faust     cl_context context, cl_mem_flags flags,
947*c217d954SCole Faust     cl_dx9_media_adapter_type_khr adapter_type, void *surface_info,
948*c217d954SCole Faust     cl_uint plane, cl_int *errcode_ret);
949*c217d954SCole Faust 
950*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR(
951*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
952*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
953*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
954*c217d954SCole Faust 
955*c217d954SCole Faust extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR(
956*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
957*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
958*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
959*c217d954SCole Faust 
960*c217d954SCole Faust #else
961*c217d954SCole Faust 
962*c217d954SCole Faust /* cl_khr_d3d10_sharing */
963*c217d954SCole Faust typedef void *cl_api_clGetDeviceIDsFromD3D10KHR;
964*c217d954SCole Faust typedef void *cl_api_clCreateFromD3D10BufferKHR;
965*c217d954SCole Faust typedef void *cl_api_clCreateFromD3D10Texture2DKHR;
966*c217d954SCole Faust typedef void *cl_api_clCreateFromD3D10Texture3DKHR;
967*c217d954SCole Faust typedef void *cl_api_clEnqueueAcquireD3D10ObjectsKHR;
968*c217d954SCole Faust typedef void *cl_api_clEnqueueReleaseD3D10ObjectsKHR;
969*c217d954SCole Faust 
970*c217d954SCole Faust /* cl_khr_d3d11_sharing */
971*c217d954SCole Faust typedef void *cl_api_clGetDeviceIDsFromD3D11KHR;
972*c217d954SCole Faust typedef void *cl_api_clCreateFromD3D11BufferKHR;
973*c217d954SCole Faust typedef void *cl_api_clCreateFromD3D11Texture2DKHR;
974*c217d954SCole Faust typedef void *cl_api_clCreateFromD3D11Texture3DKHR;
975*c217d954SCole Faust typedef void *cl_api_clEnqueueAcquireD3D11ObjectsKHR;
976*c217d954SCole Faust typedef void *cl_api_clEnqueueReleaseD3D11ObjectsKHR;
977*c217d954SCole Faust 
978*c217d954SCole Faust /* cl_khr_dx9_media_sharing */
979*c217d954SCole Faust typedef void *cl_api_clCreateFromDX9MediaSurfaceKHR;
980*c217d954SCole Faust typedef void *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR;
981*c217d954SCole Faust typedef void *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR;
982*c217d954SCole Faust typedef void *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR;
983*c217d954SCole Faust 
984*c217d954SCole Faust #endif
985*c217d954SCole Faust 
986*c217d954SCole Faust /* OpenCL 1.1 */
987*c217d954SCole Faust 
988*c217d954SCole Faust #ifdef CL_VERSION_1_1
989*c217d954SCole Faust 
990*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetEventCallback)(
991*c217d954SCole Faust     cl_event /* event */, cl_int /* command_exec_callback_type */,
992*c217d954SCole Faust     void(CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
993*c217d954SCole Faust     void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
994*c217d954SCole Faust 
995*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateSubBuffer)(
996*c217d954SCole Faust     cl_mem /* buffer */, cl_mem_flags /* flags */,
997*c217d954SCole Faust     cl_buffer_create_type /* buffer_create_type */,
998*c217d954SCole Faust     const void * /* buffer_create_info */,
999*c217d954SCole Faust     cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
1000*c217d954SCole Faust 
1001*c217d954SCole Faust typedef
1002*c217d954SCole Faust cl_int(CL_API_CALL *cl_api_clSetMemObjectDestructorCallback)(
1003*c217d954SCole Faust     cl_mem /* memobj */,
1004*c217d954SCole Faust     void(CL_CALLBACK * /*pfn_notify*/)(cl_mem /* memobj */,
1005*c217d954SCole Faust                                        void * /*user_data*/),
1006*c217d954SCole Faust     void * /*user_data */) CL_API_SUFFIX__VERSION_1_1;
1007*c217d954SCole Faust 
1008*c217d954SCole Faust typedef cl_event(CL_API_CALL *cl_api_clCreateUserEvent)(
1009*c217d954SCole Faust     cl_context /* context */,
1010*c217d954SCole Faust     cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
1011*c217d954SCole Faust 
1012*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetUserEventStatus)(
1013*c217d954SCole Faust     cl_event /* event */,
1014*c217d954SCole Faust     cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
1015*c217d954SCole Faust 
1016*c217d954SCole Faust #else
1017*c217d954SCole Faust 
1018*c217d954SCole Faust typedef void *cl_api_clSetEventCallback;
1019*c217d954SCole Faust typedef void *cl_api_clCreateSubBuffer;
1020*c217d954SCole Faust typedef void *cl_api_clSetMemObjectDestructorCallback;
1021*c217d954SCole Faust typedef void *cl_api_clCreateUserEvent;
1022*c217d954SCole Faust typedef void *cl_api_clSetUserEventStatus;
1023*c217d954SCole Faust 
1024*c217d954SCole Faust #endif
1025*c217d954SCole Faust 
1026*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevicesEXT)(
1027*c217d954SCole Faust     cl_device_id in_device,
1028*c217d954SCole Faust     const cl_device_partition_property_ext *partition_properties,
1029*c217d954SCole Faust     cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
1030*c217d954SCole Faust 
1031*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clRetainDeviceEXT)(
1032*c217d954SCole Faust     cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
1033*c217d954SCole Faust 
1034*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clReleaseDeviceEXT)(
1035*c217d954SCole Faust     cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
1036*c217d954SCole Faust 
1037*c217d954SCole Faust /* cl_khr_egl_image */
1038*c217d954SCole Faust typedef cl_mem(CL_API_CALL *cl_api_clCreateFromEGLImageKHR)(
1039*c217d954SCole Faust     cl_context context, CLeglDisplayKHR display, CLeglImageKHR image,
1040*c217d954SCole Faust     cl_mem_flags flags, const cl_egl_image_properties_khr *properties,
1041*c217d954SCole Faust     cl_int *errcode_ret);
1042*c217d954SCole Faust 
1043*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueAcquireEGLObjectsKHR)(
1044*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
1045*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
1046*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
1047*c217d954SCole Faust 
1048*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueReleaseEGLObjectsKHR)(
1049*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_objects,
1050*c217d954SCole Faust     const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
1051*c217d954SCole Faust     const cl_event *event_wait_list, cl_event *event);
1052*c217d954SCole Faust 
1053*c217d954SCole Faust /* cl_khr_egl_event */
1054*c217d954SCole Faust typedef cl_event(CL_API_CALL *cl_api_clCreateEventFromEGLSyncKHR)(
1055*c217d954SCole Faust     cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display,
1056*c217d954SCole Faust     cl_int *errcode_ret);
1057*c217d954SCole Faust 
1058*c217d954SCole Faust #ifdef CL_VERSION_2_1
1059*c217d954SCole Faust 
1060*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clSetDefaultDeviceCommandQueue)(
1061*c217d954SCole Faust     cl_context context, cl_device_id device,
1062*c217d954SCole Faust     cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1;
1063*c217d954SCole Faust 
1064*c217d954SCole Faust typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithIL)(
1065*c217d954SCole Faust     cl_context context, const void *il, size_t length,
1066*c217d954SCole Faust     cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1;
1067*c217d954SCole Faust 
1068*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfo)(
1069*c217d954SCole Faust     cl_kernel kernel, cl_device_id device, cl_kernel_sub_group_info param_name,
1070*c217d954SCole Faust     size_t input_value_size, const void *input_value, size_t param_value_size,
1071*c217d954SCole Faust     void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
1072*c217d954SCole Faust 
1073*c217d954SCole Faust typedef cl_kernel(CL_API_CALL *cl_api_clCloneKernel)(
1074*c217d954SCole Faust     cl_kernel source_kernel, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1;
1075*c217d954SCole Faust 
1076*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMigrateMem)(
1077*c217d954SCole Faust     cl_command_queue command_queue, cl_uint num_svm_pointers,
1078*c217d954SCole Faust     const void **svm_pointers, const size_t *sizes,
1079*c217d954SCole Faust     cl_mem_migration_flags flags, cl_uint num_events_in_wait_list,
1080*c217d954SCole Faust     const cl_event *event_wait_list,
1081*c217d954SCole Faust     cl_event *event) CL_API_SUFFIX__VERSION_2_1;
1082*c217d954SCole Faust 
1083*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetDeviceAndHostTimer)(
1084*c217d954SCole Faust     cl_device_id device, cl_ulong *device_timestamp,
1085*c217d954SCole Faust     cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1;
1086*c217d954SCole Faust 
1087*c217d954SCole Faust typedef cl_int(CL_API_CALL *cl_api_clGetHostTimer)(
1088*c217d954SCole Faust     cl_device_id device, cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1;
1089*c217d954SCole Faust 
1090*c217d954SCole Faust #else
1091*c217d954SCole Faust 
1092*c217d954SCole Faust typedef void *cl_api_clSetDefaultDeviceCommandQueue;
1093*c217d954SCole Faust typedef void *cl_api_clCreateProgramWithIL;
1094*c217d954SCole Faust typedef void *cl_api_clGetKernelSubGroupInfo;
1095*c217d954SCole Faust typedef void *cl_api_clCloneKernel;
1096*c217d954SCole Faust typedef void *cl_api_clEnqueueSVMMigrateMem;
1097*c217d954SCole Faust typedef void *cl_api_clGetDeviceAndHostTimer;
1098*c217d954SCole Faust typedef void *cl_api_clGetHostTimer;
1099*c217d954SCole Faust 
1100*c217d954SCole Faust #endif
1101*c217d954SCole Faust 
1102*c217d954SCole Faust /* Vendor dispatch table struture */
1103*c217d954SCole Faust 
1104*c217d954SCole Faust typedef struct _cl_icd_dispatch {
1105*c217d954SCole Faust   /* OpenCL 1.0 */
1106*c217d954SCole Faust   cl_api_clGetPlatformIDs clGetPlatformIDs;
1107*c217d954SCole Faust   cl_api_clGetPlatformInfo clGetPlatformInfo;
1108*c217d954SCole Faust   cl_api_clGetDeviceIDs clGetDeviceIDs;
1109*c217d954SCole Faust   cl_api_clGetDeviceInfo clGetDeviceInfo;
1110*c217d954SCole Faust   cl_api_clCreateContext clCreateContext;
1111*c217d954SCole Faust   cl_api_clCreateContextFromType clCreateContextFromType;
1112*c217d954SCole Faust   cl_api_clRetainContext clRetainContext;
1113*c217d954SCole Faust   cl_api_clReleaseContext clReleaseContext;
1114*c217d954SCole Faust   cl_api_clGetContextInfo clGetContextInfo;
1115*c217d954SCole Faust   cl_api_clCreateCommandQueue clCreateCommandQueue;
1116*c217d954SCole Faust   cl_api_clRetainCommandQueue clRetainCommandQueue;
1117*c217d954SCole Faust   cl_api_clReleaseCommandQueue clReleaseCommandQueue;
1118*c217d954SCole Faust   cl_api_clGetCommandQueueInfo clGetCommandQueueInfo;
1119*c217d954SCole Faust   cl_api_clSetCommandQueueProperty clSetCommandQueueProperty;
1120*c217d954SCole Faust   cl_api_clCreateBuffer clCreateBuffer;
1121*c217d954SCole Faust   cl_api_clCreateImage2D clCreateImage2D;
1122*c217d954SCole Faust   cl_api_clCreateImage3D clCreateImage3D;
1123*c217d954SCole Faust   cl_api_clRetainMemObject clRetainMemObject;
1124*c217d954SCole Faust   cl_api_clReleaseMemObject clReleaseMemObject;
1125*c217d954SCole Faust   cl_api_clGetSupportedImageFormats clGetSupportedImageFormats;
1126*c217d954SCole Faust   cl_api_clGetMemObjectInfo clGetMemObjectInfo;
1127*c217d954SCole Faust   cl_api_clGetImageInfo clGetImageInfo;
1128*c217d954SCole Faust   cl_api_clCreateSampler clCreateSampler;
1129*c217d954SCole Faust   cl_api_clRetainSampler clRetainSampler;
1130*c217d954SCole Faust   cl_api_clReleaseSampler clReleaseSampler;
1131*c217d954SCole Faust   cl_api_clGetSamplerInfo clGetSamplerInfo;
1132*c217d954SCole Faust   cl_api_clCreateProgramWithSource clCreateProgramWithSource;
1133*c217d954SCole Faust   cl_api_clCreateProgramWithBinary clCreateProgramWithBinary;
1134*c217d954SCole Faust   cl_api_clRetainProgram clRetainProgram;
1135*c217d954SCole Faust   cl_api_clReleaseProgram clReleaseProgram;
1136*c217d954SCole Faust   cl_api_clBuildProgram clBuildProgram;
1137*c217d954SCole Faust   cl_api_clUnloadCompiler clUnloadCompiler;
1138*c217d954SCole Faust   cl_api_clGetProgramInfo clGetProgramInfo;
1139*c217d954SCole Faust   cl_api_clGetProgramBuildInfo clGetProgramBuildInfo;
1140*c217d954SCole Faust   cl_api_clCreateKernel clCreateKernel;
1141*c217d954SCole Faust   cl_api_clCreateKernelsInProgram clCreateKernelsInProgram;
1142*c217d954SCole Faust   cl_api_clRetainKernel clRetainKernel;
1143*c217d954SCole Faust   cl_api_clReleaseKernel clReleaseKernel;
1144*c217d954SCole Faust   cl_api_clSetKernelArg clSetKernelArg;
1145*c217d954SCole Faust   cl_api_clGetKernelInfo clGetKernelInfo;
1146*c217d954SCole Faust   cl_api_clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo;
1147*c217d954SCole Faust   cl_api_clWaitForEvents clWaitForEvents;
1148*c217d954SCole Faust   cl_api_clGetEventInfo clGetEventInfo;
1149*c217d954SCole Faust   cl_api_clRetainEvent clRetainEvent;
1150*c217d954SCole Faust   cl_api_clReleaseEvent clReleaseEvent;
1151*c217d954SCole Faust   cl_api_clGetEventProfilingInfo clGetEventProfilingInfo;
1152*c217d954SCole Faust   cl_api_clFlush clFlush;
1153*c217d954SCole Faust   cl_api_clFinish clFinish;
1154*c217d954SCole Faust   cl_api_clEnqueueReadBuffer clEnqueueReadBuffer;
1155*c217d954SCole Faust   cl_api_clEnqueueWriteBuffer clEnqueueWriteBuffer;
1156*c217d954SCole Faust   cl_api_clEnqueueCopyBuffer clEnqueueCopyBuffer;
1157*c217d954SCole Faust   cl_api_clEnqueueReadImage clEnqueueReadImage;
1158*c217d954SCole Faust   cl_api_clEnqueueWriteImage clEnqueueWriteImage;
1159*c217d954SCole Faust   cl_api_clEnqueueCopyImage clEnqueueCopyImage;
1160*c217d954SCole Faust   cl_api_clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer;
1161*c217d954SCole Faust   cl_api_clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage;
1162*c217d954SCole Faust   cl_api_clEnqueueMapBuffer clEnqueueMapBuffer;
1163*c217d954SCole Faust   cl_api_clEnqueueMapImage clEnqueueMapImage;
1164*c217d954SCole Faust   cl_api_clEnqueueUnmapMemObject clEnqueueUnmapMemObject;
1165*c217d954SCole Faust   cl_api_clEnqueueNDRangeKernel clEnqueueNDRangeKernel;
1166*c217d954SCole Faust   cl_api_clEnqueueTask clEnqueueTask;
1167*c217d954SCole Faust   cl_api_clEnqueueNativeKernel clEnqueueNativeKernel;
1168*c217d954SCole Faust   cl_api_clEnqueueMarker clEnqueueMarker;
1169*c217d954SCole Faust   cl_api_clEnqueueWaitForEvents clEnqueueWaitForEvents;
1170*c217d954SCole Faust   cl_api_clEnqueueBarrier clEnqueueBarrier;
1171*c217d954SCole Faust   cl_api_clGetExtensionFunctionAddress clGetExtensionFunctionAddress;
1172*c217d954SCole Faust   cl_api_clCreateFromGLBuffer clCreateFromGLBuffer;
1173*c217d954SCole Faust   cl_api_clCreateFromGLTexture2D clCreateFromGLTexture2D;
1174*c217d954SCole Faust   cl_api_clCreateFromGLTexture3D clCreateFromGLTexture3D;
1175*c217d954SCole Faust   cl_api_clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer;
1176*c217d954SCole Faust   cl_api_clGetGLObjectInfo clGetGLObjectInfo;
1177*c217d954SCole Faust   cl_api_clGetGLTextureInfo clGetGLTextureInfo;
1178*c217d954SCole Faust   cl_api_clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects;
1179*c217d954SCole Faust   cl_api_clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects;
1180*c217d954SCole Faust   cl_api_clGetGLContextInfoKHR clGetGLContextInfoKHR;
1181*c217d954SCole Faust 
1182*c217d954SCole Faust   /* cl_khr_d3d10_sharing */
1183*c217d954SCole Faust   cl_api_clGetDeviceIDsFromD3D10KHR clGetDeviceIDsFromD3D10KHR;
1184*c217d954SCole Faust   cl_api_clCreateFromD3D10BufferKHR clCreateFromD3D10BufferKHR;
1185*c217d954SCole Faust   cl_api_clCreateFromD3D10Texture2DKHR clCreateFromD3D10Texture2DKHR;
1186*c217d954SCole Faust   cl_api_clCreateFromD3D10Texture3DKHR clCreateFromD3D10Texture3DKHR;
1187*c217d954SCole Faust   cl_api_clEnqueueAcquireD3D10ObjectsKHR clEnqueueAcquireD3D10ObjectsKHR;
1188*c217d954SCole Faust   cl_api_clEnqueueReleaseD3D10ObjectsKHR clEnqueueReleaseD3D10ObjectsKHR;
1189*c217d954SCole Faust 
1190*c217d954SCole Faust   /* OpenCL 1.1 */
1191*c217d954SCole Faust   cl_api_clSetEventCallback clSetEventCallback;
1192*c217d954SCole Faust   cl_api_clCreateSubBuffer clCreateSubBuffer;
1193*c217d954SCole Faust   cl_api_clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback;
1194*c217d954SCole Faust   cl_api_clCreateUserEvent clCreateUserEvent;
1195*c217d954SCole Faust   cl_api_clSetUserEventStatus clSetUserEventStatus;
1196*c217d954SCole Faust   cl_api_clEnqueueReadBufferRect clEnqueueReadBufferRect;
1197*c217d954SCole Faust   cl_api_clEnqueueWriteBufferRect clEnqueueWriteBufferRect;
1198*c217d954SCole Faust   cl_api_clEnqueueCopyBufferRect clEnqueueCopyBufferRect;
1199*c217d954SCole Faust 
1200*c217d954SCole Faust   /* cl_ext_device_fission */
1201*c217d954SCole Faust   cl_api_clCreateSubDevicesEXT clCreateSubDevicesEXT;
1202*c217d954SCole Faust   cl_api_clRetainDeviceEXT clRetainDeviceEXT;
1203*c217d954SCole Faust   cl_api_clReleaseDeviceEXT clReleaseDeviceEXT;
1204*c217d954SCole Faust 
1205*c217d954SCole Faust   /* cl_khr_gl_event */
1206*c217d954SCole Faust   cl_api_clCreateEventFromGLsyncKHR clCreateEventFromGLsyncKHR;
1207*c217d954SCole Faust 
1208*c217d954SCole Faust   /* OpenCL 1.2 */
1209*c217d954SCole Faust   cl_api_clCreateSubDevices clCreateSubDevices;
1210*c217d954SCole Faust   cl_api_clRetainDevice clRetainDevice;
1211*c217d954SCole Faust   cl_api_clReleaseDevice clReleaseDevice;
1212*c217d954SCole Faust   cl_api_clCreateImage clCreateImage;
1213*c217d954SCole Faust   cl_api_clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels;
1214*c217d954SCole Faust   cl_api_clCompileProgram clCompileProgram;
1215*c217d954SCole Faust   cl_api_clLinkProgram clLinkProgram;
1216*c217d954SCole Faust   cl_api_clUnloadPlatformCompiler clUnloadPlatformCompiler;
1217*c217d954SCole Faust   cl_api_clGetKernelArgInfo clGetKernelArgInfo;
1218*c217d954SCole Faust   cl_api_clEnqueueFillBuffer clEnqueueFillBuffer;
1219*c217d954SCole Faust   cl_api_clEnqueueFillImage clEnqueueFillImage;
1220*c217d954SCole Faust   cl_api_clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects;
1221*c217d954SCole Faust   cl_api_clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList;
1222*c217d954SCole Faust   cl_api_clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList;
1223*c217d954SCole Faust   cl_api_clGetExtensionFunctionAddressForPlatform
1224*c217d954SCole Faust       clGetExtensionFunctionAddressForPlatform;
1225*c217d954SCole Faust   cl_api_clCreateFromGLTexture clCreateFromGLTexture;
1226*c217d954SCole Faust 
1227*c217d954SCole Faust   /* cl_khr_d3d11_sharing */
1228*c217d954SCole Faust   cl_api_clGetDeviceIDsFromD3D11KHR clGetDeviceIDsFromD3D11KHR;
1229*c217d954SCole Faust   cl_api_clCreateFromD3D11BufferKHR clCreateFromD3D11BufferKHR;
1230*c217d954SCole Faust   cl_api_clCreateFromD3D11Texture2DKHR clCreateFromD3D11Texture2DKHR;
1231*c217d954SCole Faust   cl_api_clCreateFromD3D11Texture3DKHR clCreateFromD3D11Texture3DKHR;
1232*c217d954SCole Faust   cl_api_clCreateFromDX9MediaSurfaceKHR clCreateFromDX9MediaSurfaceKHR;
1233*c217d954SCole Faust   cl_api_clEnqueueAcquireD3D11ObjectsKHR clEnqueueAcquireD3D11ObjectsKHR;
1234*c217d954SCole Faust   cl_api_clEnqueueReleaseD3D11ObjectsKHR clEnqueueReleaseD3D11ObjectsKHR;
1235*c217d954SCole Faust 
1236*c217d954SCole Faust   /* cl_khr_dx9_media_sharing */
1237*c217d954SCole Faust   cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR
1238*c217d954SCole Faust       clGetDeviceIDsFromDX9MediaAdapterKHR;
1239*c217d954SCole Faust   cl_api_clEnqueueAcquireDX9MediaSurfacesKHR
1240*c217d954SCole Faust       clEnqueueAcquireDX9MediaSurfacesKHR;
1241*c217d954SCole Faust   cl_api_clEnqueueReleaseDX9MediaSurfacesKHR
1242*c217d954SCole Faust       clEnqueueReleaseDX9MediaSurfacesKHR;
1243*c217d954SCole Faust 
1244*c217d954SCole Faust   /* cl_khr_egl_image */
1245*c217d954SCole Faust   cl_api_clCreateFromEGLImageKHR clCreateFromEGLImageKHR;
1246*c217d954SCole Faust   cl_api_clEnqueueAcquireEGLObjectsKHR clEnqueueAcquireEGLObjectsKHR;
1247*c217d954SCole Faust   cl_api_clEnqueueReleaseEGLObjectsKHR clEnqueueReleaseEGLObjectsKHR;
1248*c217d954SCole Faust 
1249*c217d954SCole Faust   /* cl_khr_egl_event */
1250*c217d954SCole Faust   cl_api_clCreateEventFromEGLSyncKHR clCreateEventFromEGLSyncKHR;
1251*c217d954SCole Faust 
1252*c217d954SCole Faust   /* OpenCL 2.0 */
1253*c217d954SCole Faust   cl_api_clCreateCommandQueueWithProperties clCreateCommandQueueWithProperties;
1254*c217d954SCole Faust   cl_api_clCreatePipe clCreatePipe;
1255*c217d954SCole Faust   cl_api_clGetPipeInfo clGetPipeInfo;
1256*c217d954SCole Faust   cl_api_clSVMAlloc clSVMAlloc;
1257*c217d954SCole Faust   cl_api_clSVMFree clSVMFree;
1258*c217d954SCole Faust   cl_api_clEnqueueSVMFree clEnqueueSVMFree;
1259*c217d954SCole Faust   cl_api_clEnqueueSVMMemcpy clEnqueueSVMMemcpy;
1260*c217d954SCole Faust   cl_api_clEnqueueSVMMemFill clEnqueueSVMMemFill;
1261*c217d954SCole Faust   cl_api_clEnqueueSVMMap clEnqueueSVMMap;
1262*c217d954SCole Faust   cl_api_clEnqueueSVMUnmap clEnqueueSVMUnmap;
1263*c217d954SCole Faust   cl_api_clCreateSamplerWithProperties clCreateSamplerWithProperties;
1264*c217d954SCole Faust   cl_api_clSetKernelArgSVMPointer clSetKernelArgSVMPointer;
1265*c217d954SCole Faust   cl_api_clSetKernelExecInfo clSetKernelExecInfo;
1266*c217d954SCole Faust 
1267*c217d954SCole Faust   /* cl_khr_sub_groups */
1268*c217d954SCole Faust   cl_api_clGetKernelSubGroupInfoKHR clGetKernelSubGroupInfoKHR;
1269*c217d954SCole Faust 
1270*c217d954SCole Faust   /* OpenCL 2.1 */
1271*c217d954SCole Faust   cl_api_clCloneKernel clCloneKernel;
1272*c217d954SCole Faust   cl_api_clCreateProgramWithIL clCreateProgramWithIL;
1273*c217d954SCole Faust   cl_api_clEnqueueSVMMigrateMem clEnqueueSVMMigrateMem;
1274*c217d954SCole Faust   cl_api_clGetDeviceAndHostTimer clGetDeviceAndHostTimer;
1275*c217d954SCole Faust   cl_api_clGetHostTimer clGetHostTimer;
1276*c217d954SCole Faust   cl_api_clGetKernelSubGroupInfo clGetKernelSubGroupInfo;
1277*c217d954SCole Faust   cl_api_clSetDefaultDeviceCommandQueue clSetDefaultDeviceCommandQueue;
1278*c217d954SCole Faust 
1279*c217d954SCole Faust   /* OpenCL 2.2 */
1280*c217d954SCole Faust   cl_api_clSetProgramReleaseCallback clSetProgramReleaseCallback;
1281*c217d954SCole Faust   cl_api_clSetProgramSpecializationConstant clSetProgramSpecializationConstant;
1282*c217d954SCole Faust 
1283*c217d954SCole Faust   /* OpenCL 3.0 */
1284*c217d954SCole Faust   cl_api_clCreateBufferWithProperties clCreateBufferWithProperties;
1285*c217d954SCole Faust   cl_api_clCreateImageWithProperties clCreateImageWithProperties;
1286*c217d954SCole Faust   cl_api_clSetContextDestructorCallback clSetContextDestructorCallback;
1287*c217d954SCole Faust 
1288*c217d954SCole Faust } cl_icd_dispatch;
1289*c217d954SCole Faust 
1290*c217d954SCole Faust #ifdef __cplusplus
1291*c217d954SCole Faust }
1292*c217d954SCole Faust #endif
1293*c217d954SCole Faust 
1294*c217d954SCole Faust #endif /* #ifndef OPENCL_CL_ICD_H */
1295