From 14ec499d5b12ac4a1b1b9e8a316f2a6fc3943a1c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 16 Mar 2018 13:38:28 +0330 Subject: [PATCH] winex11: Restore the X11DRV_FLUSH_GL_DRAWABLE XFlush() for setups without OML_sync_control. This was removed in e75bc6228ebcbdc1a3877a6ac6954611dedf8a71, but appears to mitigate lack of OML_sync_control in at least some setups. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/init.c | 1 + dlls/winex11.drv/opengl.c | 3 +++ dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 5 insertions(+) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index be5537127a2..fc7972c62fe 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -259,6 +259,7 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d RECT rect = physDev->dc_rect; OffsetRect( &rect, -physDev->dc_rect.left, -physDev->dc_rect.top ); + if (data->flush) XFlush( gdi_display ); XSetFunction( gdi_display, physDev->gc, GXcopy ); XCopyArea( gdi_display, data->gl_drawable, physDev->drawable, physDev->gc, 0, 0, rect.right, rect.bottom, diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 01b92e3a099..7aa6448fedb 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1976,6 +1976,7 @@ static void wglFinish(void) escape.code = X11DRV_FLUSH_GL_DRAWABLE; escape.gl_drawable = 0; + escape.flush = FALSE; if ((gl = get_gl_drawable( WindowFromDC( ctx->hdc ), 0 ))) { @@ -2001,6 +2002,7 @@ static void wglFlush(void) escape.code = X11DRV_FLUSH_GL_DRAWABLE; escape.gl_drawable = 0; + escape.flush = FALSE; if ((gl = get_gl_drawable( WindowFromDC( ctx->hdc ), 0 ))) { @@ -3286,6 +3288,7 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) escape.code = X11DRV_FLUSH_GL_DRAWABLE; escape.gl_drawable = 0; + escape.flush = !pglXWaitForSbcOML; if (!(gl = get_gl_drawable( WindowFromDC( hdc ), hdc ))) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index abd069e1b42..6781d6073a7 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -304,6 +304,7 @@ struct x11drv_escape_flush_gl_drawable { enum x11drv_escape_codes code; /* escape code (X11DRV_FLUSH_GL_DRAWABLE) */ Drawable gl_drawable; /* GL drawable */ + BOOL flush; /* flush X11 before copying */ }; /************************************************************************** -- 2.11.4.GIT