From 6951b5b95a3fc79c80294b30c4b4fcff45e5712e Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 18 Jan 2018 14:50:57 +0000 Subject: [PATCH] force flush of command lists & GPU sync when doing non-partial replay * In some cases there was an unpredictable crash when starting a replay loop, doing a full frame replay immediately after a previous replay. There were no debug messages, and the debug layer fixed it - as did enabling single flush validate. It seems to me some timing/overloading issue, and doing this sync should be relatively harmless so we use this to avoid the crash. --- renderdoc/driver/d3d12/d3d12_device.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index 09ff62bc4..2469ca924 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -2493,6 +2493,8 @@ void WrappedID3D12Device::ReplayLog(uint32_t startEventID, uint32_t endEventID, // signalled or waited. So instead we just signal a dummy fence each new 'frame' for(size_t i = 0; i < m_Queues.size(); i++) m_Queues[i]->Signal(m_QueueFences[i], m_GPUSyncCounter); + + FlushLists(true); } D3D12ChunkType header = (D3D12ChunkType)m_pSerialiser->PushContext(NULL, NULL, 1, false);