mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d9] Ignore DISCARD after device loss
This commit is contained in:
parent
1850819483
commit
2c3f2b9ad1
@ -4328,6 +4328,10 @@ namespace dxvk {
|
||||
if (unlikely((Flags & (D3DLOCK_DISCARD | D3DLOCK_NOOVERWRITE)) == (D3DLOCK_DISCARD | D3DLOCK_NOOVERWRITE)))
|
||||
Flags &= ~D3DLOCK_DISCARD;
|
||||
|
||||
// Tests show that D3D9 drivers ignore DISCARD when the device is lost.
|
||||
if (unlikely(m_deviceLostState != D3D9DeviceLostState::Ok))
|
||||
Flags &= ~D3DLOCK_DISCARD;
|
||||
|
||||
auto& desc = *(pResource->Desc());
|
||||
|
||||
if (unlikely(!desc.IsLockable))
|
||||
@ -4808,6 +4812,10 @@ namespace dxvk {
|
||||
if (desc.Usage & D3DUSAGE_DYNAMIC)
|
||||
Flags &= ~D3DLOCK_DONOTWAIT;
|
||||
|
||||
// Tests show that D3D9 drivers ignore DISCARD when the device is lost.
|
||||
if (unlikely(m_deviceLostState != D3D9DeviceLostState::Ok))
|
||||
Flags &= ~D3DLOCK_DISCARD;
|
||||
|
||||
// We only bounds check for MANAGED.
|
||||
// (TODO: Apparently this is meant to happen for DYNAMIC too but I am not sure
|
||||
// how that works given it is meant to be a DIRECT access..?)
|
||||
|
Loading…
x
Reference in New Issue
Block a user