[PATCH] wined3d: Display state in state_undefined

Christian Costa titan.costa at wanadoo.fr
Tue Feb 16 14:55:37 CST 2010

Henri Verbeet a écrit :
> On 16 February 2010 19:32, Christian Costa <titan.costa at wanadoo.fr> wrote:
>> So we should never enter this function at all. Right ?
> Yes.
>> And what do you mean by "something is broken" ? Are you talking about
>> wined3d code ?
> It means there's code that marks a state dirty that doesn't exist.
> Typically that's because the code doing that should check some limit
> or if certain features are available.
>> That said I don't understand why we should not display the state. The fact
>> is we entered this code
>> and it seems, according to you, that knowing the state which produces the
>> error message makes the difference.
> Yes, but you can't check that here, the state is always 0. You should
> check "rep" for zero in IWineD3DDeviceImpl_MarkStateDirty() and
> Context_MarkStateDirty(), and get a backtrace if it is. I.e.,
> something like the attached patch. We can't add DebugBreak()'s like
> that to wined3d, and often the error is mostly harmless, but I've been
> thinking about adding extra validation code like that for e.g. the
> state table and locking behind some debugging define in order to share
> debugging/validation code.
That's clearer. Thanks.
I've just tested your patch. The incriminated state is 
I haven't investigated much though...

More information about the wine-devel mailing list