Mesa (main): clover/api: Interleave details in dispatch table

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 3 17:25:25 UTC 2021


Module: Mesa
Branch: main
Commit: 54dcccd535cd8c2ba35ab2a68a9b784f3eca7a1f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=54dcccd535cd8c2ba35ab2a68a9b784f3eca7a1f

Author: Pierre Moreau <dev at pmoreau.org>
Date:   Fri Aug 14 09:51:30 2020 +0200

clover/api: Interleave details in dispatch table

By adding comments regarding which version or extension introduced the
following dispatched functions, it makes it easier to glance at the
table and see which functions are missing for a particular version, but
more importantly makes it easier to compare against cl_icd.h and see if
anything is missing.

Reviewed-by: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Pierre Moreau <dev at pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

---

 src/gallium/frontends/clover/api/dispatch.cpp | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/gallium/frontends/clover/api/dispatch.cpp b/src/gallium/frontends/clover/api/dispatch.cpp
index 94c60d62dac..e6c54b1d727 100644
--- a/src/gallium/frontends/clover/api/dispatch.cpp
+++ b/src/gallium/frontends/clover/api/dispatch.cpp
@@ -24,6 +24,7 @@
 
 namespace clover {
    const cl_icd_dispatch _dispatch = {
+      // OpenCL 1.0
       clGetPlatformIDs,
       GetPlatformInfo,
       clGetDeviceIDs,
@@ -98,6 +99,8 @@ namespace clover {
       NULL, // clGetGLTextureInfo
       NULL, // clEnqueueAcquireGLObjects
       NULL, // clEnqueueReleaseGLObjects
+
+      // cl_khr_d3d10_sharing
       NULL, // clGetGLContextInfoKHR
       NULL, // clGetDeviceIDsFromD3D10KHR
       NULL, // clCreateFromD3D10BufferKHR
@@ -105,6 +108,8 @@ namespace clover {
       NULL, // clCreateFromD3D10Texture3DKHR
       NULL, // clEnqueueAcquireD3D10ObjectsKHR
       NULL, // clEnqueueReleaseD3D10ObjectsKHR
+
+      // OpenCL 1.1
       clSetEventCallback,
       clCreateSubBuffer,
       clSetMemObjectDestructorCallback,
@@ -113,10 +118,16 @@ namespace clover {
       clEnqueueReadBufferRect,
       clEnqueueWriteBufferRect,
       clEnqueueCopyBufferRect,
+
+      // cl_ext_device_fission
       NULL, // clCreateSubDevicesEXT
       NULL, // clRetainDeviceEXT
       NULL, // clReleaseDeviceEXT
+
+      // cl_khr_gl_event
       NULL, // clCreateEventFromGLsyncKHR
+
+      // OpenCL 1.2
       clCreateSubDevices,
       clRetainDevice,
       clReleaseDevice,
@@ -133,6 +144,8 @@ namespace clover {
       clEnqueueBarrierWithWaitList,
       GetExtensionFunctionAddressForPlatform,
       NULL, // clCreateFromGLTexture
+
+      // cl_khr_d3d11_sharing
       NULL, // clGetDeviceIDsFromD3D11KHR
       NULL, // clCreateFromD3D11BufferKHR
       NULL, // clCreateFromD3D11Texture2DKHR
@@ -140,13 +153,21 @@ namespace clover {
       NULL, // clCreateFromDX9MediaSurfaceKHR
       NULL, // clEnqueueAcquireD3D11ObjectsKHR
       NULL, // clEnqueueReleaseD3D11ObjectsKHR
+
+      // cl_khr_dx9_media_sharing
       NULL, // clGetDeviceIDsFromDX9MediaAdapterKHR
       NULL, // clEnqueueAcquireDX9MediaSurfacesKHR
       NULL, // clEnqueueReleaseDX9MediaSurfacesKHR
+
+      // cl_khr_egl_image
       NULL, // clCreateFromEGLImageKHR
       NULL, // clEnqueueAcquireEGLObjectsKHR
       NULL, // clEnqueueReleaseEGLObjectsKHR
+
+      // cl_khr_egl_event
       NULL, // clCreateEventFromEGLSyncKHR
+
+      // OpenCL 2.0
       clCreateCommandQueueWithProperties,
       clCreatePipe,
       clGetPipeInfo,
@@ -160,7 +181,11 @@ namespace clover {
       NULL, // clCreateSamplerWithProperties
       clSetKernelArgSVMPointer,
       clSetKernelExecInfo,
+
+      // cl_khr_sub_groups
       NULL, // clGetKernelSubGroupInfoKHR
+
+      // OpenCL 2.1
       NULL, // clCloneKernel
       clCreateProgramWithIL,
       clEnqueueSVMMigrateMem,
@@ -168,6 +193,8 @@ namespace clover {
       clGetHostTimer,
       clGetKernelSubGroupInfo,
       clSetDefaultDeviceCommandQueue,
+
+      // OpenCL 2.2
       clSetProgramReleaseCallback,
       clSetProgramSpecializationConstant,
       clCreateBufferWithProperties,



More information about the mesa-commit mailing list