Hi all,
I've made one discovery - the explicit BACKBUFFER creation (as shown in logs) works only for IID_IDirectDraw interface, not for any newer (on my Windows XP). I will do some more testing, add tests into a separate patch and send it afterwards.
Regards, Oldrich.
On Wednesday 21 July 2010 20:51:49 Oldřich Jedlička wrote:
Hi Oldřich,
Not to discourage you, but in Wine tests serve as proof to show that a patch is right, so you should first get all the tests you want in. The bug should be fixed afterward. It is likely that the test will reveal new issues.
Like I mentioned yesterday, checking memory location related capabilities in the surface descriptor of the created surface might be useful. For instance It might show that a standalone backbuffer is not created in video memory. If that's the case then it is something different from a backbuffer on the swapchain.
Roderick
2010/7/21 Oldřich Jedlička oldium.pro@seznam.cz:
Hi Roderick,
On Thursday 22 July 2010 00:23:46 Roderick Colenbrander wrote:
No problem. I've started with this implementation to test if the game works and to check if the way how I've fixed it can be done that way according to wine developpers. That would be no fun otherwise.
So if you have nothing against the way how the patch tries to fix the BACKBUFFER creation, we can focus more on the background (see if the fix is sufficient).
The function GetSurfaceDesc for DDSCAPS_BACKBUFFER-only surface on Windows XP SP3 returns
DDSCAPS_BACKBUFFER | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM
This conforms to logic in method ddraw_create_surface that adds the two flags if they are missing.
I have prepared one test on which I tried the DirectX CreateSurface logic specifically for BACKBUFFERs on different DirectX interface versions. I used similar commands as in SurfaceCapsTest() in ddraw/tests/dsurface.c.
Is there something more you see that needs tests to verify if it is the same as on Windows? As I wrote I'm a newbie in the DirectX programming, so I will definitely need some help.
This is the only thing that blocks the game from running, so from the bug perspective only the CreateSurface for DirectX1 interface needs fixing, because the other operation - blitting - works (and other flip-chain modification methods are not used and are unsupported on DirectX anyway).
When I have the CreateSurface test ready with all the DirectX interface versions, I will send it. There is also more to fix - the usage of SURFACEDESC and SURFACEDESC2. Windows don't accept the former version on the newer interfaces.
For now it looks I will send 4 patches: CreateSurface BACKBUFFER tests as the first one; tests of usage of SURFACEDESC/2 as the second one; fix of BACKBUFFER creation as third; added checking of surface descriptor in CreateSurface as the last one.
Cheers, Oldrich.