Optimizations for RTX 5070 Ti + Ryzen 5 5600X #831
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!831
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-831"
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?
@erickbobd on GitHub · 2026-11-28 07:28 UTC · original
erickbobd:rtx5070ti-5600x-optimizations→main· +23995 −714 · 94 files · 104 commits · openEverything I play with on an RTX 5070 Ti + Ryzen 5 5600X, against
main, so you can pick what is useful. It is not meant to be merged whole: it bundles open PRs from other people, which keep their own commits and credit.Series X profile, DLAA at 2560x1440, DLSS model K, DLSS 5 Neural Rendering, DLSS Frame Generation 3X. The profile played with is now DLSS Quality instead of DLAA: DLAA leaves white blocks indoors (Findings below).
The full write-up, with every number and switch, is in
contrib/rtx5070ti-ryzen5600x/README.md.Results
On this PC the layer is CPU-bound: the 8 list-translation threads use ~456 ms of CPU per ~76 ms frame (about six cores of a 5600X), the submitting thread works 58-67 ms of each frame, and the card is only 30-45 % busy (Series S, DLSS Quality). So DLAA and the DLSS model cost almost nothing in frame rate here. DLSS 5 run every frame did cost some, in light scenes on Series X with DLAA; see below.
cargo test --release -p victory-gpu --libThe submitting thread lost 14 % of its work but the frame moved 2 %: with six cores, the list-translation threads are the next limit.
What this branch has that
maindoes notFrom others (open PRs, merged with
mainup to v2026.11.28.01):-Fast, send thread, pipelines from pieces, refresh sets, title write ranges, key rebinding, 21:9.shadow::exact()buffers behind a read-locked cache.Conflicts were resolved by keeping both sides; for example, the F1 menu has PR #18's key rebinding together with upstream's save sharing, save-at-once and Series S picture row. The README lists each resolution.
Ours (each has a switch back):
shadow.rs)VICTORY_WIDE_OWN=0host.rs)VICTORY_REFRESH_BIG_FIRST=0watch.rs)VICTORY_GUARDS_SPIN_US=0host.rs)VICTORY_LIST_BUFFERS_WAIT=1descriptor/host.rs)pipeline/host.rs)VICTORY_PIPELINE_SAMPLER_REUSE=1play.rs,main.rs,menu.rs)does_of()sizes its vectors for every step at once (host/card_steps.rs)host.rs)shadow.rs)VICTORY_PAGE_SKIP=1shadow.rs)VICTORY_WIDE_THREADSwatch.rs)VICTORY_GUARDS_SPIN_USshadow.rs)VICTORY_REFRESH_SPLIT=1host/placed_constants.rs)VICTORY_PLACED_CONSTANTS=1Tried and left off because they were slower here: batched resource retirement with raised helper priority (-12 %), list-held descriptors (-6 %), and
VICTORY_PORT_CONSTANTS(5-7 fps). (The retirement queues above are another thing: the same objects, at the same time, one queue per thread.)Host-copy refreshes, measured before building (28 Nov, evening)
Each idea got a ceiling from a CPU profile and the log first, a stats-only build where it could, and only then a live F1 switch to compare standing still (heavy scene: Series X, DLSS Quality, frame generation 3X, ~95 ms a frame).
whole-page-check.py), 82.5 % of the 4 KiB pieces were equal. Comparing against the CPU side would cost more than copying (it reads at 4.0 GB/s), so SKIP SAME PAGES keeps a 64-bit hash per piece (XXH3's long loop, AVX2) and skips only copies no shader is declared to write: upstream'sVICTORY_SEND_CHANGEDlost the room's indirect light where the title writes a value again over what a shader changed on the card.VirtualProtectcalls; ~7.8 ms copying title memory while not running; the journal's lock; the batch queue). More helpers (compare-switches.py, one session, switches changed while moving between scenes, compared by scene weight):The refreshes are clearly shorter; the frame gains less, and how much is not settled by so few seconds (the wait for flights swung between 4 and 29 ms between places). The example settings now have 8 helpers and the skip on.
Constants that read a placed copy (28 Nov, night)
A diagnostics build that only logged the refusals found the submitting thread waiting ~7.5 ms a frame for a few 32-byte constant buffers that read what a copy placed earlier in the same list had just written on the card. CONSTANTS AFTER COPIES copies those bytes card to card at the constant's place instead; a CPU copy, a declared shader write or an unknown step in between keeps the old fill. Standing still (Series X, DLSS Quality, frame generation 3X, DLSS 5), with diagnostics'
VICTORY_ABswitching it every 45 s (compare-ab-phases.py):The wait went 4.7 -> 0 ms and making the copies 10.7 -> 0.05 ms, with no hang or D3D12 error, but the frame gained no more: in this profile the card was 80-87 % busy and the submitting thread already waited ~10.8 ms a frame for it (it was ~31 % on 27 Nov, before DLSS 5 and frame generation 3X). CPU waits taken out now buy at most the card's idle time. Off by default in the code; the profile played here (example settings) has it on.
DLSS 5 Neural Rendering (experimental): the F1 switch loads Skynizz/optiscaler-dlss5 1.3.0 (GPL-3.0) as a mod, the way MFG Unlocker is loaded, before the device and Streamline. Insert opens its menu (presets, passes, cache interval, placement, strengths); F6 compares optimised, vanilla and off.
To keep frame generation on (3X: 16 rendered -> 48 shown), two things were needed:
nofg).nvngx_dlss*.dllare where it looks for them. It stands in for NGX for Streamline; without them, Streamline turned DLSS-G off.contrib/.../setup-neural-rendering.ps1sets this up. NVIDIA's model is not included.What it costs. From the play logs, in scenes of the same weight: the CPU loses nothing (same ~9 us per list call), but the model, run every frame on the title's own queue, made the submitting thread wait for the card whenever the title read memory the card writes mid-frame (9-13 ms per frame against 4-5). That was -10 to -22 % rendered fps in light scenes, where DLAA at 1440p already keeps the card near its limit, and nothing in heavy ones.
The settings were then compared live:
measure-neural-rendering.ps1switches them every 36 s through OptiScaler'sdlssnr-set.txt(A B C D E E D C B A). This test was static: a closed indoor scene (Jason's bathroom), character and camera still, only to compare the settings against each other. A first run was discarded (a GPU miner was running). The scene's weight still swung between ~26k and ~50k calls per frame by itself, so each setting is read at the same weight from a fit of frame time and card wait against calls per frame:The model on its own compute queue every third frame (
CacheAsync=true,CacheInterval=3,PreSr=false) waited least, close to off, and is best or level at every weight. In light scenes it costs -11 % against off, where every frame cost -25 %. The setup script now writes it. Its look in motion was not measured (its edit arrives two frames later, along the motion vectors).Known issue: 2 of 3 test starts stalled in the intro (dynamic descriptor slots ran out once OptiScaler made its DLSS feature, then the title's watchdog
+0x23cf683ended the run). Starts that get past the intro played for 17 and 34 minutes. A native integration without OptiScaler's hooks would avoid this; it is not attempted here.Findings on this hardware
0x80000003at+0x2219650, 3 of 3 starts). On Series X, DLAA at 2560x1440 runs.main(9ce3cf9, none of this branch) with the same F1 choices too, and go away with DLSS Quality (scene 1706x960), both withmain's defaults and with every other choice of this profile kept (light estimate 1, frame generation 3X, model K). Ruled out by runs: the reflection stand-in (off in all of them), the water's tiled light (VICTORY_WATER_LIGHT=0), a cache (a separate copy with its own build and older caches showed them too). A guess, not proven: one of the title's tile lists is sized for the console's resolution and its last tiles keep what the memory held.0xc0000005at+0x2215c35). Starting again works.-Moreoptions, so it can come back on another profile.contrib/rtx5070ti-ryzen5600xscripts/play.ps1play-foxhound.ps1used for all of the above: a warm-up start with the same options, reopening after the known start failure, a timer for fixed-spot runsscripts/setup-neural-rendering.ps1scripts/measure-neural-rendering.ps1play.ps1 -MeasureNeural)scripts/compare-neural-rendering.pyscripts/close-background-apps.ps1scripts/compare-logs.pyscripts/whole-page-check.pyVICTORY_REFRESH_SPLIT=1)scripts/compare-switches.pyconfig/victory-settings.example.txt🤖 Generated with Claude Code
- ffxQuery: when the title's shipping FSR4 gives no jitter phase count (it refuses sizes it has no tables for, or has no context), the title's jitter ring stays 0 long and it divides by zero (a player's crash at game+0x28f03e8). The count is now FidelityFX's own formula in that case; an answer of the DLL's own is kept. - clzero loops: stub areas are made near each loop that the ones so far cannot reach with a jmp rel32 (a title DLL far from the exe was left to the emulation; the test failed about one run in four for it). - allocate_upload (thin lists) and the upload arenas say why they answer null, which the title's structure builder ends the run on ("Failed to allocate upload buffer", seen on a 32 GB PC). - known.rs: a raw NUL in a test string written as \0 (the asset policy refused the file). - README: how the frame pipeline was rebuilt, stage by stage.8fc2254into PR 18 (9a9d515) 03203b172963b902f): Series S picture row, memory stack on cf448312dfgithub-bot referenced this pull request2026-11-29 22:46:14 +00:00
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.