2017-04-28 05:49:35 -05:00

20 lines
1.0 KiB
Diff

Index: qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
===================================================================
--- qtbase-opensource-src-5.8.0.orig/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -576,7 +576,14 @@ QFunctionPointer QGLXContext::getProcAdd
#ifndef QT_NO_LIBRARY
extern const QString qt_gl_library_name();
// QLibrary lib(qt_gl_library_name());
+ // Check system library paths first
QLibrary lib(QLatin1String("GL"));
+#ifdef NIXPKGS_MESA_GL
+ if (!lib.load()) {
+ // Fallback to Mesa driver
+ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL));
+ }
+#endif // NIXPKGS_MESA_GL
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
#endif
}