From 26054c31606bf6f87f4ede8cbe628a1002cc9e0f Mon Sep 17 00:00:00 2001 From: David Redondo Date: Fri, 24 Nov 2023 11:44:07 +0100 Subject: 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 (cherry picked from commit 5948151aaf6fb5d36d991dab71b2cc2c87e84572) Reviewed-by: Qt Cherry-pick Bot --- src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3