Mesa (master): egl: Preload a driver if eglGetProcAddress is called early.

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 13 18:00:59 UTC 2009


Module: Mesa
Branch: master
Commit: e787ffcd02cac9085ac69f631cce235d1cad59c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e787ffcd02cac9085ac69f631cce235d1cad59c9

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Mon Sep 28 17:39:07 2009 +0800

egl: Preload a driver if eglGetProcAddress is called early.

Signed-off-by: Chia-I Wu <olvaffe at gmail.com>

---

 src/egl/main/eglapi.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 82ee9d9..23d841d 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);




More information about the mesa-commit mailing list