From ff65599dbab5514b8592cb8e02300445128dbd62 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sat, 24 Jun 2023 03:42:54 +0100 Subject: [PATCH] [d3d9] Use m_activeRTs in BindFramebuffer Can roll in the anyColorWrites this way. --- src/d3d9/d3d9_device.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 4cc39399..6a218451 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5854,7 +5854,7 @@ namespace dxvk { // target bindings are updated. Set up the attachments. VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM; - for (uint32_t i : bit::BitMask(m_boundRTs)) { + for (uint32_t i : bit::BitMask(m_activeRTs)) { const DxvkImageCreateInfo& rtImageInfo = m_state.renderTargets[i]->GetCommonTexture()->GetImage()->info(); if (likely(sampleCount == VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM)) @@ -5862,8 +5862,7 @@ namespace dxvk { else if (unlikely(sampleCount != rtImageInfo.sampleCount)) continue; - if (!(m_anyColorWrites & (1 << i))) - continue; + // Any color writes are included in m_activeRTs if (!(m_psShaderMasks.rtMask & (1 << i))) continue;