From e3805cad0d15ed25ce8f6c5a1f1ea913e5d0986a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 30 May 2008 14:50:33 -0600 Subject: 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. --- src/egl/main/eglapi.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/egl/main/eglapi.c') diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index aacbb6b08e..49d1f3d0eb 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 } -- cgit v1.2.3