clover: add CL 3.0 CL_DEVICE_NUMERIC_VERSION support

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
This commit is contained in:
Dave Airlie 2020-11-06 10:52:18 +10:00
parent 981f8d7252
commit 2a3a0322ae
3 changed files with 10 additions and 0 deletions

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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;