diff options
author | Robin Kertels <robin.kertels@gmail.com> | 2023-07-16 16:20:33 +0300 |
---|---|---|
committer | Joshie <joshua@froggi.es> | 2023-08-13 22:32:20 +0300 |
commit | 295a58afdfb1d3debac183776c352e5190a94b65 (patch) | |
tree | 51b6931598a3b7e87f3e547181b46ad893c75416 | |
parent | 0746a3b91afa5ef0ae53fbd1fb707483b4d76844 (diff) |
[d3d9] Check depth bounds test when deciding to bind DSV
-rw-r--r-- | src/d3d9/d3d9_device.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 91b61a39..0d883c8d 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -2308,6 +2308,9 @@ namespace dxvk { case D3DRS_ADAPTIVETESS_W: if (states[D3DRS_ADAPTIVETESS_X] == uint32_t(D3D9Format::NVDB) || oldNVDB) { m_flags.set(D3D9DeviceFlag::DirtyDepthBounds); + + if (m_state.depthStencil != nullptr && m_state.renderStates[D3DRS_ZENABLE]) + m_flags.set(D3D9DeviceFlag::DirtyFramebuffer); break; } [[fallthrough]]; @@ -5885,7 +5888,8 @@ namespace dxvk { if (m_state.depthStencil != nullptr && (m_state.renderStates[D3DRS_ZENABLE] || m_state.renderStates[D3DRS_ZWRITEENABLE] - || m_state.renderStates[D3DRS_STENCILENABLE])) { + || m_state.renderStates[D3DRS_STENCILENABLE] + || m_state.renderStates[D3DRS_ADAPTIVETESS_X] == uint32_t(D3D9Format::NVDB))) { const DxvkImageCreateInfo& dsImageInfo = m_state.depthStencil->GetCommonTexture()->GetImage()->info(); const bool depthWrite = m_state.renderStates[D3DRS_ZWRITEENABLE]; |