D6464: Prevent endless loop in checkGLError due to GL_CONTEXT_LOST
Martin Flöser
noreply at phabricator.kde.org
Sat Jul 1 17:28:36 UTC 2017
graesslin created this revision.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.
REVISION SUMMARY
The GL_CONTEXT_LOST flag is not reset when calling glGetError. This of
course bites with: "Thus, glGetError should always be called in a loop,
until it returns GL_NO_ERROR, if all error flags are to be reset."
(see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetError.xhtml)
As KWin calls checkGLError from init call it can result in a freeze of
KWin. This is a regression reported multiple times since the release of
5.10.3 which enabled GLX_NV_robustness_video_memory_purge extension.
Please note that I am not able to test this change. I do not have an
NVIDIA card and are not hiting the problem. I have no way to simulate
the code. I do not know whether the change will fix the problem, it is
based on what others do. Inspiration for this change is mostly from
mutter: https://git.gnome.org/browse/mutter/commit/?id=d4d2bf0f6c1737256b921c4f1dedd3a95138cab9
BUG: 381870
FIXED-IN: 5.10.3.1
TEST PLAN
See above, I can only compile check the change
REPOSITORY
R108 KWin
BRANCH
check-context-lost
REVISION DETAIL
https://phabricator.kde.org/D6464
AFFECTED FILES
libkwineffects/kwinglutils.cpp
To: graesslin, #kwin, #plasma
Cc: plasma-devel, kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170701/85fe90e4/attachment.html>
More information about the Plasma-devel
mailing list