aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2009-03-19 15:34:45 +0000
committerAlan Hourihane <[email protected]>2009-03-19 15:37:25 +0000
commit9ed03af8c0a8e6af54e827f15778d8b567492c89 (patch)
treedb489c3b1837d303f5c8aa0a535d8a8141485d4f
parent214132adfee555a26b64b2dd359afa6b09e845f5 (diff)
egl: try harder for eglGetProcAddress()
-rw-r--r--src/egl/drivers/glx/egl_glx.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 3db63a920e4..e2b3b4f67a3 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -797,7 +797,20 @@ GLX_eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
static _EGLProc
GLX_eglGetProcAddress(const char *procname)
{
- return (_EGLProc)glXGetProcAddress((const GLubyte *)procname);
+ /* This is a bit of a hack to get at the gallium/Mesa state tracker
+ * * function st_get_proc_address(). This will probably change at
+ * * some point.
+ * */
+ _EGLProc (*get_proc_addr)(const char *procname);
+ get_proc_addr = dlsym(NULL, "st_get_proc_address");
+ if (get_proc_addr)
+ return get_proc_addr(procname);
+
+ get_proc_addr = glXGetProcAddress((const GLubyte *)procname);
+ if (get_proc_addr)
+ return get_proc_addr(procname);
+
+ return (_EGLProc)dlsym(NULL, procname);
}