glXSwapBuffers() is translated internally into glXSwapBuffersMsc() with a target and divisor of 0.
https://www.opengl.org/registry/specs/OML/glx_sync_control.txt "If <divisor> = 0, the swap will occur when MSC becomes greater than or equal to <target_msc>." It does not require waiting until the next MSC, which is the commonly expected behaviour of apps using glXSwapBuffers() when not overriding the vblank_mode / swap_interval. To force the frame to be displayed on the next vblank, we want to pass divisor 1 to the backend. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Adam Jackson <a...@redhat.com> --- src/glx/glxcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 6abe0b9..4e3f3f5 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -840,7 +840,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable) if (pdraw != NULL) { Bool flush = gc != &dummyContext && drawable == gc->currentDrawable; - (*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 0, 0, flush); + (*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 1, 0, flush); return; } } -- 2.10.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev