8.2. Shader Execution

At each stage of the pipeline, multiple invocations of a shader may execute
simultaneously. Further, invocations of a single shader produced as the
result of different commands may execute simultaneously. The relative
execution order of invocations of the same shader type is undefined. Shader
invocations may complete in a different order than that in which the
primitives they originated from were drawn or dispatched by the application.
However, fragment shader outputs are written to attachments in
API order.

The relative order of invocations of different shader types is largely
undefined. However, when invoking a shader whose inputs are generated from a
previous pipeline stage, the shader invocations from the previous stage are
guaranteed to have executed far enough to generate input values for all
required inputs.