diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-13 14:33:47 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-14 09:25:07 +0000 |
commit | 12e88e486b2a38272c0e9a5402b2af708339b8a3 (patch) | |
tree | b7679f717f58668d1372fdf9e2b721b09bc1b241 /src | |
parent | dc6d353a299d3eeaf57055486db12548198114a7 (diff) |
Disable DSA on Radeon
Try to prevent crashes on Windows and broken textures on Linux.
Task-number: QTBUG-40653
Task-number: QTBUG-44988
Change-Id: I1fd259ba5ca3980c3087411e1dae1ae56bb2c2e4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/opengl/qopengltexturehelper.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp index 386c4af232..3635a7dd1b 100644 --- a/src/gui/opengl/qopengltexturehelper.cpp +++ b/src/gui/opengl/qopengltexturehelper.cpp @@ -40,8 +40,16 @@ QT_BEGIN_NAMESPACE QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) { - // Resolve EXT_direct_state_access entry points if present - if (!context->isOpenGLES() + // Resolve EXT_direct_state_access entry points if present. + + // However, disable it on some systems where DSA is known to be unreliable. + bool allowDSA = true; + const char *renderer = reinterpret_cast<const char *>(context->functions()->glGetString(GL_RENDERER)); + // QTBUG-40653, QTBUG-44988 + if (renderer && strstr(renderer, "AMD Radeon HD")) + allowDSA = false; + + if (allowDSA && !context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_EXT_direct_state_access"))) { TextureParameteriEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLint )>(context->getProcAddress(QByteArrayLiteral("glTextureParameteriEXT"))); TextureParameterivEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , const GLint *)>(context->getProcAddress(QByteArrayLiteral("glTextureParameterivEXT"))); |