Module: wine Branch: master Commit: daf0aeb34a0e34f1a9519bdacff121cd85dced30 URL: http://source.winehq.org/git/wine.git/?a=commit;h=daf0aeb34a0e34f1a9519bdacf...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jan 27 20:19:41 2010 +0100
wined3d: Make sure all contexts are finished drawing before calling SwapBuffers().
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");