[d3d8] Wine device tests fixes (Part 3)
Based on #4332, trying to fix some more low-hanging Wine tests, after which I'll call it a day probably.
So far:
- fixed error return codes for GetPrivateData and added size validation for SetPrivateData
- In D3D8, a call to BeginStateBlock() must be ended with EndStateBlock(); all other state block related calls will fail while recording via BeginStateBlock()
- added various present parameter validations on device creation and reset
- added D3DERR_INVALIDCALL return code for various calls with D3DFMT_UNKNOWN
- stripped some stray d3d9 caps from the d3d8 caps
- GetInfo/Query error code adjustments
- added various usage and pool validations for index and vertex buffers on creation
- prevent calls to MultiplyTransform() to be captured in state blocks when in D3D8 compatibility mode (yeah, don't ask, but I've checked and indeed seems to behave this way).
As an indication of progress:
Current master (once #4332 is merged):
-- D3D8: 0020:device: 51131 tests executed (34 marked as todo, 0 as flaky, 822 failures), 1 skipped.
-- D3D9: 0020:device: 155132 tests executed (78 marked as todo, 0 as flaky, 1802 failures), 6 skipped.
This PR:
-- D3D8: 0020:device: 50755 tests executed (34 marked as todo, 0 as flaky, 690 failures), 1 skipped.
-- D3D9: 0020:device: 154686 tests executed (78 marked as todo, 0 as flaky, 1690 failures), 6 skipped.
Alright, also done on this one. Seems fine now on initial tests. I'll wait on #4332 until I give it the full game prefix test treatment.
Tested with 250+ d3d8 and d3d9 titles. Apart from a minor regression hiccup with RC Cars, which uses D3DSWAPEFFECT_COPY_VSYNC with 3 back buffers, all was good.
I've decided to let the game do its thing and not enforce the maximum one buffer limit with D3DSWAPEFFECT_COPY_VSYNC, even though Windows XP and WineD3D both seem to validate it, and yes, the game indeed doesn't work with WineD3D because of it.