From 44c0f96fc141c55fd668a2f3624b0c27631f439a Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 26 Oct 2019 19:55:05 +0200 Subject: [PATCH] [dxvk] Pause transform feedback on buffer updates Otherwise, we might override a currently bound transform feedback buffer or counter buffer. Fixes Unity Engine. --- src/dxvk/dxvk_context.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index cbb780699..388c45b6e 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -1836,6 +1836,11 @@ namespace dxvk { DxvkCmdBuffer cmdBuffer; if (replaceBuffer) { + // Pause transform feedback so that we don't mess + // with the currently bound counter buffers + if (m_flags.test(DxvkContextFlag::GpXfbActive)) + this->pauseTransformFeedback(); + // As an optimization, allocate a free slice and perform // the copy in the initialization command buffer instead // interrupting the render pass and stalling the pipeline.