loader: Try to handle ICD failure in vkEnumeratePhysicalDevices
authorAdam Jackson <ajax@redhat.com>
Fri, 3 Dec 2021 16:08:54 +0000 (11:08 -0500)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Wed, 2 Feb 2022 20:10:15 +0000 (13:10 -0700)
If any ICD failed to enumerate device groups here, we would fail the call entirely, which means a broken driver for device A could prevent you from using device B. Just skip over the failing ICD instead.

loader/loader.c

index bb33e04..edc4714 100644 (file)
@@ -6846,7 +6846,7 @@ VkResult setup_loader_term_phys_dev_groups(struct loader_instance *inst) {
                            "setup_loader_term_phys_dev_groups:  Failed during dispatch call of "
                            "\'EnumeratePhysicalDevices\' to ICD %d to get plain phys dev count.",
                            icd_idx);
-                goto out;
+                continue;
             }
         } else {
             // Query the actual group info
@@ -6856,10 +6856,11 @@ VkResult setup_loader_term_phys_dev_groups(struct loader_instance *inst) {
                            "setup_loader_term_phys_dev_groups:  Failed during dispatch call of "
                            "\'EnumeratePhysicalDeviceGroups\' to ICD %d to get count.",
                            icd_idx);
-                goto out;
+                continue;
             }
         }
         total_count += cur_icd_group_count;
+        
     }
 
     if (total_count == 0) {