diff options
author | David Redondo <qt@david-redondo.de> | 2023-11-24 11:44:07 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-11-24 12:01:20 +0000 |
commit | 26054c31606bf6f87f4ede8cbe628a1002cc9e0f (patch) | |
tree | bd00a9ff84d6b0f5772cdd244843543a4d7eeb13 | |
parent | 103a4ece5f745b677f128f52bd037eafa3351936 (diff) |
Warn if eglSwapBuffers fail
This failing was the cause of windows freezing on NVidia. If it happens
for some other reason we can now see why.
Change-Id: Iabd44b1b3f73a54adac3024436ffe116ca15d21a
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 5948151aaf6fb5d36d991dab71b2cc2c87e84572)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 050b3eba3..e10b89813 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -372,7 +372,8 @@ void QWaylandGLContext::swapBuffers(QPlatformSurface *surface) window->waitForFrameSync(100); } window->handleUpdate(); - eglSwapBuffers(eglDisplay(), eglSurface); + if (!eglSwapBuffers(eglDisplay(), eglSurface)) + qCWarning(lcQpaWayland, "eglSwapBuffers failed with %#x, surface: %p", eglGetError(), eglSurface); window->setCanResize(true); } |