What is the behavior of the DXGI_PRESENT_ALLOW_TEARING flag?

978 views Asked by At

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?
0

There are 0 answers