We have created a UI framework using DirectX and Win32 APIs. Recently we started using iFlip mode. But with iFlip mode DWM automatically switches back to iFlip mode from composited mode, when a popup/ occluded window disappears. But we dont have control over that switch. Previously, when we were using composited mode, we can always setFullScreen immediately after we lost full screen exclusivity. Latency is critical in our application. So we want to either force or request Windows to switch to iFlip mode as soon as possible. how to do this?

We are using Win 11, DirectX 11 and DXGI_SWAP_EFFECT_FLIP_DISCARD as the swapEffect in the swapchain

2 Replies 2

FWIW, I think (can't find any reference about the "switch back" exactly) it should be pretty automatic when iFlip becomes possible again (ie: overlapped windows disappear, or render window dimentions is compatible again, etc.). PresentMon and/or Pix should show the switches back and forth to confirm. Maybe some reproducing project could also help understand your problem.

@Simon Mourier, Thanks for your thoughts. We confirmed that it gets back to iFlip mode after the ovelapping windows disappear. But we just don't know how many frames it takes to get back to iFlip mode. I was wondering if there is a solution to request/force/fool the DWM to re-evalulate the current state immediately and switch to iFlip mode sooner than it usually takes.

something like the following steps:

swapChain->SetFullscreenState(TRUE, nullptr);
swapChain->ResizeBuffers(...);
swapChain->Present(0, 0);

But I could not find any authentic source that gives a guranteed and safer solution.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.