const char *name;
_EGLMain_t main;
} _eglBuiltInDrivers[] = {
+#ifdef _EGL_BUILT_IN_DRIVER_GALLIUM
+ { "egl_gallium", _eglBuiltInDriverGALLIUM },
+#endif
#ifdef _EGL_BUILT_IN_DRIVER_DRI2
{ "egl_dri2", _eglBuiltInDriverDRI2 },
#endif
if (!lib) {
_eglLog(_EGL_WARNING, "Could not open driver %s (%s)",
driverPath, error);
- if (!getenv("EGL_DRIVER"))
- _eglLog(_EGL_WARNING,
- "The driver can be overridden by setting EGL_DRIVER");
return NULL;
}
}
+/**
+ * Add egl_gallium to the module array.
+ */
+static void
+_eglAddGalliumDriver(void)
+{
+#ifndef _EGL_BUILT_IN_DRIVER_GALLIUM
+ void *external = (void *) "egl_gallium";
+ _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
+#endif
+}
+
+
/**
* Add built-in drivers to the module array.
*/
static EGLBoolean
_eglAddDrivers(void)
{
- void *external = (void *) "egl_gallium";
-
if (_eglModules)
return EGL_TRUE;
/* the order here decides the priorities of the drivers */
_eglAddUserDriver();
- _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
+ _eglAddGalliumDriver();
_eglAddBuiltInDrivers();
return (_eglModules != NULL);