egl: use device dispatch if at least one vendor suceeds

Currently, in InitDeviceListInternal if any egl vendor fails to list
its devices for any reason the construction of the device list is
abandoned. That means that even if we have one vendor successfully
serving the application, the failure of another vendor library will
break any api calls related to egl devices.

Instead, if a vendor fails queryDevicesEXT the device mapping logic
should proceed as if it listed no devices. If the relevant device
belongs to the failed vendor then the dispatch will still fail with
EGL_BAD_DEVICE.
This commit is contained in:
Ronan Pigott 2020-11-18 11:05:59 -07:00
parent acc6544548
commit a527411da7

View file

@ -276,7 +276,9 @@ static EGLBoolean AddVendorDevices(__EGLvendorInfo *vendor)
}
if (!vendor->staticDispatch.queryDevicesEXT(0, NULL, &count)) {
return EGL_FALSE;
// Even if this vendor fails, we can still return the devices from any
// other vendors
return EGL_TRUE;
}
if (count <= 0) {
return EGL_TRUE;