From c5bbf2d9891e2b6ffc8070e8dd074e187ff8bd0c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 3 Mar 2018 22:28:30 +0100 Subject: [PATCH] [d3d11] Fixed FinishCommandList - ppCommandList is optional. - We need to call RestoreState in order to set up the current context state for the new command list. --- src/d3d11/d3d11_context_def.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_context_def.cpp b/src/d3d11/d3d11_context_def.cpp index 55764ced8..175b872fb 100644 --- a/src/d3d11/d3d11_context_def.cpp +++ b/src/d3d11/d3d11_context_def.cpp @@ -43,11 +43,14 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE D3D11DeferredContext::FinishCommandList( WINBOOL RestoreDeferredContextState, ID3D11CommandList **ppCommandList) { - *ppCommandList = m_commandList.ref(); + if (ppCommandList != nullptr) + *ppCommandList = m_commandList.ref(); m_commandList = CreateCommandList(); if (!RestoreDeferredContextState) ClearState(); + else + RestoreState(); return S_OK; }