mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxgi] Ignore sync interval if PRESENT_TEST is used
Otherwise, the following sequence leads to the Vulkan swap chain being recreated once per frame: swapchain->Present(0, DXGI_PRESENT_TEST); swapchain->Present(1, 0); Found while investigating #1314.
This commit is contained in:
parent
3db00a0f40
commit
ae01bd8bd4
@ -199,11 +199,13 @@ namespace dxvk {
|
||||
|
||||
if (options->syncInterval >= 0)
|
||||
SyncInterval = options->syncInterval;
|
||||
|
||||
bool vsync = SyncInterval != 0;
|
||||
|
||||
m_dirty |= vsync != m_vsync;
|
||||
m_vsync = vsync;
|
||||
if (!(PresentFlags & DXGI_PRESENT_TEST)) {
|
||||
bool vsync = SyncInterval != 0;
|
||||
|
||||
m_dirty |= vsync != m_vsync;
|
||||
m_vsync = vsync;
|
||||
}
|
||||
|
||||
if (m_presenter == nullptr)
|
||||
CreatePresenter();
|
||||
@ -211,7 +213,7 @@ namespace dxvk {
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
if (!m_presenter->hasSwapChain()) {
|
||||
RecreateSwapChain(vsync);
|
||||
RecreateSwapChain(m_vsync);
|
||||
m_dirty = false;
|
||||
}
|
||||
|
||||
@ -225,7 +227,7 @@ namespace dxvk {
|
||||
return hr;
|
||||
|
||||
if (std::exchange(m_dirty, false))
|
||||
RecreateSwapChain(vsync);
|
||||
RecreateSwapChain(m_vsync);
|
||||
|
||||
try {
|
||||
PresentImage(SyncInterval);
|
||||
|
Loading…
x
Reference in New Issue
Block a user