GL_INVALID_ENUM errors with FBO

Vitaliy Margolen wine-devel at kievinfo.com
Fri Jul 25 08:20:37 CDT 2008


Vitaliy Margolen wrote:
> H. Verbeet wrote:
>> 2008/7/24 Vitaliy Margolen <wine-devel at kievinfo.com>:
>>>>> 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,
>           LEAVE_GL();
>       }
> 
> -    ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM);
>       ENTER_GL();
> 
>       if (This->stencilBufferTarget) {
> 
> 

BTW this is a driver crash in libglcore.so with what appears to be a 
null-pointer dereference. I'm trying to play with your code to see how to 
"fix" it.

Vitaliy.



More information about the wine-devel mailing list