*
* The user driver is specified by EGL_DRIVER.
*/
-static void
+static EGLBoolean
_eglAddUserDriver(void)
{
const char *search_path = _eglGetSearchPath();
mod->BuiltIn = _eglBuiltInDrivers[i].main;
}
}
+
+ return EGL_TRUE;
}
+
+ return EGL_FALSE;
}
if (_eglModules)
return EGL_TRUE;
- /* the order here decides the priorities of the drivers */
- _eglAddUserDriver();
- _eglAddGalliumDriver();
- _eglAddBuiltInDrivers();
+ if (!_eglAddUserDriver()) {
+ /*
+ * Add other drivers only when EGL_DRIVER is not set. The order here
+ * decides the priorities.
+ */
+ _eglAddGalliumDriver();
+ _eglAddBuiltInDrivers();
+ }
return (_eglModules != NULL);
}
if (!_eglAddDrivers()) {
_eglUnlockMutex(&_eglModuleMutex);
+ _eglLog(_EGL_WARNING, "failed to find any driver");
return EGL_FALSE;
}