The first paragraph of section 6.5 says:
A pipeline barrier inserts an execution dependency and a set of memory dependencies between a set of commands earlier in the command buffer and a set of commands later in the command buffer.
This suggests that barriers are limited to commands in the command buffer. Later on you say:
If
vkCmdPipelineBarrieris called outside a render pass instance, then the first set of commands is all prior commands submitted to the queue and recorded in the command buffer and the second set of commands is all subsequent commands recorded in the command buffer and submitted to the queue. IfvkCmdPipelineBarrieris called inside a render pass instance, then the first set of commands is all prior commands in the same subpass and the second set of commands is all subsequent commands in the same subpass.
The second sentence seems to suggest that self-dependencies can act between commands in different command buffers (for secondary CBs, presumably). Whereas the first sentence suggests that only commands in the _same_ command buffer as the barrier are affected. That is, it's not clear if "recorded in the command buffer" means "recorded in the _same_ command buffer" or "recorded in _some_ command buffer".
But the fact that the sentence talks about what is submitted to the queue suggests that it also permits barriers to act across command buffers. So... which is it?
They affect commands in other command buffers. We should fix the sentence in 6.5.
This should be fixed in the 1.0.35 spec update, as part of the synchronization language rewrite.
Most helpful comment
They affect commands in other command buffers. We should fix the sentence in 6.5.