Vitaliy Margolen wine-devel at
Thu Jul 24 17:48:28 CDT 2008

H. Verbeet wrote:
> 2008/7/24 Vitaliy Margolen <wine-devel at>:
>>>> side affects. But the full version of Psychonauts crashes after initial
>>>> videos. Same as it did when we had problems with multi-threaded games.
>>> Is that a regression introduced by the patch?
>> Yes. Without the patch everything works. With the patch it crashes.
> It's a bit unfortunate that it only happens in the full version. Have
> you got any idea which part of that patch is causing the crash? Is it
> the Clear call again? In the original case it was pretty clear that
> calling apply_fbo_state() without activating the context for the
> current thread caused issues, but as far as I can see that part should
> still work correctly with my patch.

It's this part:

diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 9a47f8b..f2ab699 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -974,6 +974,7 @@ void drawPrimitive(IWineD3DDevice *iface,

      /* Signals other modules that a drawing is in progress and the 
stateblock finalized */
      This->isInDraw = TRUE;
+    ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM);

      /* Ok, we will be updating the screen from here onwards so grab the 
lock */

@@ -983,7 +984,6 @@ void drawPrimitive(IWineD3DDevice *iface,

-    ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM);

      if (This->stencilBufferTarget) {

More information about the wine-devel mailing list