http://bugs.winehq.org/show_bug.cgi?id=14666
--- Comment #12 from Tobias Jakobi liquid.acid@gmx.net 2008-07-28 04:19:56 --- (In reply to comment #11)
I think this is better handled on wine-devel, but I am not sure about the policies.
I posted it here to have a central place where to put unfinished patches and ideas. Having this on wine-devel wasn't an option for me since things there get a bit "deorganized" quickly :) I hope the others don't mind if I post this here. If all of the locking stuff is fixed I'm going to close this one.
Anyway, my primary motivation is a bunch of FIXME warnings from IWineD3DVolumeImpl_LockBox (in wined3d/volume.c) that shows up when starting Portal. When all is fixed I would like to have these removed :)
I'd recommend you to get the tests in first(with todo_wine markers for failing tests). The tests look pretty good to me, just that you should use the return value you got from D3D for error handling, not the expected value. E.g.
hr = Volume_Lock(vol); ok(hr == expected, ...); if(expected) { <--- Change this to hr unlock(); }
Sure, I use this approach then.
Once you have the volume tests in, you can port them over to textures and cubetextures, and probably plain surfaces, and then port the texture and cubetexture tests to ddraw to see how things work there. Once we know how ddraw behaves we can make a more solid decision how to implement the behavior properly in wine.
OK, the reason I wanted to fix this first was that prefixing failing tests with todo_wine was kinda impractical because of the BOOL array structures in my test. Maybe I drop them to get a cleaner test implementation.
So the plan is to finish/clean up the tests for volume creation and locking, both for d3d8 and v9 and then doing similar stuff for tex and cubtex (also for both d3d8 and v9, still have to check if <=7 has cubtex support), right?
If I wanna port everything that is supported over to ddraw, do I also have to differentiate between all the older d3d versions? Like separate tests for v1,2,3,4,5,6,7? Or can I build a generic test?
Cheers, Tobias