I'm struggling to understand when exactly execution dependency chains are formed.
The vulkan spec states:
An execution dependency chain is a sequence of execution dependencies that form a happens-before relation between the first dependency’s ScopedOps1 and the final dependency’s ScopedOps2. For each consecutive pair of execution dependencies, a chain exists if the intersection of Scope2nd in the first dependency and Scope1st in the second dependency is not an empty set.
and:
Including a particular pipeline stage in the first synchronization scope of a command implicitly includes logically earlier pipeline stages in the synchronization scope. Similarly, the second synchronization scope includes logically later pipeline stages.
Now consider slide 11 of this presentation.
The second synchronization scope of
Barrier1includes logically later stages as per spec. So ifBarrier1.dstMaskisDRAW_INDIRECT, it DOES includeCOMPUTE_SHADER. Similarly, the first synchronization scope ofBarrier2includes logically earlier stages as per spec. So ifBarrier2.srcMaskisCOMPUTE_SHADER, it DOES includeDRAW_INDIRECT. Then why is it, according to this slide, that this configuration DOES NOT constitute a execution dependency chain between the two barriers?Also, if I set
Barrier1.dstMasktoBOTTOM_OF_PIPE, how does it suddenly form a chain with anything other thanBOTTOM_OF_PIPEin the srcMask of the next barrier? The spec clearly statesBOTTOM_OF_PIPEis equivalent toALL_COMMANDS_BITwith access flags set to 0 when specified in the first scope, not the second??Is the linked presentation wrong?
I was wondering how to synchronize separate render passes, or synchronize something from inside a render pass with something outside a render pass. After scouring the internet I found you can specify
BOTTOM_OF_PIPEin the second scope and chain onto it with eitherBOTTOM_OF_PIPEorALL_COMMANDSin the first scope of a next dependency (as suggested here, and slide 12 in the presentation linked above).Is this correct? I can find nothing in the spec to support this.
