Hash :
84a62266
Author :
Date :
2021-04-01T15:18:44
Expand CL plumbing support to cover all versions The OpenCL CTS assumes that libOpenCL has symbols for all versions as it usually expects to link against the Khronos loader. Since we're not using that, we have to expose all the symbols it wants, whether we intend to implement all versions or not. All the 2.x stuff will likely remain stubs forever as it is made optional again in 3.0. In the generator scripts, work around a small issue where one function takes an array-typed parameter, which confused just_the_name and produced invalid code. Bug: angleproject:5819 Change-Id: I6c3591dc9229c5276f14ff66ee3ee6362e8bf622 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807531 Commit-Queue: Chris Forbes <chrisforbes@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: John Plate <jplate@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_loader.py using data from cl.xml.
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// cl_loader_autogen.cpp:
// Simple CL function loader.
#include "cl_loader.h"
// TODO(jplate): remove include after entry points moved to GLESV2 lib http://anglebug.com/5759
#include "entry_points_cl_autogen.h"
cl_icd_dispatch cl_loader;
namespace angle
{
void LoadCL(LoadProc loadProc)
{
cl_loader.clGetPlatformIDs = CL_GetPlatformIDs;
cl_loader.clGetPlatformInfo = CL_GetPlatformInfo;
cl_loader.clGetDeviceIDs = CL_GetDeviceIDs;
cl_loader.clGetDeviceInfo = CL_GetDeviceInfo;
cl_loader.clCreateContext = CL_CreateContext;
cl_loader.clCreateContextFromType = CL_CreateContextFromType;
cl_loader.clRetainContext = CL_RetainContext;
cl_loader.clReleaseContext = CL_ReleaseContext;
cl_loader.clGetContextInfo = CL_GetContextInfo;
cl_loader.clRetainCommandQueue = CL_RetainCommandQueue;
cl_loader.clReleaseCommandQueue = CL_ReleaseCommandQueue;
cl_loader.clGetCommandQueueInfo = CL_GetCommandQueueInfo;
cl_loader.clCreateBuffer = CL_CreateBuffer;
cl_loader.clRetainMemObject = CL_RetainMemObject;
cl_loader.clReleaseMemObject = CL_ReleaseMemObject;
cl_loader.clGetSupportedImageFormats = CL_GetSupportedImageFormats;
cl_loader.clGetMemObjectInfo = CL_GetMemObjectInfo;
cl_loader.clGetImageInfo = CL_GetImageInfo;
cl_loader.clRetainSampler = CL_RetainSampler;
cl_loader.clReleaseSampler = CL_ReleaseSampler;
cl_loader.clGetSamplerInfo = CL_GetSamplerInfo;
cl_loader.clCreateProgramWithSource = CL_CreateProgramWithSource;
cl_loader.clCreateProgramWithBinary = CL_CreateProgramWithBinary;
cl_loader.clRetainProgram = CL_RetainProgram;
cl_loader.clReleaseProgram = CL_ReleaseProgram;
cl_loader.clBuildProgram = CL_BuildProgram;
cl_loader.clGetProgramInfo = CL_GetProgramInfo;
cl_loader.clGetProgramBuildInfo = CL_GetProgramBuildInfo;
cl_loader.clCreateKernel = CL_CreateKernel;
cl_loader.clCreateKernelsInProgram = CL_CreateKernelsInProgram;
cl_loader.clRetainKernel = CL_RetainKernel;
cl_loader.clReleaseKernel = CL_ReleaseKernel;
cl_loader.clSetKernelArg = CL_SetKernelArg;
cl_loader.clGetKernelInfo = CL_GetKernelInfo;
cl_loader.clGetKernelWorkGroupInfo = CL_GetKernelWorkGroupInfo;
cl_loader.clWaitForEvents = CL_WaitForEvents;
cl_loader.clGetEventInfo = CL_GetEventInfo;
cl_loader.clRetainEvent = CL_RetainEvent;
cl_loader.clReleaseEvent = CL_ReleaseEvent;
cl_loader.clGetEventProfilingInfo = CL_GetEventProfilingInfo;
cl_loader.clFlush = CL_Flush;
cl_loader.clFinish = CL_Finish;
cl_loader.clEnqueueReadBuffer = CL_EnqueueReadBuffer;
cl_loader.clEnqueueWriteBuffer = CL_EnqueueWriteBuffer;
cl_loader.clEnqueueCopyBuffer = CL_EnqueueCopyBuffer;
cl_loader.clEnqueueReadImage = CL_EnqueueReadImage;
cl_loader.clEnqueueWriteImage = CL_EnqueueWriteImage;
cl_loader.clEnqueueCopyImage = CL_EnqueueCopyImage;
cl_loader.clEnqueueCopyImageToBuffer = CL_EnqueueCopyImageToBuffer;
cl_loader.clEnqueueCopyBufferToImage = CL_EnqueueCopyBufferToImage;
cl_loader.clEnqueueMapBuffer = CL_EnqueueMapBuffer;
cl_loader.clEnqueueMapImage = CL_EnqueueMapImage;
cl_loader.clEnqueueUnmapMemObject = CL_EnqueueUnmapMemObject;
cl_loader.clEnqueueNDRangeKernel = CL_EnqueueNDRangeKernel;
cl_loader.clEnqueueNativeKernel = CL_EnqueueNativeKernel;
cl_loader.clSetCommandQueueProperty = CL_SetCommandQueueProperty;
cl_loader.clCreateImage2D = CL_CreateImage2D;
cl_loader.clCreateImage3D = CL_CreateImage3D;
cl_loader.clEnqueueMarker = CL_EnqueueMarker;
cl_loader.clEnqueueWaitForEvents = CL_EnqueueWaitForEvents;
cl_loader.clEnqueueBarrier = CL_EnqueueBarrier;
cl_loader.clUnloadCompiler = CL_UnloadCompiler;
cl_loader.clGetExtensionFunctionAddress = CL_GetExtensionFunctionAddress;
cl_loader.clCreateCommandQueue = CL_CreateCommandQueue;
cl_loader.clCreateSampler = CL_CreateSampler;
cl_loader.clEnqueueTask = CL_EnqueueTask;
cl_loader.clCreateSubBuffer = CL_CreateSubBuffer;
cl_loader.clSetMemObjectDestructorCallback = CL_SetMemObjectDestructorCallback;
cl_loader.clCreateUserEvent = CL_CreateUserEvent;
cl_loader.clSetUserEventStatus = CL_SetUserEventStatus;
cl_loader.clSetEventCallback = CL_SetEventCallback;
cl_loader.clEnqueueReadBufferRect = CL_EnqueueReadBufferRect;
cl_loader.clEnqueueWriteBufferRect = CL_EnqueueWriteBufferRect;
cl_loader.clEnqueueCopyBufferRect = CL_EnqueueCopyBufferRect;
cl_loader.clCreateSubDevices = CL_CreateSubDevices;
cl_loader.clRetainDevice = CL_RetainDevice;
cl_loader.clReleaseDevice = CL_ReleaseDevice;
cl_loader.clCreateImage = CL_CreateImage;
cl_loader.clCreateProgramWithBuiltInKernels = CL_CreateProgramWithBuiltInKernels;
cl_loader.clCompileProgram = CL_CompileProgram;
cl_loader.clLinkProgram = CL_LinkProgram;
cl_loader.clUnloadPlatformCompiler = CL_UnloadPlatformCompiler;
cl_loader.clGetKernelArgInfo = CL_GetKernelArgInfo;
cl_loader.clEnqueueFillBuffer = CL_EnqueueFillBuffer;
cl_loader.clEnqueueFillImage = CL_EnqueueFillImage;
cl_loader.clEnqueueMigrateMemObjects = CL_EnqueueMigrateMemObjects;
cl_loader.clEnqueueMarkerWithWaitList = CL_EnqueueMarkerWithWaitList;
cl_loader.clEnqueueBarrierWithWaitList = CL_EnqueueBarrierWithWaitList;
cl_loader.clGetExtensionFunctionAddressForPlatform = CL_GetExtensionFunctionAddressForPlatform;
cl_loader.clCreateCommandQueueWithProperties = CL_CreateCommandQueueWithProperties;
cl_loader.clCreatePipe = CL_CreatePipe;
cl_loader.clGetPipeInfo = CL_GetPipeInfo;
cl_loader.clSVMAlloc = CL_SVMAlloc;
cl_loader.clSVMFree = CL_SVMFree;
cl_loader.clCreateSamplerWithProperties = CL_CreateSamplerWithProperties;
cl_loader.clSetKernelArgSVMPointer = CL_SetKernelArgSVMPointer;
cl_loader.clSetKernelExecInfo = CL_SetKernelExecInfo;
cl_loader.clEnqueueSVMFree = CL_EnqueueSVMFree;
cl_loader.clEnqueueSVMMemcpy = CL_EnqueueSVMMemcpy;
cl_loader.clEnqueueSVMMemFill = CL_EnqueueSVMMemFill;
cl_loader.clEnqueueSVMMap = CL_EnqueueSVMMap;
cl_loader.clEnqueueSVMUnmap = CL_EnqueueSVMUnmap;
cl_loader.clSetDefaultDeviceCommandQueue = CL_SetDefaultDeviceCommandQueue;
cl_loader.clGetDeviceAndHostTimer = CL_GetDeviceAndHostTimer;
cl_loader.clGetHostTimer = CL_GetHostTimer;
cl_loader.clCreateProgramWithIL = CL_CreateProgramWithIL;
cl_loader.clCloneKernel = CL_CloneKernel;
cl_loader.clGetKernelSubGroupInfo = CL_GetKernelSubGroupInfo;
cl_loader.clEnqueueSVMMigrateMem = CL_EnqueueSVMMigrateMem;
cl_loader.clSetProgramSpecializationConstant = CL_SetProgramSpecializationConstant;
cl_loader.clSetProgramReleaseCallback = CL_SetProgramReleaseCallback;
cl_loader.clSetContextDestructorCallback = CL_SetContextDestructorCallback;
cl_loader.clCreateBufferWithProperties = CL_CreateBufferWithProperties;
cl_loader.clCreateImageWithProperties = CL_CreateImageWithProperties;
}
} // namespace angle