From 8cb3a266f7877d895c0df31cf4cba79eaf6b0b6a Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 26 Apr 2018 18:43:19 +0200 Subject: [PATCH] [dxvk] Fix potential state tracking issue when updating render targets --- src/dxvk/dxvk_context.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index ebff5a16..2306b9d9 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -107,8 +107,11 @@ namespace dxvk { void DxvkContext::bindRenderTargets(const DxvkRenderTargets& targets) { + m_state.om.renderTargets = targets; + if (m_state.om.framebuffer == nullptr || !m_state.om.framebuffer->renderTargets().matches(targets)) { - m_state.om.renderTargets = targets; + // Create a new framebuffer object next + // time we start rendering something m_flags.set(DxvkContextFlag::GpDirtyFramebuffer); } else { // Don't redundantly spill the render pass if