summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-11-22 07:38:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-22 16:29:15 +0100
commit7879fbe4b8e6396fff199476494c1e05fb4c16e9 (patch)
treee577246014eecc07e11df1fac2234879b54b3e30
parent3f97e3844064fb3ecf8881067cec095df25c9782 (diff)
Disable threaded GL for nouveau drivers.
Task-number: QTCREATORBUG-10875 Change-Id: I25f3abc6ef15bba78fa9ec27de2c1e5e0bcc7fae Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index e6fa8fc898..e504d93fba 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -415,12 +415,17 @@ bool QGLXContext::m_supportsThreading = true;
// If this list grows to any significant size, change it a
// proper string table and make the implementation below use
// binary search.
-static const char *qglx_threadedgl_blacklist[] = {
+static const char *qglx_threadedgl_blacklist_renderer[] = {
"Chromium", // QTBUG-32225 (initialization fails)
"Mesa DRI Intel(R) Sandybridge Mobile", // QTBUG-34492 (flickering in fullscreen)
0
};
+static const char *qglx_threadedgl_blacklist_vendor[] = {
+ "nouveau", // QTCREATORBUG-10875 (crash in creator)
+ 0
+};
+
void QGLXContext::queryDummyContext()
{
if (m_queriedDummyContext)
@@ -437,8 +442,8 @@ void QGLXContext::queryDummyContext()
oldSurface = oldContext->surface();
QScopedPointer<QSurface> surface;
- const char *vendor = glXGetClientString(glXGetCurrentDisplay(), GLX_VENDOR);
- if (vendor && !strcmp(vendor, "ATI")) {
+ const char *glxvendor = glXGetClientString(glXGetCurrentDisplay(), GLX_VENDOR);
+ if (glxvendor && !strcmp(glxvendor, "ATI")) {
QWindow *window = new QWindow;
window->resize(64, 64);
window->setSurfaceType(QSurface::OpenGLSurface);
@@ -454,11 +459,19 @@ void QGLXContext::queryDummyContext()
context.create();
context.makeCurrent(surface.data());
+ m_supportsThreading = true;
+
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) {
+ m_supportsThreading = false;
+ break;
+ }
+ }
- m_supportsThreading = true;
- for (int i = 0; qglx_threadedgl_blacklist[i]; ++i) {
- if (strstr(renderer, qglx_threadedgl_blacklist[i]) != 0) {
+ const char *vendor = (const char *) glGetString(GL_VENDOR);
+ for (int i = 0; qglx_threadedgl_blacklist_vendor[i]; ++i) {
+ if (strstr(vendor, qglx_threadedgl_blacklist_vendor[i]) != 0) {
m_supportsThreading = false;
break;
}