From c364b102bc45cbaa8d805a6432c400331e343610 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 b41f71c95..85b2fd63f 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -2650,6 +2650,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); } if(!partial)