[PATCH 1/5] wined3d: Acquire a context for the front buffer in swapchain_gl_present().

Henri Verbeet hverbeet at codeweavers.com
Mon Jul 29 05:44:46 CDT 2019


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 at codeweavers.com>
---
 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)
     {
-- 
2.11.0




More information about the wine-devel mailing list