1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d9] Ignore D3DLOCK_DISCARD when partially locking buffers

Fixes #1444
This commit is contained in:
Joshua Ashton 2020-02-15 03:07:39 +00:00
parent 7d3ec74b40
commit 50cf3a465b

View File

@ -4175,6 +4175,10 @@ namespace dxvk {
if (desc.Pool != D3DPOOL_DEFAULT)
Flags &= ~(D3DLOCK_DISCARD | D3DLOCK_NOOVERWRITE);
// Ignore DISCARD if we are doing a partial lock.
if (OffsetToLock != 0 || (SizeToLock != 0 && SizeToLock != desc.Size))
Flags &= ~D3DLOCK_DISCARD;
// Ignore READONLY if we are a WRITEONLY resource.
if (desc.Usage & D3DUSAGE_WRITEONLY)
Flags &= ~D3DLOCK_READONLY;