[PATCH 4/5] wined3d: Make sure all contexts are finished drawing before calling SwapBuffers().

Henri Verbeet hverbeet at codeweavers.com
Wed Jan 27 13:19:41 CST 2010


This causes a small performance hit when multiple GL contexts are used. As an
optimization we could use ARB_sync to only wait for the last draw call instead
of all GL commands.
---
 dlls/wined3d/swapchain.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 434eb3f..6b44cd5 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -343,6 +343,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
         swapchain_blit(This, context, &src_rect, &dst_rect);
     }
 
+    if (This->num_contexts > 1) wglFinish();
     SwapBuffers(This->context[0]->hdc); /* TODO: cycle through the swapchain buffers */
 
     TRACE("SwapBuffers called, Starting new frame\n");
-- 
1.6.4.4




More information about the wine-patches mailing list