mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-12 16:55:49 +00:00
Change vkCmdExecuteCommands action callback to use full event range
Use full event range in the command buffer instead of the actions range
This commit is contained in:
@@ -5720,16 +5720,20 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
|
||||
auto it = std::lower_bound(m_ActionUses.begin(), m_ActionUses.end(), use);
|
||||
if(it != m_ActionUses.end())
|
||||
{
|
||||
uint32_t eventId = it->eventId + 2;
|
||||
// Skip over the vkCmdExecuteCommands
|
||||
uint32_t eventId = it->eventId + 1;
|
||||
|
||||
for(uint32_t i = 0; i < (uint32_t)rerecordedCmds.size(); i++)
|
||||
{
|
||||
ResourceId cmd = GetResID(pCommandBuffers[i]);
|
||||
BakedCmdBufferInfo &info = m_BakedCmdBufferInfo[cmd];
|
||||
if(info.action && info.action->children.size() > 0)
|
||||
uint32_t eventCount = info.eventCount;
|
||||
// Skip over the virtual marker vkBeginCommandBuffer
|
||||
uint32_t firstEventId = eventId + 1;
|
||||
// firstEventId -> lastEventId is an inclusive range
|
||||
uint32_t lastEventId = firstEventId + eventCount - 1;
|
||||
if(eventCount > 0)
|
||||
{
|
||||
uint32_t firstEventId = eventId + info.action->children.front().action.eventId;
|
||||
uint32_t lastEventId = eventId + info.action->children.back().action.eventId;
|
||||
m_ActionCallback->PreCmdExecute(eventId, firstEventId, lastEventId,
|
||||
commandBuffer);
|
||||
ObjDisp(commandBuffer)
|
||||
@@ -5743,7 +5747,8 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
|
||||
->CmdExecuteCommands(Unwrap(commandBuffer), 1, &rerecordedCmds[i]);
|
||||
}
|
||||
|
||||
eventId += 2 + m_BakedCmdBufferInfo[cmd].eventCount;
|
||||
// Skip over the final event and virtual marker vkEndCommandBuffer
|
||||
eventId = lastEventId + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user