Skip to content

Commit

Permalink
[d3d9] Implement d3d9.allowDoNotWait
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Jan 24, 2020
1 parent 764cb56 commit f804c63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3781,6 +3781,9 @@ namespace dxvk {
if (unlikely(!m_d3d9Options.allowLockFlagReadonly))
Flags &= ~D3DLOCK_READONLY;

if (unlikely(!m_d3d9Options.allowDoNotWait))
Flags &= ~D3DLOCK_DONOTWAIT;

if (unlikely((Flags & (D3DLOCK_DISCARD | D3DLOCK_NOOVERWRITE)) == (D3DLOCK_DISCARD | D3DLOCK_NOOVERWRITE)))
Flags &= ~D3DLOCK_DISCARD;

Expand Down
1 change: 1 addition & 0 deletions src/d3d9/d3d9_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ namespace dxvk {
this->forceSwapchainMSAA = config.getOption<int32_t> ("d3d9.forceSwapchainMSAA", -1);

this->forceAspectRatio = config.getOption<std::string>("d3d9.forceAspectRatio", "");
this->allowDoNotWait = config.getOption<bool> ("d3d9.allowDoNotWait", 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);
Expand Down
3 changes: 3 additions & 0 deletions src/d3d9/d3d9_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ namespace dxvk {

/// Forces an MSAA level on the swapchain
int32_t forceSwapchainMSAA;

/// Allow D3DLOCK_DONOTWAIT
bool allowDoNotWait;
};

}

0 comments on commit f804c63

Please sign in to comment.