Module: wine Branch: master Commit: 147f9341031b7a808d18a2d3545e19fdd2c7c92a URL: http://source.winehq.org/git/wine.git/?a=commit;h=147f9341031b7a808d18a2d354...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jul 12 18:42:29 2017 +0200
winex11: Only use glXSwapBuffersMscOML() for child windows.
The notion that glXSwapBuffersMscOML() with 0/0/0 target_msc/divisor/remainder is supposed to behave like glXSwapBuffers() with respect to the swap interval turns out to have been a misconception on my behalf, the extension spec doesn't actually say that. Adding to the confusion is the fact that some drivers do in fact behave like that in practice. It's possible to make glXSwapBuffersMscOML() use the proper swap interval, but it's much easier to just use glXSwapBuffers() instead. One consequence of the approach taken in this patch is that child window buffer swaps aren't necessarily synchronised to vblank, but ultimately that's up to X11DRV_FLUSH_GL_DRAWABLE, not the buffer swap. This fixes a regression introduced by commit e75bc6228ebcbdc1a3877a6ac6954611dedf8a71.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winex11.drv/opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 28f033d..5eb70a8 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3356,7 +3356,7 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc ) escape.gl_drawable = gl->window; /* fall through */ default: - if (pglXSwapBuffersMscOML) + if (escape.gl_drawable && pglXSwapBuffersMscOML) { pglFlush(); target_sbc = pglXSwapBuffersMscOML( gdi_display, gl->drawable, 0, 0, 0 );