Skip to main content

Module pipeline_seed

Module pipeline_seed 

Expand description

The session’s read-only vello pipeline cache every app starts from. A pipeline cache every app starts from, written by the session.

Each app has its own home, so each has its own Mesa shader cache, and the first launch of every app on a machine compiles vello’s ~30 compute pipelines from scratch: ~300 ms on a Snapdragon X with turnip, seconds on lavapipe. The compositor renders with the same vello on the same device, so it already holds every one of them compiled. It publishes them as a wgpu::PipelineCache blob in $XDG_RUNTIME_DIR/tilo/pipeline-seed/, and the launcher binds that directory read-only into every sandbox and names it in TILO_PIPELINE_SEED_DIR (the host environment’s paths.pipeline_seed).

Only the session writes the seed. Apps read it, and never write anything another app reads: a cache another app could write would let it plant binaries in its neighbours’ GPU pipelines. The blob is keyed by wgpu::util::pipeline_cache_key (vendor and device), and both wgpu and the driver validate its header against the device, so a seed from another GPU or driver version is ignored rather than trusted.

Functions§

empty
An empty pipeline cache for the session to fill and then publish: what cache.get_data() returns afterwards, written to seed_file in the directory the launcher binds.
seed_file
The seed blob’s file under dir for this adapter, if its backend has pipeline caches at all.
seeded
A pipeline cache started from the session’s seed, when the launcher provided one for this device. None leaves vello compiling without one.