mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 06:26:30 +00:00
Don't replay past end of indirect draws on vulkan. Closes #2590
* If the popmarker inserted at the end of an indirect multi-draw is selected this points past the end of the normal draws, but we don't want to replay that extra draw.
This commit is contained in:
@@ -914,6 +914,8 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
{
|
||||
uint32_t drawidx = 0;
|
||||
|
||||
ActionDescription *action = m_Actions[curEID];
|
||||
|
||||
if(m_FirstEventID <= 1)
|
||||
{
|
||||
// if we're replaying part-way into a multidraw, we can replay the first part
|
||||
@@ -922,6 +924,12 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
// works if we're replaying from the first multidraw to the nth (n less than Count)
|
||||
count = RDCMIN(count, m_LastEventID - baseEventID);
|
||||
}
|
||||
else if(action->flags & ActionFlags::PopMarker)
|
||||
{
|
||||
// if the popmarker is selected (most likely implicitly by a parent marker)
|
||||
// don't replay anything and don't try to set up the indirect buffer.
|
||||
count = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise we do the 'hard' case, draw only one multidraw
|
||||
@@ -996,7 +1004,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
stride = sizeof(VkDrawIndexedIndirectCommand);
|
||||
}
|
||||
|
||||
if(IsDrawInRenderPass())
|
||||
if(IsDrawInRenderPass() && count > 0)
|
||||
{
|
||||
uint32_t eventId =
|
||||
HandlePreCallback(commandBuffer, ActionFlags::Drawcall, drawidx + 1);
|
||||
|
||||
Reference in New Issue
Block a user