1

Does Windows 8.1 support the DXGI flip model? I.e. DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL and DXGI_SWAP_EFFECT_FLIP_DISCARD? I am seeing conflicting information online.

Link1 and link2 indicate that at least DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is supported by Windows 8, yet the common way to test for DXGI flip model support is:

ComPtr<IDXGIFactory4> factory4;
if (FAILED(m_dxgiFactory.As(&factory4)))
{
    m_options &= ~c_FlipPresent;
}

which seems to fail on Windows 8.1. I'm using Visual Studio 2019 with Windows SDK version 10.0.14393.0. Here's my GPU info:

GPU info

As a quick sanity check, I've run the SimpleInstancingPC example from Xbox-ATG-Samples / DirectXTK. It states:

INFO: Flip swap effects not supported
Direct3D Adapter (0): VID:10DE, PID:1F82 - NVIDIA GeForce GTX 1650

If DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is in fact supported by Windows 8.1 but DXGI_SWAP_EFFECT_FLIP_DISCARD is not, what is the correct way to check for this functionality, given that the IDXGIFactory4 approach fails?

  • 2
    It's clearly documented here: https://learn.microsoft.com/en-us/windows/win32/api/dxgi/ne-dxgi-dxgi_swap_effect DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL starting with Windows 8, DXGI_SWAP_EFFECT_FLIP_DISCARD starting with Windows 10. – Simon Mourier Jun 04 '21 at 09:45
  • @SimonMourier This is very helpful, thanks. I'd like to mark this as the answer for anyone who comes across this question, so please post this as an answer. Also, do you have an answer to the second part of my question: a substitute for the IDXGIFactory4 method? – Seth Travis Jun 04 '21 at 20:28

1 Answers1

2

The optimization work that is discussed in the "Use the flip model" blog post is only in Windows 10, so it's best to stick with legacy blit and treat Windows 8.x and Windows 7 the same.

For Windows 8.x, the main and only real use for DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is Windows Store apps.

The background here that game developers don't worry much about Windows 8.x these days given the Steam Hardware Survey numbers: It's less than 1% total.

UPDATE: See this blog post series as well for more guidance on swapchains.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • Thanks for the clarification. I'm using directX in a music app gui, not a game. There's more Windows 8.x users in that camp (though still not a lot) and I would like to be able to use the flip model whenever possible. Do you have a substitute for the IDXGIFactor4 approach that fails here? – Seth Travis Jun 04 '21 at 20:34
  • 1
    If IDXGIFactory4 is not present, then you should stick with ``DXGI_SWAP_EFFECT_DISCARD`` or ``DXGI_SWAP_EFFECT_SEQUENTIAL``. – Chuck Walbourn Jun 04 '21 at 20:48
  • The developer blog covers many things, going from DXGI 1.3 to 1.6. But.. uh, both its second section, and the linked MSDN documentation seem to significantly "appreciate" W8 still. An older [guidance](https://gamedev.stackexchange.com/a/177580/96913) of yours seemed to trail this opinion too. I get disregarding `DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL` in W7 (or all the other FLIPEX quirks) but why shouldn't you still take even half of its advantages over bitblt then? – mirh Jan 02 '23 at 20:56
  • I've written a [longer blog series](https://walbourn.github.io/care-and-feeding-of-modern-swapchains/) on this myself. See if you have any feedback. – Chuck Walbourn Jan 02 '23 at 21:54
  • I had just always been of the impression that `DXGI_SWAP_EFFECT_FLIP_DISCARD` > `DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL` > `D3DSWAPEFFECT_FLIPEX` > `DXGI_SWAP_EFFECT_DISCARD` (sorry for also adding an orange in the apples basket, but still everybody kept telling me that bitblt is old and dirty). Except for the first I reckon you aren't getting FSE-like latency, but nonetheless even guaranteeing better deadlines or just saving some cpu cycle (you did mention "more efficiency" in your post) seems valuable for simple windows. So what am I missing? Or was your recommendation just about "support burden"? – mirh Jan 03 '23 at 01:14
  • 1
    Ah, so my comment was mostly that optimizing for Windows 8.x specifically isn't worth much based on Steam's survey so it's fine to treat it as a Windows 7 flavor. The "please use FLIP_ modes" request is really Windows 10 and Windows 11. – Chuck Walbourn Jan 03 '23 at 04:30