diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-17 20:12:13 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-17 20:12:13 (GMT) |
commit | 1811da78fc63371e2639a230e0aa81ed7f47695a (patch) | |
tree | b1e3e0024d94304e7be94640c0abeb5cf0c61ed6 /src/opengl | |
parent | b8333bb969a2ac6b3917818bb95469f5f4d8dcb5 (diff) | |
parent | 3fb5fce61b6f64534ad292a78250e4256a6514b6 (diff) | |
download | Qt-1811da78fc63371e2639a230e0aa81ed7f47695a.zip Qt-1811da78fc63371e2639a230e0aa81ed7f47695a.tar.gz Qt-1811da78fc63371e2639a230e0aa81ed7f47695a.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Changes to driver workarounds.
Switch to raster also when last window is destroyed (on MeeGo).
Clipboard/Windows: Fix a hang when sending to non-responsive clients.
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl_egl.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 674d80d..d6b2d3b 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include <QtCore/qdebug.h> #include <QtOpenGL/qgl.h> #include <QtOpenGL/qglpixelbuffer.h> #include "qgl_p.h" @@ -195,6 +196,7 @@ void QGLContext::makeCurrent() // PowerVR MBX/SGX chips needs to clear all buffers when starting to render // a new frame, otherwise there will be a performance penalty to pay for // each frame. + qDebug() << "Found SGX/MBX driver, enabling FullClearOnEveryFrame"; d->workaround_needsFullClearOnEveryFrame = true; // Older PowerVR SGX drivers (like the one in the N900) have a @@ -202,10 +204,31 @@ void QGLContext::makeCurrent() // or GL_ALPHA texture bound to an FBO. The only way to // identify that driver is to check the EGL version number for it. const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION); - if (egl_version && strstr(egl_version, "1.3")) + + if (egl_version && strstr(egl_version, "1.3")) { + qDebug() << "Found v1.3 driver, enabling brokenFBOReadBack"; d->workaround_brokenFBOReadBack = true; - else if (egl_version && strstr(egl_version, "1.4")) + } else if (egl_version && strstr(egl_version, "1.4")) { + qDebug() << "Found v1.4 driver, enabling brokenTexSubImage"; d->workaround_brokenTexSubImage = true; + + // this is a bit complicated; 1.4 version SGX drivers from + // Nokia have fixed the brokenFBOReadBack problem, but + // official drivers from TI haven't, meaning that things + // like the beagleboard are broken unless we hack around it + // - but at the same time, we want to not reduce performance + // by not enabling this elsewhere. + // + // so, let's check for a Nokia-specific addon, and only + // enable if it isn't present. + // (see MeeGo bug #5616) + if (!QEgl::hasExtension("EGL_NOK_image_shared")) { + // no Nokia extension, this is probably a standard SGX + // driver, so enable the workaround + qDebug() << "Found non-Nokia v1.4 driver, enabling brokenFBOReadBack"; + d->workaround_brokenFBOReadBack = true; + } + } } } } |