4

The documentation for the DXGI 1.5 flag DXGI_PRESENT_ALLOW_TEARING is somewhat sparse. The MSDN article on variable refresh rate displays has the following to say about when to use the flag:

"Support for variable refresh rate displays is achieved by setting certain flags when creating and presenting the swap chain."

"It is recommended to always pass this tearing flag when using sync interval 0 if CheckFeatureSupport reports that tearing is supported and the app is in a windowed mode - including border-less fullscreen mode."

These descriptions make it clear that apps should use this flag if they want to support variable refresh rate in windowed mode, but don't go into very much detail on how exactly a program will behave differently if the flag is enabled or disabled. I have several relevant questions:

  1. Is this flag always required to get variable refresh for windowed swap chains, or can the system ever inject support automatically like it does for fullscreen applications (e.g., when "enabled for windowed and fullscreen mode" is enabled in the Nvidia control panel)?
  2. Can the system use this flag to allow multiple swap chains running at different refresh rates to co-exist without tearing or stuttering on the same display? E.g., a 120hz monitor playing back a 30hz video and a 24hz video at the same time without tearing or stuttering.
  3. Can this flag be used to produce actual tearing on monitors that don't support variable refresh rate?
  4. If this flag is always useful when running on compatible hardware in windowed mode with presentInterval = 0, then why can't the system enable it automatically under those circumstances?
C. Finegan
  • 83
  • 6
  • 1
    Not 100% sure but I think this flags tells the DWM to stop doing vsync. Before that the only way to really do vsync off (sync interval 0) was to go exclusive full screen (which is now not recommended). If you don't use it (when supported), you will still get implicit latency from DWM, even if you call Present(0, ...) and "think" you're doing variable refresh rate, in fact you don't. https://jackmin.home.blog/2018/12/14/swapchains-present-and-present-latency/ https://devblogs.microsoft.com/directx/dxgi-flip-model/#when-should-i-use-blt-model – Simon Mourier Oct 13 '20 at 07:27

0 Answers0