mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Print patch version for vulkan drivers
This commit is contained in:
@@ -367,16 +367,24 @@ void WrappedVulkan::vkDestroyInstance(VkInstance instance, const VkAllocationCal
|
||||
}
|
||||
|
||||
static void GetVulkanDriverVersion(const VkPhysicalDeviceProperties &physProps, uint32_t &major,
|
||||
uint32_t &minor)
|
||||
uint32_t &minor, uint32_t &patch)
|
||||
{
|
||||
major = VK_VERSION_MAJOR(physProps.driverVersion);
|
||||
minor = VK_VERSION_MINOR(physProps.driverVersion);
|
||||
patch = VK_VERSION_PATCH(physProps.driverVersion);
|
||||
|
||||
// nvidia uses its own version packing
|
||||
// nvidia uses its own version packing:
|
||||
// 10 | 8 | 8 | 6
|
||||
// major|minor|secondary_branch|tertiary_branch
|
||||
if(physProps.vendorID == 0x10DE)
|
||||
{
|
||||
major = ((uint32_t)(physProps.driverVersion) >> 22);
|
||||
minor = ((uint32_t)(physProps.driverVersion) >> 14) & 0xff;
|
||||
major = ((uint32_t)(physProps.driverVersion) >> (8 + 8 + 6)) & 0x3ff;
|
||||
minor = ((uint32_t)(physProps.driverVersion) >> (8 + 6)) & 0x0ff;
|
||||
|
||||
uint32_t secondary = ((uint32_t)(physProps.driverVersion) >> 6) & 0x0ff;
|
||||
uint32_t tertiary = physProps.driverVersion & 0x03f;
|
||||
|
||||
patch = (secondary << 8) | tertiary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,21 +480,21 @@ bool WrappedVulkan::Serialise_vkEnumeratePhysicalDevices(Serialiser *localSerial
|
||||
memcpy(storedMap, memIdxMap, sizeof(memIdxMap));
|
||||
m_MemIdxMaps[physIndex] = storedMap;
|
||||
|
||||
uint32_t major = 0, minor = 0;
|
||||
GetVulkanDriverVersion(physProps, major, minor);
|
||||
uint32_t major = 0, minor = 0, patch = 0;
|
||||
GetVulkanDriverVersion(physProps, major, minor, patch);
|
||||
|
||||
RDCLOG("Captured log describes physical device %u:", physIndex);
|
||||
RDCLOG(" - %s (ver %u.%u) - %04x:%04x", physProps.deviceName, major, minor,
|
||||
RDCLOG(" - %s (ver %u.%u patch 0x%x) - %04x:%04x", physProps.deviceName, major, minor, patch,
|
||||
physProps.vendorID, physProps.deviceID);
|
||||
|
||||
ObjDisp(pd)->GetPhysicalDeviceProperties(Unwrap(pd), &physProps);
|
||||
ObjDisp(pd)->GetPhysicalDeviceMemoryProperties(Unwrap(pd), &memProps);
|
||||
ObjDisp(pd)->GetPhysicalDeviceFeatures(Unwrap(pd), &physFeatures);
|
||||
|
||||
GetVulkanDriverVersion(physProps, major, minor);
|
||||
GetVulkanDriverVersion(physProps, major, minor, patch);
|
||||
|
||||
RDCLOG("Replaying on physical device %u:", physIndex);
|
||||
RDCLOG(" - %s (ver %u.%u) - %04x:%04x", physProps.deviceName, major, minor,
|
||||
RDCLOG(" - %s (ver %u.%u patch 0x%x) - %04x:%04x", physProps.deviceName, major, minor, patch,
|
||||
physProps.vendorID, physProps.deviceID);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user