1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxvk] Add adapter logging

This commit is contained in:
Philip Rebohle 2018-03-07 00:23:06 +01:00
parent 0fdde6a94e
commit 6e981b91b6
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 25 additions and 1 deletions

View File

@ -6,7 +6,8 @@ namespace dxvk {
DxgiFactory::DxgiFactory()
: m_instance(new DxvkInstance()),
m_adapters(m_instance->enumAdapters()) {
for (const auto& adapter : m_adapters)
adapter->logAdapterInfo();
}

View File

@ -218,6 +218,21 @@ namespace dxvk {
}
void DxvkAdapter::logAdapterInfo() const {
VkPhysicalDeviceProperties deviceInfo = this->deviceProperties();
Logger::info(str::format(deviceInfo.deviceName, ":"));
Logger::info(str::format(" Driver: ",
VK_VERSION_MAJOR(deviceInfo.driverVersion), ".",
VK_VERSION_MINOR(deviceInfo.driverVersion), ".",
VK_VERSION_PATCH(deviceInfo.driverVersion)));
Logger::info(str::format(" Vulkan: ",
VK_VERSION_MAJOR(deviceInfo.apiVersion), ".",
VK_VERSION_MINOR(deviceInfo.apiVersion), ".",
VK_VERSION_PATCH(deviceInfo.apiVersion)));
}
void DxvkAdapter::logNameList(const vk::NameList& names) {
for (uint32_t i = 0; i < names.count(); i++)
Logger::info(str::format(" ", names.name(i)));

View File

@ -147,6 +147,14 @@ namespace dxvk {
HINSTANCE instance,
HWND window);
/**
* \brief Logs DXVK adapter info
*
* May be useful for bug reports
* and general troubleshooting.
*/
void logAdapterInfo() const;
private:
Rc<DxvkInstance> m_instance;