fix: quick fix for non-dedicated gpus

This commit is contained in:
PancakeTAS 2025-07-04 17:55:42 +02:00
parent 929c0e6fa6
commit e3eae11e32
No known key found for this signature in database

View file

@ -29,11 +29,10 @@ Device::Device(const Instance& instance) {
for (const auto& device : devices) {
VkPhysicalDeviceProperties properties;
vkGetPhysicalDeviceProperties(device, &properties);
physicalDevice = device;
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
physicalDevice = device;
break;
}
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
break; // dedicated will always work
}
if (!physicalDevice)
throw LSFG::vulkan_error(VK_ERROR_INITIALIZATION_FAILED, "No discrete GPU found");