Module: wine
Branch: master
Commit: 57d158622f6c774549ae3da159117dd85339b68d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=57d158622f6c774549ae3da1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Mon Jul 29 15:32:46 2019 +0430
wined3d: Acquire a context for the front buffer in swapchain_gl_present().
Since context_acquire() doesn't take the resource location into account, it
may consider the back-buffer to be offscreen, and return an already active
context for a different swapchain. This fixes a regression introduced by
commit 64d41b3dec0635c56268be64d407ed9bfd8c0695.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/wined3d/swapchain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index bf0c308..8603c8d 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -434,7 +434,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
struct wined3d_context *context;
BOOL render_to_fbo;
- context = context_acquire(swapchain->device, back_buffer, 0);
+ context = context_acquire(swapchain->device, swapchain->front_buffer, 0);
context_gl = wined3d_context_gl(context);
if (!context_gl->valid)
{