Commit 57d15862 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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 64d41b3d. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 0b66af67
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment