Search code examples
directxdirect3ddxgi

Fullscreen Optimizations - How to tell when swapchain is being presented directly to display?


I'm curious whether a fullscreen SwapChainPanel gets optimized by Fullscreen optimizations:

To get back this performance overhead, we enhanced the DWM to recognize when a game is running in a borderless full screen window with no other applications on the screen. In this circumstance, the DWM gives control of the display and almost all the CPU/GPU power to the game

I came across this article

https://learn.microsoft.com/en-us/windows/win32/comp_swapchain/comp-swapchain#presentation-modescomposition-multiplane-overlay-and-independent-flip

which talks about direct scanouts and independent flips iflips as opposed to composition by DWM using 3D graphics. I'm going to read it and report back in.

I'm also curious whether using DXGI_FORMAT_R8G8B8A8_UNORM vs DXGI_FORMAT_B8G8R8A8_UNORM has any consequences for present efficiency.


Solution

  • Shawn also recommends

    Check out the PresentMon tool to get insight into which of the above was used.

    in his article https://devblogs.microsoft.com/directx/dxgi-flip-model/

    SpecialK also will tell you the present mode and they have some good docs

    Also confusingly there is a new feature called Hardware Flip queue which avoids overhead from DXGK (i.e. presenting independently from DXGK), as opposed to iFlip Hardware: Independent Flip which is independent from DWM (but not DXGK).