[d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

Jesse Allen the3dfxdude at gmail.com
Mon Jan 31 16:26:55 CST 2005

On Mon, 31 Jan 2005 21:47:44 -0000, Ann and Jason Edmeades
<us at the-edmeades.demon.co.uk> wrote:
> Well yes and no. The 'problem' is most of this code isn't implemented yet...
> Try Olivers large patch and see if things are any better, or wait a while
> while a whole load of code gets into cvs. Basically d3d9 shouldn't have any
> of the code relating to the stencil buffers - that will be in wine3d. I am
> pretty certain Olivers patch did that, and he is working on splitting it up
> to get cvs in sync with his local tree.

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
=>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
  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     
Unable to open file drawprim.c

Since I had to hack wine to get it to run to this degree, here are the
patches I tried out:


By Oliver:
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:

            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


More information about the wine-devel mailing list