wined3d: Setup target if offscreen rendering setting changed.
Matteo Bruni
matteo.mystral at gmail.com
Sat Jul 24 10:48:21 CDT 2010
Setting context->current_rt = NULL is not enough as it affects only
the current context.
-------------- next part --------------
From 2352820d906b82dda1f293e67572037f620ca87e Mon Sep 17 00:00:00 2001
From: Matteo Bruni <matteo.mystral at gmail.com>
Date: Mon, 28 Jun 2010 21:13:56 +0200
Subject: wined3d: Setup target if offscreen rendering setting changed.
---
dlls/wined3d/context.c | 2 +-
dlls/wined3d/swapchain.c | 3 ---
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 48da3ce..53a852f 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2204,8 +2204,8 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
const struct StateEntry *StateTable = device->StateTable;
if (!target) return;
- else if (context->current_rt == target) return;
render_offscreen = surface_is_offscreen(target);
+ if (context->current_rt == target && render_offscreen == old_render_offscreen) return;
context_set_render_offscreen(context, StateTable, render_offscreen);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 87db680..f7b7232 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -334,9 +334,6 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
surface_load_location(This->back_buffers[0], SFLAG_INTEXTURE, NULL);
surface_modify_location(This->back_buffers[0], SFLAG_INDRAWABLE, FALSE);
This->render_to_fbo = TRUE;
-
- /* Force the context manager to update the render target configuration next draw. */
- context->current_rt = NULL;
}
if(This->render_to_fbo)
--
1.7.1
More information about the wine-patches
mailing list