Append driver version

pull/197/head
jackun 4 years ago
parent 768297b430
commit 6c2b00ffb7
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -2342,26 +2342,28 @@ static VkResult overlay_CreateSwapchainKHR(
swapchain_data->sw_stats.engineVersion = device_data->instance->engineVersion;
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 << ")";
// 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);
}
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;
}

Loading…
Cancel
Save