From e2dcf6381869726353112ee156760a1498384eab Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Sun, 9 Dec 2018 22:03:04 +0000 Subject: [PATCH] Add back the glXWaitGL to compositor sync code In d6e7fbc4 the glXWaitX/glXWaitGL synchronization around compositor texture upload was replaced by an XSync fence. This causes extreme flickering on nvidia. My current understanding is that the fence code is equivalent to glXWaitX, so the other half of the synchronization is not handled. This patch restores glXWaitGL to deal with that. Note that if my understanding is correct then this patch will behave exactly the same as reverting d6e7fbc4. This means the problems d6e7fbc4 intended to fix will come back. --- src/compositor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 1b09a59a..7ade3fe4 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1584,6 +1584,8 @@ redraw_glx_texture (ScreenInfo *screen_info) glXReleaseTexImageEXT (myScreenGetXDisplay (screen_info), screen_info->glx_drawable, GLX_FRONT_EXT); + glXWaitGL(); + check_gl_error(); } #endif /* HAVE_EPOXY */ -- 2.17.1