Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Fences might not be supported at all.
dlls/wined3d/context_gl.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 2d37e29a655..d40772cbaa0 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -1377,18 +1377,13 @@ static void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl) { /* 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); - } + * is problematic. In particular, we'd end up back here again in the + * process of switching to the newly acquired context. + * + * We have to wait for all pending commands to complete and we might + * not support fences, so we might as well unconditionally + * glFinish(). */ + gl_info->gl_ops.gl.p_glFinish();
if (context_gl->dummy_arbfp_prog) GL_EXTCALL(glDeleteProgramsARB(1, &context_gl->dummy_arbfp_prog));