mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-13 16:08:50 +01:00
[dxvk] Rework driver version fixup to use driver ID instead of vendor ID
This commit is contained in:
parent
58909e4582
commit
badc53b1bb
@ -623,12 +623,16 @@ namespace dxvk {
|
|||||||
// Query full device properties for all enabled extensions
|
// Query full device properties for all enabled extensions
|
||||||
m_vki->vkGetPhysicalDeviceProperties2(m_handle, &m_deviceInfo.core);
|
m_vki->vkGetPhysicalDeviceProperties2(m_handle, &m_deviceInfo.core);
|
||||||
|
|
||||||
// Nvidia reports the driver version in a slightly different format
|
// Some drivers reports the driver version in a slightly different format
|
||||||
if (DxvkGpuVendor(m_deviceInfo.core.properties.vendorID) == DxvkGpuVendor::Nvidia) {
|
switch (m_deviceInfo.khrDeviceDriverProperties.driverID) {
|
||||||
m_deviceInfo.core.properties.driverVersion = VK_MAKE_VERSION(
|
case VK_DRIVER_ID_NVIDIA_PROPRIETARY:
|
||||||
VK_VERSION_MAJOR(m_deviceInfo.core.properties.driverVersion),
|
m_deviceInfo.core.properties.driverVersion = VK_MAKE_VERSION(
|
||||||
VK_VERSION_MINOR(m_deviceInfo.core.properties.driverVersion >> 0) >> 2,
|
(m_deviceInfo.core.properties.driverVersion >> 22) & 0x3ff,
|
||||||
VK_VERSION_PATCH(m_deviceInfo.core.properties.driverVersion >> 2) >> 4);
|
(m_deviceInfo.core.properties.driverVersion >> 14) & 0x0ff,
|
||||||
|
(m_deviceInfo.core.properties.driverVersion >> 6) & 0x0ff);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user