Jump to content
  • Advertisement
Sign in to follow this  
Shnoutz

DX12 "True immediate independent flip mode"

This topic is 897 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I am starting to convert my stuff to DX12. Exiting!

 

I am in the process of creating the window and swap chain and I would like to support (some form of) fullscreen mode in my app.

 

The obvious thing I did was to take all my old DXGI setup and copy it in my DX12 app. I had to modify a few things like the swap effect mode (FLIP_DISCARD) and the format of the buffers but it was mostly the same. I noticed that in fullscreen, the frame-rate is capped at the screen refresh rate. (That was not the case with DX11)

 

Reading this:
https://developer.nvidia.com/dx12-dos-and-donts#swapchains

 

And watching this:



I would like to know more about "True immediate independent flip mode". It seems to be the way to go for uncapped fullscreen / smooth vsync.

 

Anyone knows what that means and how to set it up?

 

Cheers,

 

Shnoutz

Share this post


Link to post
Share on other sites
Advertisement
Immediate flip immediate mode is the replacement of the fullscreen exclusive mode. The behaviour is almost the same: DWM bypassing, unleashed frame-rate and possible tearing. The main difference is the "non-exclusive" mode: this allow fast alt-tabbing and desktop switch, as well as the having OS notification (if allowed by the user) and elements over-focused the main application (like volume control). In the last scenario the presented frames are temporarily synchronized with the desktop refresh rate until the OS element disappear from the screen (the other frames are automatically discarded).
 
To enter in fullscreen immediate mode you need to call setfullscreenstate( true) and manually handling WM_SIZE meessage calling resizebuffer(). Current AMD driver should still use DWM composition, so it may not work as expected..
 
edit: here is an example how to handle fullscreen transitions: https://github.com/Microsoft/DirectX-Graphics-Samples (see D3D12Fullscreen)
 
Please note that this mode is not currently supported on WStore (aka UWP) applications. Edited by Alessio1989

Share this post


Link to post
Share on other sites

Thank you!

Its funny you mention that particular sample as its the one I used to modify my code. My stuff right now is pretty much a carbon copy of it.

The thing I do not understand is in window mode I get FPS > 1000 but in fullscreen mode its 60. I have a nVidia, is the mode not supported on my card?

 

When you say manually handle the WM_SIZE is this the only way? I tend to ignore the message and check for size differences at the beginning of the frame.

Share this post


Link to post
Share on other sites
I am not aware of NVIDIA current drivers support about immediate mode, but according to what we can see on the web, they should handle unleashed framerate (at least on ashes of singularity beta)
Did you set the DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH flag? If so you should call ResizeTarget(). I am not sure if checking for difference sizes of the frame is a good practice, because according to MSDN all the frame buffers must have the same size. Edited by Alessio1989

Share this post


Link to post
Share on other sites
Not sure if this is helpful, or even right, but I saw that video and somewhere in there he said it is not possible to have unleashed fps in fullscreen mode. Now if there was a way to check if present was ready or not, you could skip the present call that frame. I think there is a way to do that, he might have also mentioned that in the video. Or maybe it was telling present not to block

Share this post


Link to post
Share on other sites

Hi, guy in the video here. Sorry for taking so long to find this, I don't typically monitor these forums. What you're describing sounds pretty unexpected.

 

First question: Are you running on a secondary monitor? I think there's currently some limitations there, where the optimization progression stops at Direct Flip and doesn't progress to Independent Flip.

 

If no, then second question:

Can you try running PresentMon (https://github.com/GameTechDev/PresentMon) either on a secondary monitor or in the background logging to a CSV, and tell me what you see for the present mode that's being detected?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!