http://bugs.winehq.org/show_bug.cgi?id=28428
--- Comment #8 from Stefan Dösinger stefan@codeweavers.com 2011-10-16 08:12:18 CDT --- Created attachment 36933 --> http://bugs.winehq.org/attachment.cgi?id=36933 wined3d: Clear unflushed buffer areas after a DISCARD map
The game is misbehaving. It is changing buffer areas outside the mapped area and depends on those changes to be uploaded to the GPU.
This hack reproduces the issue without any VBOs, dynamic or otherwise. It clears the area in the buffer behind the mapped area if the map used D3DLOCK_DISCARD. The game doesn't use offsets != 0 or double maps, so there are some shortcuts in that hack.
Likewise, if I flush the entire buffer, and not just the modified area, after a DISCARD map the shadows work correctly.
The open question is, why does the game get away with this on Windows? I could imagine that there's a driver hack. It's also possible that Windows drivers always flush the entire buffer, or flush on page boundaries.