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

[d3d9] Allow implicit discard for all backed buffers

This commit is contained in:
Joshua Ashton 2021-02-28 13:01:00 +00:00
parent 572315567c
commit 741070785a
No known key found for this signature in database
GPG Key ID: C85A08669126BE8D

View File

@ -4421,11 +4421,10 @@ namespace dxvk {
quickRead ||
(boundsCheck && !pResource->DirtyRange().Overlaps(pResource->LockRange()));
if (!skipWait) {
const bool managed = IsPoolManaged(desc.Pool);
const bool systemmem = desc.Pool == D3DPOOL_SYSTEMMEM;
const bool backed = pResource->GetMapMode() == D3D9_COMMON_BUFFER_MAP_MODE_BUFFER;
const bool doNotWait = Flags & D3DLOCK_DONOTWAIT;
bool doImplicitDiscard = (managed || systemmem) && !doNotWait && pResource->GetLockCount() == 0;
bool doImplicitDiscard = backed && !doNotWait && pResource->GetLockCount() == 0;
doImplicitDiscard = doImplicitDiscard && m_d3d9Options.allowImplicitDiscard;