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) { HudDeviceInfoItem::HudDeviceInfoItem(const Rc<DxvkDevice>& device) {
VkPhysicalDeviceProperties props = device->adapter()->deviceProperties(); const auto& props = device->properties();
m_deviceName = props.deviceName; std::string driverInfo = props.vk12.driverInfo;
m_driverVer = str::format("Driver: ",
VK_VERSION_MAJOR(props.driverVersion), ".", if (driverInfo.empty()) {
VK_VERSION_MINOR(props.driverVersion), ".", driverInfo = str::format(
VK_VERSION_PATCH(props.driverVersion)); VK_VERSION_MAJOR(props.core.properties.driverVersion), ".",
m_vulkanVer = str::format("Vulkan: ", VK_VERSION_MINOR(props.core.properties.driverVersion), ".",
VK_VERSION_MAJOR(props.apiVersion), ".", VK_VERSION_PATCH(props.core.properties.driverVersion));
VK_VERSION_MINOR(props.apiVersion), ".", }
VK_VERSION_PATCH(props.apiVersion));
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, renderer.drawText(16.0f,
{ position.x, position.y }, { position.x, position.y },
{ 1.0f, 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f },
m_driverVer); m_driverName);
position.y += 20.0f; position.y += 20.0f;
renderer.drawText(16.0f, renderer.drawText(16.0f,
{ position.x, position.y }, { position.x, position.y },
{ 1.0f, 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f },
m_vulkanVer); m_driverVer);
position.y += 8.0f; position.y += 8.0f;
return position; return position;

View File

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