diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index c55d08d3..a5473fb3 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -3411,8 +3411,8 @@ namespace dxvk { // If we have any RTs we would have bound to the the FB // not in the new shader mask, mark the framebuffer as dirty // so we unbind them. - uint32_t oldUseMask = m_activeRTs & m_psShaderMasks.rtMask; - uint32_t newUseMask = m_activeRTs & newShaderMasks.rtMask; + uint32_t oldUseMask = m_boundRTs & m_anyColorWrites & m_psShaderMasks.rtMask; + uint32_t newUseMask = m_boundRTs & m_anyColorWrites & newShaderMasks.rtMask; if (oldUseMask != newUseMask) m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);