mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 22:46:41 +00:00
Fix event counting for single vulkan indirect multidraws. Closes #2025
* We need to count the fake indirect subcommand *before* checking if we're in range, otherwise replaying up to but not including the draw will miscount and replay the draw itself.
This commit is contained in:
@@ -408,6 +408,10 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
{
|
||||
// for single draws, it's pretty simple
|
||||
|
||||
// account for the fake indirect subcommand before checking if we're in re-record range
|
||||
if(count > 0)
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
|
||||
if(InRerecordRange(m_LastCmdBufferID) && IsDrawInRenderPass())
|
||||
{
|
||||
commandBuffer = RerecordCmdBuf(m_LastCmdBufferID);
|
||||
@@ -424,10 +428,6 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
m_DrawcallCallback->PostRedraw(eventId, commandBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
// account for the fake indirect subcommand
|
||||
if(count > 0)
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -785,6 +785,10 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
{
|
||||
// for single draws, it's pretty simple
|
||||
|
||||
// account for the fake indirect subcommand before checking if we're in re-record range
|
||||
if(count > 0)
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
|
||||
if(InRerecordRange(m_LastCmdBufferID) && IsDrawInRenderPass())
|
||||
{
|
||||
commandBuffer = RerecordCmdBuf(m_LastCmdBufferID);
|
||||
@@ -802,10 +806,6 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
m_DrawcallCallback->PostRedraw(eventId, commandBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
// account for the fake indirect subcommand
|
||||
if(count > 0)
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user