diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 83c00f399..c8dee1152 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -3783,9 +3783,7 @@ namespace dxvk { const bool newDepth = newTexture->IsShadow(); if (oldDepth != newDepth) { - m_depthTextures &= ~(1u << StateSampler); - if (newDepth) - m_depthTextures |= 1u << StateSampler; + m_depthTextures ^= 1u << StateSampler; m_dirtySamplerStates |= 1u << StateSampler; }