1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 01:24:11 +01:00

[dxgi] Add option to override the sync interval

This commit is contained in:
Philip Rebohle 2018-09-09 19:14:30 +02:00
parent d7b16dd90a
commit 2541aeb25c
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,7 @@ namespace dxvk {
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
}
}

View File

@ -41,6 +41,10 @@ namespace dxvk {
/// Back buffer count for the Vulkan swap chain.
/// Overrides DXGI_SWAP_CHAIN_DESC::BufferCount.
int32_t numBackBuffers;
/// Sync interval. Overrides the value
/// passed to IDXGISwapChain::Present.
int32_t syncInterval;
};
}

View File

@ -288,6 +288,9 @@ namespace dxvk {
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb174576(v=vs.85).aspx
SyncInterval = std::min<UINT>(SyncInterval, 4);
if (options->syncInterval >= 0)
SyncInterval = options->syncInterval;
try {
// If in fullscreen mode, apply any updated gamma curve
// if it has been changed since the last present call.