Jump to content
  • Advertisement
Sign in to follow this  
matt77hias

Resizing the back buffers of the swap chain in D3D11 vs D3D12

Recommended Posts

Before invoking IDXGISwapChain::ResizeBuffers, all references to the back buffers need to be released. In D3D11, this includes releasing the ID3D11RenderTargetView to those back buffers. I wonder whether there is an equivalent in D3D12 for the ID3D12DescriptorHeap? Does the latter have explicit references to the back buffers? If so, how are those references released? As I assume it could not be as inefficient as destroying the ID3D12DescriptorHeap.

Share this post


Link to post
Share on other sites
Advertisement

You don't have to "Release" a descriptor to resize the swapchain. You can reuse the same descriptor after resizing to recreate your RTV.

Share this post


Link to post
Share on other sites
8 hours ago, simco50 said:

You don't have to "Release" a descriptor to resize the swapchain. You can reuse the same descriptor after resizing to recreate your RTV.

Way nicer than D3D11! 🙂 So as a corollary, just calling IDXGISwapChain::SetFullscreenState now suffices to switch between fullscreen and windowed mode, and vice versa?

Share this post


Link to post
Share on other sites

No. Since D3D12 uses FLIP model swapchains, the API requirements of those include a ResizeBuffers after a fullscreen transition before you can Present again.

Share this post


Link to post
Share on other sites
17 hours ago, SoldierOfLight said:

No. Since D3D12 uses FLIP model swapchains, the API requirements of those include a ResizeBuffers after a fullscreen transition before you can Present again.

MSDN states: "For the flip presentation model, after you transition the display state to full screen, you must call ResizeBuffers to ensure that your call to IDXGISwapChain1::Present1 succeeds.", which does not explicitly mention IDXGISwapChain::Present.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!