openglbackend: reduce timeout for handling graphics resets

With current and broken behavior in Mesa, the timeout will always be
reached. GPU resets don't take anywhere near even a second, making
the user wait for 10s has no use.
This commit is contained in:
Xaver Hugl 2022-12-02 19:12:27 +01:00
parent 3335716d7b
commit 4a09f97679

View file

@ -101,11 +101,11 @@ bool OpenGLBackend::checkGraphicsReset()
QElapsedTimer timer;
timer.start();
// Wait until the reset is completed or max 10 seconds
while (timer.elapsed() < 10000 && KWin::glGetGraphicsResetStatus() != GL_NO_ERROR) {
// Wait until the reset is completed or max one second
while (timer.elapsed() < 1000 && KWin::glGetGraphicsResetStatus() != GL_NO_ERROR) {
usleep(50);
}
if (timer.elapsed() >= 10000) {
if (timer.elapsed() >= 1000) {
qCWarning(KWIN_OPENGL) << "Waiting for glGetGraphicsResetStatus to return GL_NO_ERROR timed out!";
}