Append driver version
@@ -2343,25 +2343,27 @@ static VkResult overlay_CreateSwapchainKHR(
std::stringstream ss;
// ss << prop.deviceName;
-// if (prop.vendorID == 0x10de) {
-// ss << " (" << ((prop.driverVersion >> 22) & 0x3ff);
-// ss << "." << ((prop.driverVersion >> 14) & 0x0ff);
-// ss << "." << std::setw(2) << std::setfill('0') << ((prop.driverVersion >> 6) & 0x0ff);
-// #ifdef _WIN32
-// } else if (prop.vendorID == 0x8086) {
-// ss << " (" << (prop.driverVersion >> 14);
-// ss << "." << (prop.driverVersion & 0x3fff);
-// }
-// #endif
-// } else {
-// ss << " (" << VK_VERSION_MAJOR(prop.driverVersion);
-// ss << "." << VK_VERSION_MINOR(prop.driverVersion);
-// ss << "." << VK_VERSION_PATCH(prop.driverVersion);
-// }
-// ss << ")";
+ if (prop.vendorID == 0x10de) {
+ ss << " " << ((prop.driverVersion >> 22) & 0x3ff);
+ ss << "." << ((prop.driverVersion >> 14) & 0x0ff);
+ ss << "." << std::setw(2) << std::setfill('0') << ((prop.driverVersion >> 6) & 0x0ff);
+#ifdef _WIN32
+ } else if (prop.vendorID == 0x8086) {
+ ss << " " << (prop.driverVersion >> 14);
+ ss << "." << (prop.driverVersion & 0x3fff);
+ }
+#endif
+ } else {
+ ss << " " << VK_VERSION_MAJOR(prop.driverVersion);
+ ss << "." << VK_VERSION_MINOR(prop.driverVersion);
+ ss << "." << VK_VERSION_PATCH(prop.driverVersion);
+ }
+ std::string driverVersion = ss.str();
+
std::string deviceName = prop.deviceName;
get_device_name(prop.vendorID, prop.deviceID, swapchain_data->sw_stats);
if(driverProps.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY){
+ ss.str(""); ss.clear();
ss << "NVIDIA";
ss << " (" << ((prop.driverVersion >> 22) & 0x3ff);
ss << "." << ((prop.driverVersion >> 14) & 0x0ff);
@@ -2381,6 +2383,11 @@ static VkResult overlay_CreateSwapchainKHR(
}
}
+ if (!swapchain_data->sw_stats.driverName.empty())
+ swapchain_data->sw_stats.driverName += driverVersion;
+ else
+ swapchain_data->sw_stats.driverName = prop.deviceName + driverVersion;
+
return result;
}
