Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vulkan command execution order

Quoting Vulkan 1.0 specification document, chapter.5(Command Buffers) 4th paragraph,

"Unless otherwise specified, and without explicit synchronization, the various commands submitted to a queue via command buffers may execute in arbitrary order relative to each other, and/or concurrently"

In 1st paragraph of chapter 2.1.1(Queue Operation), it also states

"... Command buffers submitted to a single queue are played back in the order they were submitted, and commands within each buffer are played back in the order they were recorded"

Does "arbitrary order" in chapter 5 mean even out-of-order? Then isn't it a conflict to statement of chapter 2.1.1 "played back in the order they were submitted"? Or are commands just "PLAYED BACK" in-order but "EXECUTED" out-of-order?

like image 323
jspark Avatar asked Mar 10 '16 07:03

jspark


1 Answers

Chapter 2.1.1 is defining the API ordering of commands: the order of command buffers submitted into the queue, and the order of commands within the command buffer (and the order of primitives within a command).

Chapter 5 is saying that the API ordering doesn't mean anything about execution ordering unless some text specifically says otherwise. Chapter 2.1.1 includes specific exceptions to this (blending, depth test), and Chapter 6 introduces execution dependencies which can enforce execution ordering, based on the API ordering defined in 2.1.1. But outside of cases that explicitly declare ordering, the API ordering does not prohibit the queue from doing whatever else it wants with regard to execution.

That being said, the spec explains that poorly.

like image 197
Nicol Bolas Avatar answered Nov 12 '22 11:11

Nicol Bolas