From bd5d9d90c9d74023166ef476eb29bad447c5f1de Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 6 Sep 2022 00:23:24 +0200 Subject: [PATCH] [d3d9] Use xor to swap bit in depth mask. --- src/d3d9/d3d9_device.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }