Idea: shareable pipeline manifest (no game content) so the first start is smooth #334
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#334
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The idea
Ship (or let the community share) a small pipeline manifest: a plain list of the pipelines the game is known to use (program hashes + fixed-function / render-pass state), with no shader text, no translated code and no game data. On first start, Hookshot would compile that list locally, in the background or on a "preparing" screen, so the first walk through Kokiri Forest is not a series of freezes.
Why
On a first start, or on any new area, every new pipeline is built on the fly. My log from a first lap of Kokiri Forest: 1029 pipelines compiled in about 34 s of wall time, and the freezes line up with that. With the default
RX_VK_PIPE_SKIP, draws whose pipeline is not ready are left out, and that shows up on screen as grey or black-blob frames. Going through a screen recording frame by frame, 334 of 2761 frames (about 12 %) were affected during the first minutes. (I have not yet confirmed thatRX_VK_PIPE_SKIP=0removes them; I will report back.)Setup: RTX 3050 Ti Laptop (4 GB), i9-12900HK, Fedora 43, Linux build. The same pattern is described for other GPUs in #62, #69 and in the cold-start vs second-start comments there.
What already exists
Hookshot already records the pipelines it sees (
hookshot_pipelines.bin) and pre-warms them at the next start. So the second start is better than the first. The only thing missing is a seed for the first start.Proposal
hookshot_pipelines.binis missing or smaller than the manifest, merge the manifest in and prewarm it (same code path that already exists), with a progress indicator.What must not be shared
~/.cache/nvidia,mesa_shader_cache, etc.): tied to the GPU and driver version, and not portable.hookshot_shaders.bin,hookshot_programs.binor any translated/generated shader or code: derived from the game, so it must not be redistributed.Precedent
nxnative (Apple Silicon) ships a
pso_manifest.tsv(9,625 rows) that is used the same way: a list of pipeline-state recipes, compiled locally.Open questions for the maintainers
Happy to help: I can produce a manifest from my own runs, test a prewarm-from-manifest build on NVIDIA/Linux, and report cold vs warm numbers.
Thanks for the idea. Feature requests are now collected in #1007, which lists this one with a link back here, so closing it in favour of that list (this is not a decision against the idea).