Module: wine Branch: master Commit: 6dd054ca587b1d95c324c10383f1f81155ed9ffb URL: http://source.winehq.org/git/wine.git/?a=commit;h=6dd054ca587b1d95c324c10383...
Author: Matteo Bruni mbruni@codeweavers.com Date: Fri Nov 27 20:39:31 2015 +0100
wined3d: Flush the GL context before switching away from it.
We might end up not using the old context anymore after that and the GL implementation is allowed to delay executing commands indefinitely if we don't flush.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/context.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 0e8b32b..5eeccab 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1129,6 +1129,11 @@ BOOL context_set_current(struct wined3d_context *ctx) } else { + if (wglGetCurrentContext()) + { + TRACE("Flushing context %p before switching to %p.\n", old, ctx); + glFlush(); + } old->current = 0; } }