[desktop] Show basic driver info on GPU selector box (#3636)

Shows a short driver identification string in the Graphics Device combo box (desktop only, Android doesn't need this at all)

Largely meant for debugging, especially macOS. Maybe Windows in the future once MESA begins working on FOSS drivers over there. Linux on ARM platforms too maybe? And Nvidia

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3636
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
crueter 2026-02-26 01:04:14 +01:00
parent 0ff84ef312
commit ee67853636
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
4 changed files with 79 additions and 55 deletions

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
@ -47,7 +47,8 @@ void PopulateRecords(std::vector<Record>& records, QWindow* window) try {
records.reserve(physical_devices.size());
for (const VkPhysicalDevice device : physical_devices) {
const auto physical_device = vk::PhysicalDevice(device, dld);
const std::string name = physical_device.GetProperties().deviceName;
std::string name = physical_device.GetProperties().deviceName;
const std::vector<VkPresentModeKHR> present_modes =
physical_device.GetSurfacePresentModesKHR(*surface);
@ -59,8 +60,16 @@ void PopulateRecords(std::vector<Record>& records, QWindow* window) try {
properties.pNext = &driver_properties;
dld.vkGetPhysicalDeviceProperties2(physical_device, &properties);
const auto driverID = driver_properties.driverID;
bool has_broken_compute{Vulkan::Device::CheckBrokenCompute(
driver_properties.driverID, properties.properties.driverVersion)};
driverID, properties.properties.driverVersion)};
std::string driver_string = Vulkan::vk::GetDriverName(driver_properties);
if (driver_string.empty()) driver_string = "Unknown";
name = fmt::format("{} ({})", name, driver_string);
records.push_back(VkDeviceInfo::Record(name, present_modes, has_broken_compute));
}