diff options
author | Adam Jackson <ajax@redhat.com> | 2018-05-01 11:34:23 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-05-01 11:50:30 -0400 |
commit | 90db0069b43f40c071510fa4e3b67f6affebd8e2 (patch) | |
tree | 31232f7b3606f731a7a151dd25008fa0620bc397 /src/dispatch_glx.c | |
parent | 53ae0bbffe18072e4d8408bad5d8448d0b4392c3 (diff) | |
download | libepoxy-90db0069b43f40c071510fa4e3b67f6affebd8e2.tar.gz |
dispatch: Load EGL/GLX provider lib from epoxy_has_{egl,glx}()
Now that we're being conservative about probing libraries, these
entrypoints would not succeed unless the caller had already dlopened
stuff themselves, or had explicitly linked against the provider library.
Both of those are exactly not what we want.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'src/dispatch_glx.c')
-rw-r--r-- | src/dispatch_glx.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dispatch_glx.c b/src/dispatch_glx.c index b5ad42e..e395564 100644 --- a/src/dispatch_glx.c +++ b/src/dispatch_glx.c @@ -158,12 +158,14 @@ epoxy_has_glx(Display *dpy) #if !PLATFORM_HAS_GLX return false; #else - Bool (* pf_glXQueryExtension) (Display *, int *, int *); - int error_base, event_base; - - pf_glXQueryExtension = epoxy_conservative_glx_dlsym("glXQueryExtension", false); - if (pf_glXQueryExtension && pf_glXQueryExtension(dpy, &error_base, &event_base)) - return true; + if (epoxy_load_glx(false, true)) { + Bool (* pf_glXQueryExtension) (Display *, int *, int *); + int error_base, event_base; + + pf_glXQueryExtension = epoxy_conservative_glx_dlsym("glXQueryExtension", false); + if (pf_glXQueryExtension && pf_glXQueryExtension(dpy, &error_base, &event_base)) + return true; + } return false; #endif /* !PLATFORM_HAS_GLX */ |