Fix eventID counting for count=1 indirect draws

This commit is contained in:
baldurk
2018-11-01 14:03:58 +00:00
parent d523153fcf
commit 4281e89764
2 changed files with 9 additions and 2 deletions
@@ -631,7 +631,9 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
structuriser.Serialise("command", VkDrawIndirectCommand());
}
m_StructuredFile->chunks.push_back(fakeChunk);
m_StructuredFile->chunks.insert(m_StructuredFile->chunks.size() - 1, fakeChunk);
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
AddEvent();
@@ -1005,7 +1007,9 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
structuriser.Serialise("command", VkDrawIndexedIndirectCommand());
}
m_StructuredFile->chunks.push_back(fakeChunk);
m_StructuredFile->chunks.insert(m_StructuredFile->chunks.size() - 1, fakeChunk);
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
AddEvent();
@@ -485,6 +485,9 @@ bool WrappedVulkan::PatchIndirectDraw(VkIndirectPatchType type, DrawcallDescript
{
SDChunk *chunk = m_StructuredFile->chunks[draw.events.back().chunkIndex];
if(chunk->metadata.chunkID != (uint32_t)VulkanChunk::vkCmdIndirectSubCommand)
chunk = m_StructuredFile->chunks[draw.events.back().chunkIndex - 1];
SDObject *command = chunk->FindChild("command");
// single draw indirect draws don't have a command child since it can't be added without