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:
parent
0fdde6a94e
commit
6e981b91b6
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)));
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user