When execute commands, will a queue hold a semaphore while waits on aonther semaphore?
For example I got two command buffers, both submitted with waiting on semaphore A and semaphore B, I got a feeling that deadlock will never happen, since semaphores work in GPU are different with mutex in CPU, the semaphore protects the hole command buffer, a command buffer will only require all semaphores or none, sort like a banker algorithm.
I’m I right about this? If not, in what case will a queue holds a semaphore and wait on aonther semaphore? Is there any pracitice to avoid semaphore deadlocks?