[Mesa-dev] [PATCH v10 18/20] clover/api: Implement CL_DEVICE_IL_VERSION
Pierre Moreau
pierre.morrow at free.fr
Tue Jan 8 21:11:07 UTC 2019
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Changes since:
* v3: Use the core define instead of the extension one (Karol Herbst)
* v2: Throw an exception if the cl_khr_il_program extension is not
supported (Francisco Jerez)
Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
---
src/gallium/state_trackers/clover/api/device.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
index ca6b90ba271..242d7ea0a51 100644
--- a/src/gallium/state_trackers/clover/api/device.cpp
+++ b/src/gallium/state_trackers/clover/api/device.cpp
@@ -329,6 +329,13 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
buf.as_string() = dev.supported_extensions();
break;
+ case CL_DEVICE_IL_VERSION:
+ if (dev.supported_extensions().find("cl_khr_il_program") == std::string::npos)
+ throw error(CL_INVALID_VALUE);
+ buf.as_string() = std::string("SPIR-V_1.0");
+
+ break;
+
case CL_DEVICE_PLATFORM:
buf.as_scalar<cl_platform_id>() = desc(dev.platform);
break;
--
2.20.1
More information about the mesa-dev
mailing list