clover/api: Add extended versioning query for OpenCL C
authorPierre Moreau <dev@pmoreau.org>
Thu, 12 Nov 2020 20:37:21 +0000 (21:37 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 18 Dec 2020 01:18:00 +0000 (01:18 +0000)
The cl_khr_extended_versioning extension differs from the OpenCL 3.0
version on this specific as it only reports a single supported OpenCL C
version, whereas the OpenCL 3.0 equivalent will report all of them.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7590>

src/gallium/frontends/clover/api/device.cpp

index ca5a9f1c25b1d97bfd63a2b8bf8612e0426b0584..80101359368b4c8ab455e78d29e77710562ad4a2 100644 (file)
@@ -413,6 +413,10 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
       buf.as_scalar<cl_version>() = dev.device_version();
       break;
 
+   case CL_DEVICE_OPENCL_C_NUMERIC_VERSION_KHR:
+      buf.as_scalar<cl_version>() = dev.device_clc_version();
+      break;
+
    case CL_DEVICE_OPENCL_C_ALL_VERSIONS:
       buf.as_vector<cl_name_version>() = dev.opencl_c_all_versions();
       break;