Mesa (master): clover: add CL 3.0 CL_DEVICE_NUMERIC_VERSION support
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 10 20:56:33 UTC 2020
Module: Mesa
Branch: master
Commit: 2a3a0322aec1024e67d67c27a7bb5cbecbf34957
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a3a0322aec1024e67d67c27a7bb5cbecbf34957
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Nov 6 10:52:18 2020 +1000
clover: add CL 3.0 CL_DEVICE_NUMERIC_VERSION support
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
---
src/gallium/frontends/clover/api/device.cpp | 4 ++++
src/gallium/frontends/clover/core/device.cpp | 5 +++++
src/gallium/frontends/clover/core/device.hpp | 1 +
3 files changed, 10 insertions(+)
diff --git a/src/gallium/frontends/clover/api/device.cpp b/src/gallium/frontends/clover/api/device.cpp
index 6f992940bf0..c4ca7fb9623 100644
--- a/src/gallium/frontends/clover/api/device.cpp
+++ b/src/gallium/frontends/clover/api/device.cpp
@@ -409,6 +409,10 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
buf.as_scalar<cl_device_svm_capabilities>() = dev.svm_support();
break;
+ case CL_DEVICE_NUMERIC_VERSION:
+ buf.as_scalar<cl_version>() = dev.device_version();
+ break;
+
default:
throw error(CL_INVALID_VALUE);
}
diff --git a/src/gallium/frontends/clover/core/device.cpp b/src/gallium/frontends/clover/core/device.cpp
index 01799809db4..7bdf37b6e44 100644
--- a/src/gallium/frontends/clover/core/device.cpp
+++ b/src/gallium/frontends/clover/core/device.cpp
@@ -360,3 +360,8 @@ const void *
device::get_compiler_options(enum pipe_shader_ir ir) const {
return pipe->get_compiler_options(pipe, ir, PIPE_SHADER_COMPUTE);
}
+
+cl_version
+device::device_version() const {
+ return version;
+}
diff --git a/src/gallium/frontends/clover/core/device.hpp b/src/gallium/frontends/clover/core/device.hpp
index 85e01bf0c52..71791e342d6 100644
--- a/src/gallium/frontends/clover/core/device.hpp
+++ b/src/gallium/frontends/clover/core/device.hpp
@@ -91,6 +91,7 @@ namespace clover {
enum pipe_endian endianness() const;
bool supports_ir(enum pipe_shader_ir ir) const;
std::string supported_extensions_as_string() const;
+ cl_version device_version() const;
friend class command_queue;
friend class root_resource;
More information about the mesa-commit
mailing list