Compute graph

Requirement: Compiled before use REQ_GRAPH_PRERECORDED
status: implemented

A compute graph shall be defined and compiled fully into command buffers before it can be submitted. Submitting a compiled graph shall not record command buffers.

Requirement: Multiple execution paths REQ_GRAPH_PATHS
status: implemented

A compiled graph shall support a fixed number of execution paths, each with its own command buffers, so that several frames can be in flight at once.

Requirement: Parallel execution on several queues REQ_GRAPH_PARALLEL_QUEUES
status: open

Compute graphs shall be able to run in parallel when more than one queue that can run compute graphs is available.

Requirement: Use from several threads REQ_GRAPH_THREADS
status: implemented

Compute graphs shall be creatable and submittable from different threads for the same Vulkan context.

Requirement: Outputs shared across queues REQ_GRAPH_SHARED_OUTPUTS
status: implemented

The output of a compute graph shall be usable as input by a compute graph running on another queue.

Specification: Topological ordering with Kahn's algorithm SPEC_GRAPH_ORDER
status: implemented

ComputeGraph::compileFrom() orders the elements with Kahn’s algorithm, sets them up and records one command buffer per path.

Test: Headless submit and wait TEST_GRAPH_HEADLESS_SUBMIT
status: verified
gtest: ComputeGraph.headlessSubmitAndWait

Compiles a render graph over several headless paths and submits each path with submitAndWait.

Test: Background graph beside the frames TEST_GRAPH_BACKGROUND_BESIDE_FRAMES
status: verified
gtest: ComputeGraph.backgroundQueueRunsBesideFrames

Builds and runs a graph on a worker thread while the main thread renders frames, then reads the graph’s output on the graphics queue.