Tests: the warp budget test accepts either group winning the budget race #847
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/fxceless--victory-fork!847
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-847"
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?
@Roy-0406 on GitHub · 2026-11-25 10:29 UTC · original
Roy-0406:fix/warp-budget-group-race→main· +10 −6 · 1 files · 1 commits · openindirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fieldsfails intermittently.Cause. The test clamps 128 records, two groups of 64. The clamp shader charges records in lane order within a group, but the two groups race for the budget word with a compare and swap (
indirect.rs, thewhile (before < BUDGET)loop). Whichever group charges first keeps its first two real draws: records 1 and 2, or 64 and 65. The test required 1 and 2.Measured on WARP (RTX 4070 machine, single test thread): the old test failed in 8 of 10 runs on its own; with a temporary log of the kept record, every failure kept record 64. In the full suite it passed more often, which is why it slips through.
Change. The test accepts
[1, 2]or[64, 65]and names the records kept when it fails. Everything else it checks is unchanged: the budget saturates without wrapping, the source is untouched, every other draw is emptied, and the remaining fields of every record are kept. The shader is not touched.Proof. The fixed test passes 20 of 20 runs alone;
cargo test -p victory-gpu --libpasses 3 of 3 (159 passed);cargo xtask policy --stagedok.Note on CI. Both clippy jobs already fail on
mainwithout this change (placed_filler_twinsnever used,sort_unstable_by_keyindraw.rs,depth_writtennever read); #841 fixes those.Not in this PR, seen while testing:
watch::tests::a_write_is_reported_at_every_checked_viewfailed once in 10 parallel runs of the GPU tests (0 of 15 serial), and one parallel run of the GPU test binary ended in0xc0000005(not reproduced in 10 more runs).🤖 Generated with Claude Code
@MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
520179aintomainf85101bin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warningsfails with exactly the errorsmainitself has on this machine (placed_filler_twins,depth_written, a sort; PR #841 fixes them), also with--all-features; this PR adds none.cargo test --workspace --locked: run 1: 555 passed, 0 failed, 11 ignored; run 2: 555 passed, 0 failed, 11 ignored (mainalone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
@HailLucifer666 on GitHub · 2026-11-25 14:05 UTC · original
Evidence from a fourth machine (Windows, WARP, this repo's own suite), and one thing your two PRs between them have established that neither body says: this is a regression, not a missing nicety.
mainalready had an order-independent version of this test —(kept, zeroed) == (2, 126), naming no indices — from578d459c.f85101b6(Frame rate, second night) changed that block back toassert!(i == 1 || i == 2, ...), so every branch built on it inherits the failure.Measured: full suite, four processes at a time, twelve runs on
f85101b6without the patch — 2 of 12 failed withpanicked at indirect.rs:1611: the first two real draws fit the budget. With the patch applied, 0 of 12. Idle and serial runs never reproduce it (34 runs clean), which is why it looked machine-specific.I have opened #970 taking
MamaLeVrai's #849 verbatim so the branches under review have it; if #847 lands instead it is equivalent and #970 can be closed unmerged. Credit for the diagnosis is entirely yours — two people on two machines reaching the same cause is stronger evidence than either measurement alone.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.