-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-01-02 12:42, schrieb Henri Verbeet:
On 2 January 2013 12:26, Stefan Dösinger stefan@codeweavers.com wrote:
Fixes bug 32485.
I'm sure we've had this discussion wrt. commit messages before, but this tells me just about nothing about what problem this patch is supposed to fix, or why this is the correct solution. Also, do you have tests for this?
- From the bug report:
The game apparently wants the buffer contents to remain intact when it locks a buffer with DDLOCK_DISCARDCONTENTS - or at least in some cases. I noticed that the game maps and unmaps a buffer repeatedly with this flag, without ever drawing from it. In theory DISCARDCONTENTS is redundant in all but the first lock after a draw, but the driver still discards the buffer contents. Ignoring the flag and memsetting the buffer to some random value has the same effect as setting the flag.
One thing is unclear in the text: The game does eventually draw from the buffer, so it's not just using it as a sysmem storage. But there are about 20 DISCARD maps/unmaps between the draws.
A test sounds like a good idea though.