Henri Verbeet : wined3d: Preload resources before FBO setup.

Alexandre Julliard julliard at winehq.org
Thu Jul 22 12:09:19 CDT 2010


Module: wine
Branch: master
Commit: 4817a650911d78dd59baf954a65fcc8df124af1f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4817a650911d78dd59baf954a65fcc8df124af1f

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Jul 21 18:48:23 2010 +0200

wined3d: Preload resources before FBO setup.

---

 dlls/wined3d/context.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index fe397dc..435c315 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2110,6 +2110,14 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
     const struct StateEntry *state_table = device->StateTable;
     unsigned int i;
 
+    /* Preload resources before FBO setup. Texture preload in particular may
+     * result in changes to the current FBO, due to using e.g. FBO blits for
+     * updating a resource location. */
+    IWineD3DDeviceImpl_FindTexUnitMap(device);
+    device_preload_textures(device);
+    if (isStateDirty(context, STATE_VDECL))
+        device_update_stream_info(device, context->gl_info);
+
     if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
     {
         context_validate_onscreen_formats(device, context, device->depth_stencil);
@@ -2139,11 +2147,6 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
         device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE);
     }
 
-    IWineD3DDeviceImpl_FindTexUnitMap(device);
-    device_preload_textures(device);
-    if (isStateDirty(context, STATE_VDECL))
-        device_update_stream_info(device, context->gl_info);
-
     ENTER_GL();
     for (i = 0; i < context->numDirtyEntries; ++i)
     {




More information about the wine-cvs mailing list