mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 14:36:35 +00:00
Fix D3D12 Pixel History ExecuteIndirect with multiple draws
Update m_IndirectData.argsOffset inside the loop Clear the m_IndirectData outside of the loop Add not NULL assert for argsBuffer in ReplayDraw() helper
This commit is contained in:
@@ -4192,6 +4192,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
|
||||
(pCountBuffer ? pCountBuffer->GetGPUVirtualAddress() : 0) + CountBufferOffset,
|
||||
MaxCommandCount);
|
||||
|
||||
m_Cmd->m_IndirectData.commandSig = pCommandSignature;
|
||||
m_Cmd->m_IndirectData.argsBuffer = patched.first;
|
||||
m_Cmd->m_IndirectData.argsOffset = patched.second;
|
||||
|
||||
@@ -4223,7 +4224,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
|
||||
|
||||
for(uint32_t i = 0; i < countToReplay; i++)
|
||||
{
|
||||
m_Cmd->m_IndirectData.commandSig = pCommandSignature;
|
||||
ActionFlags drawType =
|
||||
comSig->sig.graphics ? ActionFlags::Drawcall : ActionFlags::Dispatch;
|
||||
|
||||
@@ -4253,12 +4253,12 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
|
||||
}
|
||||
}
|
||||
|
||||
m_Cmd->m_IndirectData.commandSig = NULL;
|
||||
m_Cmd->m_IndirectData.argsBuffer = NULL;
|
||||
m_Cmd->m_IndirectData.argsOffset = 0;
|
||||
|
||||
argOffset += comSig->sig.ByteStride;
|
||||
m_Cmd->m_IndirectData.argsOffset += comSig->sig.ByteStride;
|
||||
}
|
||||
m_Cmd->m_IndirectData.commandSig = NULL;
|
||||
m_Cmd->m_IndirectData.argsBuffer = NULL;
|
||||
m_Cmd->m_IndirectData.argsOffset = 0;
|
||||
|
||||
D3D12MarkerRegion::End(list);
|
||||
}
|
||||
|
||||
@@ -5595,6 +5595,7 @@ void WrappedID3D12Device::ReplayDraw(ID3D12GraphicsCommandListX *cmd, const Acti
|
||||
// TODO: support replay of draws not in callback
|
||||
D3D12CommandData *cmdData = m_Queue->GetCommandData();
|
||||
RDCASSERT(cmdData->m_IndirectData.commandSig != NULL);
|
||||
RDCASSERT(cmdData->m_IndirectData.argsBuffer != NULL);
|
||||
cmd->ExecuteIndirect(cmdData->m_IndirectData.commandSig, 1, cmdData->m_IndirectData.argsBuffer,
|
||||
cmdData->m_IndirectData.argsOffset, NULL, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user