diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-07-01 11:05:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-07-01 11:05:26 +0200 |
commit | 0aa2d318b1524cdab42ab9988270779ddcc1922a (patch) | |
tree | 695c70702763ba2c66eb398ae9d545fc712a9e2d /src/platformsupport/eglconvenience/qeglpbuffer.cpp | |
parent | 6251d4dafc86bcbec09d1962050af9924249d419 (diff) | |
parent | 49049d90470eb3e94bda77d19ab7f7c57a0bd57f (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/corelib/global/qglobal.cpp
src/corelib/global/qglobal.h
src/corelib/global/qsysinfo.h
src/corelib/global/qsystemdetection.h
src/corelib/kernel/qobjectdefs.h
src/plugins/plugins.pro
tests/auto/widgets/itemviews/qlistview/qlistview.pro
Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglpbuffer.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglpbuffer.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/platformsupport/eglconvenience/qeglpbuffer.cpp b/src/platformsupport/eglconvenience/qeglpbuffer.cpp index 9cdf5a0931..756609a641 100644 --- a/src/platformsupport/eglconvenience/qeglpbuffer.cpp +++ b/src/platformsupport/eglconvenience/qeglpbuffer.cpp @@ -55,7 +55,18 @@ QEGLPbuffer::QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffs , m_display(display) , m_pbuffer(EGL_NO_SURFACE) { - if (q_hasEglExtension(display, "EGL_KHR_surfaceless_context")) + bool hasSurfaceless = q_hasEglExtension(display, "EGL_KHR_surfaceless_context"); + + // Disable surfaceless contexts on Mesa for now. As of 10.6.0 and Intel at least, some + // operations (glReadPixels) are unable to work without a surface since they at some + // point temporarily unbind the current FBO and then later blow up in some seemingly + // safe operations, like setting the viewport, that apparently need access to the + // read/draw surface in the Intel backend. + const char *vendor = eglQueryString(display, EGL_VENDOR); // hard to check for GL_ strings here, so blacklist all Mesa + if (vendor && strstr(vendor, "Mesa")) + hasSurfaceless = false; + + if (hasSurfaceless) return; EGLConfig config = q_configFromGLFormat(m_display, m_format, false, EGL_PBUFFER_BIT); |