1 //
2 // Copyright 2021 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // cl_dispatch_table_autogen.cpp: Dispatch table for CL ICD Loader.
7 
8 #include "libGLESv2/cl_dispatch_table.h"
9 
10 #include "libGLESv2/entry_points_cl_autogen.h"
11 
12 // clang-format off
13 
14 // The correct order is required as defined in 'include/CL/cl_icd.h'.
15 const cl_icd_dispatch gCLIcdDispatchTable = {
16 
17     // OpenCL 1.0
18     cl::clGetPlatformIDs,
19     cl::clGetPlatformInfo,
20     cl::clGetDeviceIDs,
21     cl::clGetDeviceInfo,
22     cl::clCreateContext,
23     cl::clCreateContextFromType,
24     cl::clRetainContext,
25     cl::clReleaseContext,
26     cl::clGetContextInfo,
27     cl::clCreateCommandQueue,
28     cl::clRetainCommandQueue,
29     cl::clReleaseCommandQueue,
30     cl::clGetCommandQueueInfo,
31     cl::clSetCommandQueueProperty,
32     cl::clCreateBuffer,
33     cl::clCreateImage2D,
34     cl::clCreateImage3D,
35     cl::clRetainMemObject,
36     cl::clReleaseMemObject,
37     cl::clGetSupportedImageFormats,
38     cl::clGetMemObjectInfo,
39     cl::clGetImageInfo,
40     cl::clCreateSampler,
41     cl::clRetainSampler,
42     cl::clReleaseSampler,
43     cl::clGetSamplerInfo,
44     cl::clCreateProgramWithSource,
45     cl::clCreateProgramWithBinary,
46     cl::clRetainProgram,
47     cl::clReleaseProgram,
48     cl::clBuildProgram,
49     cl::clUnloadCompiler,
50     cl::clGetProgramInfo,
51     cl::clGetProgramBuildInfo,
52     cl::clCreateKernel,
53     cl::clCreateKernelsInProgram,
54     cl::clRetainKernel,
55     cl::clReleaseKernel,
56     cl::clSetKernelArg,
57     cl::clGetKernelInfo,
58     cl::clGetKernelWorkGroupInfo,
59     cl::clWaitForEvents,
60     cl::clGetEventInfo,
61     cl::clRetainEvent,
62     cl::clReleaseEvent,
63     cl::clGetEventProfilingInfo,
64     cl::clFlush,
65     cl::clFinish,
66     cl::clEnqueueReadBuffer,
67     cl::clEnqueueWriteBuffer,
68     cl::clEnqueueCopyBuffer,
69     cl::clEnqueueReadImage,
70     cl::clEnqueueWriteImage,
71     cl::clEnqueueCopyImage,
72     cl::clEnqueueCopyImageToBuffer,
73     cl::clEnqueueCopyBufferToImage,
74     cl::clEnqueueMapBuffer,
75     cl::clEnqueueMapImage,
76     cl::clEnqueueUnmapMemObject,
77     cl::clEnqueueNDRangeKernel,
78     cl::clEnqueueTask,
79     cl::clEnqueueNativeKernel,
80     cl::clEnqueueMarker,
81     cl::clEnqueueWaitForEvents,
82     cl::clEnqueueBarrier,
83     cl::clGetExtensionFunctionAddress,
84     nullptr, // clCreateFromGLBuffer,
85     nullptr, // clCreateFromGLTexture2D,
86     nullptr, // clCreateFromGLTexture3D,
87     nullptr, // clCreateFromGLRenderbuffer,
88     nullptr, // clGetGLObjectInfo,
89     nullptr, // clGetGLTextureInfo,
90     nullptr, // clEnqueueAcquireGLObjects,
91     nullptr, // clEnqueueReleaseGLObjects,
92     nullptr, // clGetGLContextInfoKHR,
93 
94     // cl_khr_d3d10_sharing
95     nullptr, // clGetDeviceIDsFromD3D10KHR,
96     nullptr, // clCreateFromD3D10BufferKHR,
97     nullptr, // clCreateFromD3D10Texture2DKHR,
98     nullptr, // clCreateFromD3D10Texture3DKHR,
99     nullptr, // clEnqueueAcquireD3D10ObjectsKHR,
100     nullptr, // clEnqueueReleaseD3D10ObjectsKHR,
101 
102     // OpenCL 1.1
103     cl::clSetEventCallback,
104     cl::clCreateSubBuffer,
105     cl::clSetMemObjectDestructorCallback,
106     cl::clCreateUserEvent,
107     cl::clSetUserEventStatus,
108     cl::clEnqueueReadBufferRect,
109     cl::clEnqueueWriteBufferRect,
110     cl::clEnqueueCopyBufferRect,
111 
112     // cl_ext_device_fission
113     nullptr, // clCreateSubDevicesEXT,
114     nullptr, // clRetainDeviceEXT,
115     nullptr, // clReleaseDeviceEXT,
116 
117     // cl_khr_gl_event
118     nullptr, // clCreateEventFromGLsyncKHR,
119 
120     // OpenCL 1.2
121     cl::clCreateSubDevices,
122     cl::clRetainDevice,
123     cl::clReleaseDevice,
124     cl::clCreateImage,
125     cl::clCreateProgramWithBuiltInKernels,
126     cl::clCompileProgram,
127     cl::clLinkProgram,
128     cl::clUnloadPlatformCompiler,
129     cl::clGetKernelArgInfo,
130     cl::clEnqueueFillBuffer,
131     cl::clEnqueueFillImage,
132     cl::clEnqueueMigrateMemObjects,
133     cl::clEnqueueMarkerWithWaitList,
134     cl::clEnqueueBarrierWithWaitList,
135     cl::clGetExtensionFunctionAddressForPlatform,
136     nullptr, // clCreateFromGLTexture,
137 
138     // cl_khr_d3d11_sharing
139     nullptr, // clGetDeviceIDsFromD3D11KHR,
140     nullptr, // clCreateFromD3D11BufferKHR,
141     nullptr, // clCreateFromD3D11Texture2DKHR,
142     nullptr, // clCreateFromD3D11Texture3DKHR,
143     nullptr, // clCreateFromDX9MediaSurfaceKHR,
144     nullptr, // clEnqueueAcquireD3D11ObjectsKHR,
145     nullptr, // clEnqueueReleaseD3D11ObjectsKHR,
146 
147     // cl_khr_dx9_media_sharing
148     nullptr, // clGetDeviceIDsFromDX9MediaAdapterKHR,
149     nullptr, // clEnqueueAcquireDX9MediaSurfacesKHR,
150     nullptr, // clEnqueueReleaseDX9MediaSurfacesKHR,
151 
152     // cl_khr_egl_image
153     nullptr, // clCreateFromEGLImageKHR,
154     nullptr, // clEnqueueAcquireEGLObjectsKHR,
155     nullptr, // clEnqueueReleaseEGLObjectsKHR,
156 
157     // cl_khr_egl_event
158     nullptr, // clCreateEventFromEGLSyncKHR,
159 
160     // OpenCL 2.0
161     cl::clCreateCommandQueueWithProperties,
162     cl::clCreatePipe,
163     cl::clGetPipeInfo,
164     cl::clSVMAlloc,
165     cl::clSVMFree,
166     cl::clEnqueueSVMFree,
167     cl::clEnqueueSVMMemcpy,
168     cl::clEnqueueSVMMemFill,
169     cl::clEnqueueSVMMap,
170     cl::clEnqueueSVMUnmap,
171     cl::clCreateSamplerWithProperties,
172     cl::clSetKernelArgSVMPointer,
173     cl::clSetKernelExecInfo,
174 
175     // cl_khr_sub_groups
176     nullptr, // clGetKernelSubGroupInfoKHR,
177 
178     // OpenCL 2.1
179     cl::clCloneKernel,
180     cl::clCreateProgramWithIL,
181     cl::clEnqueueSVMMigrateMem,
182     cl::clGetDeviceAndHostTimer,
183     cl::clGetHostTimer,
184     cl::clGetKernelSubGroupInfo,
185     cl::clSetDefaultDeviceCommandQueue,
186 
187     // OpenCL 2.2
188     cl::clSetProgramReleaseCallback,
189     cl::clSetProgramSpecializationConstant,
190 
191     // OpenCL 3.0
192     cl::clCreateBufferWithProperties,
193     cl::clCreateImageWithProperties,
194     cl::clSetContextDestructorCallback
195 };
196 
197 // clang-format on
198