From 4eacff21e96d3db8ebd14815b10b1fb9083393e5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 11 Mar 2018 20:25:09 +0100 Subject: [PATCH] [dxvk] Flush initialization context unconditionally An application might need to wait for a resource to become available just after it has been created, in which case its initialization commands might not have been dispatched yet. If no rendering commands were issued on the immediate context prior to the wait operation, WaitForResource would stall indefinitely. --- src/d3d11/d3d11_context_imm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 46badedfe..1ba812f1e 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -42,8 +42,9 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11ImmediateContext::Flush() { + m_parent->FlushInitContext(); + if (m_csChunk->commandCount() != 0) { - m_parent->FlushInitContext(); m_drawCount = 0; // Add commands to flush the threaded