mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Prevent GPU hang in postvs incremental draws with many instances
This commit is contained in:
committed by
Baldur Karlsson
parent
ecb1ba7804
commit
6756189324
@@ -978,6 +978,20 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
|
||||
list->DrawInstanced(drawcall->numIndices, inst, drawcall->vertexOffset,
|
||||
drawcall->instanceOffset);
|
||||
}
|
||||
|
||||
// Instanced draws with a wild number of instances can hang the GPU, sync after every 1000
|
||||
if((inst % 1000) == 0)
|
||||
{
|
||||
list->Close();
|
||||
|
||||
l = list;
|
||||
m_pDevice->GetQueue()->ExecuteCommandLists(1, &l);
|
||||
m_pDevice->GPUSync();
|
||||
|
||||
GetDebugManager()->ResetDebugAlloc();
|
||||
|
||||
list = GetDebugManager()->ResetDebugList();
|
||||
}
|
||||
}
|
||||
|
||||
list->Close();
|
||||
|
||||
Reference in New Issue
Block a user