From ada8ad76b97e7bd2d85d6b943216bc7bc2f58d1c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 7 Dec 2011 22:08:57 +0100 Subject: [PATCH] wined3d: Avoid clearing the current wined3d context in WineD3D_CreateFakeGLContext(). There should be no need to clear the thread's current wined3d context as long as we properly restore the corresponding GL stuff. This avoids hitting the context restore code in context_enter() when we have e.g. two d3d9 devices, one of which is inactive, because now we can see that the GL context that's active belongs to another wined3d context, and we don't need to bother saving and restoring it. --- dlls/wined3d/directx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index ece3b16cab..c2d5c2f56c 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -341,11 +341,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx) } /* Make it the current GL context. */ - if (!context_set_current(NULL)) - { - ERR_(d3d_caps)("Failed to clear current D3D context.\n"); - } - if (!pwglMakeCurrent(ctx->dc, ctx->gl_ctx)) { ERR_(d3d_caps)("Failed to make fake GL context current.\n"); -- 2.32.0.93.g670b81a890