summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
diff options
context:
space:
mode:
authorJeremy Katz <jeremy@panix.com>2017-03-13 14:47:56 -0700
committerJeremy Katz <jeremy@panix.com>2017-03-16 18:55:52 +0000
commit3e0355014edda23d94605c77dd8c1582b91f9c18 (patch)
tree40dc854d0c26c005cfe4c2f60e8984bf5f839e6a /src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
parent3f0ceb91f806737586b2acc39c1efa960a26cf00 (diff)
warn of blacklisted GLX OpenGL renderers and vendors
Notify users when multithreaded OpenGL is disabled due to the renderer or vendor blacklist. Change-Id: I16a80568afe87b227575102ca839f18050613e90 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 4e0c73450e..caa4b7361a 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -56,6 +56,8 @@
#include <QtGlxSupport/private/qglxconvenience_p.h>
#include <QtPlatformHeaders/QGLXNativeContext>
+#include "qxcbglintegration.h"
+
#if !defined(QT_STATIC) && QT_CONFIG(dlopen)
#include <dlfcn.h>
#endif
@@ -691,6 +693,10 @@ void QGLXContext::queryDummyContext()
if (const char *renderer = (const char *) glGetString(GL_RENDERER)) {
for (int i = 0; qglx_threadedgl_blacklist_renderer[i]; ++i) {
if (strstr(renderer, qglx_threadedgl_blacklist_renderer[i]) != 0) {
+ qCInfo(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: "
+ "blacklisted renderer \""
+ << qglx_threadedgl_blacklist_renderer[i]
+ << "\"";
m_supportsThreading = false;
break;
}
@@ -700,6 +706,11 @@ void QGLXContext::queryDummyContext()
if (glxvendor) {
for (int i = 0; qglx_threadedgl_blacklist_vendor[i]; ++i) {
if (strstr(glxvendor, qglx_threadedgl_blacklist_vendor[i]) != 0) {
+ qCInfo(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: "
+ "blacklisted vendor \""
+ << qglx_threadedgl_blacklist_vendor[i]
+ << "\"";
+
m_supportsThreading = false;
break;
}
@@ -709,6 +720,11 @@ void QGLXContext::queryDummyContext()
context.doneCurrent();
if (oldContext && oldSurface)
oldContext->makeCurrent(oldSurface);
+
+ if (!m_supportsThreading) {
+ qCInfo(lcQpaGl) << "Force-enable multithreaded OpenGL by setting "
+ "environment variable QT_OPENGL_NO_SANITY_CHECK";
+ }
}
bool QGLXContext::supportsThreading()