RTX 5080, Series S: 12.9 -> ~25 fps in one day; what moved the frame, what did not, why avatarmanz main runs at 4 fps on NVIDIA, and where help is needed #1379
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 fxceless/victory-fork. Originally posted by Zignixx on 2026-11-26T19:37:54Z.
AI-assisted (Claude Mythos 5.2 in Claude Code). Numbers and log lines only, no game data. Almost every number below is ONE run on ONE machine; where two runs with the same settings were compared they differed by about 2 ms a frame.
Summary
On an RTX 5080 the frame went from 77.7 ms to about 39 ms in the prologue (Series S profile, 720p internal, ray tracing shaders skipped, correct picture). Four changes account for nearly all of it. Each was one thing in the wrong place, not a slow algorithm. After them three things are saturated at once (the title's render thread, its recording threads, the card), and nothing we tried since has moved the frame. That is where we would like help.
Setup
trustno1-coder/VIctory-NVIDIA033be27f3+ the avatarmanz speed wave up to85d564167+ avatarmanz PRs 24, 42, 82, 96, 97, 105, 107, 108, 109, 114, 119 + fxceless PRs 907, 1044, 1210 (the recipe of fxceless/victory-fork#1268, without its DXIL optimiser PRs).--profile diag --features diagnostics),--console series-s,VICTORY_RENDER_SCALE=0.6667,VICTORY_OWN_UPSCALER=1,VICTORY_CARD_BUFFERS_MB=1536,VICTORY_DYNAMIC_SLOTS=524288, the fork'sscripts/rt_off_hashes.txtinVICTORY_SKIP_PIPELINES.What moved the frame
RELAY=1,CARD_STEPS=0,TEXTURE_NO_WAIT=0)VICTORY_CARD_BUFFERS_MIN_KB=64)RELAY=2,CARD_STEPS=1,TEXTURE_NO_WAIT=0c36971b, fxceless/victory-fork#1163, avatarmanz/VIctory-7900XTX#213 and PR 225). Our numbers for the record: per-command card time fell from 42 to 18.5 ms a frame; the eleven compute programs that took 17.5 ms together (14264103296aa43a5.5 ms,f22a76fcb967ee592.3,5cf00dc39042edaf2.1, ...; compare fxceless/victory-fork#1186) dropped out of the top forty. WithCARD_BUFFERS_MB=1536nothing was pushed out (the caveat of #1163).RELAY=2withCARD_STEPS=1andTEXTURE_NO_WAIT=0. The fork's speed defaults (CARD_STEPS=2,TEXTURE_NO_WAIT=1) gave noise faces and stretched bodies here; this combination did not. It removes the wait fxceless/victory-fork#1256 describes.pipeline::skipped_shadercompared every draw's and dispatch's shader hashes against aVec<String>of the 1,034 entries ofrt_off_hashes.txt: about 20 million string compares a frame, a sixth of all samples on the recording threads. AHashSetfixes it (one commit: https://github.com/Zignixx/VIctory-7900XTX/tree/skip-list-set, onavatarmanz/VIctory-7900XTXmain, where the function is the same).What did not move the frame (so nobody repeats it)
VICTORY_PORT_CONSTANTS=1, the 32-bit heap in place)VICTORY_GROUP_SYNC=0(no barrier waits)VICTORY_PORT_GUARD=1)VICTORY_FRAME_INTERVAL_MS=16.667)VICTORY_WIDE_SPIN=300VICTORY_ASYNC_SUBMIT=1VICTORY_PORT_CBV=1) as it isavatarmanz/VIctory-7900XTX
mainon NVIDIA: 4 fps until two things are setWe then moved the work onto
avatarmanz/VIctory-7900XTXmain(2de998014). As it is, it ran at 4 fps here: 38,000 list calls took about 1,000 ms a frame over the recording threads instead of 120 ms, and no counter showed it. This looks like the slowdown of avatarmanz/VIctory-7900XTX#213 and #221.VICTORY_VIEW_BYTES=0brings recording back to 113 ms a frame. A sampling profile had 37% of the samples of the six busiest threads indescriptor::host::view_home->shadow::exact, most of it waiting for one mutex. Every buffer view that does not start on its copy's elements gets a copy of its own there; without raw twins (a view heap capped at 1,000,000) that is most views, and only 256 such copies are kept. The picture stayed correct without them in the scenes we looked at.VICTORY_OWN_UPSCALER); otherwise it runs its FSR 4 compute passes and the card is 94% busy.With both, and once the driver's pipeline cache had settled, that tree sits at 39-40 ms in the same window as the old one. On it,
VICTORY_CARD_STEPS=2,VICTORY_ASYNC_SUBMIT=1,VICTORY_PORT_GUARD=1and combinations of them all landed within 38-40 ms (one or two runs each);CARD_STEPS=2removed the waits for flights (13 -> 0 ms) but left dark smears on a shirt.A warning about comparing runs after a re-translation: the first five runs got faster one after another in the same scene (63, 60, 45, 47, 39 ms) whatever was switched on, because the driver was still filling its pipeline cache. Alternate A/B/A before believing a difference.
Where the frame is now (timeline of four frames at 39 ms)
ExecuteCommandListsfor 38.5 of 39 ms (16 calls, about 29 submissions).Recording is
State::tables: every table that holds a constant buffer is made afresh in dynamic slots (the console takes constant buffers on 16 bytes, D3D12 on 256). About 11,000 tables are asked for a frame and about 100,000 made a second, 6.6 slots each. Counted by contents alone (the constant entries and the table's place in the title's heap left out), 49% of the tables made had been made the same before, 38% by another list of the same frame.Slot budget on the capped heap: 500,000 title slots kept, 499,999 dynamic. The pool fell to 245,759 free (peak use about 254,000) at up to 5,170 draws; the tables the title's draws bind lie at title slots 1,200,000-1,232,000, past anything kept. So fixed-offset twins for the dynamic pool do not fit without halving a pool that is already half used. See also avatarmanz/VIctory-7900XTX#35, #102, fxceless/victory-fork PR 1258, Marvisak/VIctory#1760.
Open questions, and where help would count
VICTORY_DEFER_LISTS) aims at exactly the 26 ms a recording thread spends in our calls. Results on NVIDIA?victory replayloses the device here (0x887A0005), as in avatarmanz/VIctory-7900XTX#133. Our capture holds about 2,200 buffers of 64 KiB in heaps with the cross-adapter flags, which the replay cannot place.VICTORY_PROFILE) crashed the title in two of five runs (an access violation inside the stack walk, once at a 2 ms interval and once at 10 ms).Seen and already reported by others: the dark smear on the cell's left wall (fxceless/victory-fork#1223; one capture here, with port 6 on), the noise face of the woman at the bar.
How we measure
VICTORY_GPU_TIMING=1withVICTORY_D3D12_DRED=1for card time by command;VICTORY_TIMELINEfor the chain behind a present;VICTORY_PROFILEsymbolised against the same build.Code
Branch with everything: https://github.com/Zignixx/VIctory-7900XTX/tree/nvidia-wip (
avatarmanz/VIctory-7900XTXmain2de998014+ 23 commits: the NVIDIA fork's dynamic slots on a capped heap,VICTORY_BVH_MISSand loader hooks, and ours). Everything experimental is behind a switch and off by default. It needsVICTORY_VIEW_BYTES=0andVICTORY_OWN_UPSCALER=1on NVIDIA, as above. The skip-list fix alone: https://github.com/Zignixx/VIctory-7900XTX/tree/skip-list-set.Switches of ours in that branch:
VICTORY_SKIP_WC_BACK=1(count: counting only) withVICTORY_SKIP_WC_BACK_MIN_KB(1024),VICTORY_SKIP_WC_COMPARE=1,VICTORY_PORT_CBV=1with the own-slot path on hosts without twins (VICTORY_PORT_CBV_SLOT=0,VICTORY_PORT_CBV_CARD=0turn its halves off),VICTORY_TABLE_REPEATS=1,VICTORY_SYSTEM_HEAP=1(back from mimalloc, which is a new dependency there).The goal on this machine is 60 fps at a native resolution with ray tracing. We are a long way from it and say so; this issue is the map of what is between here and there as far as we can see it.
Imported from fxceless/victory-fork. Originally posted by LeonardoS11 on 2026-11-26T21:34:34Z.
AI-assisted (Claude in Claude Code). Numbers and log lines only, no game data. One or two runs per number unless said otherwise.
Your branch on an RTX 3080 Ti
We built
Zignixx/VIctory-7900XTXnvidia-wip(acbc666) from source and ran it next to our own tree (fxceless/victory-fork main + our patches) in the same scene (Series S profile, the opening cell and corridor, about 4,400 draws a frame), RTX 3080 Ti, Windows 11:nvidia-wip, your recipe,VICTORY_RENDER_SCALE=0.6667nvidia-wip, your recipe, no render scale (full resolution)nvidia-wip, full resolution, without the own-upscaler hookSo on this card the difference is not resolution: the preparing is about the same in both trees, and ours spends some 30-40 ms more a frame outside it. We are moving our work onto your branch.
Two things we saw:
VICTORY_RENDER_SCALE=1.0with the loader hook ends inunhandled exception 0x80000003(both runs; leaving the variable unset gives full resolution), and the chain-link screen in the window of the opening cell is missing in every run ofnvidia-wiphere, at both scales (it is drawn in our tree).Inside
State::tables(our tree, for your question 2)Per
ExecuteIndirectcall, all recording threads together, about 3,900-4,500 calls a frame:State::bind)ExecuteIndirectcallInside
State::bind(about 7,500-7,700 binds a frame): descriptor tables 137-162 ms a frame over all threads (18-21 us a bind); everything else together about 30 ms.Inside the tables:
So most of the cost of a table made afresh is re-creating every other view of a table that holds a constant buffer, not the constant buffer itself.
The view table's lock is not the convoy
We counted it: about 165,000 reads of the view table a frame, 54 of them found the lock taken, 0.2 ms waited in all.
On your question 2 we agree that moving the constant out of the descriptor (an offset into one bound buffer) is the clean end state, since it lets whole tables repeat. We will try it on top of your branch and report.
Imported from fxceless/victory-fork. Originally posted by LeonardoS11 on 2026-11-26T21:35:37Z.
A correction to my comment above: the "missing chain-link screen" in
nvidia-wipis not a defect. A PS5 reference of the same shot shows that window with frosted glass and the chain-link only faintly behind it, which is what your branch draws. The sharp mesh our own tree drew there was the window without its glass, so the defect was ours. Sorry for the noise; the rest of the comment stands.Written with Claude Code.
Imported from fxceless/victory-fork. Originally posted by Zignixx on 2026-11-26T21:54:24Z.
AI-assisted (Claude Mythos 5.2 in Claude Code). Log lines and numbers only, no game data.
Thank you for building it and for the numbers, and for the correction about the window.
VICTORY_RENDER_SCALE=1.0: reproduced, fixed innvidia-wip(90fe314)It stops here too (RTX 5080), and not only at 1.0: 0.75 and 0.85 end the same way, each about five seconds after the start. 0.6667 runs.
int3attitle+0x2219650is the end of the title's own out-of-memory handler:title+0x4fac3c0asks one of its allocators (title+0x104070), gets nothing, and calls it. The requests that failed were small (1 MiB at 64 KiB alignment, 2.1 MiB at 128 bytes, 512 KiB at 64 KiB) and came from three different callers in the three runs (texture creation attitle+0x193e248twice, another path once), always the same allocator object. Nothing on the host side failed before it (no refused reservation in the log).--console series-sand a scale above 2/3 the run stops before loading and says to use--console series-x(2560x1440 without the variable; that runs here, 17.5 fps without ray tracing, one warm run).title+0x28f1e78. Two places wrote the same immediate for the same variable (our load hook first,resolution.rsafter it).Your second row may not be full resolution
The row "no render scale (full resolution)": the immediate the hook replaces is 2/3 in the title itself (
AB AA 2A 3Fattitle+0x28f1e7e), so with the own-upscaler hook and noVICTORY_RENDER_SCALEthe scale should still be 2/3, 1280x720. Your times for the two rows are the same, which fits. We did not verify the render size in a run; if you have a quick way to read it, that would settle it.Your table numbers
41,000-42,000 other views re-made a frame against about 10,000 constant buffer views is the number we were missing: it says the constant out of the descriptor is worth more than we assumed, because then those tables are the title's own again and nothing is made. Our own attempt at it (the constant read raw through its own slot, no twins) worked but gained nothing, since the tables were still made afresh. Glad to see what you find on top of the branch; we will keep
nvidia-wipas it is apart from fixes like this one, so you have a stable base.Imported from fxceless/victory-fork. Originally posted by akimfomin on 2026-11-26T22:15:39Z.
I checked whether ByFxbian’s #1316 switch can answer the CBV question on the current
nvidia-wip. At90fe3144a4c5fe8ca4e6ce1b5f0e42f4fb28696bthe switch is absent. A three-way application of the #1316 delta atc5b08986a571f4befb6806ca94b8ab7ce8c58dbaconflicts incopystat.rs,draw.rs,host.rsandlist.rs. Setting the flag on stocknvidia-wipwould therefore be an inert control. This is separate from moving constants out of descriptors, which you already plan to try.@LeonardoS11, if you have time for one optional check on the same RTX 3080 Ti scene, #1316’s own pinned head is ready for an isolated OFF/ON comparison if that head reaches the scene on your setup. The checklist uses the same warmed cache, actual internal resolution and three alternating pairs. It takes frame-time captures plus the ON diagnostics for eligible hits and misses, and asks whether the picture or draw counts changed. The script produces just the aggregates. If your available build is only
nvidia-wip, the four conflicts are the gating work before this comparison can answer anything about that branch. Exact revisions and six-run checklistAI-assisted source comparison and test tooling (Codex).
Update: I built
c5b0898with the diagnostic profile and verified both settings on a physical RTX 4070 Ti SUPER (617.14). The public synthetic snapshot regression passed. With 22,000 bindings and 64 distinct sources, median preparation/enqueue was 10.977 ms OFF and 0.172 ms ON; with all sources unique it was 11.202 ms and 11.066 ms, and command recording was slower with reuse. These are isolated tests. The ready-to-run 90-second capture instructions and validator reject shortened, mixed-process and mixed-swapchain captures. If the compatible revision already reaches your setup, all that needs doing there is the capture and picture check; PortBridge can handle the summaries from permitted aggregates.Imported from fxceless/victory-fork. Originally posted by oz-stanislav-zhukov on 2026-11-26T23:03:28Z.
Your recipe, reproduced on a weaker card and a different tree, with what did and did not carry over. One run per row, diag build, Series S at 720p internal. Numbers come from our own in-game stats window and the run logs.
Setup. RTX 5060 Ti 16 GB, i7-14700KF, 64 GB, Windows 10 22H2 with the Agility SDK. The tree is Proudnoob4
nvidia-hybrid-v2f3c8a1f3plus two commits of ours:The warm-up runs
victory warm --usedwith the run's settings, so nothing compiles in game (made 0, about 4,100 pipelines from disk).-Quality(RELAY=1, CARD_STEPS=0)RELAY=2 CARD_STEPS=1 TEXTURE_NO_WAIT=0 CARD_BUFFERS_MIN_KB=64 SKIP_WC_BACK=1CARD_BUFFERS_MB=2048 FETCH_CHECK=1(#1268 pass 13)VIEW_BYTES=0 SUBMIT_FRAMES=2 LAND_ASIDE=1What we take from it:
SUBMIT_FRAMES=2the submission-lock wait went from 16.8 to 21.9 ms, and guard-lock waits from 52 to 66 ms.Where our frame is now (H12, 16.3 fps, 61 ms, 5.7k draws):
titlewrite.rs: about 5 µs a protection change, serialized).Next we test
VICTORY_COPY_BESIDE=1+VICTORY_STORE_BESIDE=1against the guard faults.Already in this tree, so no need to port: fx#1237's per-thread lookup memo (
QUICK_FIND), Marvisak#2821's RwLocks and the skip set.Ported on our branch
fork-hybrid-rec, numbers pending:BURY_ASIDE, from #1224;Picture problems still open on this tree, in case anyone has seen them:
AMBIENT_AIRat 0.1, 0.4 or 0.8.CARD_BUFFERS_MIN_KB=64.AI-assisted (Claude Code, Claude Opus 5.5); numbers and log lines only, no game data.
Imported from fxceless/victory-fork. Originally posted by LeonardoS11 on 2026-11-27T00:05:38Z.
One more correction to the table in my first comment: the render-scale rows did not measure a render scale. On our game build the loader reports
not patched, the title's bytes there are not the ones expected (another build?) site=0x28f1e78for the render-scale hook, in every run (two machines, ten runs); only the "own upscaler minimum" and "maximum = minimum" hooks apply. So theVICTORY_RENDER_SCALE=0.6667rows ran at the title's default scale, like the full-resolution rows, which is why they match (and maybe why1.0ended in0x80000003). The conclusion stands, since both trees ran at the same scale; but the render-scale hook may want a more tolerant byte pattern. We will look at what differs at that site and report.Written with Claude Code.
Imported from fxceless/victory-fork. Originally posted by LeonardoS11 on 2026-11-27T00:06:27Z.
Please disregard my previous comment; I was wrong, sorry. The render-scale hook does apply. The "not patched … site=0x28f1e78" line comes from a second patch path (
victory_loader::resolution), whose site is the wholemov dword [rcx+90h], imm32at +0x28f1e78; its immediate at +0x28f1e7e is exactly what the hooks already rewrote, so that path finds other bytes and logs. It is noise, not a failure.Why the two rows matched anyway:
VICTORY_RENDER_SCALE=0.6667equals the Series S own upscaler's default minimum (the immediate isab aa 2a 3f), and without the variable the title's dynamic scale already sits at that minimum at 13-16 fps. So both rows in my first comment ran at about 2/3, and the row I called "full resolution" is the title's dynamic scale, not native. The comparison with our tree is unaffected (same scale on both sides). We will try 0.5 on a card-bound machine.Written with Claude Code.
Imported from fxceless/victory-fork. Originally posted by KainanP on 2026-11-27T15:14:04Z.
Synthetic numbers for question 2 (tables across lists): open PRs A/B'd, plus a new opt-in PR.
Bench.
pipeline::list_bench::table_bench(KainanP/victory-forkbench/desc-tables,#[ignore]) is our VIctory list-call bench's draw sequence, ported to the fork. Each draw binds a material table: one constant buffer view and five textures the title placed in memory. Each table sits at its own place in the title's heap, so every one is made afresh. A list has 2,000 tables, half of them repeating an earlier one's contents. 1 and 5 recording threads. The cells are ns per draw (the table plus the root CBV, constants, index buffer and draw), medians of 7-9 interleaved processes. RTX 4060 Laptop. It times recording only, not submission. A headless Chrome from other work was using about 2 cores.On this bench, a table made afresh costs about 7.5 µs on 1 thread and 9-12 µs per thread on 5, the same order as your 12-14 µs. In a diagnostics build, a 6-slot table splits as follows:
readable: the upload check and state of each texture, per list): about 6 µs;This matches LeonardoS11's reading that the cost is "re-creating every other view of a table that holds a constant buffer, not the constant buffer itself".
=0/=1+ our view check passbindVICTORY_TABLE_VIEW_CACHE=1)#1316 and #1455 save work at submission (fills), which this bench does not see. They are not wrong; they work on the smaller part. Per-PR details are in each PR's comment.
#1484 makes each texture view once into a heap that shaders do not see, keyed by its record, and copies it into the table's slot. An entry is reused only while the texture's host copy (identified by its shared allocation, held through a
Weak, so idle copies can still be let go) and its first level shown (levels on demand) are the ones it was made from. Its test fails if that comparison is removed. Every texture slot of every table made is also compared with the descriptor the host makes of its view, with the cache off and on. It is off by default.@Zignixx @LeonardoS11, if you have a run to spare:
VICTORY_TABLE_VIEW_CACHE=0against=1on the same scene, with theTABLESdiagnostics line and the recording threads' time. Also check that streamed textures do not go stale. The constants-out-of-descriptors route you plan would let whole tables repeat. This PR is independent of it and composes with it.AI use: Claude Code (Claude Opus 5.5).