VulkanDevice: Ignore GPUs which don't support Vulkan 1.1
This commit is contained in:
parent
db675cf5d0
commit
a4c7d03ed2
|
@ -247,8 +247,8 @@ VulkanDevice::GPUList VulkanDevice::EnumerateGPUs(VkInstance instance)
|
||||||
res = vkEnumeratePhysicalDevices(instance, &gpu_count, physical_devices.data());
|
res = vkEnumeratePhysicalDevices(instance, &gpu_count, physical_devices.data());
|
||||||
if (res == VK_INCOMPLETE)
|
if (res == VK_INCOMPLETE)
|
||||||
{
|
{
|
||||||
Log_WarningPrintf("First vkEnumeratePhysicalDevices() call returned %zu devices, but second returned %u",
|
Log_WarningFmt("First vkEnumeratePhysicalDevices() call returned {} devices, but second returned {}",
|
||||||
physical_devices.size(), gpu_count);
|
physical_devices.size(), gpu_count);
|
||||||
}
|
}
|
||||||
else if (res != VK_SUCCESS)
|
else if (res != VK_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -266,6 +266,16 @@ VulkanDevice::GPUList VulkanDevice::EnumerateGPUs(VkInstance instance)
|
||||||
VkPhysicalDeviceProperties props = {};
|
VkPhysicalDeviceProperties props = {};
|
||||||
vkGetPhysicalDeviceProperties(device, &props);
|
vkGetPhysicalDeviceProperties(device, &props);
|
||||||
|
|
||||||
|
// Skip GPUs which don't support Vulkan 1.1, since we won't be able to create a device with them anyway.
|
||||||
|
if (VK_API_VERSION_VARIANT(props.apiVersion) == 0 && VK_API_VERSION_MAJOR(props.apiVersion) <= 1 &&
|
||||||
|
VK_API_VERSION_MINOR(props.apiVersion) < 1)
|
||||||
|
{
|
||||||
|
Log_WarningFmt("Ignoring Vulkan GPU '{}' because it only claims support for Vulkan {}.{}.{}", props.deviceName,
|
||||||
|
VK_API_VERSION_MAJOR(props.apiVersion), VK_API_VERSION_MINOR(props.apiVersion),
|
||||||
|
VK_API_VERSION_PATCH(props.apiVersion));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
std::string gpu_name = props.deviceName;
|
std::string gpu_name = props.deviceName;
|
||||||
|
|
||||||
// handle duplicate adapter names
|
// handle duplicate adapter names
|
||||||
|
|
Loading…
Reference in New Issue