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>
This commit is contained in:
Matteo Bruni 2015-11-27 20:39:31 +01:00 committed by Alexandre Julliard
parent 7223330ffc
commit 6dd054ca58
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}
}