From dfe2922136f740eb0d81bd6bc839f3f498efee45 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 24 Jul 2019 23:41:56 +0200 Subject: [PATCH] [dxvk] Fix partial clears for mismatched framebuffer attachment sizes Fixes an issue in Borderlands: The Pre-Sequel, which binds a 512x512 color attachment and a full-screen depth buffer at the same time and then attempts to clear the depth buffer. --- src/dxvk/dxvk_context.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index f3159f1d..c15e5c54 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -2394,7 +2394,8 @@ namespace dxvk { // so that we can avoid spilling the render pass if it is. int32_t attachmentIndex = -1; - if (m_state.om.framebuffer != nullptr) + if (m_state.om.framebuffer != nullptr + && m_state.om.framebuffer->isFullSize(imageView)) attachmentIndex = m_state.om.framebuffer->findAttachment(imageView); if (attachmentIndex < 0) {