Dxgi tearing support (#2601)

* present tearing support

* use existing syncInterval variable
This commit is contained in:
James Fulop
2021-09-09 07:20:01 -07:00
committed by GitHub
parent f1ddf67114
commit bbc2b76948
4 changed files with 31 additions and 2 deletions

View File

@@ -2287,7 +2287,12 @@ namespace bgfx { namespace d3d11
if (NULL != m_swapChain
&& m_needPresent)
{
hr = m_swapChain->Present(syncInterval, 0);
uint32_t presentFlags = 0;
if (!syncInterval && (m_dxgi.tearingSupported()))
{
presentFlags |= DXGI_PRESENT_ALLOW_TEARING;
}
hr = m_swapChain->Present(syncInterval, presentFlags);
m_needPresent = false;
}