summaryrefslogtreecommitdiff
path: root/src/egl
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2011-01-10 12:39:46 +0800
committerChia-I Wu <olv@lunarg.com>2011-01-12 17:40:01 +0800
commit49ed5bb28d501cd6751bd59dc25a60a4293bcd75 (patch)
treecec057da906c7783cc1e3dd703edbd2a99c7681c /src/egl
parent1412dea94953243b5cd3a452f676afd046101192 (diff)
targets/egl-static: New EGL target for scons.
This target is based on and replaces egl-gdi. It is suitable for both windows and x11.
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/main/egldriver.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 62c5695513..46876d0056 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -141,9 +141,6 @@ _eglOpenLibrary(const char *driverPath, lib_handle *handle)
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;
}
@@ -468,6 +465,19 @@ _eglAddUserDriver(void)
/**
+ * 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 void
@@ -491,14 +501,12 @@ _eglAddBuiltInDrivers(void)
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);