Properly release all D3D12 objects

This commit is contained in:
baldurk
2023-09-27 12:40:31 +01:00
parent 2576a7b7f6
commit 5addf044d7
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -498,6 +498,11 @@ D3D12DebugManager::~D3D12DebugManager()
SAFE_RELEASE(m_DiscardFloatPS);
SAFE_RELEASE(m_DiscardIntPS);
SAFE_RELEASE(m_EIPatchRootSig);
SAFE_RELEASE(m_EIPatchBufferData);
SAFE_RELEASE(m_EIPatchPso);
SAFE_RELEASE(m_EIPatchScratchBuffer);
SAFE_RELEASE(m_DebugAlloc);
SAFE_RELEASE(m_DebugList);
SAFE_RELEASE(m_DebugFence);
+5
View File
@@ -77,6 +77,11 @@ void D3D12Replay::Shutdown()
FreeLibrary(D3D12Lib);
D3D12_CleanupReplaySDK();
// we should have unloaded both modules here by now. If we haven't - we probably leaked some D3D12
// objects. This can cause subsequent captures to fail to open.
RDCASSERT(GetModuleHandleA("d3d12.dll") == NULL);
RDCASSERT(GetModuleHandleA("d3d12core.dll") == NULL);
}
void D3D12Replay::Initialise(IDXGIFactory1 *factory)