summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-01-12 17:44:03 +0800
committerChia-I Wu <[email protected]>2010-01-12 17:53:57 +0800
commit3e6139d158a054a0dfe8def28bf60201cdb9f385 (patch)
tree491c4e016186930c9fff7ac6dbe98e23c20b706b /src
parent31d2786239d7d4c5d73d2a39c01d55975b6c901c (diff)
egl: Add _EGLDriver as the first argument to GetProcAddress.
The rest of the driver API has it as the first argument. It should be there so that a driver has access to itself.
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/glx/egl_glx.c2
-rw-r--r--src/egl/drivers/xdri/egl_xdri.c2
-rw-r--r--src/egl/main/eglapi.c3
-rw-r--r--src/egl/main/eglapi.h2
-rw-r--r--src/gallium/state_trackers/egl_g3d/common/egl_g3d.c2
-rw-r--r--src/gallium/winsys/egl_xlib/egl_xlib.c2
6 files changed, 7 insertions, 6 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 96292b0e9e8..7c6e8637a1c 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -899,7 +899,7 @@ GLX_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
* Called from eglGetProcAddress() via drv->API.GetProcAddress().
*/
static _EGLProc
-GLX_eglGetProcAddress(const char *procname)
+GLX_eglGetProcAddress(_EGLDriver *drv, const char *procname)
{
return (_EGLProc) glXGetProcAddress((const GLubyte *) procname);
}
diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c
index 0f0a9af15be..8425b3d11ef 100644
--- a/src/egl/drivers/xdri/egl_xdri.c
+++ b/src/egl/drivers/xdri/egl_xdri.c
@@ -355,7 +355,7 @@ xdri_eglTerminate(_EGLDriver *drv, _EGLDisplay *dpy)
* Called from eglGetProcAddress() via drv->API.GetProcAddress().
*/
static _EGLProc
-xdri_eglGetProcAddress(const char *procname)
+xdri_eglGetProcAddress(_EGLDriver *drv, const char *procname)
{
/* the symbol is defined in libGL.so */
return (_EGLProc) _glapi_get_proc_address(procname);
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 14cc5fa6137..26e0602453a 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -716,7 +716,8 @@ void (* EGLAPIENTRY eglGetProcAddress(const char *procname))()
/* now loop over drivers to query their procs */
for (i = 0; i < _eglGlobal.NumDrivers; i++) {
- _EGLProc p = _eglGlobal.Drivers[i]->API.GetProcAddress(procname);
+ _EGLDriver *drv = _eglGlobal.Drivers[i];
+ _EGLProc p = drv->API.GetProcAddress(drv, procname);
if (p)
return p;
}
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index aa0abe3eb6b..080f2155e3a 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -44,7 +44,7 @@ typedef const char *(*QueryString_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint n
typedef EGLBoolean (*WaitClient_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
typedef EGLBoolean (*WaitNative_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine);
-typedef _EGLProc (*GetProcAddress_t)(const char *procname);
+typedef _EGLProc (*GetProcAddress_t)(_EGLDriver *drv, const char *procname);
diff --git a/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c b/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c
index 8b2e3b5f85b..d7d3f934b56 100644
--- a/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c
@@ -849,7 +849,7 @@ egl_g3d_wait_native(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine)
}
static _EGLProc
-egl_g3d_get_proc_address(const char *procname)
+egl_g3d_get_proc_address(_EGLDriver *drv, const char *procname)
{
/* FIXME how come _EGLDriver is not passed? */
const struct egl_g3d_st *stapi;
diff --git a/src/gallium/winsys/egl_xlib/egl_xlib.c b/src/gallium/winsys/egl_xlib/egl_xlib.c
index 420dccc92c9..1d9bac3871c 100644
--- a/src/gallium/winsys/egl_xlib/egl_xlib.c
+++ b/src/gallium/winsys/egl_xlib/egl_xlib.c
@@ -274,7 +274,7 @@ xlib_eglTerminate(_EGLDriver *drv, _EGLDisplay *dpy)
static _EGLProc
-xlib_eglGetProcAddress(const char *procname)
+xlib_eglGetProcAddress(_EGLDriver *drv, const char *procname)
{
return (_EGLProc) st_get_proc_address(procname);
}