Repository navigation
feat(gpu): 64-bit atomic-lock rounds on by default under Wine - #307
Conversation
The rounds from pragyaangaur#257 are now on wherever the atomic locks are, and VICTORY_ATOMIC_LOCK_ROUNDS=0 goes back to the turns alone, as asked on pragyaangaur#240. In the game they took a world frame from 7.9 to 2.5 s on an M2 Max (sys-skye), from 5.29 to 0.71 s on an M4 Pro (evan-kolberg, same binary) and from 2.9 to 0.88 s on a 16 GB M4 (Stefa008), and the GPU resets and queue recoveries of the turns stopped. Test: lock_rounds_are_on_with_the_locks_unless_turned_off. docs/macos.md describes the rounds as the default, with those numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
In-game pair on an M5 Pro, as a no-regression check. It does not measure the gain: the scene does not run the 64-bit atomics. Setup: M5 Pro, 64 GB, macOS 27.2.1, CrossOver 26.3 Wine, D3DMetal 4.0 beta 3, Series X. Both legs ran the same diagnostics binary of
Both legs sat in the same indoor prologue shot. The pipeline log shows the alpha-prepass pixel shader Prepared with Claude Code. Text only, no game data. |
Makes the 64-bit atomic-lock rounds from #257 the default wherever the atomic locks are on (under Wine, or with
VICTORY_ATOMIC_LOCKS=1), as asked on #240.VICTORY_ATOMIC_LOCK_ROUNDS=0goes back to the turns alone. It is one change of its own, so a regression bisects to it.In-game results from #240
VICTORY_ATOMIC_LOCK_ROUNDSchangedsys-skye reports characters and hair drawn correctly with rounds on, and Stefa008 saw nothing broken. The synthetic timing is 4.5–6.0× faster per wave-wide 64-bit
umaxon two M5 Pros (macOS 26.6.2 by Nick233x, and 27.2.1) and an M2 Max.The lost adds on #240 are not the rounds. patcliftongc's lost 64-bit adds happen in the turns too, under heavy contention. A lane that waits out the spin bound goes on without the lock. #306 fixes that and is independent of this PR.
What changed
shader_cache.rs:atomic_lock_rounds()is on with the locks unlessVICTORY_ATOMIC_LOCK_ROUNDS=0(the decision is inrounds_on). The option keys the shader cache, and so do this file's bytes, so translations are made again once.docs/macos.md: the rounds are described as the default, with the in-game numbers above.How tested
cargo test --workspace541 passed, 0 failed both times.tools/macos/test-wine.sh --workspace --no-fail-fast1,093 → 1,094 passed, 0 failed (the new test).lock_rounds_are_on_with_the_locks_unless_turned_off.cargo clippy -p victory-gpu --all-targets --target x86_64-pc-windows-gnullvm -- -D warningsandcargo xtask policypass. Only changed lines are formatted.Thanks to sys-skye, evan-kolberg, Stefa008, Nick233x and cocobailey for the runs and measurements.
🤖 Generated with Claude Code