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

Open
opened 2026-11-26 19:47:28 +00:00 by github-bot · 0 comments
Owner

@⁠Zignixx on GitHub · 2026-11-26 19:37 UTC · original

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

  • RTX 5080 16 GB (32-lane waves, view heap capped at 1,000,000), Ryzen 9 9900X3D, 64 GB, Windows 11 26200.
  • Tree for the table below: trustno1-coder/VIctory-NVIDIA 033be27f3 + the avatarmanz speed wave up to 85d564167 + 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).
  • Diagnostics build (--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's scripts/rt_off_hashes.txt in VICTORY_SKIP_PIPELINES.
  • Scene: the opening cell, corridor and visiting room, 4,400-4,700 draws a frame; the city later has about 6,000.

What moved the frame

step fps (median) ms a frame what changed
start (quality switches: RELAY=1, CARD_STEPS=0, TEXTURE_NO_WAIT=0) 12.9 77.7
shader writes into write-combined title memory not fetched back 14.4 69.5 copying back 12.8 -> 4.6 ms
every title buffer's copy in the card's memory (VICTORY_CARD_BUFFERS_MIN_KB=64) 19.6 51.2 waiting for the card 38 -> 16 ms
RELAY=2, CARD_STEPS=1, TEXTURE_NO_WAIT=0 20.8 48.2 waits for flights 16 -> 4 ms, picture still correct
the skipped-shader list looked up in a set ~25 ~39 recording 3.9 -> 2.9 us a list call
  1. Write-combined memory is not fetched back. As fxceless/victory-fork#868, with one addition that matters once small buffers are on the card: only copies of 1 MiB and more may be skipped. Skipping the small ones gave 22 fps and a black picture with half the draws (2,700 instead of 5,700 a frame): they hold the counts and visibility lists the title's CPU does read.
  2. Small buffers on the card. Already known (fxceless c36971b, 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 (14264103296aa43a 5.5 ms, f22a76fcb967ee59 2.3, 5cf00dc39042edaf 2.1, ...; compare fxceless/victory-fork#1186) dropped out of the top forty. With CARD_BUFFERS_MB=1536 nothing was pushed out (the caveat of #1163).
  3. RELAY=2 with CARD_STEPS=1 and TEXTURE_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.
  4. The skip list was a list. pipeline::skipped_shader compared every draw's and dispatch's shader hashes against a Vec<String> of the 1,034 entries of rt_off_hashes.txt: about 20 million string compares a frame, a sixth of all samples on the recording threads. A HashSet fixes it (one commit: https://github.com/Zignixx/VIctory-7900XTX/tree/skip-list-set, on avatarmanz/VIctory-7900XTX main, where the function is the same).

What did not move the frame (so nobody repeats it)

tried result
avatarmanz renderer port 1 (VICTORY_PORT_CONSTANTS=1, the 32-bit heap in place) traffic 56 -> 7 MB up, 50 -> 0 MB fetched a frame, but waiting for the card 38 -> 119 ms: 6.9 fps. This card reads system-memory heaps slowly.
VICTORY_GROUP_SYNC=0 (no barrier waits) the hot compute programs take the same time; barrier waits are not their cost
avatarmanz renderer port 6 (VICTORY_PORT_GUARD=1) guard lock waits 23 -> 0.5 ms a frame over all threads, frame unchanged
frame-rate unlock (VICTORY_FRAME_INTERVAL_MS=16.667) menus reach 60 fps, game speed is normal, the world stays where it was: pacing is not the limit
VICTORY_WIDE_SPIN=300 nothing
mimalloc under the diagnostics build's counting allocator preparing 26.7 -> 24.8 ms, frame unchanged
declared writes of big write-combined copies left out of the card's compares 13,638 -> 3,630 pieces compared, card 91% -> 70% busy, frame unchanged (61 ms in the city)
VICTORY_ASYNC_SUBMIT=1 active, frame unchanged
avatarmanz renderer port 5 (VICTORY_PORT_CBV=1) as it is inert on NVIDIA: it reads constants through raw twins, which need a heap of 2 * 2^21 views
port 5 with the raw view in the constant buffer's own slot (local, see below) picture correct, 9,148 of ~10,000 constant buffers a frame read from the card copy, waits for flights 0, but 45.8 ms against 42.5 ms

avatarmanz/VIctory-7900XTX main on NVIDIA: 4 fps until two things are set

We then moved the work onto avatarmanz/VIctory-7900XTX main (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=0 brings recording back to 113 ms a frame. A sampling profile had 37% of the samples of the six busiest threads in descriptor::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.
  • The title must be kept on its own upscaler (the NVIDIA fork's loader hook for 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=1 and combinations of them all landed within 38-40 ms (one or two runs each); CARD_STEPS=2 removed 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)

  • The title's render thread is inside ExecuteCommandLists for 38.5 of 39 ms (16 calls, about 29 submissions).
  • Its five recording threads run 35-40 of 39 ms, about 26 ms of it inside our list calls.
  • The card runs submissions for 29.6 of 39 ms; the title's own commands are 18.5 ms of that.
  • The chain a present comes out of has no single long link: about 15 ms of our work on the render thread, 7 ms recording, 5 ms helper jobs, 4 ms wake-ups and waits, 3 ms title code, 1.3 ms card.

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

  1. Is reading constants as raw bytes dearer on the card than a constant buffer view? Our own-slot variant removed the fills and the waits and still lost about 3 ms. We have no per-command timing of that run. Anyone with a replay that works could answer this in minutes.
  2. Tables across lists. Half the tables repeat by contents. Reuse needs the constant's place out of the descriptor (an offset in root constants into one bound buffer, as a PC renderer would do it). Has anyone started on that? Marvisak/VIctory PR 3068 and fxceless/victory-fork PRs 1316 and 1192 look related; we have not tried them yet.
  3. Recording on other threads. Marvisak/VIctory PR 3184 (VICTORY_DEFER_LISTS) aims at exactly the 26 ms a recording thread spends in our calls. Results on NVIDIA?
  4. Dynamic slot search costs about 8 ms a frame over all threads here; fxceless/victory-fork PR 1297 and avatarmanz/VIctory-7900XTX PR 237 address it.
  5. How high do the title's heap-indexed (bindless) slots reach? If past the 500,000 kept on a capped heap they read null today.
  6. Replay on NVIDIA. victory replay loses 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.
  7. The sampling profiler (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

  • Runs are compared in the window 100-140 s after start: the same scene in every run (4,550-4,650 draws), so a 150 s run is enough. Medians over a whole run mislead, because a faster run reaches later, heavier scenes.
  • VICTORY_GPU_TIMING=1 with VICTORY_D3D12_DRED=1 for card time by command; VICTORY_TIMELINE for the chain behind a present; VICTORY_PROFILE symbolised against the same build.

Code

Branch with everything: https://github.com/Zignixx/VIctory-7900XTX/tree/nvidia-wip (avatarmanz/VIctory-7900XTX main 2de998014 + 23 commits: the NVIDIA fork's dynamic slots on a capped heap, VICTORY_BVH_MISS and loader hooks, and ours). Everything experimental is behind a switch and off by default. It needs VICTORY_VIEW_BYTES=0 and VICTORY_OWN_UPSCALER=1 on 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) with VICTORY_SKIP_WC_BACK_MIN_KB (1024), VICTORY_SKIP_WC_COMPARE=1, VICTORY_PORT_CBV=1 with the own-slot path on hosts without twins (VICTORY_PORT_CBV_SLOT=0, VICTORY_PORT_CBV_CARD=0 turn 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.

**@⁠Zignixx** on GitHub · 2026-11-26 19:37 UTC · [original](https://github.com/fxceless/victory-fork/issues/1379) *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 - RTX 5080 16 GB (32-lane waves, view heap capped at 1,000,000), Ryzen 9 9900X3D, 64 GB, Windows 11 26200. - Tree for the table below: `trustno1-coder/VIctory-NVIDIA` `033be27f3` + the avatarmanz speed wave up to `85d564167` + 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). - Diagnostics build (`--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's `scripts/rt_off_hashes.txt` in `VICTORY_SKIP_PIPELINES`. - Scene: the opening cell, corridor and visiting room, 4,400-4,700 draws a frame; the city later has about 6,000. ## What moved the frame | step | fps (median) | ms a frame | what changed | |---|---|---|---| | start (quality switches: `RELAY=1`, `CARD_STEPS=0`, `TEXTURE_NO_WAIT=0`) | 12.9 | 77.7 | | | shader writes into write-combined title memory not fetched back | 14.4 | 69.5 | copying back 12.8 -> 4.6 ms | | every title buffer's copy in the card's memory (`VICTORY_CARD_BUFFERS_MIN_KB=64`) | 19.6 | 51.2 | waiting for the card 38 -> 16 ms | | `RELAY=2`, `CARD_STEPS=1`, `TEXTURE_NO_WAIT=0` | 20.8 | 48.2 | waits for flights 16 -> 4 ms, picture still correct | | the skipped-shader list looked up in a set | ~25 | ~39 | recording 3.9 -> 2.9 us a list call | 1. **Write-combined memory is not fetched back.** As fxceless/victory-fork#868, with one addition that matters once small buffers are on the card: only copies of 1 MiB and more may be skipped. Skipping the small ones gave 22 fps and a black picture with half the draws (2,700 instead of 5,700 a frame): they hold the counts and visibility lists the title's CPU does read. 2. **Small buffers on the card.** Already known (fxceless `c36971b`, 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 (`14264103296aa43a` 5.5 ms, `f22a76fcb967ee59` 2.3, `5cf00dc39042edaf` 2.1, ...; compare fxceless/victory-fork#1186) dropped out of the top forty. With `CARD_BUFFERS_MB=1536` nothing was pushed out (the caveat of #1163). 3. **`RELAY=2` with `CARD_STEPS=1` and `TEXTURE_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. 4. **The skip list was a list.** `pipeline::skipped_shader` compared every draw's and dispatch's shader hashes against a `Vec<String>` of the 1,034 entries of `rt_off_hashes.txt`: about 20 million string compares a frame, a sixth of all samples on the recording threads. A `HashSet` fixes it (one commit: https://github.com/Zignixx/VIctory-7900XTX/tree/skip-list-set, on `avatarmanz/VIctory-7900XTX` `main`, where the function is the same). ## What did not move the frame (so nobody repeats it) | tried | result | |---|---| | avatarmanz renderer port 1 (`VICTORY_PORT_CONSTANTS=1`, the 32-bit heap in place) | traffic 56 -> 7 MB up, 50 -> 0 MB fetched a frame, but waiting for the card 38 -> 119 ms: 6.9 fps. This card reads system-memory heaps slowly. | | `VICTORY_GROUP_SYNC=0` (no barrier waits) | the hot compute programs take the same time; barrier waits are not their cost | | avatarmanz renderer port 6 (`VICTORY_PORT_GUARD=1`) | guard lock waits 23 -> 0.5 ms a frame over all threads, frame unchanged | | frame-rate unlock (`VICTORY_FRAME_INTERVAL_MS=16.667`) | menus reach 60 fps, game speed is normal, the world stays where it was: pacing is not the limit | | `VICTORY_WIDE_SPIN=300` | nothing | | mimalloc under the diagnostics build's counting allocator | preparing 26.7 -> 24.8 ms, frame unchanged | | declared writes of big write-combined copies left out of the card's compares | 13,638 -> 3,630 pieces compared, card 91% -> 70% busy, frame unchanged (61 ms in the city) | | `VICTORY_ASYNC_SUBMIT=1` | active, frame unchanged | | avatarmanz renderer port 5 (`VICTORY_PORT_CBV=1`) as it is | inert on NVIDIA: it reads constants through raw twins, which need a heap of 2 * 2^21 views | | port 5 with the raw view in the constant buffer's own slot (local, see below) | picture correct, 9,148 of ~10,000 constant buffers a frame read from the card copy, waits for flights 0, but 45.8 ms against 42.5 ms | ## avatarmanz/VIctory-7900XTX `main` on NVIDIA: 4 fps until two things are set We then moved the work onto `avatarmanz/VIctory-7900XTX` `main` (`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=0` brings recording back to 113 ms a frame.** A sampling profile had 37% of the samples of the six busiest threads in `descriptor::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. - **The title must be kept on its own upscaler** (the NVIDIA fork's loader hook for `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=1` and combinations of them all landed within 38-40 ms (one or two runs each); `CARD_STEPS=2` removed 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) - The title's render thread is inside `ExecuteCommandLists` for 38.5 of 39 ms (16 calls, about 29 submissions). - Its five recording threads run 35-40 of 39 ms, about 26 ms of it inside our list calls. - The card runs submissions for 29.6 of 39 ms; the title's own commands are 18.5 ms of that. - The chain a present comes out of has no single long link: about 15 ms of our work on the render thread, 7 ms recording, 5 ms helper jobs, 4 ms wake-ups and waits, 3 ms title code, 1.3 ms card. 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 1. **Is reading constants as raw bytes dearer on the card than a constant buffer view?** Our own-slot variant removed the fills and the waits and still lost about 3 ms. We have no per-command timing of that run. Anyone with a replay that works could answer this in minutes. 2. **Tables across lists.** Half the tables repeat by contents. Reuse needs the constant's place out of the descriptor (an offset in root constants into one bound buffer, as a PC renderer would do it). Has anyone started on that? Marvisak/VIctory PR 3068 and fxceless/victory-fork PRs 1316 and 1192 look related; we have not tried them yet. 3. **Recording on other threads.** Marvisak/VIctory PR 3184 (`VICTORY_DEFER_LISTS`) aims at exactly the 26 ms a recording thread spends in our calls. Results on NVIDIA? 4. **Dynamic slot search** costs about 8 ms a frame over all threads here; fxceless/victory-fork PR 1297 and avatarmanz/VIctory-7900XTX PR 237 address it. 5. **How high do the title's heap-indexed (bindless) slots reach?** If past the 500,000 kept on a capped heap they read null today. 6. **Replay on NVIDIA.** `victory replay` loses 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. 7. **The sampling profiler** (`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 - Runs are compared in the window 100-140 s after start: the same scene in every run (4,550-4,650 draws), so a 150 s run is enough. Medians over a whole run mislead, because a faster run reaches later, heavier scenes. - `VICTORY_GPU_TIMING=1` with `VICTORY_D3D12_DRED=1` for card time by command; `VICTORY_TIMELINE` for the chain behind a present; `VICTORY_PROFILE` symbolised against the same build. ## Code Branch with everything: https://github.com/Zignixx/VIctory-7900XTX/tree/nvidia-wip (`avatarmanz/VIctory-7900XTX` `main` `2de998014` + 23 commits: the NVIDIA fork's dynamic slots on a capped heap, `VICTORY_BVH_MISS` and loader hooks, and ours). Everything experimental is behind a switch and off by default. It needs `VICTORY_VIEW_BYTES=0` and `VICTORY_OWN_UPSCALER=1` on 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) with `VICTORY_SKIP_WC_BACK_MIN_KB` (1024), `VICTORY_SKIP_WC_COMPARE=1`, `VICTORY_PORT_CBV=1` with the own-slot path on hosts without twins (`VICTORY_PORT_CBV_SLOT=0`, `VICTORY_PORT_CBV_CARD=0` turn 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:47:28 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#1379
No description provided.