1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[hud] Display more useful driver info in HUD

Vulkan versions are irrelevant anyway, not sure why we
ever displayed that in the first place.
This commit is contained in:
Philip Rebohle 2023-01-23 00:10:39 +01:00
parent 3128f4ea8e
commit 255ab1a63c
2 changed files with 16 additions and 13 deletions

View File

@ -125,17 +125,20 @@ namespace dxvk::hud {
HudDeviceInfoItem::HudDeviceInfoItem(const Rc<DxvkDevice>& device) {
VkPhysicalDeviceProperties props = device->adapter()->deviceProperties();
const auto& props = device->properties();
m_deviceName = props.deviceName;
m_driverVer = str::format("Driver: ",
VK_VERSION_MAJOR(props.driverVersion), ".",
VK_VERSION_MINOR(props.driverVersion), ".",
VK_VERSION_PATCH(props.driverVersion));
m_vulkanVer = str::format("Vulkan: ",
VK_VERSION_MAJOR(props.apiVersion), ".",
VK_VERSION_MINOR(props.apiVersion), ".",
VK_VERSION_PATCH(props.apiVersion));
std::string driverInfo = props.vk12.driverInfo;
if (driverInfo.empty()) {
driverInfo = str::format(
VK_VERSION_MAJOR(props.core.properties.driverVersion), ".",
VK_VERSION_MINOR(props.core.properties.driverVersion), ".",
VK_VERSION_PATCH(props.core.properties.driverVersion));
}
m_deviceName = props.core.properties.deviceName;
m_driverName = str::format("Driver: ", props.vk12.driverName);
m_driverVer = str::format("Version: ", driverInfo);
}
@ -157,13 +160,13 @@ namespace dxvk::hud {
renderer.drawText(16.0f,
{ position.x, position.y },
{ 1.0f, 1.0f, 1.0f, 1.0f },
m_driverVer);
m_driverName);
position.y += 20.0f;
renderer.drawText(16.0f,
{ position.x, position.y },
{ 1.0f, 1.0f, 1.0f, 1.0f },
m_vulkanVer);
m_driverVer);
position.y += 8.0f;
return position;

View File

@ -175,8 +175,8 @@ namespace dxvk::hud {
private:
std::string m_deviceName;
std::string m_driverName;
std::string m_driverVer;
std::string m_vulkanVer;
};