Hi Stefan,
On Tuesday 20 July 2010 00:01:13 Stefan Dösinger wrote:
> Am 19.07.2010 um 21:24 schrieb Oldřich Jedlička:
> > Hi Stefan,
> >
> > On Monday 19 July 2010 20:56:35 Stefan Dösinger wrote:
> >> Allowing the creation of the surface is most likely not enough, the
> >> backbuffer has to be useable after it has been created. Specifically,
> >> when the app attaches the backbuffer to the frontbuffer(assuming this
> >> works, needs a test) wined3d has to be made aware of the change -
> >> there's a SetFrontBackBuffers method in the wined3d device to
> >> reconfigure the primary swapchain.
> >
> > There is at least one game verified to work with CreateSurface method
> > that allows creation of back buffers - Bulanci (Combat Pillows, bug
> > #9008). But I have to admit that I don't know the internals of WineD3D,
> > nor DirectX.
>
> You probably get away with not dealing with AddAttachedSurface by luck.
> With the GDI 2D renderer ddraw passes the attached backbuffer explicitly
> to wined3d. With the GL renderer you may not be so lucky because it may
> render to an offscreen texture instead of the backbuffer.
I've analysed the usage by the game and read something about
AddAttachedSurface.
MSDN says that AddAttachedSurface might work, but should not be used on the
flipping chain (i.e. to attach back buffers to front buffers). Thus I think
there
is no change necessary at the moment.
I've downloaded the "bulanci" game (Combat Pillows) and analysed how it is
used. The created BACKBUFFER is always Blt'ed onto the FRONTBUFFER (see
attachment), there is no call to AddAttachedSurface. I don't know if there is
any additional action (=coding) needed.
@all: Can anybody please have look at the attached log snippet if there is
something wrong? It looks to me that everything works. I've used wine with
original patch removing the backbuffer check.
Regards,
Oldrich.
wine: created the configuration directory '/home/oldium/.wine'
trace:ddraw:DllMain (0x7dda0000,1,(nil))
trace:ddraw:DllRegisterServer
trace:ddraw:DllMain (0x7dda0000,0,(nil))
trace:ddraw:DllMain (0x7dd80000,1,(nil))
trace:ddraw:DllRegisterServer
trace:ddraw:DllMain (0x7dd80000,0,(nil))
trace:ddraw:DllMain (0x7daa0000,1,(nil))
trace:ddraw:DllMain (0x7daa0000,0,(nil))
fixme:system:SetProcessDPIAware stub!
fixme:dwmapi:DwmIsCompositionEnabled 0x33d12c
fixme:file:MoveFileWithProgressW MOVEFILE_WRITE_THROUGH unimplemented
fixme:advapi:SetNamedSecurityInfoW L"C:\\windows\\system32\\gecko\\1.0.0\\wine_gecko\\components\\xpti.dat" 1 536870916 (nil) (nil) 0x1b460c (nil)
fixme:iphlpapi:NotifyAddrChange (Handle 0x27be8f8, overlapped 0x27be900): stub
fixme:file:MoveFileWithProgressW MOVEFILE_WRITE_THROUGH unimplemented
fixme:advapi:SetNamedSecurityInfoW L"C:\\windows\\system32\\gecko\\1.0.0\\wine_gecko\\components\\compreg.dat" 1 536870916 (nil) (nil) 0x1e82414 (nil)
wine: configuration in '/home/oldium/.wine' has been updated.
trace:ddraw:DllMain (0x7e6d0000,1,0x1)
trace:ddraw:DirectDrawCreate ((null),0x4be96c,(nil))
trace:ddraw:DDRAW_Create ((null),0x4be96c,(nil))
fixme:win:EnumDisplayDevicesW ((null),0,0x32f620,0x00000000), stub!
trace:ddraw:DDRAW_Create WineD3D created at 0x1256d0
trace:ddraw:device_parent_WineD3DDeviceCreated iface 0x1242ec, device 0x12ba00
trace:ddraw:DDRAW_Create wineD3DDevice created at 0x12ba00
trace:ddraw:IDirectDrawImpl_QueryInterface (0x1242c8)->({6c14db80-a733-11ce-a521-0020af0be560},0x4be96c)
trace:ddraw:IDirectDrawImpl_QueryInterface (0x1242c8) Returning IDirectDraw interface at 0x1242d8
trace:ddraw:IDirectDrawImpl_SetCooperativeLevel (0x1242c8)->(0x30036,00000011)
trace:ddraw:DDRAW_dump_cooperativelevel - DDSCL_FULLSCREEN DDSCL_EXCLUSIVE
trace:ddraw:IDirectDrawImpl_SetCooperativeLevel SetCooperativeLevel retuning DD_OK
fixme:mixer:ALSA_MixerInit No master control found on HDA ATI HDMI, disabling mixer
fixme:mixer:ALSA_MixerInit No master control found on SAA7134, disabling mixer
err:alsa:ALSA_CheckSetVolume Could not find 'PCM Playback Volume' element
fixme:dsalsa:IDsDriverBufferImpl_SetVolumePan (0x135de8,0x135d48): stub
trace:ddraw:IDirectDrawImpl_SetDisplayModeNoOverride (0x1242c8)->(800,600,32,0,0): Relay!
trace:ddraw:IDirectDrawImpl_CreateSurface (0x1242c8)->(0x32fbd8,0x32fbb0,(nil))
trace:ddraw:IDirectDrawImpl_CreateSurface (0x1242c8) Requesting surface desc :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_PRIMARYSURFACE
trace:ddraw:PixelFormat_WineD3DtoDD Converting WINED3DFORMAT 115 to DDRAW
trace:ddraw:PixelFormat_WineD3DtoDD Returning: ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawImpl_CreateNewSurface (0x1242c8) Requesting surface desc :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_FRONTBUFFER DDSCAPS_PRIMARYSURFACE
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawImpl_CreateNewSurface (0x1242c8) Choosing GDI surfaces for 2D rendering
trace:ddraw:PixelFormat_DD2WineD3D Convert a DirectDraw Pixelformat to a WineD3D Pixelformat
trace:ddraw:DDRAW_dump_pixelformat ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawImpl_CreateNewSurface 0x161800->version = 7
trace:ddraw:IDirectDrawImpl_CreateNewSurface (0x1242c8) Created IDirectDrawSurface implementation structure at 0x161800
trace:ddraw:PixelFormat_WineD3DtoDD Converting WINED3DFORMAT 115 to DDRAW
trace:ddraw:PixelFormat_WineD3DtoDD Returning: ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:PixelFormat_DD2WineD3D Convert a DirectDraw Pixelformat to a WineD3D Pixelformat
trace:ddraw:DDRAW_dump_pixelformat ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:device_parent_CreateSwapChain iface 0x1242ec, present_parameters 0x32fb20, swapchain 0x32f9bc
trace:ddraw:device_parent_CreateRenderTarget iface 0x1242ec, superior 0x161e38, width 800, height 600, format 0x73, multisample_type 0,
multisample_quality 0, lockable 1, surface 0x161e64
trace:ddraw:device_parent_CreateRenderTarget Returning wineD3DSurface 0x1618f8, it belongs to surface 0x161800
trace:ddraw:IDirectDrawImpl_AddRef (0x1242c8) : incrementing IDirectDraw7 refcount from 0.
trace:ddraw:IDirectDrawImpl_Release (0x1242c8)->() decrementing IDirectDraw7 refcount from 1.
trace:ddraw:IDirectDrawImpl_CreateSurface (0x1242c8)->(0x32fbd0,0x32fba8,(nil))
trace:ddraw:IDirectDrawImpl_CreateSurface (0x1242c8) Requesting surface desc :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:PixelFormat_WineD3DtoDD Converting WINED3DFORMAT 115 to DDRAW
trace:ddraw:PixelFormat_WineD3DtoDD Returning: ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawImpl_CreateNewSurface (0x1242c8) Requesting surface desc :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:PixelFormat_DD2WineD3D Convert a DirectDraw Pixelformat to a WineD3D Pixelformat
trace:ddraw:DDRAW_dump_pixelformat ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawImpl_CreateNewSurface 0x162590->version = 7
trace:ddraw:IDirectDrawImpl_CreateNewSurface (0x1242c8) Created IDirectDrawSurface implementation structure at 0x162590
trace:ddraw:PixelFormat_WineD3DtoDD Converting WINED3DFORMAT 115 to DDRAW
trace:ddraw:PixelFormat_WineD3DtoDD Returning: ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawImpl_AddRef (0x1242c8) : incrementing IDirectDraw7 refcount from 0.
trace:ddraw:IDirectDrawImpl_Release (0x1242c8)->() decrementing IDirectDraw7 refcount from 1.
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fbdc,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09260,0x162590,0xc09260,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09250,0x162590,0xc09250,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09240,0x162590,0xc09240,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09230,0x162590,0xc09230,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09220,0x162590,0xc09220,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09230,0x162590,0xc09230,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09220,0x162590,0xc09220,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09230,0x162590,0xc09230,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09220,0x162590,0xc09220,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09230,0x162590,0xc09230,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09220,0x162590,0xc09220,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock (0x162590)->((nil),0x32fae0,1,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Lock locked surface returning description :
trace:ddraw:DDRAW_dump_members - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM
trace:ddraw:DDRAW_dump_members - DDSD_HEIGHT : 600
trace:ddraw:DDRAW_dump_members - DDSD_WIDTH : 800
trace:ddraw:DDRAW_dump_members - DDSD_PITCH : 3200
trace:ddraw:DDRAW_dump_members - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 32, R 00ff0000 G 0000ff00 B 000000ff)
trace:ddraw:IDirectDrawSurfaceImpl_Unlock (0x162590)->((nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09230,0x162590,0xc09230,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09220,0x162590,0xc09220,1000000,(nil))
trace:ddraw:IDirectDrawSurfaceImpl_Blt (0x161800)->(0xc09210,0x162590,0xc09210,1000000,(nil))