The two commits before this one. A compute state whose descriptor requires no threadgroup size
predicts no VkPipeline at its creation: the local size and the threadgroup memory lengths come
from the dispatch. So its creation's record warmed none of its dispatches' pipelines, and each
was a cold driver compile at the program's first dispatch of that shape. On the Iris Xe these are
the compute kernels FAST-PATHS names.
Now a compute state's direct dispatch (dispatchThreadgroups: or dispatchThreads:) whose regions'
pipelines weren't all made hands the record hook one more record. It holds the creation's
descriptor and the dispatch: the threadgroup size, a dispatchThreads: grid cut down to one whole
threadgroup plus its ragged edge per axis, and the encoder's threadgroup memory lengths. Each
dispatch shape is recorded once per state, at most 16 per state (pipeline/dispatch_record.rs).
The warm pass creates the state, plans each recorded dispatch with nothing bound and the recorded
lengths, settles its variant through compute::settle_direct as the program's direct dispatch
does, and makes each region's VkPipeline on the pass thread. The program's making is then handed
the driver cache the pass filled. WarmStatistics::dispatch_pipelines_warmed counts them. Indirect
dispatches, threadgroup-range dispatches and tile dispatches record nothing. The record format
goes from 6 to 7; a format-6 record reads as none. The codec caps a record at 16 dispatches and
31 lengths each, on write and on read. The warm budget is unchanged.
Not covered: the program's dispatch still calls vkCreateComputePipelines (warm states share no
live variant with the program), and a dispatch whose bindings specialize its regions still makes
its own pipelines at first dispatch.
Verified (potluck jobs, on the branch at 42d9d77e54):
- lavapipe (m3-max-18386): 50/50, the warm, warm_record, dispatch_pending, dispatch_making,
deferred_calls, driver_pipeline_compile and creation_log tests. The new device test: on a device
warmed with both records, records_warmed 2 and dispatch_pipelines_warmed 1, and the program's
first dispatch gave [makings handed a cache the device held, pipelines made, functions
translated] = [1, 1, 0]; on a control warmed with the creation's record alone, [0, 1, 0] and 0.
lavapipe reported 0 driver hits and 1 miss on both devices; the cache sharing is the only
structural check there.
- An earlier run (18374) caught the pass making 2 pipelines the program never asks for (settled
through ComputePipelineState::settle alone); 42d9d77e54 fixes it.
- Lint (18388): fmt check, clippy in all three configurations, rustdoc, api_signatures and
api_surface 15/15, fast_paths 27/27, warm_record 5/5.
Not yet run: a driver hit on a real GPU (the Iris run is queued).