Skip to content

Commit ccc2a50

Browse files
committed
D3D12 EI ActionCallback replay don't generate negative argidx
For an EI with a single argument then curEID == baseEventID because the fake push/pop markers are not present
1 parent 3ba5cc4 commit ccc2a50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4420,7 +4420,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
44204420

44214421
if(m_Cmd->m_FirstEventID > 1)
44224422
{
4423-
const uint32_t argidx = (curEID - baseEventID - 1);
4423+
const uint32_t argidx = (curEID > baseEventID) ? (curEID - baseEventID - 1) : 0;
44244424
const uint32_t execidx = argidx / comSig->sig.arguments.count();
44254425

44264426
argOffset += comSig->sig.ByteStride * execidx;
@@ -4516,7 +4516,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
45164516
}
45174517
else
45184518
{
4519-
const uint32_t argidx = (curEID - baseEventID - 1);
4519+
const uint32_t argidx = (curEID > baseEventID) ? (curEID - baseEventID - 1) : 0;
45204520
const uint32_t execidx = argidx / comSig->sig.arguments.count();
45214521

45224522
// don't do anything when selecting the final popmarker as well - everything will have

0 commit comments

Comments
 (0)