egl: Rework driver loading.

Driver loading is now splitted into two stages.  In the first stage, an
_EGLModule is created for each driver: user driver, default drivers, and
all files in the search directories that start with "egl_".  Modules are
not loaded at this stage.

In the second stage, each module is loaded to initialize a display.  The
process stops at the first module that can initialize the display.

If eglGetProcAddress is called before eglInitialize, the same code path
will be taken to find the first module that supports
EGL_DEFAULT_DISPLAY.  Because we do not want to initialize the display,
drv->Probe is used instead in this case.
This commit is contained in:
Chia-I Wu
2010-07-04 15:55:12 +08:00
parent cf588ab3f1
commit f2aa361f3b
7 changed files with 382 additions and 228 deletions

View File

@@ -12,8 +12,6 @@ struct _egl_global _eglGlobal =
&_eglGlobalMutex, /* Mutex */
NULL, /* DisplayList */
1, /* FreeScreenHandle */
0, /* NumDrivers */
{ NULL }, /* Drivers */
2, /* NumAtExitCalls */
{
/* default AtExitCalls, called in reverse order */