Fix refcounting around swapchain resizing on D3D12

This commit is contained in:
baldurk
2016-07-10 14:49:17 +03:00
parent 1f1467b06b
commit b9600e6f28
+6
View File
@@ -482,6 +482,12 @@ void WrappedID3D12Device::ApplyBarriers(vector<D3D12_RESOURCE_BARRIER> &barriers
void WrappedID3D12Device::ReleaseSwapchainResources(WrappedIDXGISwapChain3 *swap)
{
for(int i = 0; i < swap->GetNumBackbuffers(); i++)
{
WrappedID3D12Resource *wrapped = (WrappedID3D12Resource *)swap->GetBackbuffers()[i];
SAFE_RELEASE(wrapped);
}
if(swap)
{
DXGI_SWAP_CHAIN_DESC desc;