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.
Resizing the back buffers of the swap chain in D3D11 vs D3D12
You don't have to "Release" a descriptor to resize the swapchain. You can reuse the same descriptor after resizing to recreate your RTV.
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?
🧙
No. Since D3D12 uses FLIP model swapchains, the API requirements of those include a ResizeBuffers after a fullscreen transition before you can Present again.
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.
🧙