GPU: synchronize frame interval resets with tick reservations #2477
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2479"
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 Marvisak/VIctory. Originally posted by VlREX on 2026-11-25T14:27:05Z.
set_intervalreads the last reserved ticks before acquiringCLOCK. A concurrentnext_tickcan reserve another tick in between, leaving the new interval anchored to an older tick and potentially adding an interval to the next wait for that event kind.Hold the same
CLOCKlock around theLASTscan and the clock replacement. This keeps interval resets ordered with the reservations introduced in #174.Verified that the patch is one commit on upstream
mainand only changesframe.rs. Rust tests were not run locally. No title data was used.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T14:57:42Z.
Review: COMMENTED
Synchronize frame interval resets with tick reservations. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
Imported from Marvisak/VIctory. Originally posted by Bj0rnis on 2026-11-25T14:41:35Z.
Independent Windows 11 hardware + WARP verification of #2479 at
b5e0caab(cleangit merge-treewithorigin/main940d32f6, Rust 1.98.1 MSVC):cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1-> 144 passed, 2 failed, 2 ignored (only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures also present onmain940d32f6; allframe::testspassed).VICTORY_D3D12_WARP=1): 146 passed, 0 failed, 2 ignored (0.99s).cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings-> 0 warnings.cargo xtask policy-> 182 files ok.Not tested: live game workload / frame pacing soak test.
AI-assisted test run and summary.
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-25T21:03:10Z.
Native AMD / Windows 10 validation
CPU: AMD Ryzen 5 3600X
GPU: Radeon RX 5700 XT
Driver: 32.0.21045.29003
OS: Windows 10 Pro 19045
Rust: 1.98.1
Tested commit:
30a5f1dFull GPU suite and live gameplay frame pacing
were not tested in this run.
AI-assisted development (ChatGPT).
Native verification using VIREX Test Studio 1.2.1.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T13:35:05Z.
I combined this PR at
30a5f1dwith the virtual clock from #2877 at8616219on current main63bcca4. Tested branch atedb4bb0. Both exact PR heads and their Git authors are preserved.In a two-thread synthetic check, I paused the interval reset just before it acquired the clock mutex, reserved tick 1, then let the reset finish. The next reservation requested tick 2. With #2877 alone it waited 14 ms after switching to a 7 ms interval. With this PR's locking applied to
Pacerit waited 7 ms. The combined code samples the new start time and the latest reserved tick while holding the same lock.The eight-thread test now uses the virtual clock and checks that eight simultaneous reservations get ticks 1 through 8, a zero-timeout poll takes none, and the first tick after the reset uses the new interval. All three frame tests passed in 30 separate processes. On WARP 1.0.22 with Agility 1.620.2, the full GPU diagnostics suite had 247 passed and one ignored with the D3D12 debug layer off and on. Strict GPU Clippy in both configurations and the asset policy passed.
Please retain the original Git authors if carrying either change separately. If folding the integration changes into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>. AI-assisted with OpenAI Codex.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.