Matteo Bruni : wined3d: Remove isInDraw hack from context_setup_target.

Alexandre Julliard julliard at winehq.org
Mon Aug 16 12:25:07 CDT 2010


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

Author: Matteo Bruni <matteo.mystral at gmail.com>
Date:   Sat Aug  7 22:37:11 2010 +0200

wined3d: Remove isInDraw hack from context_setup_target.

It is conceptually wrong and actually broken too (as the comment there
said). Just remove the hack now and properly fix any regression that
may come up later by explicitely acquiring the right context where
needed (so, in surface_internal_preload and its callees).

---

 dlls/wined3d/context.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 72b84c9..d7f2cf3 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2321,19 +2321,6 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
         if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
                 && old_render_offscreen && context->current_rt != target)
         {
-            BOOL oldInDraw = device->isInDraw;
-
-            /* surface_internal_preload() requires a context to load the
-             * texture, so it will call context_acquire(). Set isInDraw to true
-             * to signal surface_internal_preload() that it has a context. */
-
-            /* FIXME: This is just broken. There's no guarantee whatsoever
-             * that the currently active context, if any, is appropriate for
-             * reading back the render target. We should probably call
-             * context_set_current(context) here and then rely on
-             * context_acquire() doing the right thing. */
-            device->isInDraw = TRUE;
-
             /* Read the back buffer of the old drawable into the destination texture. */
             if (context->current_rt->texture_name_srgb)
             {
@@ -2345,8 +2332,6 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
             }
 
             surface_modify_location(context->current_rt, SFLAG_INDRAWABLE, FALSE);
-
-            device->isInDraw = oldInDraw;
         }
     }
 




More information about the wine-cvs mailing list