]> git.tdb.fi Git - libs/gui.git/commitdiff
Select the correct physical device for Vulkan context
authorMikko Rasa <tdb@tdb.fi>
Wed, 16 Mar 2022 10:07:17 +0000 (12:07 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 16 Mar 2022 10:07:17 +0000 (12:07 +0200)
source/graphics/vkxlib/vulkancontext.cpp

index 8e253e148b0fbc0a972701382ee42565ce313227..51a623b8e2b15ddc1bd74e66b14fde7324292158 100644 (file)
@@ -176,7 +176,10 @@ void VulkanContext::platform_init(const VulkanOptions &opts)
                                continue;
 
                        if(supported)
-                               priv->physical_device = phys_devices[0];
+                       {
+                               priv->physical_device = phys_device;
+                               break;
+                       }
                }
 
                if(!priv->physical_device)