From 2a3a0322aec1024e67d67c27a7bb5cbecbf34957 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 6 Nov 2020 10:52:18 +1000 Subject: [PATCH] clover: add CL 3.0 CL_DEVICE_NUMERIC_VERSION support Reviewed-by: Karol Herbst Part-of: --- 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() = dev.svm_support(); break; + case CL_DEVICE_NUMERIC_VERSION: + buf.as_scalar() = 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;