[d3d11] Change state restoring behaviour in SwapDeviceContextState

This commit is contained in:
Philip Rebohle 2022-08-04 15:10:31 +02:00
parent c7d9201303
commit 7685a86494
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 5 additions and 1 deletions

View File

@ -621,7 +621,10 @@ namespace dxvk {
if (!pState)
return;
// Reset all state affected by the current context state
ResetCommandListState();
Com<D3D11DeviceContextState> oldState = std::move(m_stateObject);
Com<D3D11DeviceContextState> newState = static_cast<D3D11DeviceContextState*>(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();
}