summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-30 14:50:33 -0600
committerBrian Paul <[email protected]>2008-05-30 14:50:33 -0600
commite3805cad0d15ed25ce8f6c5a1f1ea913e5d0986a (patch)
tree644f0a12d1142269f63fc541f6aa3d41ac255a6a /src/egl/main/eglapi.c
parent6b9b49127e575ecfae08a78b991e89cb484150a4 (diff)
egl: new eglGetProcAddress() code
The idea is to pass the call down to the device driver where an API-specific query can be made. Untested.
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index aacbb6b08e3..49d1f3d0eb4 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -385,12 +385,15 @@ void (* EGLAPIENTRY eglGetProcAddress(const char *procname))()
return (genericFunc) egl_functions[i].function;
}
}
-#if 0
- /* XXX enable this code someday */
- return (genericFunc) _glapi_get_proc_address(procname);
-#else
+
+ /* now loop over drivers to query their procs */
+ for (i = 0; i < _eglGlobal.NumDrivers; i++) {
+ _EGLProc p = _eglGlobal.Drivers[i]->API.GetProcAddress(procname);
+ if (p)
+ return p;
+ }
+
return NULL;
-#endif
}