Commit 3cc81475 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use glFinish() for synchronisation when cleaning up a destroyed context…

wined3d: Use glFinish() for synchronisation when cleaning up a destroyed context in wined3d_context_gl_cleanup(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50485Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 96fdbabc
......@@ -1374,9 +1374,20 @@ static void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl)
if (context_gl->valid)
{
wined3d_context_gl_submit_command_fence(context_gl);
wined3d_context_gl_wait_command_fence(context_gl,
wined3d_device_gl(context_gl->c.device)->current_fence_id - 1);
/* If we're here because we're switching away from a previously
* destroyed context, acquiring a context in order to submit a fence
* is problematic. (In particular, we'd end up back here again in the
* process of switching to the newly acquired context.) */
if (context_gl->c.destroyed)
{
gl_info->gl_ops.gl.p_glFinish();
}
else
{
wined3d_context_gl_submit_command_fence(context_gl);
wined3d_context_gl_wait_command_fence(context_gl,
wined3d_device_gl(context_gl->c.device)->current_fence_id - 1);
}
if (context_gl->dummy_arbfp_prog)
GL_EXTCALL(glDeleteProgramsARB(1, &context_gl->dummy_arbfp_prog));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment