Mesa (master): egl: Use _eglPreloadDrivers.
Chia-I Wu
olv at kemper.freedesktop.org
Wed Jan 20 10:18:03 UTC 2010
Module: Mesa
Branch: master
Commit: 57929eda3e876dc60be7060237a669f042be2376
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=57929eda3e876dc60be7060237a669f042be2376
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Tue Jan 19 18:29:21 2010 +0800
egl: Use _eglPreloadDrivers.
Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter
supports EGL_DISPLAY which have a better chance to "just work".
---
src/egl/main/eglapi.c | 6 +++---
src/egl/main/egldisplay.c | 6 ------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 26e0602..6e8f444 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -101,6 +101,8 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
drv = disp->Driver;
if (!drv) {
+ _eglPreloadDrivers();
+
drv = _eglOpenDriver(disp);
if (!drv)
return _eglError(EGL_NOT_INITIALIZED, __FUNCTION__);
@@ -710,9 +712,7 @@ void (* EGLAPIENTRY eglGetProcAddress(const char *procname))()
}
}
- /* preload a driver if there isn't one */
- if (!_eglGlobal.NumDrivers)
- _eglPreloadDriver(NULL);
+ _eglPreloadDrivers();
/* now loop over drivers to query their procs */
for (i = 0; i < _eglGlobal.NumDrivers; i++) {
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 896d60d..a65ac6e 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -81,12 +81,6 @@ _eglNewDisplay(NativeDisplayType nativeDisplay)
_EGLDisplay *dpy = (_EGLDisplay *) calloc(1, sizeof(_EGLDisplay));
if (dpy) {
dpy->NativeDisplay = nativeDisplay;
-
- dpy->DriverName = _eglPreloadDriver(dpy);
- if (!dpy->DriverName) {
- free(dpy);
- return NULL;
- }
}
return dpy;
}
More information about the mesa-commit
mailing list