D3D12 ShaderDebugger reset the debug allocator after submits

Performance win for shader debugger for ops run on the GPU (math, sample)
Fixes GPU errors if the shader debugger does a very large amount of GPU ops
This commit is contained in:
Jake Turner
2025-05-23 17:06:50 +01:00
parent 1ca3f25850
commit e4d027a79c
@@ -128,6 +128,7 @@ bool D3D12ShaderDebug::CalculateMathIntrinsic(bool dxil, WrappedID3D12Device *de
ID3D12CommandList *l = cmdList;
device->GetQueue()->ExecuteCommandLists(1, &l);
device->InternalQueueWaitForIdle();
device->GetDebugManager()->ResetDebugAlloc();
}
D3D12_RANGE range = {0, sizeof(Vec4f) * 6};
@@ -373,6 +374,7 @@ bool D3D12ShaderDebug::CalculateSampleGather(
ID3D12CommandList *l = cmdList;
device->GetQueue()->ExecuteCommandLists(1, &l);
device->InternalQueueWaitForIdle();
device->GetDebugManager()->ResetDebugAlloc();
}
rs = prevState;
@@ -2314,6 +2316,7 @@ ShaderDebugTrace *D3D12Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
ID3D12CommandList *l = cmdList;
m_pDevice->GetQueue()->ExecuteCommandLists(1, &l);
m_pDevice->InternalQueueWaitForIdle();
m_pDevice->GetDebugManager()->ResetDebugAlloc();
}
{
@@ -2917,6 +2920,7 @@ ShaderDebugTrace *D3D12Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
ID3D12CommandList *l = cmdList;
m_pDevice->GetQueue()->ExecuteCommandLists(1, &l);
m_pDevice->InternalQueueWaitForIdle();
m_pDevice->GetDebugManager()->ResetDebugAlloc();
}
{
@@ -3551,6 +3555,7 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
ID3D12CommandList *l = cmdList;
m_pDevice->GetQueue()->ExecuteCommandLists(1, &l);
m_pDevice->InternalQueueWaitForIdle();
m_pDevice->GetDebugManager()->ResetDebugAlloc();
}
{