Opt-in CPU-side frame pacing and per-frame savings (from VIctory-NVIDIA RDNA 4 work) #74

Closed
github-bot wants to merge 0 commits from github-bot/gh-74 into main AGit
Owner

@⁠420basedonwhat on GitHub · 2026-12-01 03:48 UTC · original
420basedonwhat:perf-from-victory-nvidia → main · +7 −0 · 1 files · 26 commits · closed without merging

Four small changes from my RDNA 4 tuning of VIctory-NVIDIA, ported to victory-amd. Each one is
behind its own switch and off by default, so nothing changes unless a switch is set.

What's in it

Switch Change Files
VICTORY_PRESENT_PACE=1 Even presents. Before Present, wait until 92% of the recent mean time between presents has passed. Nothing is held while the mean is under 20 ms (menus, loading), and never longer than 15 ms. victory-gpu/src/host.rs
VICTORY_TEXTURE_HASH_RARE=1 A written texture is hashed every 64th frame instead of every 8th. victory-gpu/src/texture.rs
VICTORY_NULL_COPIED=1 The two plain null descriptors are made once, in a heap the card doesn't see, and copied into slots with CopyDescriptorsSimple instead of being created in each slot. victory-gpu/src/descriptor/host.rs
--profile perf A release profile with fat LTO. Cargo.toml

Why

Frames came in uneven pairs (about 25 ms then 50 ms) when the game is CPU-bound, which feels
far worse than the average suggests. Even presents smooth that out for a small cost in average
frame rate. The other two cut per-frame CPU work on the submitting thread, which is the
bottleneck here.

Results

Test machine: Ryzen 7 5800X3D, RX 9070 XT, 32 GB RAM, Windows 10.

Settings:

  • Series X, rendered at 1920×1080, output 2560×1440, FSR off.
  • Your launcher's High preset for this PC.
  • The same save and the same kitchen scene.
  • 6 minutes of gameplay.
  • Only frames with 1,000 or more draws counted.
Build Mean fps Median fps 1% low Frames over 50 ms Frame-to-frame jitter
victory-amd b5942bb 17.8 22.6 1.9 29.6% 27.4 ms
+ these changes (all on, --profile perf) 20.9 22.6 5.0 21.8% 7.2 ms
  • At equal draw load: 7.4 ms less per frame.
  • Caveat on the gain: part of it comes from the plain run still compiling about 440 shaders in game.
  • Caveat on the numbers: single runs on this setup vary by up to about 5 ms, so treat the frame-time
    gain as approximate.
  • The smoothness gain is consistent: the same pacing in VIctory-NVIDIA took frames over 50 ms from
    11–13% to 1–4% in an in-run A/B test.

Notes

  • Your launcher doesn't set these switches yet. To try them, set VICTORY_PRESENT_PACE=1,
    VICTORY_TEXTURE_HASH_RARE=1 and VICTORY_NULL_COPIED=1 in the environment before starting
    victory.exe.
  • If you'd like them on by default or exposed in VIctory.ps1, I'm happy to follow up.
  • Even presents trade a little average fps for smoothness: about 0.3 fps in VIctory-NVIDIA. That
    could suit a launcher toggle.
  • Testing: cargo check -p victory-gpu passes. The four changes are in separate commits.

🤖 Generated with Claude Code

**@⁠420basedonwhat** on GitHub · 2026-12-01 03:48 UTC · [original](https://github.com/eikkapine/justanxboxemulator/pull/74) `420basedonwhat:perf-from-victory-nvidia` → `main` · +7 −0 · 1 files · 26 commits · closed without merging Four small changes from my RDNA 4 tuning of VIctory-NVIDIA, ported to victory-amd. Each one is behind its own switch and **off by default**, so nothing changes unless a switch is set. ## What's in it | Switch | Change | Files | |---|---|---| | `VICTORY_PRESENT_PACE=1` | **Even presents.** Before Present, wait until 92% of the recent mean time between presents has passed. Nothing is held while the mean is under 20 ms (menus, loading), and never longer than 15 ms. | `victory-gpu/src/host.rs` | | `VICTORY_TEXTURE_HASH_RARE=1` | A written texture is hashed every 64th frame instead of every 8th. | `victory-gpu/src/texture.rs` | | `VICTORY_NULL_COPIED=1` | The two plain null descriptors are made once, in a heap the card doesn't see, and copied into slots with `CopyDescriptorsSimple` instead of being created in each slot. | `victory-gpu/src/descriptor/host.rs` | | `--profile perf` | A release profile with fat LTO. | `Cargo.toml` | ## Why Frames came in uneven pairs (about 25 ms then 50 ms) when the game is CPU-bound, which feels far worse than the average suggests. Even presents smooth that out for a small cost in average frame rate. The other two cut per-frame CPU work on the submitting thread, which is the bottleneck here. ## Results **Test machine:** Ryzen 7 5800X3D, RX 9070 XT, 32 GB RAM, Windows 10. **Settings:** - Series X, rendered at 1920×1080, output 2560×1440, FSR off. - Your launcher's High preset for this PC. - The same save and the same kitchen scene. - 6 minutes of gameplay. - Only frames with 1,000 or more draws counted. | Build | Mean fps | Median fps | 1% low | Frames over 50 ms | Frame-to-frame jitter | |---|---|---|---|---|---| | victory-amd `b5942bb` | 17.8 | 22.6 | 1.9 | 29.6% | 27.4 ms | | + these changes (all on, `--profile perf`) | **20.9** | 22.6 | **5.0** | **21.8%** | **7.2 ms** | - **At equal draw load:** 7.4 ms less per frame. - **Caveat on the gain:** part of it comes from the plain run still compiling about 440 shaders in game. - **Caveat on the numbers:** single runs on this setup vary by up to about 5 ms, so treat the frame-time gain as approximate. - **The smoothness gain is consistent:** the same pacing in VIctory-NVIDIA took frames over 50 ms from 11–13% to 1–4% in an in-run A/B test. ## Notes - **Your launcher doesn't set these switches yet.** To try them, set `VICTORY_PRESENT_PACE=1`, `VICTORY_TEXTURE_HASH_RARE=1` and `VICTORY_NULL_COPIED=1` in the environment before starting `victory.exe`. - **If you'd like them on by default** or exposed in `VIctory.ps1`, I'm happy to follow up. - **Even presents trade a little average fps for smoothness:** about 0.3 fps in VIctory-NVIDIA. That could suit a launcher toggle. - **Testing:** `cargo check -p victory-gpu` passes. The four changes are in separate commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Before Present, wait until 92% of the recent mean time between presents has
passed, so CPU-bound frames stop arriving in 25/50 ms pairs. Nothing is held
while the mean is under 20 ms (menus, loading), nor for longer than 15 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A written texture is hashed every 64th frame instead of every 8th.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two plain null views are made once in a non-shader-visible heap and copied
into slots with CopyDescriptorsSimple instead of being created in each slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 03:51:11 +00:00
Author
Owner

@⁠motioncsgo on GitHub · 2026-12-01 07:59 UTC · original

Tested this on an RX 7900 XTX (RDNA3) with a Ryzen 9 5950X and 64 GB of RAM. Settings: Series X, FSR 4 quality to 4K, RT on, the same save and spot each run. The build was v2026.11.30.8 with this PR merged (no conflicts), plus #72 and a few local patches. Single runs, so treat the numbers as rough.

Present pacing helps smoothness, not speed. All three switches on, against the same build without them:

Without All three on
Median frame 72.5 ms 73.7 ms
p95 frame 89 ms 82 ms
Worst 1 % low (5-s windows) 381 ms 253 ms

VICTORY_TEXTURE_HASH_RARE=1 made RT shadow artifacts worse. The speckled dark patches on characters and the ground around them were already there with RT on, but they got clearly worse with all three switches on. Of the three, only the rarer texture hashing should be able to change the picture, so we turned it off. We still run VICTORY_PRESENT_PACE=1 and VICTORY_NULL_COPIED=1. A later pickup of texture writes seems to show up in the RT shadow path, so the rarer hashing may need an exception for textures the title writes every frame.

Not tested: --profile perf.

**@⁠motioncsgo** on GitHub · 2026-12-01 07:59 UTC · [original](https://github.com/eikkapine/victory-amd/pull/74#issuecomment-7304732164) Tested this on an RX 7900 XTX (RDNA3) with a Ryzen 9 5950X and 64 GB of RAM. Settings: Series X, FSR 4 quality to 4K, RT on, the same save and spot each run. The build was v2026.11.30.8 with this PR merged (no conflicts), plus #72 and a few local patches. Single runs, so treat the numbers as rough. **Present pacing helps smoothness, not speed.** All three switches on, against the same build without them: | | Without | All three on | |---|---|---| | Median frame | 72.5 ms | 73.7 ms | | p95 frame | 89 ms | 82 ms | | Worst 1 % low (5-s windows) | 381 ms | 253 ms | **`VICTORY_TEXTURE_HASH_RARE=1` made RT shadow artifacts worse.** The speckled dark patches on characters and the ground around them were already there with RT on, but they got clearly worse with all three switches on. Of the three, only the rarer texture hashing should be able to change the picture, so we turned it off. We still run `VICTORY_PRESENT_PACE=1` and `VICTORY_NULL_COPIED=1`. A later pickup of texture writes seems to show up in the RT shadow path, so the rarer hashing may need an exception for textures the title writes every frame. Not tested: `--profile perf`.
github-bot closed this pull request 2026-12-01 19:52:19 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.