Commit 52bd3c9c authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Bring back workaround for threaded render loop not working on NVIDIA Wayland

For more details, check QTBUG-95817. But to summarize it in a couple of
words: a window will stop pushing buffers when it's resized and using
threaded render loop.

CCBUG: 455575
parent 7b1ece82
Pipeline #231330 passed with stage
in 1 minute and 10 seconds
......@@ -69,6 +69,19 @@ void initializeRendererSessions()
if (!qEnvironmentVariableIsSet("QSG_RENDER_LOOP")) {
if (!s.renderLoop().isEmpty()) {
qputenv("QSG_RENDER_LOOP", s.renderLoop().toLatin1());
} else if (QGuiApplication::platformName() == QLatin1String("wayland")) {
#if QT_CONFIG(opengl)
// Workaround for Bug 432062 / QTBUG-95817
QOffscreenSurface surface;
surface.create();
if (checkContext.makeCurrent(&surface)) {
const char *vendor = reinterpret_cast<const char *>(checkContext.functions()->glGetString(GL_VENDOR));
if (qstrcmp(vendor, "NVIDIA Corporation") == 0) {
// Otherwise Qt Quick Windows break when resized
qputenv("QSG_RENDER_LOOP", "basic");
}
}
#endif
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment