Henri Verbeet : winex11: Restore the X11DRV_FLUSH_GL_DRAWABLE XFlush() for setups without OML_sync_control.
Module: wine Branch: stable Commit: 8b0d595a6043ae96b587e8f6eb5eb4607f1d9aae URL: https://source.winehq.org/git/wine.git/?a=commit;h=8b0d595a6043ae96b587e8f6e... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 16 13:56:28 2018 +0330 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 <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 14ec499d5b12ac4a1b1b9e8a316f2a6fc3943a1c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- 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 e1eb3f8..5cfff58 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 5d98f14..07cfff2 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2041,6 +2041,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 ))) { @@ -2066,6 +2067,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 ))) { @@ -3347,6 +3349,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 0bb5b37..34b6902 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -303,6 +303,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 */ }; /**************************************************************************
participants (1)
-
Alexandre Julliard