Add opt-in LARP_PIPELINE_WAIT_MS budgeted wait for graphics pipelines #3
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!3
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/3/head"
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?
@Logard0 on GitHub · 2026-12-05 12:32 UTC · original
Logard0:fix/pipeline-wait-budget→main· +79 −16 · 1 files · 1 commits · merged 2026-12-05 14:45 UTCAdds an opt-in per-frame budgeted wait (
LARP_PIPELINE_WAIT_MS=<N>) for non-lasting graphics pipelines incrates/larp-gpu/src/pipeline/make.rsto eliminate in-game shader-compilation hitches.Summary of changes
pipeline_wait_budget): ReadsLARP_PIPELINE_WAIT_MSonce viaOnceLockand logs onetracing::info!line on first use with the configured budget in ms. Unset or0preserves the existing behavior exactly.wait_budgeted): When a draw asks for a non-lasting graphics pipeline (!p.lasting()) andLARP_PIPELINE_WAIT_MS=N(N > 0) is set,ready()skipswait_for()and instead waits up toNms per title frame (shared across all threads via a per-frameSPENTmutex using the same reserve-and-refund pattern aswait(), extracted intorun_with_frame_budget) usinguntil_made()only—nevermake_here()on the title thread. If the budget runs out before a worker finishes,ready()returnsNoneso the draw is dropped until the worker completes.BAKE_PIXEL_SHADERS(Pending::lasting()) keep the existingwait_for()/wait()+wait_lasting()behavior.parse_wait_budget_handles_opt_in_valuescovering unset, empty,0, negative, invalid, and positive millisecond values (recommended value:8).Verification
cargo test --locked -p larp-gpu parse_wait_budget: 1 passed, 0 failedcargo clippy --locked --tests -p larp-gpu: 0 warnings in the changed codeMade with the help of Gemini 4 Neon.