summaryrefslogtreecommitdiff
path: root/src/egl/main
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-28 17:39:07 +0800
committerBrian Paul <brianp@vmware.com>2009-10-13 12:00:36 -0600
commite787ffcd02cac9085ac69f631cce235d1cad59c9 (patch)
tree9a220f80d6e5d9247c3537845151820bc34b206a /src/egl/main
parent9061d733d3f31293c145cf3b7a0f71c1bfd31989 (diff)
egl: Preload a driver if eglGetProcAddress is called early.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 82ee9d9bcd..23d841d2d1 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -618,6 +618,10 @@ void (* EGLAPIENTRY eglGetProcAddress(const char *procname))()
}
}
+ /* preload a driver if there isn't one */
+ if (!_eglGlobal.NumDrivers)
+ _eglPreloadDriver(NULL);
+
/* now loop over drivers to query their procs */
for (i = 0; i < _eglGlobal.NumDrivers; i++) {
_EGLProc p = _eglGlobal.Drivers[i]->API.GetProcAddress(procname);