mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 05:52:11 +01:00
[d3d11] Add option to enforce mailbox present mode
This commit is contained in:
parent
7f03f45301
commit
4d8940957c
10
dxvk.conf
10
dxvk.conf
@ -69,6 +69,16 @@
|
||||
# d3d9.presentInterval = -1
|
||||
|
||||
|
||||
# Enables the mailbox present mode in case regular Vsync is disabled.
|
||||
# This should avoid tearing, but may be unsupported on some systems
|
||||
# or require setting dxgi.numBackBuffers to a higher value in order
|
||||
# to work properly. Please do not report issues with this option.
|
||||
#
|
||||
# Supported values: True, False
|
||||
|
||||
# dxgi.tearFree = False
|
||||
|
||||
|
||||
# Performs range check on dynamically indexed constant buffers in shaders.
|
||||
# This may be needed to work around a certain type of game bug, but may
|
||||
# also introduce incorrect behaviour.
|
||||
|
@ -19,6 +19,7 @@ namespace dxvk {
|
||||
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
|
||||
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
||||
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
||||
this->tearFree = config.getOption<bool>("dxgi.tearFree", false);
|
||||
|
||||
this->constantBufferRangeCheck = config.getOption<bool>("d3d11.constantBufferRangeCheck", false)
|
||||
&& DxvkGpuVendor(devInfo.core.properties.vendorID) != DxvkGpuVendor::Amd;
|
||||
|
@ -72,6 +72,9 @@ namespace dxvk {
|
||||
/// passed to IDXGISwapChain::Present.
|
||||
int32_t syncInterval;
|
||||
|
||||
/// Tear-free mode if vsync is disabled
|
||||
bool tearFree;
|
||||
|
||||
/// Override maximum frame latency if the app specifies
|
||||
/// a higher value. May help with frame timing issues.
|
||||
int32_t maxFrameLatency;
|
||||
|
@ -850,7 +850,8 @@ namespace dxvk {
|
||||
if (Vsync) {
|
||||
pDstModes[n++] = VK_PRESENT_MODE_FIFO_KHR;
|
||||
} else {
|
||||
pDstModes[n++] = VK_PRESENT_MODE_IMMEDIATE_KHR;
|
||||
if (!m_parent->GetOptions()->tearFree)
|
||||
pDstModes[n++] = VK_PRESENT_MODE_IMMEDIATE_KHR;
|
||||
pDstModes[n++] = VK_PRESENT_MODE_MAILBOX_KHR;
|
||||
pDstModes[n++] = VK_PRESENT_MODE_FIFO_RELAXED_KHR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user