diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2021-07-12 16:53:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 16:53:46 +0100 |
commit | ecfa8e0f083084181d36966fa084aca9a6c97d53 (patch) | |
tree | 8217465aee70eeed3d2879064830f3cba95b90f3 | |
parent | ad723a7a75ee387bcc07430090677c58882763ff (diff) | |
parent | 7975061f6b47217df8309536f5dad697cadd5251 (diff) | |
download | libepoxy-1.5.9.tar.gz |
Merge pull request #257 from batesj/allow_libopengl1.5.9
Allow libopengl.so to be used when GLX_LIB is missing
-rw-r--r-- | src/dispatch_common.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/dispatch_common.c b/src/dispatch_common.c index 9977a02..592df38 100644 --- a/src/dispatch_common.c +++ b/src/dispatch_common.c @@ -670,13 +670,23 @@ epoxy_load_gl(void) get_dlopen_handle(&api.gl_handle, OPENGL_LIB, true, true); #else + // Prefer GLX_LIB over OPENGL_LIB to maintain existing behavior. + // Using the inverse ordering OPENGL_LIB -> GLX_LIB, causes issues such as: + // https://github.com/anholt/libepoxy/issues/240 (apitrace missing calls) + // https://github.com/anholt/libepoxy/issues/252 (Xorg boot crash) + get_dlopen_handle(&api.glx_handle, GLX_LIB, false, true); + api.gl_handle = api.glx_handle; + #if defined(OPENGL_LIB) if (!api.gl_handle) - get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false, true); + get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false, true); #endif - get_dlopen_handle(&api.glx_handle, GLX_LIB, true, true); - api.gl_handle = api.glx_handle; + if (!api.gl_handle) { + fprintf(stderr, "Couldn't open %s or %s\n", GLX_LIB, OPENGL_LIB); + abort(); + } + #endif } |