Wrapped swapchain textures should be tracked in resource manager

This commit is contained in:
baldurk
2021-08-27 13:14:13 +01:00
parent 2fd1b75270
commit 9e52554495
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -1704,6 +1704,10 @@ IUnknown *WrappedID3D11Device::WrapSwapchainBuffer(IDXGISwapper *swapper, DXGI_F
record->AddChunk(scope.Get());
}
else
{
GetResourceManager()->AddLiveResource(id, pTex);
}
}
if(buffer == 0 && IsCaptureMode(m_State) && m_SwapChains[swapper] == NULL)
+6
View File
@@ -1573,6 +1573,12 @@ IUnknown *WrappedID3D12Device::WrapSwapchainBuffer(IDXGISwapper *swapper, DXGI_F
states = {D3D12_RESOURCE_STATE_PRESENT};
}
}
else
{
WrappedID3D12Resource *wrapped = (WrappedID3D12Resource *)pRes;
GetResourceManager()->AddLiveResource(wrapped->GetResourceID(), wrapped);
}
}
if(IsCaptureMode(m_State))