2 * Copyright (c) 2016 The Khronos Group Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software source and associated documentation files (the "Materials"),
6 * to deal in the Materials without restriction, including without limitation
7 * the rights to use, copy, modify, compile, merge, publish, distribute,
8 * sublicense, and/or sell copies of the Materials, and to permit persons to
9 * whom the Materials are furnished to do so, subject the following terms and
12 * All modifications to the Materials used to create a binary that is
13 * distributed to third parties shall be provided to Khronos with an
14 * unrestricted license to use for the purposes of implementing bug fixes and
15 * enhancements to the Materials;
17 * If the binary is used as part of an OpenCL(TM) implementation, whether binary
18 * is distributed together with or separately to that implementation, then
19 * recipient must become an OpenCL Adopter and follow the published OpenCL
20 * conformance process for that implementation, details at:
21 * http://www.khronos.org/conformance/;
23 * The above copyright notice, the OpenCL trademark license, and this permission
24 * notice shall be included in all copies or substantial portions of the
27 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32 * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN
35 * OpenCL is a trademark of Apple Inc. used under license by Khronos.
38 #ifndef _ICD_DISPATCH_H_
39 #define _ICD_DISPATCH_H_
41 #ifndef CL_USE_DEPRECATED_OPENCL_1_0_APIS
42 #define CL_USE_DEPRECATED_OPENCL_1_0_APIS
45 #ifndef CL_USE_DEPRECATED_OPENCL_1_1_APIS
46 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
49 #ifndef CL_USE_DEPRECATED_OPENCL_1_2_APIS
50 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
53 #ifndef CL_USE_DEPRECATED_OPENCL_2_0_APIS
54 #define CL_USE_DEPRECATED_OPENCL_2_0_APIS
60 // cl_gl.h and required files
65 #include <CL/cl_d3d10.h>
66 #include <CL/cl_d3d11.h>
67 #include <CL/cl_dx9_media_sharing.h>
69 #if !defined(__ANDROID__)
75 #include <CL/cl_gl_ext.h>
76 #include <CL/cl_ext.h>
77 #include <CL/cl_egl.h>
81 * function pointer typedefs
86 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetPlatformIDs)(
88 cl_platform_id * platforms,
89 cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0;
91 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetPlatformInfo)(
92 cl_platform_id platform,
93 cl_platform_info param_name,
94 size_t param_value_size,
96 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
99 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetDeviceIDs)(
100 cl_platform_id platform,
101 cl_device_type device_type,
103 cl_device_id * devices,
104 cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
106 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetDeviceInfo)(
108 cl_device_info param_name,
109 size_t param_value_size,
111 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
113 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clCreateSubDevices)(
114 cl_device_id in_device,
115 const cl_device_partition_property * partition_properties,
117 cl_device_id * out_devices,
118 cl_uint * num_devices);
120 typedef CL_API_ENTRY cl_int (CL_API_CALL * KHRpfn_clRetainDevice)(
121 cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
123 typedef CL_API_ENTRY cl_int (CL_API_CALL * KHRpfn_clReleaseDevice)(
124 cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
127 typedef CL_API_ENTRY cl_context (CL_API_CALL *KHRpfn_clCreateContext)(
128 const cl_context_properties * properties,
130 const cl_device_id * devices,
131 void (CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
133 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
135 typedef CL_API_ENTRY cl_context (CL_API_CALL *KHRpfn_clCreateContextFromType)(
136 const cl_context_properties * properties,
137 cl_device_type device_type,
138 void (CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
140 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
142 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainContext)(
143 cl_context context) CL_API_SUFFIX__VERSION_1_0;
145 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseContext)(
146 cl_context context) CL_API_SUFFIX__VERSION_1_0;
148 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetContextInfo)(
150 cl_context_info param_name,
151 size_t param_value_size,
153 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
155 // Command Queue APIs
156 typedef CL_API_ENTRY cl_command_queue (CL_API_CALL *KHRpfn_clCreateCommandQueue)(
159 cl_command_queue_properties properties,
160 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
162 typedef CL_API_ENTRY cl_command_queue (CL_API_CALL *KHRpfn_clCreateCommandQueueWithProperties)(
163 cl_context /* context */,
164 cl_device_id /* device */,
165 const cl_queue_properties * /* properties */,
166 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
168 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainCommandQueue)(
169 cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
171 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseCommandQueue)(
172 cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
174 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetCommandQueueInfo)(
175 cl_command_queue command_queue,
176 cl_command_queue_info param_name,
177 size_t param_value_size,
179 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
181 // Memory Object APIs
182 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateBuffer)(
187 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
189 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateImage)(
192 const cl_image_format * image_format,
193 const cl_image_desc * image_desc,
195 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
197 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainMemObject)(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
199 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseMemObject)(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
201 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetSupportedImageFormats)(
204 cl_mem_object_type image_type,
206 cl_image_format * image_formats,
207 cl_uint * num_image_formats) CL_API_SUFFIX__VERSION_1_0;
209 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetMemObjectInfo)(
211 cl_mem_info param_name,
212 size_t param_value_size,
214 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
216 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetImageInfo)(
218 cl_image_info param_name,
219 size_t param_value_size,
221 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
223 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreatePipe)(
224 cl_context /* context */,
225 cl_mem_flags /* flags */,
226 cl_uint /* pipe_packet_size */,
227 cl_uint /* pipe_max_packets */,
228 const cl_pipe_properties * /* properties */,
229 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
231 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetPipeInfo)(
233 cl_pipe_info /* param_name */,
234 size_t /* param_value_size */,
235 void * /* param_value */,
236 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
238 typedef CL_API_ENTRY void * (CL_API_CALL *KHRpfn_clSVMAlloc)(
239 cl_context /* context */,
240 cl_svm_mem_flags /* flags */,
242 unsigned int /* alignment */) CL_API_SUFFIX__VERSION_2_0;
244 typedef CL_API_ENTRY void (CL_API_CALL *KHRpfn_clSVMFree)(
245 cl_context /* context */,
246 void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0;
249 typedef CL_API_ENTRY cl_sampler (CL_API_CALL *KHRpfn_clCreateSampler)(
251 cl_bool normalized_coords,
252 cl_addressing_mode addressing_mode,
253 cl_filter_mode filter_mode,
254 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
256 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainSampler)(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
258 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseSampler)(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
260 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetSamplerInfo)(
262 cl_sampler_info param_name,
263 size_t param_value_size,
265 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
267 typedef CL_API_ENTRY cl_sampler (CL_API_CALL *KHRpfn_clCreateSamplerWithProperties)(
268 cl_context /* context */,
269 const cl_sampler_properties * /* sampler_properties */,
270 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
272 // Program Object APIs
273 typedef CL_API_ENTRY cl_program (CL_API_CALL *KHRpfn_clCreateProgramWithSource)(
276 const char ** strings,
277 const size_t * lengths,
278 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
280 typedef CL_API_ENTRY cl_program (CL_API_CALL *KHRpfn_clCreateProgramWithBinary)(
283 const cl_device_id * device_list,
284 const size_t * lengths,
285 const unsigned char ** binaries,
286 cl_int * binary_status,
287 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
289 typedef CL_API_ENTRY cl_program (CL_API_CALL *KHRpfn_clCreateProgramWithBuiltInKernels)(
292 const cl_device_id * device_list,
293 const char * kernel_names,
294 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
296 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainProgram)(cl_program program) CL_API_SUFFIX__VERSION_1_0;
298 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseProgram)(cl_program program) CL_API_SUFFIX__VERSION_1_0;
300 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clBuildProgram)(
303 const cl_device_id * device_list,
304 const char * options,
305 void (CL_CALLBACK *pfn_notify)(cl_program program, void * user_data),
306 void * user_data) CL_API_SUFFIX__VERSION_1_0;
308 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clCompileProgram)(
311 const cl_device_id * device_list,
312 const char * options,
313 cl_uint num_input_headers,
314 const cl_program * input_headers,
315 const char ** header_include_names,
316 void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
317 void * user_data) CL_API_SUFFIX__VERSION_1_2;
319 typedef CL_API_ENTRY cl_program (CL_API_CALL *KHRpfn_clLinkProgram)(
322 const cl_device_id * device_list,
323 const char * options,
324 cl_uint num_input_programs,
325 const cl_program * input_programs,
326 void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
328 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
330 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetProgramSpecializationConstant)(
334 const void* spec_value) CL_API_SUFFIX__VERSION_2_2;
336 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetProgramReleaseCallback)(
338 void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
339 void * user_data) CL_API_SUFFIX__VERSION_2_2;
341 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clUnloadPlatformCompiler)(
342 cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
344 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetProgramInfo)(
346 cl_program_info param_name,
347 size_t param_value_size,
349 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
351 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetProgramBuildInfo)(
354 cl_program_build_info param_name,
355 size_t param_value_size,
357 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
359 // Kernel Object APIs
360 typedef CL_API_ENTRY cl_kernel (CL_API_CALL *KHRpfn_clCreateKernel)(
362 const char * kernel_name,
363 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
365 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clCreateKernelsInProgram)(
369 cl_uint * num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
371 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainKernel)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
373 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseKernel)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
375 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetKernelArg)(
379 const void * arg_value) CL_API_SUFFIX__VERSION_1_0;
381 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetKernelInfo)(
383 cl_kernel_info param_name,
384 size_t param_value_size,
386 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
388 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetKernelArgInfo)(
391 cl_kernel_arg_info param_name,
392 size_t param_value_size,
394 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
396 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetKernelWorkGroupInfo)(
399 cl_kernel_work_group_info param_name,
400 size_t param_value_size,
402 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
404 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetKernelArgSVMPointer)(
405 cl_kernel /* kernel */,
406 cl_uint /* arg_index */,
407 const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0;
409 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetKernelExecInfo)(
410 cl_kernel /* kernel */,
411 cl_kernel_exec_info /* param_name */,
412 size_t /* param_value_size */,
413 const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
415 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetKernelSubGroupInfoKHR)(
416 cl_kernel /* in_kernel */,
417 cl_device_id /*in_device*/,
418 cl_kernel_sub_group_info /* param_name */,
419 size_t /*input_value_size*/,
420 const void * /*input_value*/,
421 size_t /*param_value_size*/,
422 void* /*param_value*/,
423 size_t* /*param_value_size_ret*/) CL_EXT_SUFFIX__VERSION_2_0;
426 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clWaitForEvents)(
428 const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0;
430 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetEventInfo)(
432 cl_event_info param_name,
433 size_t param_value_size,
435 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
437 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clRetainEvent)(cl_event event) CL_API_SUFFIX__VERSION_1_0;
439 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clReleaseEvent)(cl_event event) CL_API_SUFFIX__VERSION_1_0;
442 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetEventProfilingInfo)(
444 cl_profiling_info param_name,
445 size_t param_value_size,
447 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
449 // Flush and Finish APIs
450 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clFlush)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
452 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clFinish)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
454 // Enqueued Commands APIs
455 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReadBuffer)(
456 cl_command_queue command_queue,
458 cl_bool blocking_read,
462 cl_uint num_events_in_wait_list,
463 const cl_event * event_wait_list,
464 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
466 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReadBufferRect)(
467 cl_command_queue command_queue,
469 cl_bool blocking_read,
470 const size_t * buffer_origin,
471 const size_t * host_origin,
472 const size_t * region,
473 size_t buffer_row_pitch,
474 size_t buffer_slice_pitch,
475 size_t host_row_pitch,
476 size_t host_slice_pitch,
478 cl_uint num_events_in_wait_list,
479 const cl_event * event_wait_list,
480 cl_event * event) CL_API_SUFFIX__VERSION_1_1;
482 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueWriteBuffer)(
483 cl_command_queue command_queue,
485 cl_bool blocking_write,
489 cl_uint num_events_in_wait_list,
490 const cl_event * event_wait_list,
491 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
493 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueWriteBufferRect)(
494 cl_command_queue command_queue,
496 cl_bool blocking_read,
497 const size_t * buffer_origin,
498 const size_t * host_origin,
499 const size_t * region,
500 size_t buffer_row_pitch,
501 size_t buffer_slice_pitch,
502 size_t host_row_pitch,
503 size_t host_slice_pitch,
505 cl_uint num_events_in_wait_list,
506 const cl_event * event_wait_list,
507 cl_event * event) CL_API_SUFFIX__VERSION_1_1;
509 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueFillBuffer)(
510 cl_command_queue command_queue,
512 const void * pattern,
516 cl_uint num_events_in_wait_list,
517 const cl_event * event_wait_list,
518 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
520 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueCopyBuffer)(
521 cl_command_queue command_queue,
527 cl_uint num_events_in_wait_list,
528 const cl_event * event_wait_list,
529 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
531 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueCopyBufferRect)(
532 cl_command_queue command_queue,
535 const size_t * src_origin,
536 const size_t * dst_origin,
537 const size_t * region,
538 size_t src_row_pitch,
539 size_t src_slice_pitch,
540 size_t dst_row_pitch,
541 size_t dst_slice_pitch,
542 cl_uint num_events_in_wait_list,
543 const cl_event * event_wait_list,
544 cl_event * event) CL_API_SUFFIX__VERSION_1_1;
546 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReadImage)(
547 cl_command_queue command_queue,
549 cl_bool blocking_read,
550 const size_t * origin,
551 const size_t * region,
555 cl_uint num_events_in_wait_list,
556 const cl_event * event_wait_list,
557 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
559 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueWriteImage)(
560 cl_command_queue command_queue,
562 cl_bool blocking_write,
563 const size_t * origin,
564 const size_t * region,
565 size_t input_row_pitch,
566 size_t input_slice_pitch,
568 cl_uint num_events_in_wait_list,
569 const cl_event * event_wait_list,
570 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
572 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueFillImage)(
573 cl_command_queue command_queue,
575 const void * fill_color,
576 const size_t origin[3],
577 const size_t region[3],
578 cl_uint num_events_in_wait_list,
579 const cl_event * event_wait_list,
580 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
582 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueCopyImage)(
583 cl_command_queue command_queue,
586 const size_t * src_origin,
587 const size_t * dst_origin,
588 const size_t * region,
589 cl_uint num_events_in_wait_list,
590 const cl_event * event_wait_list,
591 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
593 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueCopyImageToBuffer)(
594 cl_command_queue command_queue,
597 const size_t * src_origin,
598 const size_t * region,
600 cl_uint num_events_in_wait_list,
601 const cl_event * event_wait_list,
602 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
604 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueCopyBufferToImage)(
605 cl_command_queue command_queue,
609 const size_t * dst_origin,
610 const size_t * region,
611 cl_uint num_events_in_wait_list,
612 const cl_event * event_wait_list,
613 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
615 typedef CL_API_ENTRY void * (CL_API_CALL *KHRpfn_clEnqueueMapBuffer)(
616 cl_command_queue command_queue,
618 cl_bool blocking_map,
619 cl_map_flags map_flags,
622 cl_uint num_events_in_wait_list,
623 const cl_event * event_wait_list,
625 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
627 typedef CL_API_ENTRY void * (CL_API_CALL *KHRpfn_clEnqueueMapImage)(
628 cl_command_queue command_queue,
630 cl_bool blocking_map,
631 cl_map_flags map_flags,
632 const size_t * origin,
633 const size_t * region,
634 size_t * image_row_pitch,
635 size_t * image_slice_pitch,
636 cl_uint num_events_in_wait_list,
637 const cl_event * event_wait_list,
639 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
641 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueUnmapMemObject)(
642 cl_command_queue command_queue,
645 cl_uint num_events_in_wait_list,
646 const cl_event * event_wait_list,
647 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
649 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueMigrateMemObjects)(
650 cl_command_queue command_queue,
651 cl_uint num_mem_objects,
652 const cl_mem * mem_objects,
653 cl_mem_migration_flags flags,
654 cl_uint num_events_in_wait_list,
655 const cl_event * event_wait_list,
656 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
658 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueNDRangeKernel)(
659 cl_command_queue command_queue,
662 const size_t * global_work_offset,
663 const size_t * global_work_size,
664 const size_t * local_work_size,
665 cl_uint num_events_in_wait_list,
666 const cl_event * event_wait_list,
667 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
669 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueTask)(
670 cl_command_queue command_queue,
672 cl_uint num_events_in_wait_list,
673 const cl_event * event_wait_list,
674 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
676 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueNativeKernel)(
677 cl_command_queue command_queue,
678 void (CL_CALLBACK * user_func)(void *),
681 cl_uint num_mem_objects,
682 const cl_mem * mem_list,
683 const void ** args_mem_loc,
684 cl_uint num_events_in_wait_list,
685 const cl_event * event_wait_list,
686 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
688 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueMarkerWithWaitList)(
689 cl_command_queue command_queue,
690 cl_uint num_events_in_wait_list,
691 const cl_event * event_wait_list,
692 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
694 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueBarrierWithWaitList)(
695 cl_command_queue command_queue,
696 cl_uint num_events_in_wait_list,
697 const cl_event * event_wait_list,
698 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
700 typedef CL_API_ENTRY void * (CL_API_CALL *KHRpfn_clGetExtensionFunctionAddressForPlatform)(
701 cl_platform_id platform,
702 const char * function_name) CL_API_SUFFIX__VERSION_1_2;
704 // Shared Virtual Memory APIs
705 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueSVMFree)(
706 cl_command_queue /* command_queue */,
707 cl_uint /* num_svm_pointers */,
708 void ** /* svm_pointers */,
709 void (CL_CALLBACK *pfn_free_func)(
710 cl_command_queue /* queue */,
711 cl_uint /* num_svm_pointers */,
712 void ** /* svm_pointers[] */,
713 void * /* user_data */),
714 void * /* user_data */,
715 cl_uint /* num_events_in_wait_list */,
716 const cl_event * /* event_wait_list */,
717 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
719 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueSVMMemcpy)(
720 cl_command_queue /* command_queue */,
721 cl_bool /* blocking_copy */,
722 void * /* dst_ptr */,
723 const void * /* src_ptr */,
725 cl_uint /* num_events_in_wait_list */,
726 const cl_event * /* event_wait_list */,
727 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
729 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueSVMMemFill)(
730 cl_command_queue /* command_queue */,
731 void * /* svm_ptr */,
732 const void * /* pattern */,
733 size_t /* pattern_size */,
735 cl_uint /* num_events_in_wait_list */,
736 const cl_event * /* event_wait_list */,
737 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
739 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueSVMMap)(
740 cl_command_queue /* command_queue */,
741 cl_bool /* blocking_map */,
742 cl_map_flags /* map_flags */,
743 void * /* svm_ptr */,
745 cl_uint /* num_events_in_wait_list */,
746 const cl_event * /* event_wait_list */,
747 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
749 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueSVMUnmap)(
750 cl_command_queue /* command_queue */,
751 void * /* svm_ptr */,
752 cl_uint /* num_events_in_wait_list */,
753 const cl_event * /* event_wait_list */,
754 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
757 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetCommandQueueProperty)(
758 cl_command_queue command_queue,
759 cl_command_queue_properties properties,
761 cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
763 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateImage2D)(
766 const cl_image_format * image_format,
769 size_t image_row_pitch,
771 cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
773 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateImage3D)(
776 const cl_image_format * image_format,
780 size_t image_row_pitch,
781 size_t image_slice_pitch,
783 cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
785 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clUnloadCompiler)(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
787 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueMarker)(
788 cl_command_queue command_queue,
789 cl_event * event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
791 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueWaitForEvents)(
792 cl_command_queue command_queue,
794 const cl_event * event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
796 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueBarrier)(cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
798 typedef CL_API_ENTRY void * (CL_API_CALL *KHRpfn_clGetExtensionFunctionAddress)(const char *function_name) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
801 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromGLBuffer)(
805 int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
807 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromGLTexture)(
813 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
815 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromGLTexture2D)(
821 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
823 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromGLTexture3D)(
829 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
831 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromGLRenderbuffer)(
835 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
837 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetGLObjectInfo)(
839 cl_gl_object_type * gl_object_type,
840 GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
842 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetGLTextureInfo)(
844 cl_gl_texture_info param_name,
845 size_t param_value_size,
847 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
849 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueAcquireGLObjects)(
850 cl_command_queue command_queue,
852 const cl_mem * mem_objects,
853 cl_uint num_events_in_wait_list,
854 const cl_event * event_wait_list,
855 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
857 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReleaseGLObjects)(
858 cl_command_queue command_queue,
860 const cl_mem * mem_objects,
861 cl_uint num_events_in_wait_list,
862 const cl_event * event_wait_list,
863 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
865 /* cl_khr_gl_sharing */
866 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetGLContextInfoKHR)(
867 const cl_context_properties *properties,
868 cl_gl_context_info param_name,
869 size_t param_value_size,
871 size_t *param_value_size_ret);
873 /* cl_khr_gl_event */
874 typedef CL_API_ENTRY cl_event (CL_API_CALL *KHRpfn_clCreateEventFromGLsyncKHR)(
877 cl_int *errcode_ret);
882 /* cl_khr_d3d10_sharing */
884 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetDeviceIDsFromD3D10KHR)(
885 cl_platform_id platform,
886 cl_d3d10_device_source_khr d3d_device_source,
888 cl_d3d10_device_set_khr d3d_device_set,
890 cl_device_id * devices,
891 cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
893 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromD3D10BufferKHR)(
896 ID3D10Buffer * resource,
897 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
899 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromD3D10Texture2DKHR)(
902 ID3D10Texture2D * resource,
904 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
906 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromD3D10Texture3DKHR)(
909 ID3D10Texture3D * resource,
911 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
913 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueAcquireD3D10ObjectsKHR)(
914 cl_command_queue command_queue,
916 const cl_mem * mem_objects,
917 cl_uint num_events_in_wait_list,
918 const cl_event * event_wait_list,
919 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
921 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReleaseD3D10ObjectsKHR)(
922 cl_command_queue command_queue,
924 const cl_mem * mem_objects,
925 cl_uint num_events_in_wait_list,
926 const cl_event * event_wait_list,
927 cl_event * event) CL_API_SUFFIX__VERSION_1_0;
929 extern CL_API_ENTRY cl_int CL_API_CALL
930 clGetDeviceIDsFromD3D10KHR(
931 cl_platform_id platform,
932 cl_d3d10_device_source_khr d3d_device_source,
934 cl_d3d10_device_set_khr d3d_device_set,
936 cl_device_id *devices,
937 cl_uint *num_devices);
939 extern CL_API_ENTRY cl_mem CL_API_CALL
940 clCreateFromD3D10BufferKHR(
943 ID3D10Buffer *resource,
944 cl_int *errcode_ret);
946 extern CL_API_ENTRY cl_mem CL_API_CALL
947 clCreateFromD3D10Texture2DKHR(
950 ID3D10Texture2D * resource,
952 cl_int * errcode_ret);
954 extern CL_API_ENTRY cl_mem CL_API_CALL
955 clCreateFromD3D10Texture3DKHR(
958 ID3D10Texture3D *resource,
960 cl_int *errcode_ret);
962 extern CL_API_ENTRY cl_int CL_API_CALL
963 clEnqueueAcquireD3D10ObjectsKHR(
964 cl_command_queue command_queue,
966 const cl_mem *mem_objects,
967 cl_uint num_events_in_wait_list,
968 const cl_event *event_wait_list,
971 extern CL_API_ENTRY cl_int CL_API_CALL
972 clEnqueueReleaseD3D10ObjectsKHR(
973 cl_command_queue command_queue,
975 const cl_mem *mem_objects,
976 cl_uint num_events_in_wait_list,
977 const cl_event *event_wait_list,
980 /* cl_khr_d3d11_sharing */
981 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetDeviceIDsFromD3D11KHR)(
982 cl_platform_id platform,
983 cl_d3d11_device_source_khr d3d_device_source,
985 cl_d3d11_device_set_khr d3d_device_set,
987 cl_device_id * devices,
988 cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
990 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromD3D11BufferKHR)(
993 ID3D11Buffer * resource,
994 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
996 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromD3D11Texture2DKHR)(
999 ID3D11Texture2D * resource,
1001 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
1003 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromD3D11Texture3DKHR)(
1006 ID3D11Texture3D * resource,
1008 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
1010 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueAcquireD3D11ObjectsKHR)(
1011 cl_command_queue command_queue,
1012 cl_uint num_objects,
1013 const cl_mem * mem_objects,
1014 cl_uint num_events_in_wait_list,
1015 const cl_event * event_wait_list,
1016 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1018 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReleaseD3D11ObjectsKHR)(
1019 cl_command_queue command_queue,
1020 cl_uint num_objects,
1021 const cl_mem * mem_objects,
1022 cl_uint num_events_in_wait_list,
1023 const cl_event * event_wait_list,
1024 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1026 /* cl_khr_dx9_media_sharing */
1027 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetDeviceIDsFromDX9MediaAdapterKHR)(
1028 cl_platform_id platform,
1029 cl_uint num_media_adapters,
1030 cl_dx9_media_adapter_type_khr * media_adapters_type,
1031 void * media_adapters,
1032 cl_dx9_media_adapter_set_khr media_adapter_set,
1033 cl_uint num_entries,
1034 cl_device_id * devices,
1035 cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
1037 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromDX9MediaSurfaceKHR)(
1040 cl_dx9_media_adapter_type_khr adapter_type,
1041 void * surface_info,
1043 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
1045 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueAcquireDX9MediaSurfacesKHR)(
1046 cl_command_queue command_queue,
1047 cl_uint num_objects,
1048 const cl_mem * mem_objects,
1049 cl_uint num_events_in_wait_list,
1050 const cl_event * event_wait_list,
1051 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1053 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReleaseDX9MediaSurfacesKHR)(
1054 cl_command_queue command_queue,
1055 cl_uint num_objects,
1056 const cl_mem * mem_objects,
1057 cl_uint num_events_in_wait_list,
1058 const cl_event * event_wait_list,
1059 cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1061 /* cl_khr_d3d11_sharing */
1062 extern CL_API_ENTRY cl_int CL_API_CALL
1063 clGetDeviceIDsFromD3D11KHR(
1064 cl_platform_id platform,
1065 cl_d3d11_device_source_khr d3d_device_source,
1067 cl_d3d11_device_set_khr d3d_device_set,
1068 cl_uint num_entries,
1069 cl_device_id * devices,
1070 cl_uint * num_devices);
1072 extern CL_API_ENTRY cl_mem CL_API_CALL
1073 clCreateFromD3D11BufferKHR(
1076 ID3D11Buffer * resource,
1077 cl_int * errcode_ret);
1079 extern CL_API_ENTRY cl_mem CL_API_CALL
1080 clCreateFromD3D11Texture2DKHR(
1083 ID3D11Texture2D * resource,
1085 cl_int * errcode_ret);
1087 extern CL_API_ENTRY cl_mem CL_API_CALL
1088 clCreateFromD3D11Texture3DKHR(
1091 ID3D11Texture3D * resource,
1093 cl_int * errcode_ret);
1095 extern CL_API_ENTRY cl_int CL_API_CALL
1096 clEnqueueAcquireD3D11ObjectsKHR(
1097 cl_command_queue command_queue,
1098 cl_uint num_objects,
1099 const cl_mem * mem_objects,
1100 cl_uint num_events_in_wait_list,
1101 const cl_event * event_wait_list,
1104 extern CL_API_ENTRY cl_int CL_API_CALL
1105 clEnqueueReleaseD3D11ObjectsKHR(
1106 cl_command_queue command_queue,
1107 cl_uint num_objects,
1108 const cl_mem * mem_objects,
1109 cl_uint num_events_in_wait_list,
1110 const cl_event * event_wait_list,
1113 /* cl_khr_dx9_media_sharing */
1114 extern CL_API_ENTRY cl_int CL_API_CALL
1115 clGetDeviceIDsFromDX9MediaAdapterKHR(
1116 cl_platform_id platform,
1117 cl_uint num_media_adapters,
1118 cl_dx9_media_adapter_type_khr * media_adapter_type,
1119 void * media_adapters,
1120 cl_dx9_media_adapter_set_khr media_adapter_set,
1121 cl_uint num_entries,
1122 cl_device_id * devices,
1123 cl_uint * num_devices);
1125 extern CL_API_ENTRY cl_mem CL_API_CALL
1126 clCreateFromDX9MediaSurfaceKHR(
1129 cl_dx9_media_adapter_type_khr adapter_type,
1130 void * surface_info,
1132 cl_int * errcode_ret);
1134 extern CL_API_ENTRY cl_int CL_API_CALL
1135 clEnqueueAcquireDX9MediaSurfacesKHR(
1136 cl_command_queue command_queue,
1137 cl_uint num_objects,
1138 const cl_mem * mem_objects,
1139 cl_uint num_events_in_wait_list,
1140 const cl_event * event_wait_list,
1143 extern CL_API_ENTRY cl_int CL_API_CALL
1144 clEnqueueReleaseDX9MediaSurfacesKHR(
1145 cl_command_queue command_queue,
1146 cl_uint num_objects,
1147 const cl_mem * mem_objects,
1148 cl_uint num_events_in_wait_list,
1149 const cl_event * event_wait_list,
1154 /* cl_khr_d3d10_sharing */
1155 typedef void *KHRpfn_clGetDeviceIDsFromD3D10KHR;
1156 typedef void *KHRpfn_clCreateFromD3D10BufferKHR;
1157 typedef void *KHRpfn_clCreateFromD3D10Texture2DKHR;
1158 typedef void *KHRpfn_clCreateFromD3D10Texture3DKHR;
1159 typedef void *KHRpfn_clEnqueueAcquireD3D10ObjectsKHR;
1160 typedef void *KHRpfn_clEnqueueReleaseD3D10ObjectsKHR;
1162 /* cl_khr_d3d11_sharing */
1163 typedef void *KHRpfn_clGetDeviceIDsFromD3D11KHR;
1164 typedef void *KHRpfn_clCreateFromD3D11BufferKHR;
1165 typedef void *KHRpfn_clCreateFromD3D11Texture2DKHR;
1166 typedef void *KHRpfn_clCreateFromD3D11Texture3DKHR;
1167 typedef void *KHRpfn_clEnqueueAcquireD3D11ObjectsKHR;
1168 typedef void *KHRpfn_clEnqueueReleaseD3D11ObjectsKHR;
1170 /* cl_khr_dx9_media_sharing */
1171 typedef void *KHRpfn_clCreateFromDX9MediaSurfaceKHR;
1172 typedef void *KHRpfn_clEnqueueAcquireDX9MediaSurfacesKHR;
1173 typedef void *KHRpfn_clEnqueueReleaseDX9MediaSurfacesKHR;
1174 typedef void *KHRpfn_clGetDeviceIDsFromDX9MediaAdapterKHR;
1180 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetEventCallback)(
1181 cl_event /* event */,
1182 cl_int /* command_exec_callback_type */,
1183 void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
1184 void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
1186 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateSubBuffer)(
1187 cl_mem /* buffer */,
1188 cl_mem_flags /* flags */,
1189 cl_buffer_create_type /* buffer_create_type */,
1190 const void * /* buffer_create_info */,
1191 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
1193 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetMemObjectDestructorCallback)(
1194 cl_mem /* memobj */,
1195 void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
1196 void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1;
1198 typedef CL_API_ENTRY cl_event (CL_API_CALL *KHRpfn_clCreateUserEvent)(
1199 cl_context /* context */,
1200 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
1202 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetUserEventStatus)(
1203 cl_event /* event */,
1204 cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
1206 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clCreateSubDevicesEXT)(
1207 cl_device_id in_device,
1208 const cl_device_partition_property_ext * partition_properties,
1209 cl_uint num_entries,
1210 cl_device_id * out_devices,
1211 cl_uint * num_devices);
1213 typedef CL_API_ENTRY cl_int (CL_API_CALL * KHRpfn_clRetainDeviceEXT)(
1214 cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
1216 typedef CL_API_ENTRY cl_int (CL_API_CALL * KHRpfn_clReleaseDeviceEXT)(
1217 cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
1219 /* cl_khr_egl_image */
1220 typedef CL_API_ENTRY cl_mem (CL_API_CALL *KHRpfn_clCreateFromEGLImageKHR)(
1222 CLeglDisplayKHR display,
1223 CLeglImageKHR image,
1225 const cl_egl_image_properties_khr *properties,
1226 cl_int *errcode_ret);
1228 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueAcquireEGLObjectsKHR)(
1229 cl_command_queue command_queue,
1230 cl_uint num_objects,
1231 const cl_mem *mem_objects,
1232 cl_uint num_events_in_wait_list,
1233 const cl_event *event_wait_list,
1236 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueReleaseEGLObjectsKHR)(
1237 cl_command_queue command_queue,
1238 cl_uint num_objects,
1239 const cl_mem *mem_objects,
1240 cl_uint num_events_in_wait_list,
1241 const cl_event *event_wait_list,
1244 /* cl_khr_egl_event */
1245 typedef CL_API_ENTRY cl_event (CL_API_CALL *KHRpfn_clCreateEventFromEGLSyncKHR)(
1248 CLeglDisplayKHR display,
1249 cl_int *errcode_ret);
1251 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetDefaultDeviceCommandQueue)(
1253 cl_device_id device,
1254 cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1;
1256 typedef CL_API_ENTRY cl_program (CL_API_CALL *KHRpfn_clCreateProgramWithIL)(
1260 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_1;
1262 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetKernelSubGroupInfo )(
1264 cl_device_id device,
1265 cl_kernel_sub_group_info param_name,
1266 size_t input_value_size,
1267 const void * input_value,
1268 size_t param_value_size,
1270 size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
1272 typedef CL_API_ENTRY cl_kernel (CL_API_CALL *KHRpfn_clCloneKernel)(
1273 cl_kernel source_kernel,
1274 cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_1;
1276 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clEnqueueSVMMigrateMem)(
1277 cl_command_queue command_queue,
1278 cl_uint num_svm_pointers,
1279 const void ** svm_pointers,
1280 const size_t * sizes,
1281 cl_mem_migration_flags flags,
1282 cl_uint num_events_in_wait_list,
1283 const cl_event * event_wait_list,
1284 cl_event * event) CL_API_SUFFIX__VERSION_2_1;
1286 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetDeviceAndHostTimer)(
1287 cl_device_id device,
1288 cl_ulong * device_timestamp,
1289 cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1;
1291 typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clGetHostTimer)(
1292 cl_device_id device,
1293 cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1;
1297 * vendor dispatch table structure
1299 * note that the types in the structure KHRicdVendorDispatch mirror the function
1300 * names listed in the string table khrIcdVendorDispatchFunctionNames
1304 typedef struct KHRicdVendorDispatchRec KHRicdVendorDispatch;
1306 struct KHRicdVendorDispatchRec
1309 KHRpfn_clGetPlatformIDs clGetPlatformIDs;
1310 KHRpfn_clGetPlatformInfo clGetPlatformInfo;
1311 KHRpfn_clGetDeviceIDs clGetDeviceIDs;
1312 KHRpfn_clGetDeviceInfo clGetDeviceInfo;
1313 KHRpfn_clCreateContext clCreateContext;
1314 KHRpfn_clCreateContextFromType clCreateContextFromType;
1315 KHRpfn_clRetainContext clRetainContext;
1316 KHRpfn_clReleaseContext clReleaseContext;
1317 KHRpfn_clGetContextInfo clGetContextInfo;
1318 KHRpfn_clCreateCommandQueue clCreateCommandQueue;
1319 KHRpfn_clRetainCommandQueue clRetainCommandQueue;
1320 KHRpfn_clReleaseCommandQueue clReleaseCommandQueue;
1321 KHRpfn_clGetCommandQueueInfo clGetCommandQueueInfo;
1322 KHRpfn_clSetCommandQueueProperty clSetCommandQueueProperty;
1323 KHRpfn_clCreateBuffer clCreateBuffer;
1324 KHRpfn_clCreateImage2D clCreateImage2D;
1325 KHRpfn_clCreateImage3D clCreateImage3D;
1326 KHRpfn_clRetainMemObject clRetainMemObject;
1327 KHRpfn_clReleaseMemObject clReleaseMemObject;
1328 KHRpfn_clGetSupportedImageFormats clGetSupportedImageFormats;
1329 KHRpfn_clGetMemObjectInfo clGetMemObjectInfo;
1330 KHRpfn_clGetImageInfo clGetImageInfo;
1331 KHRpfn_clCreateSampler clCreateSampler;
1332 KHRpfn_clRetainSampler clRetainSampler;
1333 KHRpfn_clReleaseSampler clReleaseSampler;
1334 KHRpfn_clGetSamplerInfo clGetSamplerInfo;
1335 KHRpfn_clCreateProgramWithSource clCreateProgramWithSource;
1336 KHRpfn_clCreateProgramWithBinary clCreateProgramWithBinary;
1337 KHRpfn_clRetainProgram clRetainProgram;
1338 KHRpfn_clReleaseProgram clReleaseProgram;
1339 KHRpfn_clBuildProgram clBuildProgram;
1340 KHRpfn_clUnloadCompiler clUnloadCompiler;
1341 KHRpfn_clGetProgramInfo clGetProgramInfo;
1342 KHRpfn_clGetProgramBuildInfo clGetProgramBuildInfo;
1343 KHRpfn_clCreateKernel clCreateKernel;
1344 KHRpfn_clCreateKernelsInProgram clCreateKernelsInProgram;
1345 KHRpfn_clRetainKernel clRetainKernel;
1346 KHRpfn_clReleaseKernel clReleaseKernel;
1347 KHRpfn_clSetKernelArg clSetKernelArg;
1348 KHRpfn_clGetKernelInfo clGetKernelInfo;
1349 KHRpfn_clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo;
1350 KHRpfn_clWaitForEvents clWaitForEvents;
1351 KHRpfn_clGetEventInfo clGetEventInfo;
1352 KHRpfn_clRetainEvent clRetainEvent;
1353 KHRpfn_clReleaseEvent clReleaseEvent;
1354 KHRpfn_clGetEventProfilingInfo clGetEventProfilingInfo;
1355 KHRpfn_clFlush clFlush;
1356 KHRpfn_clFinish clFinish;
1357 KHRpfn_clEnqueueReadBuffer clEnqueueReadBuffer;
1358 KHRpfn_clEnqueueWriteBuffer clEnqueueWriteBuffer;
1359 KHRpfn_clEnqueueCopyBuffer clEnqueueCopyBuffer;
1360 KHRpfn_clEnqueueReadImage clEnqueueReadImage;
1361 KHRpfn_clEnqueueWriteImage clEnqueueWriteImage;
1362 KHRpfn_clEnqueueCopyImage clEnqueueCopyImage;
1363 KHRpfn_clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer;
1364 KHRpfn_clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage;
1365 KHRpfn_clEnqueueMapBuffer clEnqueueMapBuffer;
1366 KHRpfn_clEnqueueMapImage clEnqueueMapImage;
1367 KHRpfn_clEnqueueUnmapMemObject clEnqueueUnmapMemObject;
1368 KHRpfn_clEnqueueNDRangeKernel clEnqueueNDRangeKernel;
1369 KHRpfn_clEnqueueTask clEnqueueTask;
1370 KHRpfn_clEnqueueNativeKernel clEnqueueNativeKernel;
1371 KHRpfn_clEnqueueMarker clEnqueueMarker;
1372 KHRpfn_clEnqueueWaitForEvents clEnqueueWaitForEvents;
1373 KHRpfn_clEnqueueBarrier clEnqueueBarrier;
1374 KHRpfn_clGetExtensionFunctionAddress clGetExtensionFunctionAddress;
1375 KHRpfn_clCreateFromGLBuffer clCreateFromGLBuffer;
1376 KHRpfn_clCreateFromGLTexture2D clCreateFromGLTexture2D;
1377 KHRpfn_clCreateFromGLTexture3D clCreateFromGLTexture3D;
1378 KHRpfn_clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer;
1379 KHRpfn_clGetGLObjectInfo clGetGLObjectInfo;
1380 KHRpfn_clGetGLTextureInfo clGetGLTextureInfo;
1381 KHRpfn_clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects;
1382 KHRpfn_clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects;
1383 KHRpfn_clGetGLContextInfoKHR clGetGLContextInfoKHR;
1385 /* cl_khr_d3d10_sharing */
1386 KHRpfn_clGetDeviceIDsFromD3D10KHR clGetDeviceIDsFromD3D10KHR;
1387 KHRpfn_clCreateFromD3D10BufferKHR clCreateFromD3D10BufferKHR;
1388 KHRpfn_clCreateFromD3D10Texture2DKHR clCreateFromD3D10Texture2DKHR;
1389 KHRpfn_clCreateFromD3D10Texture3DKHR clCreateFromD3D10Texture3DKHR;
1390 KHRpfn_clEnqueueAcquireD3D10ObjectsKHR clEnqueueAcquireD3D10ObjectsKHR;
1391 KHRpfn_clEnqueueReleaseD3D10ObjectsKHR clEnqueueReleaseD3D10ObjectsKHR;
1394 KHRpfn_clSetEventCallback clSetEventCallback;
1395 KHRpfn_clCreateSubBuffer clCreateSubBuffer;
1396 KHRpfn_clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback;
1397 KHRpfn_clCreateUserEvent clCreateUserEvent;
1398 KHRpfn_clSetUserEventStatus clSetUserEventStatus;
1399 KHRpfn_clEnqueueReadBufferRect clEnqueueReadBufferRect;
1400 KHRpfn_clEnqueueWriteBufferRect clEnqueueWriteBufferRect;
1401 KHRpfn_clEnqueueCopyBufferRect clEnqueueCopyBufferRect;
1403 /* cl_ext_device_fission */
1404 KHRpfn_clCreateSubDevicesEXT clCreateSubDevicesEXT;
1405 KHRpfn_clRetainDeviceEXT clRetainDeviceEXT;
1406 KHRpfn_clReleaseDeviceEXT clReleaseDeviceEXT;
1408 /* cl_khr_gl_event */
1409 KHRpfn_clCreateEventFromGLsyncKHR clCreateEventFromGLsyncKHR;
1412 KHRpfn_clCreateSubDevices clCreateSubDevices;
1413 KHRpfn_clRetainDevice clRetainDevice;
1414 KHRpfn_clReleaseDevice clReleaseDevice;
1415 KHRpfn_clCreateImage clCreateImage;
1416 KHRpfn_clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels;
1417 KHRpfn_clCompileProgram clCompileProgram;
1418 KHRpfn_clLinkProgram clLinkProgram;
1419 KHRpfn_clUnloadPlatformCompiler clUnloadPlatformCompiler;
1420 KHRpfn_clGetKernelArgInfo clGetKernelArgInfo;
1421 KHRpfn_clEnqueueFillBuffer clEnqueueFillBuffer;
1422 KHRpfn_clEnqueueFillImage clEnqueueFillImage;
1423 KHRpfn_clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects;
1424 KHRpfn_clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList;
1425 KHRpfn_clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList;
1426 KHRpfn_clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform;
1427 KHRpfn_clCreateFromGLTexture clCreateFromGLTexture;
1429 /* cl_khr_d3d11_sharing */
1430 KHRpfn_clGetDeviceIDsFromD3D11KHR clGetDeviceIDsFromD3D11KHR;
1431 KHRpfn_clCreateFromD3D11BufferKHR clCreateFromD3D11BufferKHR;
1432 KHRpfn_clCreateFromD3D11Texture2DKHR clCreateFromD3D11Texture2DKHR;
1433 KHRpfn_clCreateFromD3D11Texture3DKHR clCreateFromD3D11Texture3DKHR;
1434 KHRpfn_clCreateFromDX9MediaSurfaceKHR clCreateFromDX9MediaSurfaceKHR;
1435 KHRpfn_clEnqueueAcquireD3D11ObjectsKHR clEnqueueAcquireD3D11ObjectsKHR;
1436 KHRpfn_clEnqueueReleaseD3D11ObjectsKHR clEnqueueReleaseD3D11ObjectsKHR;
1438 /* cl_khr_dx9_media_sharing */
1439 KHRpfn_clGetDeviceIDsFromDX9MediaAdapterKHR clGetDeviceIDsFromDX9MediaAdapterKHR;
1440 KHRpfn_clEnqueueAcquireDX9MediaSurfacesKHR clEnqueueAcquireDX9MediaSurfacesKHR;
1441 KHRpfn_clEnqueueReleaseDX9MediaSurfacesKHR clEnqueueReleaseDX9MediaSurfacesKHR;
1443 /* cl_khr_egl_image */
1444 KHRpfn_clCreateFromEGLImageKHR clCreateFromEGLImageKHR;
1445 KHRpfn_clEnqueueAcquireEGLObjectsKHR clEnqueueAcquireEGLObjectsKHR;
1446 KHRpfn_clEnqueueReleaseEGLObjectsKHR clEnqueueReleaseEGLObjectsKHR;
1448 /* cl_khr_egl_event */
1449 KHRpfn_clCreateEventFromEGLSyncKHR clCreateEventFromEGLSyncKHR;
1452 KHRpfn_clCreateCommandQueueWithProperties clCreateCommandQueueWithProperties;
1453 KHRpfn_clCreatePipe clCreatePipe;
1454 KHRpfn_clGetPipeInfo clGetPipeInfo;
1455 KHRpfn_clSVMAlloc clSVMAlloc;
1456 KHRpfn_clSVMFree clSVMFree;
1457 KHRpfn_clEnqueueSVMFree clEnqueueSVMFree;
1458 KHRpfn_clEnqueueSVMMemcpy clEnqueueSVMMemcpy;
1459 KHRpfn_clEnqueueSVMMemFill clEnqueueSVMMemFill;
1460 KHRpfn_clEnqueueSVMMap clEnqueueSVMMap;
1461 KHRpfn_clEnqueueSVMUnmap clEnqueueSVMUnmap;
1462 KHRpfn_clCreateSamplerWithProperties clCreateSamplerWithProperties;
1463 KHRpfn_clSetKernelArgSVMPointer clSetKernelArgSVMPointer;
1464 KHRpfn_clSetKernelExecInfo clSetKernelExecInfo;
1466 /* cl_khr_sub_groups */
1467 KHRpfn_clGetKernelSubGroupInfoKHR clGetKernelSubGroupInfoKHR;
1470 KHRpfn_clCloneKernel clCloneKernel;
1471 KHRpfn_clCreateProgramWithIL clCreateProgramWithIL;
1472 KHRpfn_clEnqueueSVMMigrateMem clEnqueueSVMMigrateMem;
1473 KHRpfn_clGetDeviceAndHostTimer clGetDeviceAndHostTimer;
1474 KHRpfn_clGetHostTimer clGetHostTimer;
1475 KHRpfn_clGetKernelSubGroupInfo clGetKernelSubGroupInfo;
1476 KHRpfn_clSetDefaultDeviceCommandQueue clSetDefaultDeviceCommandQueue;
1479 KHRpfn_clSetProgramReleaseCallback clSetProgramReleaseCallback;
1480 KHRpfn_clSetProgramSpecializationConstant clSetProgramSpecializationConstant;
1485 * vendor dispatch table structure
1489 struct _cl_platform_id
1491 KHRicdVendorDispatch *dispatch;
1494 struct _cl_device_id
1496 KHRicdVendorDispatch *dispatch;
1501 KHRicdVendorDispatch *dispatch;
1504 struct _cl_command_queue
1506 KHRicdVendorDispatch *dispatch;
1511 KHRicdVendorDispatch *dispatch;
1516 KHRicdVendorDispatch *dispatch;
1521 KHRicdVendorDispatch *dispatch;
1526 KHRicdVendorDispatch *dispatch;
1531 KHRicdVendorDispatch *dispatch;
1534 #endif // _ICD_DISPATCH_H_