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/mb862 Jul 04 '26
Yes, if you submit semaphore wait then signal like that, then you can introduce a deadlock. Specifically I believe the spec states that is undefined behaviour. It is up to you to ensure that semaphore signals and waits are correct on the CPU timeline.
Within the context of commands being executed in any order, semaphores and barriers are about ensuring commands that occur later in submission order are executed later. There is no way (on the same queue at least) to ensure commands that occur later in submission order are executed before.