diff options
author | Aaron Watry <[email protected]> | 2017-07-21 21:17:50 -0500 |
---|---|---|
committer | Aaron Watry <[email protected]> | 2017-08-05 19:50:30 -0500 |
commit | 293b3e0a3f73ef85b446259dc9422932e0b8ff49 (patch) | |
tree | 886c4fdfb1b3706686f0641f71a75994e87bc51a /src/gallium | |
parent | 36a1b61321561634c6b243cf876c347fef73dfa4 (diff) |
clover/device: Move device_version into core and add device_clc_version
The device version is the maximum CL version that the device supports.
device_version and device_clc_version are not necessarily the same for
devices that support CL 1.0, but have a 1.1 compiler and the necessary
extensions.
Eventually, this will be based on the features/extensions of the actual
device, but for now move it a bit closer to its eventual destination.
Signed-off-by: Aaron Watry <[email protected]>
Reviewed-by: Jan Vesey <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/clover/api/device.cpp | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.cpp | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.hpp | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 0b33350bb2e..b1b7917e4ec 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++ b/src/gallium/state_trackers/clover/api/device.cpp @@ -314,7 +314,7 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param, break; case CL_DEVICE_VERSION: - buf.as_string() = "OpenCL 1.1 Mesa " PACKAGE_VERSION + buf.as_string() = "OpenCL " + dev.device_version() + " Mesa " PACKAGE_VERSION #ifdef MESA_GIT_SHA1 " (" MESA_GIT_SHA1 ")" #endif @@ -368,7 +368,7 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param, break; case CL_DEVICE_OPENCL_C_VERSION: - buf.as_string() = "OpenCL C 1.1 "; + buf.as_string() = "OpenCL C " + dev.device_clc_version() + " "; break; case CL_DEVICE_PRINTF_BUFFER_SIZE: diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index 8dfba1ad9fd..f6bbc38a980 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -240,3 +240,13 @@ enum pipe_endian device::endianness() const { return (enum pipe_endian)pipe->get_param(pipe, PIPE_CAP_ENDIANNESS); } + +std::string +device::device_version() const { + return "1.1"; +} + +std::string +device::device_clc_version() const { + return "1.1"; +} diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp index 7b3353df345..efc217aedb0 100644 --- a/src/gallium/state_trackers/clover/core/device.hpp +++ b/src/gallium/state_trackers/clover/core/device.hpp @@ -74,6 +74,8 @@ namespace clover { cl_uint address_bits() const; std::string device_name() const; std::string vendor_name() const; + std::string device_version() const; + std::string device_clc_version() const; enum pipe_shader_ir ir_format() const; std::string ir_target() const; enum pipe_endian endianness() const; |