GPU: two frame waits that pick the same tick no longer both end on it #325
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/325"
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?
Imported from fxceless/victory-fork. Originally posted by RenzoWit35 on 2026-11-24T23:34:38Z.
Fixes #244.
A wait chose its tick before sleeping and then advanced
LASTwithfetch_max, ignoring theprevious value, so two concurrent waits (two FLIP waits, or both on the late path) could both
return
S_OKon one tick. The wait (now inclaim()) ends only if itsfetch_maxmovedLASTpast the previous value. Otherwise it waits for the next tick against the original deadline,
so a retry never lengthens the caller's time-out.
Tests: two concurrent waits end on different ticks (three rounds); three waits aligned on a
tick, with 150 ms time-outs and 100 ms ticks, give exactly one
S_OKand two time-outs withinthe limit (on
mainall three ended on the same tick). The frame tests share the global clock,so they now take a test lock.
Note for review: the existing
waits_end_on_ticks_and_count_framesrelies on sleeps landingwithin a 5 ms tick; on a heavily loaded machine it can fail on
maintoo.Testing
On Windows 11, MSVC Rust 1.98.1, branch alone on top of
main(2119b0e):cargo clippy --workspace --all-targets --locked -- -D warnings, the same with--all-features, andcargo test --workspace --lockedall pass. The new regression test fails onmainand passes here. All nine fix branches for #242-#250 also pass together when merged.🤖 Generated with Claude Code
Imported from fxceless/victory-fork. Originally posted by kaayzouee on 2026-11-25T01:16:59Z.
Duplicate of #281?
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.