From 57d158622f6c774549ae3da159117dd85339b68d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 29 Jul 2019 15:14:46 +0430 Subject: [PATCH] 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 Signed-off-by: Alexandre Julliard --- 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 bf0c308f0d3..8603c8de7a0 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) {