mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[d3d9] Don't mark DS as hazardous if depth write is disabled
This commit is contained in:
parent
ff65599dba
commit
0e36a07a93
@ -2131,8 +2131,11 @@ namespace dxvk {
|
|||||||
m_flags.set(D3D9DeviceFlag::DirtyMultiSampleState);
|
m_flags.set(D3D9DeviceFlag::DirtyMultiSampleState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D3DRS_STENCILENABLE:
|
|
||||||
case D3DRS_ZWRITEENABLE:
|
case D3DRS_ZWRITEENABLE:
|
||||||
|
if (likely(!old != !Value))
|
||||||
|
UpdateActiveHazardsDS(UINT32_MAX);
|
||||||
|
[[fallthrough]];
|
||||||
|
case D3DRS_STENCILENABLE:
|
||||||
case D3DRS_ZENABLE:
|
case D3DRS_ZENABLE:
|
||||||
if (likely(m_state.depthStencil != nullptr))
|
if (likely(m_state.depthStencil != nullptr))
|
||||||
m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);
|
m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);
|
||||||
@ -5584,7 +5587,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_activeHazardsDS = m_activeHazardsDS & (~texMask);
|
m_activeHazardsDS = m_activeHazardsDS & (~texMask);
|
||||||
if (m_state.depthStencil != nullptr &&
|
if (m_state.depthStencil != nullptr &&
|
||||||
m_state.depthStencil->GetBaseTexture() != nullptr) {
|
m_state.depthStencil->GetBaseTexture() != nullptr &&
|
||||||
|
m_state.renderStates[D3DRS_ZWRITEENABLE]) {
|
||||||
for (uint32_t samplerIdx : bit::BitMask(masks.samplerMask)) {
|
for (uint32_t samplerIdx : bit::BitMask(masks.samplerMask)) {
|
||||||
IDirect3DBaseTexture9* dsBase = m_state.depthStencil->GetBaseTexture();
|
IDirect3DBaseTexture9* dsBase = m_state.depthStencil->GetBaseTexture();
|
||||||
IDirect3DBaseTexture9* texBase = m_state.textures[samplerIdx];
|
IDirect3DBaseTexture9* texBase = m_state.textures[samplerIdx];
|
||||||
|
Loading…
Reference in New Issue
Block a user