[PATCH 0/1] MR9738: win32u: Remove unnecessary drawable flush in context_sync_drawables.
This fixes sluggish rendering of Steam and other CEF based applications, as wined3d calls wglMakeCurrent with possibly already active surface every time it tries to activate a context. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9738
From: Rémi Bernon <rbernon@codeweavers.com> This fixes sluggish rendering of Steam and other CEF based applications, as wined3d calls wglMakeCurrent with possibly already active surface every time it tries to activate a context. --- dlls/win32u/opengl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 60349f8eace..bdcf0ff1743 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -1711,12 +1711,13 @@ static BOOL context_sync_drawables( struct wgl_context *context, HDC draw_hdc, H opengl_drawable_set_context( new_read, context ); if (new_read != new_draw) opengl_drawable_set_context( new_draw, context ); + + opengl_drawable_flush( new_read, new_read->interval, 0 ); + opengl_drawable_flush( new_draw, new_draw->interval, 0 ); } if (ret) { - opengl_drawable_flush( new_read, new_read->interval, 0 ); - opengl_drawable_flush( new_draw, new_draw->interval, 0 ); /* update the current window drawable to the last used draw surface */ if (new_draw->client) set_window_opengl_drawable( new_draw->client->hwnd, new_draw, TRUE ); context_exchange_drawables( context, &new_draw, &new_read ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9738
participants (2)
-
Rémi Bernon -
Rémi Bernon (@rbernon)