diff --git a/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp index 904ad6333..23a0028e2 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp @@ -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)