On 18 October 2011 12:43, Stefan Dösinger stefan@codeweavers.com wrote:
Changes: Check for dynamic texture support, moved the format-specific tests to this patch.
That's not really what I meant with "make this part of the test in patch 3/7". The point is that test_lockrect_offset() is about the offset calculation, not so much about what valid rectangles for block based formats are. And it probably wouldn't hurt to run test_partial_block_lock() on the other formats like e.g. ATI2N anyway.
On Tuesday 18 October 2011 17:37:09 Henri Verbeet wrote:
That's not really what I meant with "make this part of the test in patch 3/7". The point is that test_lockrect_offset() is about the offset calculation, not so much about what valid rectangles for block based formats are. And it probably wouldn't hurt to run test_partial_block_lock() on the other formats like e.g. ATI2N anyway.
I felt that merging the tests to test all format and pool combinations would cause needlessly complicated code because some format-pool combinations require surfaces, some require dynamic textures, some require normal textures and some are unsupported. That's why I introduced the new test that loops only over the pools.
On the other hand we may at some point care about the offset returned by a allowed partial block lock, which is why putting the per-format test in test_partial_block_lock correct imo. Strictly speaking the test now verifies the block sizes directly instead of just verifying them indirectly as a side product of testing the stride, so we might as well rename it.
ATI2N is a good point though. The locking behavior matches the 1x1 "block" definition in the d3d9 test. I'll change the test to verify that we can indeed lock single pixels in formats that are supposedly block-free(and that we can lock single lines in YUY2/UYVY)
On Tuesday 18 October 2011 19:36:33 Stefan Dösinger wrote:
I felt that merging the tests to test all format and pool combinations would cause needlessly complicated
With a few simplifications like skipping all tests without dynamic textures it turns out okish. It's not too pretty. There are still a bunch of checks for caps and pools, but it should be readable.
On Tuesday 18 October 2011 20:12:35 Stefan Dösinger wrote:
On Tuesday 18 October 2011 19:36:33 Stefan Dösinger wrote:
I felt that merging the tests to test all format and pool combinations would cause needlessly complicated
With a few simplifications like skipping all tests without dynamic textures it turns out okish. It's not too pretty. There are still a bunch of checks for caps and pools, but it should be readable.
This is a version of the patch with both tests merged into one that tests all format-pool combinations. I'll resend the patches tomorrow unless you have further suggestions.
I changed the d3d8 patch in a similar way.
On 18 October 2011 17:37, Henri Verbeet hverbeet@gmail.com wrote:
patch 3/7". The point is that test_lockrect_offset() is about the offset calculation, not so much about what valid rectangles for block based formats are.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 19.10.2011 um 11:49 schrieb Henri Verbeet:
On 18 October 2011 17:37, Henri Verbeet hverbeet@gmail.com wrote:
patch 3/7". The point is that test_lockrect_offset() is about the offset calculation, not so much about what valid rectangles for block based formats are.
Tbh I don't see the point in separating those two since both are determined by the block size, but OK.