wined3d: Don't DISCARD or NOOVERWRITE non-dynamic buffers.
commit04752991b1b427282229da6fba2fa2c6075ffabc
authorStefan Dösinger <stefan@codeweavers.com>
Thu, 11 Mar 2010 11:05:23 +0000 (11 12:05 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 16 Mar 2010 16:02:34 +0000 (16 17:02 +0100)
tree5fc53a70060816b95a34f53aa14fc8b04efb1742
parenteb355ece4aeb6a1e6fb348c3662378ab76809667
wined3d: Don't DISCARD or NOOVERWRITE non-dynamic buffers.

Shaiya locks a non-dynamic buffer with the DISCARD flag and expects
the contents to be retained. The SDK says DISCARD requires dynamic
resources, and Windows 7 returns an error in this situation, crashing
Shaiya. This patch sticks to the Windows XP behavior and allows the
lock, but ignores the DISCARD flag to retain the buffer contents.
dlls/wined3d/buffer.c