From 7685a86494ace86e6fc18c1813d33d1c1969cb6d Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 4 Aug 2022 15:10:31 +0200 Subject: [PATCH] [d3d11] Change state restoring behaviour in SwapDeviceContextState --- src/d3d11/d3d11_context_imm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 2f827d4d..6703a661 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -621,7 +621,10 @@ namespace dxvk { if (!pState) return; - + + // Reset all state affected by the current context state + ResetCommandListState(); + Com oldState = std::move(m_stateObject); Com newState = static_cast(pState); @@ -636,6 +639,7 @@ namespace dxvk { oldState->SetState(m_state); newState->GetState(m_state); + // Restore all state affected by the new context state RestoreCommandListState(); }