[3/4] d3d9/tests: Test partial block locks

Stefan Dösinger stefandoesinger at gmx.at
Mon Oct 31 21:13:27 CDT 2011

On Monday 31 October 2011 21:10:41 Henri Verbeet wrote:
> On 31 October 2011 20:03, Stefan Dösinger <stefan at codeweavers.com> wrote:
> > +                case D3DPOOL_SCRATCH:
> > +                case D3DPOOL_SYSTEMMEM:
> > +                    hr =
> > IDirect3DDevice9_CreateOffscreenPlainSurface(device, 128, 128,
> > formats[i].fmt, +                            D3DPOOL_SCRATCH, &surface,
> > 0);
> That doesn't really test D3DPOOL_SYSTEMMEM.
That was a pretty simple change, but when I re-ran the tests on Windows to be 
sure they work the ATI2N test failed.

On Nvidia drivers ATI2N has 4x4 blocks, which makes sense, but if you violate 
that the driver returns E_INVALIDARG instead of D3DERR_INVALIDCALL. Oh well. 
On AMD, ATI2N has 2x2 blocks, which doesn't make sense to me. When I ran the 
tests on Windows the last time the 1x1 "blocks" locked fine. I couldn't 
reproduce that even with the last version of my patch.

I've changed the test and implementation according to those results, but 
before I resubmit them I'll test a few more Windows machines(especially dx9 
and xp based ones).

What's changed:
*) block_size removed, this was unused
*) Improved messages, print the pool
*) Use block_dimensions / 2 instead of block_dimensions - 1 to construct 
invalid blocks.
*) Adjusted test to 2x2 / 4x4 ATI2N block sizes 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-d3d9-tests-Test-partial-block-locks.patch
Type: text/x-patch
Size: 8950 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20111101/284b366f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20111101/284b366f/attachment.pgp>

More information about the wine-devel mailing list