Sync on all queue fences to ensure work is done before shutdown

This commit is contained in:
baldurk
2016-10-26 23:14:14 +02:00
parent a69012e50d
commit dd0a68c9c9
+8
View File
@@ -326,7 +326,15 @@ WrappedID3D12Device::~WrappedID3D12Device()
RenderDoc::Inst().RemoveDeviceFrameCapturer((ID3D12Device *)this);
for(size_t i = 0; i < m_QueueFences.size(); i++)
{
m_GPUSyncCounter++;
m_Queues[i]->Signal(m_QueueFences[i], m_GPUSyncCounter);
m_QueueFences[i]->SetEventOnCompletion(m_GPUSyncCounter, m_GPUSyncHandle);
WaitForSingleObject(m_GPUSyncHandle, 10000);
SAFE_RELEASE(m_QueueFences[i]);
}
DestroyInternalResources();