mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Examples: Vulkan: pick integrated GPU if nothing else is available. (#6359)
This commit is contained in:
@ -99,6 +99,10 @@ static VkPhysicalDevice SetupVulkan_SelectPhysicalDevice()
|
||||
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||
return device;
|
||||
}
|
||||
|
||||
// Use first GPU (Integrated) is a Discrete one is not available.
|
||||
if (gpu_count > 0)
|
||||
return gpus[0];
|
||||
return VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,10 @@ static VkPhysicalDevice SetupVulkan_SelectPhysicalDevice()
|
||||
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||
return device;
|
||||
}
|
||||
|
||||
// Use first GPU (Integrated) is a Discrete one is not available.
|
||||
if (gpu_count > 0)
|
||||
return gpus[0];
|
||||
return VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user