RTX 3070 8 GB + 16 GB RAM, Series S profile: what each switch and recent PR did on main (3973179 → ca8829f) #1083

Open
opened 2026-11-26 03:57:11 +00:00 by github-bot · 12 comments
Owner

@⁠MKmajster on GitHub · 2026-11-25 18:47 UTC · original

Measurements from one machine, in case they help others with 8 GB cards.

Machine. RTX 3070 8 GB, 16 GB RAM (+ 48–64 GB page file), 12 threads, Windows 11. Diagnostics builds, --console series-s, the opening scene. Each row is one 5-minute run unless marked. The figure is the median of the frame-rate lines. Frame captures were off or every 64th frame (VICTORY_CAPTURE_WORLD_EVERY=64). Between two runs of the same build the median moved by up to about 10 %, so differences below that are noise here.

Tree. main (3973179, later 465b94f and ca8829f) + #188 + #258 (Series S) + #883. The only conflict in #188 is Host::present against the frame log's present_now. The held present (ASYNC_PRESENT, off) then has no overlay, so I pass None there.

Added on top Median frame Notes
COPY_PLAIN JOIN_PARTS BACK_OWN_VIEW ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT 181 ms
+ INDIRECT_WINDOW=1 158 ms clamped indirect commands 4,541 → 2,425 a frame; hair strands looked whole here
+ INDIRECT_GATHER=1 (465b94f), INDIRECT_SINGLE=1 (#1016), #1014, MONITOR_FENCE_WAIT=1 (#1020) 144 ms (two runs) "on the GPU" about 50 → 23 ms a frame; now the submitting thread is the limit (about 100 ms CPU a frame)
+ TEXTURE_BUDGET_MB=4096 144–149 ms far fuller picture on 8 GB (walls, fences, prints). The default stops making texture copies at 90 % of the system's budget. A 10-minute run kept 18.5 GB private, flat, with no errors. 5120 MB together with PAGE_WRITES=slots cost 198 ms here.

Two things that cost time here:

  • The frame-rate box of ca8829f: 159 ms against 138 ms with VICTORY_FPS_COUNTER=0, same build. The box should be off in measured runs.
  • PAGE_WRITES=slots alone: 162 ms, no visible change.

No measurable gain here (within the noise above): #824, #1007 (HEAP_WORKER=1), #1053, #1058 with #1059, #1032 (with the box off it was about even). The same goes for running copy refreshes on several threads.

Problems:

  • TEXTURE_DIRTY_GEN=1 (#1018 merged without #872, together with #1007): an access violation (write to 0) while loading, before the world. The PR says it is stacked on #872, so this is expected. I note it for anyone who merges it alone.
  • The ray-tracing builder from the NVIDIA fork (BVH_BUILDER=1 FIRSTLANE_OWN=1): it runs, at 0.2–0.3 fps, and the picture turns white within some frames, also with the ambient stand-in off. Private memory rose to about 20.8 GB.

AI-assisted (Claude Code). No game data attached.

**@⁠MKmajster** on GitHub · 2026-11-25 18:47 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083) Measurements from one machine, in case they help others with 8 GB cards. **Machine.** RTX 3070 8 GB, 16 GB RAM (+ 48–64 GB page file), 12 threads, Windows 11. Diagnostics builds, `--console series-s`, the opening scene. Each row is one 5-minute run unless marked. The figure is the median of the frame-rate lines. Frame captures were off or every 64th frame (`VICTORY_CAPTURE_WORLD_EVERY=64`). Between two runs of the same build the median moved by up to about 10 %, so differences below that are noise here. **Tree.** `main` (3973179, later 465b94f and ca8829f) + #188 + #258 (Series S) + #883. The only conflict in #188 is `Host::present` against the frame log's `present_now`. The held present (ASYNC_PRESENT, off) then has no overlay, so I pass `None` there. | Added on top | Median frame | Notes | |---|---|---| | `COPY_PLAIN JOIN_PARTS BACK_OWN_VIEW ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT` | 181 ms | | | + `INDIRECT_WINDOW=1` | 158 ms | clamped indirect commands 4,541 → 2,425 a frame; hair strands looked whole here | | + `INDIRECT_GATHER=1` (465b94f), `INDIRECT_SINGLE=1` (#1016), #1014, `MONITOR_FENCE_WAIT=1` (#1020) | **144 ms** (two runs) | "on the GPU" about 50 → 23 ms a frame; now the submitting thread is the limit (about 100 ms CPU a frame) | | + `TEXTURE_BUDGET_MB=4096` | 144–149 ms | **far fuller picture on 8 GB** (walls, fences, prints). The default stops making texture copies at 90 % of the system's budget. A 10-minute run kept 18.5 GB private, flat, with no errors. 5120 MB together with `PAGE_WRITES=slots` cost 198 ms here. | **Two things that cost time here:** - The frame-rate box of ca8829f: 159 ms against 138 ms with `VICTORY_FPS_COUNTER=0`, same build. The box should be off in measured runs. - `PAGE_WRITES=slots` alone: 162 ms, no visible change. **No measurable gain here** (within the noise above): #824, #1007 (`HEAP_WORKER=1`), #1053, #1058 with #1059, #1032 (with the box off it was about even). The same goes for running copy refreshes on several threads. **Problems:** - `TEXTURE_DIRTY_GEN=1` (#1018 merged without #872, together with #1007): an access violation (write to 0) while loading, before the world. The PR says it is stacked on #872, so this is expected. I note it for anyone who merges it alone. - The ray-tracing builder from the NVIDIA fork (`BVH_BUILDER=1 FIRSTLANE_OWN=1`): it runs, at 0.2–0.3 fps, and the picture turns white within some frames, also with the ambient stand-in off. Private memory rose to about 20.8 GB. AI-assisted (Claude Code). No game data attached.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:11 +00:00
Author
Owner

@⁠MKmajster on GitHub · 2026-11-25 22:31 UTC · original

Two additions on the same machine.

  • #1053: 142 ms against 144–155 ms without it (details in the PR).
  • soldsawn/victory-nvidia-8gb (main ca8829f + about 30 PRs, TEXTURE_DROP_MIPS=2, 1080p cap): 148 ms at Series X 1080p. That matches the Series S 720p figure above, so on 8 GB the 1080p cap with dropped top mips looks like a good trade.
  • The ca8829f frame-rate box: with VICTORY_FPS_COUNTER=0 the same tree measured 138 ms (without the 4 GB texture budget), so the box was the whole regression noted above.

AI-assisted (Claude Code). No game data attached.

**@⁠MKmajster** on GitHub · 2026-11-25 22:31 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7176458062) Two additions on the same machine. - **#1053:** 142 ms against 144–155 ms without it (details in the PR). - **soldsawn/victory-nvidia-8gb** (main ca8829f + about 30 PRs, `TEXTURE_DROP_MIPS=2`, 1080p cap): 148 ms at **Series X 1080p**. That matches the Series S 720p figure above, so on 8 GB the 1080p cap with dropped top mips looks like a good trade. - The ca8829f frame-rate box: with `VICTORY_FPS_COUNTER=0` the same tree measured 138 ms (without the 4 GB texture budget), so the box was the whole regression noted above. AI-assisted (Claude Code). No game data attached.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-25 23:59 UTC · original

Same card here (RTX 3070 8 GB, Ryzen 5 3600): a Series S tree you could measure against yours

Your table is the closest thing to my setup I have found, so in case it is useful: the tree I have been measuring
on is public as source at https://github.com/CuteBooty/victory-8gb (snapshot, GPL-3.0-or-later, no binaries; the
README lists the switches).

The part most likely to matter on our card: a partial port of upstream 683ad7a9 (table constants read in place).
In heavy scenes (7,000-10,000 draws) our dynamic descriptor ring was 99 % full because each table with a constant
buffer was rebuilt per draw; with the port the slot waits (285-400 ms a frame summed over recording threads) went
to zero and GPU time in the heaviest view from 100-115 ms to 51-62 ms. In the opening scene, where you measure, I
would expect little from it: the ring was not the limit there.

My numbers are from other scenes than yours (open water 141-168 ms, medium 180-250, heavy 240-340), so I cannot
compare directly. If you ever run it in your opening scene with your method, I would be glad to see the row.

**@⁠CuteBooty** on GitHub · 2026-11-25 23:59 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7178276502) **Same card here (RTX 3070 8 GB, Ryzen 5 3600): a Series S tree you could measure against yours** Your table is the closest thing to my setup I have found, so in case it is useful: the tree I have been measuring on is public as source at https://github.com/CuteBooty/victory-8gb (snapshot, GPL-3.0-or-later, no binaries; the README lists the switches). The part most likely to matter on our card: a partial port of upstream 683ad7a9 (table constants read in place). In heavy scenes (7,000-10,000 draws) our dynamic descriptor ring was 99 % full because each table with a constant buffer was rebuilt per draw; with the port the slot waits (285-400 ms a frame summed over recording threads) went to zero and GPU time in the heaviest view from 100-115 ms to 51-62 ms. In the opening scene, where you measure, I would expect little from it: the ring was not the limit there. My numbers are from other scenes than yours (open water 141-168 ms, medium 180-250, heavy 240-340), so I cannot compare directly. If you ever run it in your opening scene with your method, I would be glad to see the row.
Author
Owner

@⁠MKmajster on GitHub · 2026-11-26 09:32 UTC · original

Follow-up on the same machine (RTX 3070 8 GB, 16 GB RAM, Series S, main ca8829f + the switches above, opening scene, about 150–160 ms a frame). This is where the frame goes, from the built-in profiler (VICTORY_PROFILE=1) and per-stage counters we added. It may save others the same search.

It is waiting, not computing. The submitting thread (victory-submit) is on a processor about 51 % of the time. The title's render thread waits about 96 % of its time, almost all of it in queue::present_now → release_held_now, for the lock victory-submit holds while it prepares the submissions (141–148 ms a frame in the world). The card is busy 23–50 ms and stands idle 60–70 ms behind us. So the frame is the submitting thread's serial work, about 150 ms of its 152.

The submitting thread per frame (counters, 4 readings):

Stage ms
batch_flush (copies up to the card's copies) 29–46
settle for "title memory changed under shader writes" 27–35
descriptor::sync_heaps 21–26
deferred copies 10–15
texture refresh 5–10
ask_once (write watch) 6–7
stale check 5–7
snapshots 6

Copies total about 89 MB a frame. victory_copy_guarded_at alone is about 20 ms on one thread, and the write-watch askings plus guards about 15–30 ms.

Why it settles. Every settle here (1.3–1.5 a frame) is the merge's run cap. A page under the flights' writes has up to about 16,000 changed runs of a few bytes, and each run would be a copy of its own into the card's copy. VICTORY_MERGE_RUNS is a budget per submission, so even its maximum (65,536) is exceeded. Raising it made the frame slower here (199 ms against 162–173 ms): more copies, the same settles. A fix would need a different upload for such pages: the page staged once, plus a byte mask, applied on the card in one pass, ordered after the flights.

Two things that did not help here, so others can skip them:

  • Moving the per-submission preparation onto more threads (sync_heaps, copies, heap pass) or queueing presents (#1136): about 0 % on the frame. The work in parallel is not on the critical path, and the wait moves to the same thread.
  • Our own and other forks' attempts that saved memory by holding textures back did save RAM (−4 GB), but the picture lost most of its textures.

AI-assisted (Claude Code, analysis with Gemini). No game data attached.

**@⁠MKmajster** on GitHub · 2026-11-26 09:32 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7188135837) Follow-up on the same machine (RTX 3070 8 GB, 16 GB RAM, Series S, `main` ca8829f + the switches above, opening scene, about 150–160 ms a frame). This is where the frame goes, from the built-in profiler (`VICTORY_PROFILE=1`) and per-stage counters we added. It may save others the same search. **It is waiting, not computing.** The submitting thread (`victory-submit`) is on a processor about 51 % of the time. The title's render thread waits about 96 % of its time, almost all of it in `queue::present_now → release_held_now`, for the lock `victory-submit` holds while it prepares the submissions (141–148 ms a frame in the world). The card is busy 23–50 ms and stands idle 60–70 ms behind us. So the frame is the submitting thread's serial work, about 150 ms of its 152. **The submitting thread per frame** (counters, 4 readings): | Stage | ms | |---|---| | `batch_flush` (copies up to the card's copies) | 29–46 | | settle for "title memory changed under shader writes" | 27–35 | | `descriptor::sync_heaps` | 21–26 | | deferred copies | 10–15 | | texture refresh | 5–10 | | `ask_once` (write watch) | 6–7 | | stale check | 5–7 | | snapshots | 6 | Copies total about 89 MB a frame. `victory_copy_guarded_at` alone is about 20 ms on one thread, and the write-watch askings plus guards about 15–30 ms. **Why it settles.** Every settle here (1.3–1.5 a frame) is the merge's run cap. A page under the flights' writes has up to about 16,000 changed runs of a few bytes, and each run would be a copy of its own into the card's copy. `VICTORY_MERGE_RUNS` is a budget per submission, so even its maximum (65,536) is exceeded. Raising it made the frame slower here (199 ms against 162–173 ms): more copies, the same settles. A fix would need a different upload for such pages: the page staged once, plus a byte mask, applied on the card in one pass, ordered after the flights. **Two things that did not help here, so others can skip them:** - Moving the per-submission preparation onto more threads (sync_heaps, copies, heap pass) or queueing presents (#1136): about 0 % on the frame. The work in parallel is not on the critical path, and the wait moves to the same thread. - Our own and other forks' attempts that saved memory by holding textures back did save RAM (−4 GB), but the picture lost most of its textures. AI-assisted (Claude Code, analysis with Gemini). No game data attached.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-26 10:17 UTC · original

Same card and the same shape of frame here (RTX 3070 8 GB, Ryzen 5 3600, Series S): our numbers for your stages

Your profile matches what the timeline counters show on my tree (CuteBooty/victory-8gb), so here is the comparison, in case it saves you a search. One or two short runs each, in town at 7,000-9,000 draws, about 200 ms a frame.

  • Waiting, not computing: the presenting thread is inside the present for 187 of 212 ms; the submit worker prepares for 126 ms a frame on average (240 at worst) and is idle for 71.
  • Settles for "title memory changed under shader writes": 2.0-2.7 a frame, 13-14 ms a frame. My tree caps the merge at 512 changed runs per submission (no VICTORY_MERGE_RUNS there), so the mechanism differs from yours, but the logs do not yet split the run cap from the other causes (untracked memory, no journal, no snapshot). A further 1.0 settle a frame is the submission or present waiting for flights to land, about 60 ms: that one is the frame's own length showing up as a wait.
  • More threads for the preparation: the same result as yours. Texture refreshes and buffer copies on a pool of four threads, alone and with the write-watch query moved under per-region locks, did not shorten the frame; the threads queue on the guards' lock (about 190 thread-ms a frame).
  • Descriptor compare: about 240,000 records a frame, but by estimate only a few milliseconds here. A dirty-page skip using the kernel's write watch skips nothing on this title, because the heaps sit in physical-page views that the write watch does not cover.
  • What did move a number: publishing guarded blocks as clean with the stamp of their last tracked write, so that refreshes and copies of unwritten memory are answered without the guards' lock: about 945 refreshes a frame skipped, preparing 87 ms against 105-146 on plain runs. That comparison was made with a self-check on and other work on the machine, so it is a first reading, not a result.
  • The texture pass on its own thread (fork PR 1007, ported): 75 ms a frame of work leaves the recording threads; I have no clean before-and-after frame time yet.

All of it is in the tree behind switches that are off unless set (VICTORY_LIGHT_REFRESH, VICTORY_PREP_THREADS, VICTORY_WATCH_SPLIT, VICTORY_DESC_DIRTY, VICTORY_HEAP_WORKER, counters under VICTORY_FRAME_WHY2). Your page-plus-mask upload for pages with thousands of small runs looks right to me for your 27-35 ms; on my numbers it would be worth about half of 13 ms, so I have not built it.

AI-assisted (Claude Code, OpenAI Codex).

**@⁠CuteBooty** on GitHub · 2026-11-26 10:17 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7189171783) **Same card and the same shape of frame here (RTX 3070 8 GB, Ryzen 5 3600, Series S): our numbers for your stages** Your profile matches what the timeline counters show on my tree (CuteBooty/victory-8gb), so here is the comparison, in case it saves you a search. One or two short runs each, in town at 7,000-9,000 draws, about 200 ms a frame. - **Waiting, not computing:** the presenting thread is inside the present for 187 of 212 ms; the submit worker prepares for 126 ms a frame on average (240 at worst) and is idle for 71. - **Settles for "title memory changed under shader writes":** 2.0-2.7 a frame, 13-14 ms a frame. My tree caps the merge at 512 changed runs per submission (no `VICTORY_MERGE_RUNS` there), so the mechanism differs from yours, but the logs do not yet split the run cap from the other causes (untracked memory, no journal, no snapshot). A further 1.0 settle a frame is the submission or present waiting for flights to land, about 60 ms: that one is the frame's own length showing up as a wait. - **More threads for the preparation:** the same result as yours. Texture refreshes and buffer copies on a pool of four threads, alone and with the write-watch query moved under per-region locks, did not shorten the frame; the threads queue on the guards' lock (about 190 thread-ms a frame). - **Descriptor compare:** about 240,000 records a frame, but by estimate only a few milliseconds here. A dirty-page skip using the kernel's write watch skips nothing on this title, because the heaps sit in physical-page views that the write watch does not cover. - **What did move a number:** publishing guarded blocks as clean with the stamp of their last tracked write, so that refreshes and copies of unwritten memory are answered without the guards' lock: about 945 refreshes a frame skipped, preparing 87 ms against 105-146 on plain runs. That comparison was made with a self-check on and other work on the machine, so it is a first reading, not a result. - **The texture pass on its own thread** (fork PR 1007, ported): 75 ms a frame of work leaves the recording threads; I have no clean before-and-after frame time yet. All of it is in the tree behind switches that are off unless set (`VICTORY_LIGHT_REFRESH`, `VICTORY_PREP_THREADS`, `VICTORY_WATCH_SPLIT`, `VICTORY_DESC_DIRTY`, `VICTORY_HEAP_WORKER`, counters under `VICTORY_FRAME_WHY2`). Your page-plus-mask upload for pages with thousands of small runs looks right to me for your 27-35 ms; on my numbers it would be worth about half of 13 ms, so I have not built it. AI-assisted (Claude Code, OpenAI Codex).
Author
Owner

@⁠KainanP on GitHub · 2026-11-26 12:07 UTC · original

The page-plus-mask upload suggested above is now in #1295. It is off by default; turn it on with VICTORY_MERGE_MASK=1, or with alt to switch it on and off every 20 s.

What it does: a 64 KiB page with more than 16 changed runs costs the merge budget one run instead of one per run. On the card, the page goes up with one compute pass that writes only the masked bytes and keeps the flights' bytes. The result is byte-exact, checked on an RTX 4060, an Intel UHD and WARP.

In a synthetic benchmark, a page with 16,384 runs took 6.3 ms of the submitting thread and 14 ms of the card as one copy per run. With the mask it took 0.46 ms and 0.05 ms (RTX 4060 Laptop). I have no game here, so the effect on the settles and on the frame time is not measured. An alt run in your opening scene would answer that; what to compare is in the PR.

AI-assisted (Claude Code).

**@⁠KainanP** on GitHub · 2026-11-26 12:07 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7191592662) The page-plus-mask upload suggested above is now in #1295. It is off by default; turn it on with `VICTORY_MERGE_MASK=1`, or with `alt` to switch it on and off every 20 s. What it does: a 64 KiB page with more than 16 changed runs costs the merge budget one run instead of one per run. On the card, the page goes up with one compute pass that writes only the masked bytes and keeps the flights' bytes. The result is byte-exact, checked on an RTX 4060, an Intel UHD and WARP. In a synthetic benchmark, a page with 16,384 runs took 6.3 ms of the submitting thread and 14 ms of the card as one copy per run. With the mask it took 0.46 ms and 0.05 ms (RTX 4060 Laptop). I have no game here, so the effect on the settles and on the frame time is not measured. An `alt` run in your opening scene would answer that; what to compare is in the PR. _AI-assisted (Claude Code)._
Author
Owner

@⁠KainanP on GitHub · 2026-11-26 13:56 UTC · original

On the guards' lock that the threads queue on: #1315 moves the costly part out of it. It is off by default; turn it on with VICTORY_GUARD_OUTSIDE=1, or with alt to switch it on and off every 20 s.

What was serialized. For view memory, each refresh makes the blocks it found written read-only again with one VirtualProtect per block. It did this while holding both the guards' lock and the journal's lock. Windows can run these calls side by side: 4 threads were 2.3 times faster here. Our two locks are what kept them one at a time.

Synthetic benchmark. About 89 MB dirty per frame, 4 title threads writing during the flush, i7-14650HX:

  • On the submitting thread: the flush takes the same time (17 ms). The title threads' lock waits drop from 5–7 ms to 0.1 ms, and a faulting write from about 20 µs to 6 µs.
  • On the helper threads (VICTORY_WIDE_REFRESH-style): the flush drops from 11 ms to 5.5 ms, and the lock waits summed over all threads from 61–66 ms to 3 ms.

The answers stay the same. A test runs writers against flushes and checks that no write is lost and no copy goes back to an older value. Details are in the PR.

Not measured: the game, which I can't run. @⁠MKmajster @⁠CuteBooty, if you can, an A/B with VICTORY_WIDE_REFRESH=1 VICTORY_GUARD_OUTSIDE=alt in your scene would answer whether this shortens your frame (compare batch_flush / "copies" and the frame median between the ON and off phases).

AI-assisted (Claude Code).

**@⁠KainanP** on GitHub · 2026-11-26 13:56 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7194039908) On the guards' lock that the threads queue on: #1315 moves the costly part out of it. It is off by default; turn it on with `VICTORY_GUARD_OUTSIDE=1`, or with `alt` to switch it on and off every 20 s. **What was serialized.** For view memory, each refresh makes the blocks it found written read-only again with one `VirtualProtect` per block. It did this while holding both the guards' lock and the journal's lock. Windows can run these calls side by side: 4 threads were 2.3 times faster here. Our two locks are what kept them one at a time. **Synthetic benchmark.** About 89 MB dirty per frame, 4 title threads writing during the flush, i7-14650HX: - **On the submitting thread:** the flush takes the same time (17 ms). The title threads' lock waits drop from 5–7 ms to 0.1 ms, and a faulting write from about 20 µs to 6 µs. - **On the helper threads** (`VICTORY_WIDE_REFRESH`-style): the flush drops from 11 ms to 5.5 ms, and the lock waits summed over all threads from 61–66 ms to 3 ms. The answers stay the same. A test runs writers against flushes and checks that no write is lost and no copy goes back to an older value. Details are in the PR. Not measured: the game, which I can't run. @⁠MKmajster @⁠CuteBooty, if you can, an A/B with `VICTORY_WIDE_REFRESH=1 VICTORY_GUARD_OUTSIDE=alt` in your scene would answer whether this shortens your frame (compare `batch_flush` / "copies" and the frame median between the ON and off phases). _AI-assisted (Claude Code)._
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-26 14:44 UTC · original

Thanks, this is the lock our threads queue on. I'm testing a shared-lock approach on my tree now and will read #1315 next; an in-game comparison from the 3070 will follow if it ports cleanly.

**@⁠CuteBooty** on GitHub · 2026-11-26 14:44 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7195260496) Thanks, this is the lock our threads queue on. I'm testing a shared-lock approach on my tree now and will read #1315 next; an in-game comparison from the 3070 will follow if it ports cleanly.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-26 16:04 UTC · original

The read of #1315 I promised is on the PR: #1315. In short: from the code, the outside path does not seem to run for registered view memory with the default settings, and the PR does not apply to my tree, so there is no in-game comparison from the 3070.

**@⁠CuteBooty** on GitHub · 2026-11-26 16:04 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7197145323) The read of #1315 I promised is on the PR: https://git.gtahub.st/github/fxceless--victory-fork/pulls/1315. In short: from the code, the outside path does not seem to run for registered view memory with the default settings, and the PR does not apply to my tree, so there is no in-game comparison from the 3070.
Author
Owner

@⁠MKmajster on GitHub · 2026-11-26 22:17 UTC · original

Another update from the same machine (RTX 3070 8 GB, Ryzen 5 5600, 16 GB RAM, Windows 11, Series S profile, opening scene). Resizable BAR is now on (BAR1 8192 MiB); both rows of each comparison below were run with it on, warm, 5 minutes each.

1. A set of opt-in levers ported onto the fxceless line (main ca8829f + #188/#258/#883/#1016/#1014/#1020/#1032/#798/#610): 185 → 144 ms.
The "usual frame" went from 185 ms to 144 ms (128–167), and the title's render thread stopped waiting in present (172 ms → 0 ms a frame). Private memory was about the same (17.5 vs 17.1 GB) and the picture matched frame by frame. What is in it, each behind its own switch, off by default:

  • renderer port 2 from avatarmanz/VIctory-7900XTX (descriptor-table stores mark their slots; sync_heaps 17 ms → under 1 ms here), with the patching helper rewritten so it no longer depends on the GPL-2.0-only console_insn.rs;
  • the under-writes merge on several threads with AVX2, and copy-backs landed on threads of their own;
  • the guards' lock as a read/write lock with a fast path for clean blocks, and a batched wide Batch::flush;
  • indirect clamps hoisted after compute through a gather split ("the list had stopped gathering" 1,001 → 0 a frame, clamp barriers 1,920 → 866);
  • VICTORY_ASYNC_PRESENT=1 keeping the Series S second plane (see my note on #188).

2. Windows of 4 MiB beat 1 MiB + tails here. Same binary, 4-minute runs: 4 MiB windows 147 ms against 157 ms with VICTORY_WINDOW_KB=1024 VICTORY_WINDOW_TAILS=1. With the smaller grid the same pages sit in several overlapping windows and are copied more than once: 88.6 MB against 153.7 MB of copies a frame. The smaller windows saved only about 0.5 GB of RAM.

3. VICTORY_CARD_HASH_WIDE after 6d20eed6. Since that commit the 64-thread hash of #1014 is opt-in. Merging main (58de9bf4) into the tree above without setting it cost about 20 ms of card time a frame on this card ("on the GPU" 48–58 ms against 28–47 ms with VICTORY_CARD_HASH_WIDE=1; frame 179–187 → 161–176 ms). Anyone who had #1014 before and merges main may want to set it.

4. Not worth it here: renderer ports 1+5 (PORT_CONSTANTS/PORT_CBV) on this NVIDIA card: even with a warm pipeline library the card's list time went from about 52–58 ms to 119–134 ms a frame, as constants are read across PCIe as raw views instead of constant buffers in video memory.

AI-assisted (Claude Code, with Gemini). No game data attached.

**@⁠MKmajster** on GitHub · 2026-11-26 22:17 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7204536832) Another update from the same machine (RTX 3070 8 GB, Ryzen 5 5600, 16 GB RAM, Windows 11, Series S profile, opening scene). Resizable BAR is now on (BAR1 8192 MiB); both rows of each comparison below were run with it on, warm, 5 minutes each. **1. A set of opt-in levers ported onto the fxceless line (main ca8829f + #188/#258/#883/#1016/#1014/#1020/#1032/#798/#610): 185 → 144 ms.** The "usual frame" went from 185 ms to 144 ms (128–167), and the title's render thread stopped waiting in present (172 ms → 0 ms a frame). Private memory was about the same (17.5 vs 17.1 GB) and the picture matched frame by frame. What is in it, each behind its own switch, off by default: - renderer port 2 from avatarmanz/VIctory-7900XTX (descriptor-table stores mark their slots; `sync_heaps` 17 ms → under 1 ms here), with the patching helper rewritten so it no longer depends on the GPL-2.0-only `console_insn.rs`; - the under-writes merge on several threads with AVX2, and copy-backs landed on threads of their own; - the guards' lock as a read/write lock with a fast path for clean blocks, and a batched wide `Batch::flush`; - indirect clamps hoisted after compute through a gather split ("the list had stopped gathering" 1,001 → 0 a frame, clamp barriers 1,920 → 866); - `VICTORY_ASYNC_PRESENT=1` keeping the Series S second plane (see my note on #188). **2. Windows of 4 MiB beat 1 MiB + tails here.** Same binary, 4-minute runs: 4 MiB windows 147 ms against 157 ms with `VICTORY_WINDOW_KB=1024 VICTORY_WINDOW_TAILS=1`. With the smaller grid the same pages sit in several overlapping windows and are copied more than once: 88.6 MB against 153.7 MB of copies a frame. The smaller windows saved only about 0.5 GB of RAM. **3. `VICTORY_CARD_HASH_WIDE` after 6d20eed6.** Since that commit the 64-thread hash of #1014 is opt-in. Merging main (58de9bf4) into the tree above without setting it cost about 20 ms of card time a frame on this card ("on the GPU" 48–58 ms against 28–47 ms with `VICTORY_CARD_HASH_WIDE=1`; frame 179–187 → 161–176 ms). Anyone who had #1014 before and merges main may want to set it. **4. Not worth it here:** renderer ports 1+5 (`PORT_CONSTANTS`/`PORT_CBV`) on this NVIDIA card: even with a warm pipeline library the card's list time went from about 52–58 ms to 119–134 ms a frame, as constants are read across PCIe as raw views instead of constant buffers in video memory. AI-assisted (Claude Code, with Gemini). No game data attached.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-26 22:39 UTC · original

Same card, Resizable BAR off (BAR1 256 MiB): in-place reading lost here too, plus three things that did not help on 8 GB

Thanks for the ReBAR rows. They close a question I had left open. My card is the same (RTX 3070 8 GB, driver 621.24, Ryzen 5 3600, Series S profile), but Resizable BAR is off here. Taken together, our results say reading title memory in place loses on this card with or without it.

  • In-place reading (VICTORY_INPLACE=1, the private-memory form of the same idea): the probe works on this driver. The device opens the title's memory as a heap, places a buffer in it, and the card reads CPU writes with no call in between. A section kept reserved is refused (0x80070057); a committed one is accepted. In play, 76-77 windows (about 360 MB) were read in place with no copy, and the dense frame (7,000-9,000 draws) went from 220 to 254 ms. All of the loss was on the card (102 -> 141 ms); preparing did not fall (105 ms both). That is one run each, and the scene was dusk vs night, so it is soft, but it points the same way as your ports 1+5 (52-58 -> 119-134 ms card). I did not port renderer port 1.
  • How much port 1 could have covered: with a copy-source counter, the sections port 1 would place in-place account for about a quarter of what we copy per frame. That is 44-47 MB and 5.5-5.8 thread-ms a frame (mostly a shadow refresh), against 128-145 MB / 18-21 thread-ms above 4 GiB.
  • Half resolution (fork PR 1323's render-scale patch, 960x540 internal): no gain, 248 ms against 220 at the same draw counts, and a much worse picture. The dense frame here is CPU-bound, so fewer pixels do not help.
  • Full-detail textures (VICTORY_TEXTURE_DROP_MIPS=0) do not fit 8 GB: 6,986 MB in use against a 6,775 MB budget, 70 "no room" refusals, and roads, signs and skin drawn black. DROP_MIPS=1 stays.
  • A correction from my side: the strict gather rule in my sixth snapshot (VICTORY_GATHER_STRICT, on by default) also demoted the indirect-window path. That cost about 70 ms a dense frame on this card (276-285 against 203-210 with it off). The seventh snapshot (https://github.com/CuteBooty/victory-8gb) limits it to gathers and segments. Any number taken on the sixth snapshot with VICTORY_INDIRECT_WINDOW=1 carries that cost.

On VICTORY_CARD_HASH_WIDE: agreed, it is in my standard set.

One question about your 185 -> 144 ms: do you know which of the levers moved the frame most on its own? Renderer port 2 (sync_heaps 17 ms -> under 1) is the one I have been weighing. On my logs the heap pass is 145-155 thread-ms a frame, and about 88 % of the records it compares turn out unchanged. So the share it actually saves on a 3070 would decide whether I port it.

AI-assisted (Claude Code, OpenAI Codex). No game data attached.

**@⁠CuteBooty** on GitHub · 2026-11-26 22:39 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7204865747) **Same card, Resizable BAR off (BAR1 256 MiB): in-place reading lost here too, plus three things that did not help on 8 GB** Thanks for the ReBAR rows. They close a question I had left open. My card is the same (RTX 3070 8 GB, driver 621.24, Ryzen 5 3600, Series S profile), but Resizable BAR is off here. Taken together, our results say reading title memory in place loses on this card with or without it. - **In-place reading (`VICTORY_INPLACE=1`, the private-memory form of the same idea):** the probe works on this driver. The device opens the title's memory as a heap, places a buffer in it, and the card reads CPU writes with no call in between. A section kept *reserved* is refused (0x80070057); a *committed* one is accepted. In play, 76-77 windows (about 360 MB) were read in place with no copy, and the dense frame (7,000-9,000 draws) went from 220 to 254 ms. All of the loss was on the card (102 -> 141 ms); preparing did not fall (105 ms both). That is one run each, and the scene was dusk vs night, so it is soft, but it points the same way as your ports 1+5 (52-58 -> 119-134 ms card). I did not port renderer port 1. - **How much port 1 could have covered:** with a copy-source counter, the sections port 1 would place in-place account for about a quarter of what we copy per frame. That is 44-47 MB and 5.5-5.8 thread-ms a frame (mostly a shadow refresh), against 128-145 MB / 18-21 thread-ms above 4 GiB. - **Half resolution (fork PR 1323's render-scale patch, 960x540 internal):** no gain, 248 ms against 220 at the same draw counts, and a much worse picture. The dense frame here is CPU-bound, so fewer pixels do not help. - **Full-detail textures (`VICTORY_TEXTURE_DROP_MIPS=0`) do not fit 8 GB:** 6,986 MB in use against a 6,775 MB budget, 70 "no room" refusals, and roads, signs and skin drawn black. `DROP_MIPS=1` stays. - **A correction from my side:** the strict gather rule in my sixth snapshot (`VICTORY_GATHER_STRICT`, on by default) also demoted the indirect-window path. That cost about 70 ms a dense frame on this card (276-285 against 203-210 with it off). The seventh snapshot (https://github.com/CuteBooty/victory-8gb) limits it to gathers and segments. Any number taken on the sixth snapshot with `VICTORY_INDIRECT_WINDOW=1` carries that cost. On `VICTORY_CARD_HASH_WIDE`: agreed, it is in my standard set. One question about your 185 -> 144 ms: do you know which of the levers moved the frame most on its own? Renderer port 2 (`sync_heaps` 17 ms -> under 1) is the one I have been weighing. On my logs the heap pass is 145-155 thread-ms a frame, and about 88 % of the records it compares turn out unchanged. So the share it actually saves on a 3070 would decide whether I port it. AI-assisted (Claude Code, OpenAI Codex). No game data attached.
Author
Owner

@⁠MKmajster on GitHub · 2026-11-26 22:55 UTC · original

Thanks for the ReBAR-off rows — that settles it for this card. To your question: I measured the set together (185 → 144 ms), not each lever on its own, so I can only give what was counted inside those runs. Renderer port 2 took sync_heaps on the submitting thread from 17.2 ms to 0.2–0.6 ms a frame, with no records missed by its every-8-frames fallback check. VICTORY_ASYNC_PRESENT (with the second plane kept) took the render thread's wait in present from about 172 ms to 0. The 4 MiB windows were measured apart: −10 ms against 1 MiB + tails. If the heap pass is 145–155 thread-ms a frame on your logs and 88 % unchanged, port 2 skips that look entirely for the marked heap, so it should be worth more on your tree than the 17 ms it saved here. The tree is now at https://github.com/MKmajster/victory-fork-8gb (branch nvidia-8gb, every lever behind its own switch, scripts/play-8gb.ps1 for the measured set); its port 2 checks the title's code by a hash rather than keeping its bytes.

AI-assisted (Claude Code, with Gemini). No game data attached.

**@⁠MKmajster** on GitHub · 2026-11-26 22:55 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7205101829) Thanks for the ReBAR-off rows — that settles it for this card. To your question: I measured the set together (185 → 144 ms), not each lever on its own, so I can only give what was counted inside those runs. Renderer port 2 took `sync_heaps` on the submitting thread from 17.2 ms to 0.2–0.6 ms a frame, with no records missed by its every-8-frames fallback check. `VICTORY_ASYNC_PRESENT` (with the second plane kept) took the render thread's wait in present from about 172 ms to 0. The 4 MiB windows were measured apart: −10 ms against 1 MiB + tails. If the heap pass is 145–155 thread-ms a frame on your logs and 88 % unchanged, port 2 skips that look entirely for the marked heap, so it should be worth more on your tree than the 17 ms it saved here. The tree is now at https://github.com/MKmajster/victory-fork-8gb (branch `nvidia-8gb`, every lever behind its own switch, `scripts/play-8gb.ps1` for the measured set); its port 2 checks the title's code by a hash rather than keeping its bytes. AI-assisted (Claude Code, with Gemini). No game data attached.
Author
Owner

@⁠akimfomin on GitHub · 2026-11-26 23:05 UTC · original

CuteBooty's seventh snapshot already has an independent switch for repeatedly resolving unchanged heap records. I checked 1056c88: VICTORY_HEAP_SAME_SKIP skips lookup only if the record, cached host view and table epoch still match. The hot path still looks up changed or remapped records. This targets the reported 88% unchanged records on that tree. MKmajster's marked-heap port works at a different boundary, and the 185→144 ms result is for his combined set.

@⁠CuteBooty, a single OFF/ON pair for VICTORY_HEAP_SAME_SKIP on that snapshot, with the same scene and VICTORY_HEAP_SAME_SKIP_CHECK=16 for the ON leg, could estimate how much your current tree can already save before porting another mechanism. The existing output gives skipped/due slots, check mismatches and heap-pass time. I checked the source and have no 3070 gameplay delta. PortBridge · AI-assisted source review.

**@⁠akimfomin** on GitHub · 2026-11-26 23:05 UTC · [original](https://github.com/fxceless/victory-fork/issues/1083#issuecomment-7205249537) CuteBooty's seventh snapshot already has an independent switch for repeatedly resolving unchanged heap records. I checked `1056c88`: [`VICTORY_HEAP_SAME_SKIP`](https://github.com/CuteBooty/victory-8gb/blob/1056c8869b6fbd8701a46242d3a062975289227b/crates/victory-gpu/src/heap_pass.rs#L211-L254) skips lookup only if the record, cached host view and table epoch still match. [The hot path](https://github.com/CuteBooty/victory-8gb/blob/1056c8869b6fbd8701a46242d3a062975289227b/crates/victory-gpu/src/draw.rs#L2026-L2073) still looks up changed or remapped records. This targets the reported 88% unchanged records on that tree. MKmajster's marked-heap port works at a different boundary, and the 185→144 ms result is for his combined set. @⁠CuteBooty, a single OFF/ON pair for `VICTORY_HEAP_SAME_SKIP` on that snapshot, with the same scene and `VICTORY_HEAP_SAME_SKIP_CHECK=16` for the ON leg, could estimate how much your current tree can already save before porting another mechanism. The existing output gives skipped/due slots, check mismatches and heap-pass time. I checked the source and have no 3070 gameplay delta. [PortBridge](https://github.com/akimfomin/PortBridge) · AI-assisted source review.
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#1083
No description provided.