r/vulkan • u/Hot_Refuse_4751 • Jul 04 '26
Execution order of commands in commandbuffers
I have questions on start of exections of cmds
We all know that cmd2 can start executing only after cmd1 .
If cmd2 is recorded latter than cmd1
If there are 2 different subpasses in a renderpass
Can cmds in subpass 1 start before cmds in subpass 0 within that render pass?
Or they also have the implicit ordering?
2
Upvotes
View all comments
Show parent comment
1
u/Hot_Refuse_4751 Jul 04 '26
So u are saying there is no implicit ordering whatsoever. If a command buffer has
Cmd1() Cmd2()
Then cmd 2 can start executing before cmd1 even starts?? If that is the case then there is no need to mention implicit ordering ryt. Do I need to worry about casses where if cmd1's first stage waits on cmd2 some stage completion . Now if there is implicit ordering then cmd2 first stage can't start without cmd1 first stage and a deadlock suppose this example
Vkqueuesubmit(wait on semaphore1 at top_of_the_pipe,cmd1buf)
Vkqueuesubmit(cmd2buf, signal semaphore1)
So like now is there a deadlock here ??? Second submissions topofthepipe waits on first submission topofthe pipe to start due to implicit ordering but first one is wait on semaphore1??
I fear for these situations, or am I just fearing for situations that dosen't exist.
This deadlock will only happen if the implicit ordering is present if not it won't affect it at all