vk_instance.cpp: Prefer device with most recent ApiVersion

Changed to prefer the GPU with support for the most recent VulkanApiVersion to avoid selecting the onboard GPU.
If both GPUs have support for the same version it will consider the memory heap size while sorting physical devices.
This commit is contained in:
SamuelFontes 2024-08-09 14:38:19 -03:00
parent ea4ae56f4d
commit 0129d78873

View file

@ -73,7 +73,7 @@ Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index,
const vk::PhysicalDeviceProperties& left_prop = std::get<1>(left).properties;
const vk::PhysicalDeviceProperties& right_prop = std::get<1>(right).properties;
if (left_prop.apiVersion >= TargetVulkanApiVersion &&
right_prop.apiVersion < TargetVulkanApiVersion) {
right_prop.apiVersion < left_prop.apiVersion) {
return true;
}
if (left_prop.deviceType != right_prop.deviceType) {