From 698185e24a35f046d29e440b0edc4f9737f2f76d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Mar 2014 17:44:21 -0700 Subject: [PATCH] Try to avoid looking up bootstrap functions in the wrong library. Fixes the EGL-only subtest of egl_and_glx_different_pointers. --- src/dispatch_common.c | 8 +++----- test/Makefile.am | 1 - 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 \ $()