mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-12 01:30:57 +00:00
Fix EID being wrong if vkQueueSubmit has multiple submit infos
Move the m_RootEventID-- to outside the loop over the number of submits
This commit is contained in:
@@ -285,7 +285,8 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2 submitInfo, r
|
||||
// we're adding multiple events, need to increment ourselves
|
||||
m_RootEventID++;
|
||||
|
||||
if(submitInfo.commandBufferInfoCount == 0)
|
||||
uint32_t numCmds = submitInfo.commandBufferInfoCount;
|
||||
if(numCmds == 0)
|
||||
{
|
||||
DoSubmit(queue, submitInfo);
|
||||
|
||||
@@ -304,7 +305,6 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2 submitInfo, r
|
||||
}
|
||||
|
||||
// submit command buffers one by one
|
||||
uint32_t numCmds = submitInfo.commandBufferInfoCount;
|
||||
submitInfo.commandBufferInfoCount = 1;
|
||||
for(uint32_t c = 0; c < numCmds; c++)
|
||||
{
|
||||
@@ -393,10 +393,6 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2 submitInfo, r
|
||||
m_RootEventID++;
|
||||
}
|
||||
}
|
||||
|
||||
// account for the outer loop thinking we've added one event and incrementing,
|
||||
// since we've done all the handling ourselves this will be off by one.
|
||||
m_RootEventID--;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -427,9 +423,6 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2 submitInfo, r
|
||||
}
|
||||
}
|
||||
|
||||
// same accounting for the outer loop as above
|
||||
m_RootEventID--;
|
||||
|
||||
if(submitInfo.commandBufferInfoCount == 0)
|
||||
{
|
||||
// do nothing, don't bother with the logic below
|
||||
@@ -1484,6 +1477,9 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(SerialiserType &ser, VkQueue queue,
|
||||
|
||||
ReplayQueueSubmit(queue, submitInfo, basename);
|
||||
}
|
||||
// account for the outer loop thinking we've added one event and incrementing,
|
||||
// since we've done all the handling ourselves this will be off by one.
|
||||
m_RootEventID--;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1652,6 +1648,9 @@ bool WrappedVulkan::Serialise_vkQueueSubmit2(SerialiserType &ser, VkQueue queue,
|
||||
|
||||
ReplayQueueSubmit(queue, pSubmits[sub], basename);
|
||||
}
|
||||
// account for the outer loop thinking we've added one event and incrementing,
|
||||
// since we've done all the handling ourselves this will be off by one.
|
||||
m_RootEventID--;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user