From 962a7f5766a6b8527dda106803f9ace18d63ac86 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 26 Apr 2018 15:30:18 +0200 Subject: [PATCH] [dxvk] Ignore redundant render target bindings Further reduces render pass count if applications bind render targets without using them, and then bind the old set of render targets again. --- src/dxvk/dxvk_context.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 66e50fd97..ebff5a169 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -110,6 +110,10 @@ namespace dxvk { if (m_state.om.framebuffer == nullptr || !m_state.om.framebuffer->renderTargets().matches(targets)) { m_state.om.renderTargets = targets; m_flags.set(DxvkContextFlag::GpDirtyFramebuffer); + } else { + // Don't redundantly spill the render pass if + // the same render targets are bound again + m_flags.clr(DxvkContextFlag::GpDirtyFramebuffer); } }