[dxgi] Unlock presenter lock early during presentation

If SetGammaControl and Present are called at the same time, we'll
otherwise have a deadlock due to reversed lock order.

Fixes #3458.
This commit is contained in:
Philip Rebohle 2023-06-05 17:01:29 +02:00
parent d241daa0b1
commit 4d254b13be
1 changed files with 1 additions and 1 deletions

View File

@ -288,9 +288,9 @@ namespace dxvk {
return DXGI_ERROR_INVALID_CALL;
std::lock_guard<dxvk::recursive_mutex> lockWin(m_lockWindow);
std::lock_guard<dxvk::mutex> lockBuf(m_lockBuffer);
try {
std::lock_guard<dxvk::mutex> lockBuf(m_lockBuffer);
HRESULT hr = m_presenter->Present(SyncInterval, PresentFlags, nullptr);
if (hr != S_OK || (PresentFlags & DXGI_PRESENT_TEST))