From: Matteo Bruni mbruni@codeweavers.com
Acquiring a GL context might be problematic during teardown (e.g. the CS thread might end up running this code after wined3d_device_uninit_3d() has already completed and device->swapchains has become NULL). --- dlls/wined3d/context_gl.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 7bb2ca910d3..b1f217b4e50 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -1391,23 +1391,7 @@ static void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl)
if (context_gl->valid) { - /* 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 fences aren't supported there should be nothing to wait for - * anyway, so just do nothing in that case. */ - if (context_gl->c.destroyed) - { - gl_info->gl_ops.gl.p_glFinish(); - } - else if (context_gl->c.d3d_info->fences) - { - 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); - } + gl_info->gl_ops.gl.p_glFinish();
if (context_gl->dummy_arbfp_prog) GL_EXTCALL(glDeleteProgramsARB(1, &context_gl->dummy_arbfp_prog));