summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-03-19 17:44:21 -0700
committerEric Anholt <eric@anholt.net>2014-03-19 18:34:30 -0700
commit698185e24a35f046d29e440b0edc4f9737f2f76d (patch)
treec904169db8cabf9c45cf22bf8dabb2f5a38d0419
parent037ac7f56646a906326dd35567410045e4a1f314 (diff)
downloadlibepoxy-698185e24a35f046d29e440b0edc4f9737f2f76d.tar.gz
Try to avoid looking up bootstrap functions in the wrong library.
Fixes the EGL-only subtest of egl_and_glx_different_pointers.
-rw-r--r--src/dispatch_common.c8
-rw-r--r--test/Makefile.am1
2 files changed, 3 insertions, 6 deletions
diff --git a/src/dispatch_common.c b/src/dispatch_common.c
index d5420bf..6e8589f 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -440,12 +440,10 @@ epoxy_get_bootstrap_proc_address(const char *name)
/* If we already have a library that links to libglapi loaded,
* use that.
*/
- if (api.glx_handle)
+#if PLATFORM_HAS_GLX
+ if (api.glx_handle && glXGetCurrentContext())
return epoxy_gl_dlsym(name);
- if (api.gles2_handle)
- return epoxy_gles2_dlsym(name);
- if (api.gles1_handle)
- return epoxy_gles1_dlsym(name);
+#endif
/* If epoxy hasn't loaded any API-specific library yet, try to
* figure out what API the context is using and use that library,
diff --git a/test/Makefile.am b/test/Makefile.am
index b23ddfa..40a63af 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -64,7 +64,6 @@ check_BINARIES = $(EGL_AND_GLX_BIN)
XFAIL_TESTS = \
egl_and_glx_different_pointers_egl_glx \
- egl_and_glx_different_pointers_egl \
egl_and_glx_different_pointers_glx \
$()