Henri Verbeet : winex11: Restore the X11DRV_FLUSH_GL_DRAWABLE XFlush() for setups without OML_sync_control.
Alexandre Julliard
julliard at winehq.org
Fri Mar 16 13:53:08 CDT 2018
Module: wine
Branch: master
Commit: 14ec499d5b12ac4a1b1b9e8a316f2a6fc3943a1c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=14ec499d5b12ac4a1b1b9e8a316f2a6fc3943a1c
Author: Henri Verbeet <hverbeet at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 be55371..fc7972c 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 01b92e3..7aa6448 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 abd069e..6781d60 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 */
};
/**************************************************************************
More information about the wine-cvs
mailing list