kwin/libkwineffects
Martin Gräßlin aefb5f4dd9 Prevent endless loop in checkGLError due to GL_CONTEXT_LOST
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

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6464
2017-07-01 19:28:31 +02:00
..
CMakeLists.txt [effects] Use arg="true" in the kcfg files 2017-04-15 10:03:34 +02:00
Mainpage.dox Move kwineffects library into own directory 2011-02-19 10:01:31 +01:00
Messages.sh Improve message extraction 2011-02-20 16:02:33 +01:00
anidata.cpp optimize string operations 2015-11-05 14:14:06 +00:00
anidata_p.h use a global static for animation ids 2016-03-23 12:03:31 +01:00
kwinanimationeffect.cpp use a global static for animation ids 2016-03-23 12:03:31 +01:00
kwinanimationeffect.h allow to retarget animations 2016-02-16 13:59:22 +01:00
kwinconfig.h.cmake Move linking to DL_LIBRARY to x11standalone platform 2016-11-22 14:22:06 +01:00
kwineffects.cpp Desaturate non-responsive windows 2017-04-05 11:16:23 +02:00
kwineffects.h Merge branch 'scaling' 2017-04-29 14:11:13 +01:00
kwinglobals.h Add support for global touchpad swipe gestures 2017-03-27 17:43:44 +02:00
kwinglplatform.cpp Remove useless branching on EGL/GLX in GLPlatform 2016-11-22 07:46:22 +01:00
kwinglplatform.h [libkwineffects] Add detection code for Qualcomm Adreno to GLPlatform 2016-08-12 09:59:38 +02:00
kwingltexture.cpp [kwinglutils] Don't setup old shader API for rendering a texture 2016-01-25 14:11:54 +01:00
kwingltexture.h [libkwineffects] Fix includes in kwingltexture.h 2016-08-08 15:46:25 +02:00
kwingltexture_p.h Check GL version and/or extension for using texture format GL_R8 2015-02-18 09:09:50 +01:00
kwinglutils.cpp Prevent endless loop in checkGLError due to GL_CONTEXT_LOST 2017-07-01 19:28:31 +02:00
kwinglutils.h Restore the backend set viewport when popping the final render target 2017-04-28 10:23:14 +01:00
kwinglutils_funcs.cpp [kwinglutils] Drop eglResolveFunctions 2016-11-17 12:59:48 +01:00
kwinglutils_funcs.h Remove epoxy/egl.h from kwinglutils_func.h 2016-11-22 14:21:40 +01:00
kwinxrenderutils.cpp [libkwinxrenderutils] Clean up static blend picture before going down 2016-06-13 15:29:07 +02:00
kwinxrenderutils.h [libkwinxrenderutils] Clean up static blend picture before going down 2016-06-13 15:29:07 +02:00
logging.cpp pedantic fixes 2016-07-16 13:14:44 -04:00
logging_p.h pedantic fixes 2016-07-16 13:14:44 -04:00