feat(gpu): allow cached pipelines to warm after startup #475
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!475
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-475"
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?
@vanya890 on GitHub · 2026-12-06 01:21 UTC · original
vanya890:feature/pipeline-startup-background-459→main· +115 −3 · 2 files · 2 commits · openSummary
LARP_PIPELINE_STARTUP_WAIT=0to release menu input after the previous-run pipeline list is queued, rather than waiting for the entire cached queue to drain.ready(); pipelines still compile in the background and first use can still hitch while the queue catches up.LARP_PIPELINE_WAIT_MS.This is an explicit startup-speed trade-off for users who prefer reaching the title sooner over warming every cached PSO first.
Related: #459. Complementary to #481, which accelerates cache enumeration and blob loading; this PR adds the separate opt-in to bypass the global startup hold. Both touch pipeline queue/progress code, so if #481 lands first this branch may need a small rebase/reconciliation.
Validation
cargo test -p larp-gpu(34 passed, 7 ignored)git diff --checkLISTED_QUEUEDrelease flag.cargo fmt --checkcurrently reports pre-existing formatting differences across the workspace; no whole-repository formatting was applied.@vanya890 on GitHub · 2026-12-06 01:25 UTC · original
The opt-in scope is sensible: default behavior and cold-start behavior remain unchanged, and the per-pipeline
ready()wait still protects first use. One edge case worth documenting/testing is that the fast path only activates whenLISTED_COUNT > 0; a prior-run list that exists but queues zero usable entries will intentionally retain the full wait. Please keep a regression test around that distinction and around the publication order (LISTED_QUEUEDonly after the listing thread has finished queuing), since the startup barrier now depends on those atomics.@vanya890 on GitHub · 2026-12-06 01:27 UTC · original
Added the requested regression coverage in commit
2919767:LISTED_QUEUED, or when zero usable entries were queued; it is true only for an enabled, published, non-empty list.publish_listed_queuestores the final count and then publishesLISTED_QUEUEDwithRelease; readers useAcquirebefore consuming the count.larp-gpusuite now passes: 34 passed, 7 ignored.git diff --checkis clean.@vanya890 on GitHub · 2026-12-06 01:42 UTC · original · reviewed
Follow-up review: the new tests cover the important gate conditions (disabled, not yet published, empty previous-run list, and non-empty published list), and
publish_listed_queuestores the count before the Release publication flag. Readers acquire that flag before using the count. This addresses the startup-barrier coverage I requested; I found no additional issue in the updated diff.@christopear on GitHub · 2026-12-06 02:00 UTC · original
I found an interaction with unattended preload on
29197676. With a populated list,LARP_PRELOAD=1andLARP_PIPELINE_STARTUP_WAIT=0,listed()can clearHOLDbefore the queue drains. The only call topreload_done()inprogress()is guarded by that same hold. That can skip the intended save, flush delay and automatic exit.Giving preload priority in the shared skip decision preserves both normal background startup and the existing preload behavior. I tested that decision in fresh Windows test processes under Proton. The original failed the precedence check with both options enabled. The patch passed with preload set to
1,yesand0. All four existing make-module tests passed. I traced the exit path in source but haven't run a full unattended game preload.Tested patch and optional process-level regression check
Run the ignored test by name in separate processes with
LARP_PIPELINE_STARTUP_WAIT=0and each of the preload values above, since the decision is cached.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.