Make sure to sync *all* GPU queues before processing ExecuteIndirect

This commit is contained in:
baldurk
2017-07-27 16:13:53 +01:00
parent 806876c540
commit 97e16e8333
3 changed files with 9 additions and 1 deletions
@@ -180,7 +180,8 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(UINT NumCommandLis
for(size_t c = 1; c < info.crackedLists.size(); c++)
{
m_pDevice->GPUSync();
// ensure all work on all queues has finished
m_pDevice->GPUSyncAllQueues();
// readback the patch buffer and perform patching
m_ReplayList->PatchExecuteIndirect(info, uint32_t(c - 1));
+6
View File
@@ -2142,6 +2142,12 @@ void WrappedID3D12Device::GPUSync(ID3D12CommandQueue *queue, ID3D12Fence *fence)
RDCASSERTEQUAL(hr, S_OK);
}
void WrappedID3D12Device::GPUSyncAllQueues()
{
for(size_t i = 0; i < m_QueueFences.size(); i++)
GPUSync(m_Queues[i], m_QueueFences[i]);
}
ID3D12GraphicsCommandList *WrappedID3D12Device::GetNewList()
{
ID3D12GraphicsCommandList *ret = NULL;
+1
View File
@@ -443,6 +443,7 @@ public:
void FlushLists(bool forceSync = false, ID3D12CommandQueue *queue = NULL);
void GPUSync(ID3D12CommandQueue *queue = NULL, ID3D12Fence *fence = NULL);
void GPUSyncAllQueues();
void StartFrameCapture(void *dev, void *wnd);
bool EndFrameCapture(void *dev, void *wnd);