Examples: Vulkan: pick integrated GPU if nothing else is available. (#6359)

This commit is contained in:
kimidaisuki22
2023-04-23 04:45:45 +00:00
committed by ocornut
parent 0fbf2888e7
commit 565aa0b763
3 changed files with 9 additions and 1 deletions

View File

@ -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;
}