protonscr

Can you disable TripleBufferning when using DXVK

dxvkclosed question
doitsujin/dxvk#1636 · opened 2020-05-21 by Pshemas · updated 2021-08-18 · 6 comments · github
PPshemas 2020-05-21 github

Is there a setting that would allow disabling of triple buffering when using DXVK with Nvidia?
I've been trying with MoI (a modeling 3d app, a kind of CAD sketchbook). With regular wine (without DXVK) it had a drawing issue as well (what you see on the screen seems to be a one state behind, so you don't get proper object highlight when you hover over it and so on) - but I've been able to get around it by setting:

__GL_MaxFramesAllowed=1

As mentioned I'm running it on Nvidia, where it seems that triple buffering seems to be broken for years (at least with WINE).
I have my fingers crossed that there's a setting that would allow a workaround with Vulkan as well, knowing that next version of MoI will rely on DX even more.

Bbno1 2020-05-21 github

Are you using a laptop with nvidia optimus or a desktop?

Ddoitsujin maintainer 2020-05-22 github

In what way exactly does this application rely on triple buffering being disabled? In case Vsync is enabled, we always request one more swap chain image than required since otherwise we'd end up with terrible frame pacing,

There are several settings that (may) affect presentation latency in various ways:

  • dxgi.numBackBuffers = 1 overrides the app's desired back buffer count, setting this to 1 may or may not help.
  • dxgi.syncInterval = 0 disables Vsync, which may or may not open up a lower-latency presentation path for the Vulkan swap chain.
  • dxgi.maxFrameLatency = 1 introduces more aggressive GPU->CPU synchronization on presentation which may reduce latency, but it's usually the applicaction's job to do this.

Also, your window manager may introduce multiple frames of latency, but we can't really do anything about that; disabling desktop effects if possible may improve that though.

KKuraiShidosha 2021-08-16 github

Is .numBackBuffers = 1 supposed to do anything? The conf file specifies that the only supported values are greater than or equal to 2. I'm attempting to engage typical double buffered v-sync with DXVK for the sake of flawless presentation pacing and instead I'm getting stuttery triple buffered v-sync. Eg - GPU running at 128 fps on a 144hz monitor instead of dropping to 72 fps for perfect 2:1 refresh cycles.

Ddoitsujin maintainer 2021-08-17 github

That won't work, and it's not expected to work, I don't think X11 is even able to support "true" double-buffering in the first place. All Vulkan drivers require 3-4 swap chain images in practice anyway, the option was originally intended to work around cases where drivers behave weirdly and cause frame pacing issues.

You can use dxgi.syncInterval = 2 to force games to run at half your monitor's refresh rate.

KKuraiShidosha 2021-08-17 github

The funny thing is, the only game I currently possess that exhibits this behavior is RDR2 under DX12. I assume if a DX12 game can support proper double buffered v-sync then surely DX11 and under can too. I haven't found a Vulkan game that experiences this yet however so it's likely not possible under DXVK.

Ddoitsujin maintainer 2021-08-18 github

D3D11 can technically support double-buffered Vsync but that doesn't help when the graphics stack that our D3D11 implementation is running on can't. Even if it could, it probably wouldn't work very well with DXVK without some changes to how presentation is handled.

I'd also argue that it's not all that important, pretty much every modern game defaults to triple buffering anyway, most high-refresh displays support VRR, and there are more reliable ways to limit frame rates and ensure reasonably smooth frame intervals.

Launch options