Am Mittwoch, 22. August 2007 11:36 schrieb H. Verbeet:
On 22/08/07, Stefan Dösinger stefan@codeweavers.com wrote:
Spotted by DCT
I don't know what the DCT actually tests, but should it refuse to lock any locked surface, or only when the rectangles overlap? Of course a test would be nice, considering surface locking behaves somewhat different between ddraw, d3d8 and d3d9.
I agree that we need some tests, but all docs I've read so far indicate that a surface(opposed to index/vertex buffers) can't be locked two times, no matter what rectangles there are. The DCT test in question tested GetDC(), then LockRect() and LockRect(), then GetDC(). But since UnlockRect doesn't take a rectangle parameter, the runtime wouldn't know which rectangle is now locked or unlocked, so it is unlikely that two rectangles can be locked concurrently. But I'll write a test for this.