DirectX11 Swap Chain Format
It has to do with the way your back-buffer gets to the screen. There's at least one copy involved(back-buffer=>screen), so if your back-buffer format matches the screen-format(BGRA8), then theoretically this copy operations should run faster.
Read this for a better explanation on how present works, and differences between the Win8 flip-model to the Win7 blit-model.
Ive read this article before And i noticed that it mentions you can still use the rgba format with flip and DWM will still compose the screen without a copy. So what about vista or windows 7 with directx 10/11 where flip sequential might not be available or using say discard as the presentation model?
So what about vista or windows 7 with directx 10/11 where flip sequential might not be available or using say discard as the presentation model?
It will use an additional BitBlit() to copy the DX surface to an intermediate DWM surface, which is slower. But same principal holds - if the swap-chain format matches the screen-format, this operation will be faster. When using the BitBlit mode, you also have more options for swap-chain formats.
So what about vista or windows 7 with directx 10/11 where flip sequential might not be available or using say discard as the presentation model?It will use an additional BitBlit() to copy the DX surface to an intermediate DWM surface, which is slower. But same principal holds - if the swap-chain format matches the screen-format, this operation will be faster. When using the BitBlit mode, you also have more options for swap-chain formats.
This is not completely true for windows 7. As long your backbuffer matches your front buffer and you have your swap chain set to full screen. It will not bitblt, but swap the backbuffer with the front. The only time it bitblt is when the swapchain is in window mode or when the swap chain back buffer does not match the front buffer width/heigh and format.
Hi Guys,
After doing my research (of which I already knew half cheers for the information about the flip presentation info btw).
Heres my findings:
Now when using the discard presentation in a Win32 app it passes the render target to DWM which then blits the target to the screen and when in full screen mode (provided you have resized your back buffer and refresh rate correctly) it will disable DWM and perform flips to render the scene.
Now with metro apps there's no such thing as full screen exclusive (as they are essentially borderless window). So they would blit all the time (the discard presentation model is actually not allowed for metro apps).
So you have to set the presentation model to flip in Win32 apps and metro apps(with this being your only option for metro :]). It will than pass your render target to DWM (I assume maybe it allows you access to its underlying target to draw into and uses dirty rectangles), and instead of blitting it will straight up flip/merge your target into the screen space it currently resides in and you get flip performance and in full screen it does the flip (assuming you resized buffers and refresh rate).
Now for some reason the windows default back buffer for the OS is BGR and if you use this as your back buffer format the flip is slightly faster as it doesn't have to swizzle or do whatever it does to merge/flip. But you can use either RGBA or BGRA.
Heres the msdn explaining the new presentation model: http://msdn.microsoft.com/en-us/library/windows/desktop/hh706346%28v=vs.85%29.aspx
And heres another msdn confirming the slightly faster flip with bgra:http://social.msdn.microsoft.com/Forums/windowsapps/en-US/f56e4449-f3e1-491e-9f64-e65e989a518a/best-swap-buffer-format-rgba-or-bgra-