Paste P191

Masterwork From Distant Lands
ActivePublic

Authored by davidedmundson on Apr 4 2018, 10:10 PM.
commit 4db21c26d30a40f1bf58bd62816d78de334fb6a5
Author: David Edmundson <davidedmundson@kde.org>
Date: Mon Apr 2 19:50:27 2018 +0100
Support graphics reset status for offscreen surfaces in XCB-GLX
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 86ca7afa12..6a663712b8 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -539,6 +539,7 @@ bool QGLXContext::makeCurrent(QPlatformSurface *surface)
m_lost = false;
if (m_getGraphicsResetStatus && m_getGraphicsResetStatus() != GL_NO_ERROR) {
m_lost = true;
+ success = false;
// Drop the surface. Will recreate on the next makeCurrent.
window->invalidateSurface();
}
@@ -547,6 +548,11 @@ bool QGLXContext::makeCurrent(QPlatformSurface *surface)
QGLXPbuffer *pbuffer = static_cast<QGLXPbuffer *>(surface);
glxDrawable = pbuffer->pbuffer();
success = glXMakeContextCurrent(m_display, glxDrawable, glxDrawable, m_context);
+ m_lost = false;
+ if (m_getGraphicsResetStatus && m_getGraphicsResetStatus() != GL_NO_ERROR) {
+ m_lost = true;
+ success = false;
+ }
}
if (success && surfaceClass == QSurface::Window) {
davidedmundson edited the content of this paste. (Show Details)Apr 4 2018, 10:10 PM
davidedmundson changed the title of this paste from untitled to Masterwork From Distant Lands.
davidedmundson updated the paste's language from autodetect to autodetect.