Skip to content

Commit 93fc846

Browse files
committed
Don't modify command buffer loose events when adding them via submit
The command buffer might be submitted multiple times
1 parent 15dfa31 commit 93fc846

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,16 +351,14 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2 submitInfo, r
351351

352352
{
353353
// pull in any remaining events on the command buffer that weren't added to an action
354-
uint32_t i = 0;
355-
for(APIEvent &apievent : cmdBufInfo.curEvents)
354+
for(const APIEvent &event : cmdBufInfo.curEvents)
356355
{
356+
APIEvent apievent(event);
357357
apievent.eventId += m_RootEventID;
358358

359359
m_RootEvents.push_back(apievent);
360360
m_Events.resize(apievent.eventId + 1);
361361
m_Events[apievent.eventId] = apievent;
362-
363-
i++;
364362
}
365363

366364
for(auto it = cmdBufInfo.resourceUsage.begin(); it != cmdBufInfo.resourceUsage.end(); ++it)

0 commit comments

Comments
 (0)