From 5aad615aef18681be118ce7d54d58b1e971038de Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 19 Nov 2018 01:35:41 +0100 Subject: [PATCH] [dxvk] Unbind graphics pipeline when spilling render pass Otherwise we may in some very rare cases continue using an incorrect pipeline in subsequent render passes if the same shaders are used for drawing. --- src/dxvk/dxvk_context.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index e83555195..08c63af8b 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -1242,7 +1242,6 @@ namespace dxvk { return; this->spillRenderPass(); - this->unbindGraphicsPipeline(); m_barriers.recordCommands(m_cmd); @@ -1951,7 +1950,6 @@ namespace dxvk { VkImageSubresourceLayers srcSubresource, VkOffset3D srcOffset, VkExtent3D extent) { - this->unbindGraphicsPipeline(); m_barriers.recordCommands(m_cmd); auto srcSubresourceRange = vk::makeSubresourceRange(srcSubresource); @@ -2225,7 +2223,6 @@ namespace dxvk { const Rc& srcImage, const VkImageSubresourceLayers& srcSubresources, VkFormat format) { - this->unbindGraphicsPipeline(); m_barriers.recordCommands(m_cmd); // Create image views covering the requested subresourcs @@ -2361,6 +2358,7 @@ namespace dxvk { m_queries.endQueries(m_cmd, VK_QUERY_TYPE_PIPELINE_STATISTICS); this->renderPassUnbindFramebuffer(); + this->unbindGraphicsPipeline(); m_flags.clr(DxvkContextFlag::GpDirtyXfbCounters); }