[d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem
Oliver Stieber
oliver_stieber at yahoo.co.uk
Tue Feb 1 01:05:12 CST 2005
>
> Maybe. I got pirates partially to work. The intro
> at loading plays,
> after the Atari logo, it then crashes:
>
>
fixme:d3d:IDirect3DDevice9Impl_CreateDepthStencilSurface
> (0x403ac0f0) : stub
>
fixme:d3d:IDirect3DDevice9Impl_CreateDepthStencilSurface
> (0x403ac0f0) : stub
> wine: Unhandled exception (thread 0009), starting
> debugger...
> WineDbg starting on pid 0x8
> Unhandled exception: page fault on read access to
> 0x00000001 in 32-bit
> code (0x4a1a5b30).
> In 32 bit mode.
> Register dump:
> CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:0000
> EIP:4a1a5b30 ESP:4068fc40 EBP:4068fd1c
> EFLAGS:00010202( - 00 - -RI1)
> EAX:4042c688 EBX:4a1cc32c ECX:403abe40 EDX:00000001
> ESI:403ec588 EDI:00000000
> Stack dump:
> 0x4068fc40: 00000001 00007eac 00000002 00000000
> 0x4068fc50: 7a7d2ba0 0000000c 00000002 00000000
> 0x4068fc60: 00000000 00000000 00000000 00000000
> 0x4068fc70: 00000000 00000000 00000000 00000000
> 0x4068fc80: 00000000 00000000 00000000 00000000
> 0x4068fc90: 00000000 00000000 00000000 00000000
> Backtrace:
> =>1 0x4a1a5b30 drawPrimitive+0x230(iface=0x403ec588,
> PrimitiveType=0x6, NumPrimitives=0x2,
> StartVertexIndex=0x0,
> StartIdx=0xffffffff, idxSize=0x0, idxData=0x0,
> minIndex=0x0)
> [drawprim.c:1582] in wined3d (0x4068fd1c)
> 2 0x4a19dc57
>
IWineD3DDeviceImpl_DrawPrimitive+0x47(iface=0x403ec588,
> PrimitiveType=0x6, StartVertex=0x0,
> PrimitiveCount=0x2)
> [/home/jesse/wine-printf/dlls/wined3d/device.c:3504]
> in wined3d
> (0x4068fd50)
> 3 0x4a0244ee
>
IDirect3DDevice9Impl_DrawPrimitive+0x1e(iface=0x403ac0f0,
> PrimitiveType=0x6, StartVertex=0x0,
> PrimitiveCount=0x2)
> [/home/jesse/wine-printf/dlls/d3d9/device.c:579] in
> d3d9 (0x4068fd68)
> 4 0x005c1ac0 in pirates! (+0x1c1ac0) (0x00000000)
> 0x4a1a5b30 drawPrimitive+0x230 [drawprim.c:1582] in
> wined3d: movl
> 0x0(%edx),%eax
> Unable to open file drawprim.c
> Wine-dbg>
>
> Since I had to hack wine to get it to run to this
> degree, here are the
> patches I tried out:
>
> d3d9_device.diff
> printf.diff
> printf_compare_warn.diff
> wined3d_vb_begin.diff
>
> By Oliver:
> wined3d_guids_01_os.diff
> wined3d_guids__newfiles_01_os.diff (slight fix to
> get this to compile)
>
> I'm not sure if I need an older patch of his.
>
> I also hacked dlls/wined3d/surface.c
> IWineD3DSurfaceImpl_UnlockRect() here:
>
> break;
> case D3DFMT_A8R8G8B8:
> case D3DFMT_X8R8G8B8:
> {
>
> The game calls the function with D3DFMT_X8R8G8B8. I
> think it could
> work like case D3DFMT_A8R8G8B8 since it's padded the
> same =) -- just
> without alpha -- and seemed to thus far. It allowed
> me to see the
> intro.
>
> Jesse
>
I tried that and it seems to be fine, but the intro's
crash a lot more now :(
In wined3d_private.h search for anything that
allocates and array HIGHEST_RENDER_STATE in size and
change it to HIGHEST_RENDER_STATE + 1 since were
addressing 1 based not 0 based.
Do the same with HIGHEST_TRANSFORMSTATE,
HIGHEST_TEXTURE_STATE and HIGHEST_SAMPLER_STATE.
I've done a tone of debugging and to be honest the
first patch was a lot buggier than I thought, but then
I had been doing a 18hrs 7days a week on it, so it's
not supprsing.
Anyhow, I've more or less put in the other 80% of the
effort and a lot more apps are running without any
crash bugs things there's still a few issues that need
to sorted out before patches can go into CVS, mainly
where to put GUIDS.
I'm putting a new big patch up against head as soon as
I've done a cvs update, ./configure etc... and some
regression.
The big patch won't be CVS worthy but it will have
things like non-power-2 textures if anyone wants to do
some testing since I've only tested against an ATI
9600.
>
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
More information about the wine-devel
mailing list