Make sure to do drawcall callback for indirect draws

This commit is contained in:
baldurk
2016-04-24 13:48:50 +02:00
parent 90e96e2fd6
commit 91b05e41e3
@@ -1168,7 +1168,16 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(
if(ShouldRerecordCmd(cmdid) && InRerecordRange())
{
commandBuffer = RerecordCmdBuf(cmdid);
uint32_t eventID = HandlePreDraw(commandBuffer);
ObjDisp(commandBuffer)->CmdDrawIndirect(Unwrap(commandBuffer), Unwrap(buffer), offs, cnt, strd);
if(eventID && m_DrawcallCallback->PostDraw(eventID, commandBuffer))
{
ObjDisp(commandBuffer)->CmdDrawIndirect(Unwrap(commandBuffer), Unwrap(buffer), offs, cnt, strd);
m_DrawcallCallback->PostRedraw(eventID, commandBuffer);
}
}
}
else if(m_State == READING)
@@ -1271,7 +1280,16 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(
if(ShouldRerecordCmd(cmdid) && InRerecordRange())
{
commandBuffer = RerecordCmdBuf(cmdid);
uint32_t eventID = HandlePreDraw(commandBuffer);
ObjDisp(commandBuffer)->CmdDrawIndexedIndirect(Unwrap(commandBuffer), Unwrap(buffer), offs, cnt, strd);
if(eventID && m_DrawcallCallback->PostDraw(eventID, commandBuffer))
{
ObjDisp(commandBuffer)->CmdDrawIndexedIndirect(Unwrap(commandBuffer), Unwrap(buffer), offs, cnt, strd);
m_DrawcallCallback->PostRedraw(eventID, commandBuffer);
}
}
}
else if(m_State == READING)