From 27b9736626f42c95b1e5efd02576d3af6068ed6a Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 7 May 2020 16:09:58 +0100 Subject: [PATCH] [d3d9] Dirty fixed function pixel shader on texture type change Fixes #1603 --- src/d3d9/d3d9_device.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 775d9c9b..81596853 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5445,8 +5445,12 @@ namespace dxvk { const uint32_t textureBitMask = 0b11u << offset; const uint32_t textureBits = textureType << offset; - m_samplerTypeBitfield &= ~textureBitMask; - m_samplerTypeBitfield |= textureBits; + if ((m_samplerTypeBitfield & textureBitMask) != textureBits) { + m_flags.set(D3D9DeviceFlag::DirtyFFPixelShader); + + m_samplerTypeBitfield &= ~textureBitMask; + m_samplerTypeBitfield |= textureBits; + } } if (commonTex == nullptr) {