logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

pr-232_GLX.patch (1206B)


  1. From 7e6843e2c5ca7c7e27c1a327a296e5d719744b49 Mon Sep 17 00:00:00 2001
  2. From: Patrick Steinhardt <ps@pks.im>
  3. Date: Sat, 24 Oct 2020 11:25:00 +0200
  4. Subject: [PATCH] dispatch: fix loading of GL without GLX library
  5. When loading the GL library in `epoxy_load_gl`, we in turn try to load
  6. OPENGL_LIB and GLX_LIB. But notably, we'll also try to load GLX_LIB even
  7. if loading OPENGL_LIB succeeded. As this load will abort in case the
  8. library wasn't found, the end result is that systems without GLX_LIB
  9. will always fail `epoxy_load_gl`.
  10. Fix the issue by only trying to load GLX_LIB in case OPENGL_LIB wasn't
  11. found.
  12. ---
  13. src/dispatch_common.c | 6 ++++--
  14. 1 file changed, 4 insertions(+), 2 deletions(-)
  15. diff --git a/src/dispatch_common.c b/src/dispatch_common.c
  16. index 9977a02..71ff2a0 100644
  17. --- a/src/dispatch_common.c
  18. +++ b/src/dispatch_common.c
  19. @@ -675,8 +675,10 @@ epoxy_load_gl(void)
  20. get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false, true);
  21. #endif
  22. - get_dlopen_handle(&api.glx_handle, GLX_LIB, true, true);
  23. - api.gl_handle = api.glx_handle;
  24. + if (!api.gl_handle) {
  25. + get_dlopen_handle(&api.glx_handle, GLX_LIB, true, true);
  26. + api.gl_handle = api.glx_handle;
  27. + }
  28. #endif
  29. }