Skip the pipeline wait's lock and clock once the frame's budget is spent #56
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/Belobug--VIctory-Belobug-AMD!56
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-56"
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?
@romainhedouin on GitHub · 2026-11-25 13:12 UTC · original
romainhedouin:perf/pipeline-wait-spent-budget→main· +9 −2 · 1 files · 1 commits · closed without mergingA draw whose host pipeline is not built yet may wait for it, up to a budget per frame. Once that budget was spent, every further such draw still took the global
DONElock and read the clock three times, though it could no longer wait at all. It now returns as soon as it sees the budget is spent. Also, the "queued" and "used" flags are read before being swapped, so after the first time they cost a plain read instead of a locked write. Each pipeline is still queued, and noted as used, exactly once.DONElock + unlock"Model benchmark" = the same logic copied into a standalone program and timed in release mode on a Mac, not in the game. Matters while pipelines are still being built (warm-up, new areas). Type-checked for Windows (
cargo clippy --target x86_64-pc-windows-msvc, with and without--all-features, no new warnings); not run.🤖 Generated with Claude Code
@gut0to on GitHub · 2026-11-25 16:00 UTC · original · reviewed
Static review: after the frame-wait budget is exhausted, wait returns before taking DONE or reading the clock; the queue-once and note-used-once guards remain intact. The PR reports Windows clippy and a standalone release-mode model benchmark, not a game benchmark. I did not run tests or the game here. AI-assisted review.
@romainhedouin on GitHub · 2026-11-26 22:24 UTC · original
Closing:
a-publieralready has all three changes in pipeline/make.rs:waitreturns before the clock and the lock once the budget is spent (:458),readychecksusedfirst (:396), andstartchecks the queue state first (:600).Pull request closed