mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
fix: quick fix for non-dedicated gpus
This commit is contained in:
parent
929c0e6fa6
commit
e3eae11e32
1 changed files with 3 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue