From a08579e5552bcbb97de95f3739c0e1345e51a639 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 5 Mar 2025 17:54:23 +0100 Subject: [PATCH] [dxvk] Fix clear after late resolve --- src/dxvk/dxvk_context.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 0b127f686..ff6c75294 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -386,7 +386,8 @@ namespace dxvk { if (m_state.om.framebufferInfo.isFullSize(imageView)) attachmentIndex = m_state.om.framebufferInfo.findAttachment(imageView); - if (attachmentIndex < 0) { + // Need to interrupt the render pass if there are pending resolves + if (attachmentIndex < 0 || m_flags.test(DxvkContextFlag::GpDirtyFramebuffer)) { // Suspend works here because we'll end up with one of these scenarios: // 1) The render pass gets ended for good, in which case we emit barriers // 2) The clear gets folded into render pass ops, so the layout is correct @@ -3957,7 +3958,7 @@ namespace dxvk { if (attachmentIndex >= 0 && !m_state.om.framebufferInfo.isWritable(attachmentIndex, aspect)) attachmentIndex = -1; - if (attachmentIndex < 0) { + if (attachmentIndex < 0 || m_flags.test(DxvkContextFlag::GpDirtyFramebuffer)) { this->spillRenderPass(false); this->prepareImage(imageView->image(), imageView->subresources());