http://bugs.winehq.org/show_bug.cgi?id=24249
--- Comment #2 from Rico kgbricola@web.de 2010-09-03 09:38:54 CDT --- Created an attachment (id=30530) --> (http://bugs.winehq.org/attachment.cgi?id=30530) Add argument check for the type in IDirect3DDevice8Impl_GetTextureStageState.
Does the attached patch help?
The game somehow queries all values for the Type(also not available ones) from 0 to 32 in IDirect3DDevice8::GetTextureStageState(), which seems a bit strange.
The problem is that the tss_lookup table has only 29 entries, which returns random memory (or an access violation) in cases where the index >= table size. The patch prevents this.
There might be another problem when WINED3DTSS_FORCE_DWORD is triggered (e.g. Type == 0). So it could happen that there is also an access violation on read access.