The modern "flip" modes (DXGI_SWAP_EFFECT_FLIP_DISCARD
and DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL
) enforce some new usage rules. Specifically you can't create an MSAA backbuffer or an _SRGB
format backbuffer.
The reality is that when using the legacy "blt" style modes (DXGI_SWAP_EFFECT_DISCARD
, DXGI_SWAP_EFFECT_SEQUENTIAL
), you can't really create an MSAA backbuffer at all. It just implicitly created a single-sample backbuffer and a MSAA render target, and did the resolve "by magic".
In most 'real world' rendering solutions, you (a) don't just do a resolve, and (b) don't immediately render the resolved content of the MSAA render target. Post-processing, custom anti-aliasing, and post-resolve UI composition all takes place before you Present the result. As such, the 'magic' solution is only useful for trivial samples.
See this blog series: The Care and Feeding of Modern Swap Chains
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…