gpu: Move device ranking to the bottom of IsDeviceSuitable.
This prevents devices without presentation/graphics support from getting ranked.
This commit is contained in:
@@ -11425,15 +11425,6 @@ static Uint8 VULKAN_INTERNAL_IsDeviceSuitable(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Device rank depends on extension support, do NOT move this block any higher!
|
|
||||||
if (!VULKAN_INTERNAL_GetDeviceRank(
|
|
||||||
renderer,
|
|
||||||
physicalDevice,
|
|
||||||
physicalDeviceExtensions,
|
|
||||||
deviceRank)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
renderer->vkGetPhysicalDeviceQueueFamilyProperties(
|
renderer->vkGetPhysicalDeviceQueueFamilyProperties(
|
||||||
physicalDevice,
|
physicalDevice,
|
||||||
&queueFamilyCount,
|
&queueFamilyCount,
|
||||||
@@ -11508,6 +11499,15 @@ static Uint8 VULKAN_INTERNAL_IsDeviceSuitable(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now that we know this device supports what we need, rank it against any other devices
|
||||||
|
if (!VULKAN_INTERNAL_GetDeviceRank(
|
||||||
|
renderer,
|
||||||
|
physicalDevice,
|
||||||
|
physicalDeviceExtensions,
|
||||||
|
deviceRank)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: Need better structure for checking vs storing swapchain support details
|
// FIXME: Need better structure for checking vs storing swapchain support details
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user