1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[d3d9] Implement d3d9.allowDiscard

This commit is contained in:
Joshua Ashton 2020-02-18 16:53:51 +00:00
parent 6b85e6d3f1
commit 8fabc25a38
3 changed files with 7 additions and 0 deletions

View File

@ -4163,6 +4163,9 @@ namespace dxvk {
if (!m_d3d9Options.allowLockFlagReadonly)
Flags &= ~D3DLOCK_READONLY;
if (!m_d3d9Options.allowDiscard)
Flags &= ~D3DLOCK_DISCARD;
auto& desc = *pResource->Desc();
// Ignore DISCARD if NOOVERWRITE is set

View File

@ -66,6 +66,7 @@ namespace dxvk {
this->forceAspectRatio = config.getOption<std::string>("d3d9.forceAspectRatio", "");
this->allowDoNotWait = config.getOption<bool> ("d3d9.allowDoNotWait", true);
this->allowDiscard = config.getOption<bool> ("d3d9.allowDiscard", true);
// If we are not Nvidia, enable general hazards.
this->generalHazards = adapter == nullptr || !adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);

View File

@ -122,6 +122,9 @@ namespace dxvk {
/// Allow D3DLOCK_DONOTWAIT
bool allowDoNotWait;
/// Allow D3DLOCK_DISCARD
bool allowDiscard;
};
}