summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglpbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglpbuffer.cpp')
-rw-r--r--src/platformsupport/eglconvenience/qeglpbuffer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platformsupport/eglconvenience/qeglpbuffer.cpp b/src/platformsupport/eglconvenience/qeglpbuffer.cpp
index 756609a641..d1a31642b2 100644
--- a/src/platformsupport/eglconvenience/qeglpbuffer.cpp
+++ b/src/platformsupport/eglconvenience/qeglpbuffer.cpp
@@ -49,13 +49,15 @@ QT_BEGIN_NAMESPACE
and return a new instance of this class.
*/
-QEGLPbuffer::QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface)
+QEGLPbuffer::QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface,
+ QEGLPlatformContext::Flags flags)
: QPlatformOffscreenSurface(offscreenSurface)
, m_format(format)
, m_display(display)
, m_pbuffer(EGL_NO_SURFACE)
{
- bool hasSurfaceless = q_hasEglExtension(display, "EGL_KHR_surfaceless_context");
+ bool hasSurfaceless = !flags.testFlag(QEGLPlatformContext::NoSurfaceless)
+ && 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