From: Chia-I Wu Date: Mon, 28 Sep 2009 09:39:07 +0000 (+0800) Subject: egl: Preload a driver if eglGetProcAddress is called early. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e787ffcd02cac9085ac69f631cce235d1cad59c9;p=mesa.git egl: Preload a driver if eglGetProcAddress is called early. Signed-off-by: Chia-I Wu --- diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 82ee9d9bcdf..23d841d2d1a 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);