The pipeline file (pipeline_file.c, <game>.vkshaders) keeps shaders (PF_SHADER, PF_SOURCE) and whole pipeline
keys (PF_PIPE). The design adds no record type. A PF_PIPE key gives its four part keys through vk_pipe_split.
So at startup the reading thread (pf_load_pipe) queues on the file's queue, in this order:
PF_PIPE, each one time (the part tables find the repeats). This is the slow work.PF_PIPE, when its parts are ready.PF_PIPE that a draw binds in 3 presents, on the lowest queue.With warm caches, step 1 is a hit in g_pipeline.pcache for each part, and step 3 a hit for each pipeline. The file key
(pf_key, PF_GUEST_VERSION) does not change, because a PipeKey keeps its meaning. A field that becomes 0 for
dynamic state is set to 0 only in the part key, never in the record.
vk_pipelines.bin keeps what the driver compiled, for parts and for optimized pipelines. The NVIDIA driver also has
its own disk cache. With both warm, a second run compiles nothing.
Fossilize and the Granite post (part 6 of its tour of the Vulkan backend) fill the pipeline tables of a run from the create infos of earlier runs, replayed on many threads at startup. The pipeline file is that already, for whole pipelines. This design only adds the parts in front of it.
Made from docs/layers/gpu/pipeline-libraries.md at 69237645142c. GPL-3.0-or-later.