NVIDIA: Fixed 262,144 dynamic descriptor cap (PORTABLE_VIEWS) starves LATE_WAIT pipelining and causes Default corruption #35

Open
opened 2026-11-26 03:31:28 +00:00 by github-bot · 7 comments
Owner

@⁠owsware on GitHub · 2026-11-25 23:57 UTC · original

Summary

Controlled 7-run ablation on an NVIDIA GeForce RTX 5080 (0a43566, diag profile, 2560x1440, VICTORY_SKIP_PIPELINES=none, zero crashes / zero device removals) isolates why scripts\play.ps1 Default (THIN=1, JOIN_PARTS=8, UPLOAD_AHEAD=1) produces broken geometry and 2.8x slower frame times on NVIDIA while -Safe or THIN=0 / LATE_WAIT=0 recovers the image.

There are two distinct issues stacked in the Default failure:

  1. CPU stall from VICTORY_THIN=1 + JOIN_PARTS=8: slows recording threads (454.2 ms across threads in Default vs 164.5 ms with THIN=0 on LATE_WAIT_LISTS=32) and amplifies dynamic descriptor search overhead (329.4 ms vs 49.0 ms).
  2. Hard DYNAMIC = 262,144 descriptor pool ceiling under PORTABLE_VIEWS = 1_000_000: when LATE_WAIT keeps prior frames' command lists alive for CPU/GPU overlap, dynamic table allocations overflow the 262,144-slot slice and State::tables returns u32::MAX, dropping 1,564–1,683 indirect draws/dispatches per frame (prepare failed).

Code Findings (0a43566)

  • crates/victory-gpu/src/descriptor/host.rs:1416-1436 (dynamic_slots):
    if null < PORTABLE_VIEWS {
        return DYNAMIC;
    }
    null.saturating_sub(count).min(most).max(DYNAMIC)
    
    On NVIDIA Tier-3 (1,000,000 view limit -> null = 999_999 < PORTABLE_VIEWS), dynamic_slots returns DYNAMIC (262,144) and ignores VICTORY_DYNAMIC_SLOTS, leaving 737,855 direct title slots (with raw_twins = false). Meanwhile AMD gets up to DYNAMIC << 2 (1,048,576) dynamic slots under UNCAPPED_VIEWS.
  • Ablation Proof (LATE_WAIT=0 vs LATE_WAIT_LISTS=32 vs Default):
    • Default (THIN=1, JOIN_PARTS=8, UPLOAD_AHEAD=1): 3.9 fps (255.4 ms/frame), 13,353 tables asked / 2,411 refused (329.4 ms searching), 1,683 indirect dropped/frame (829.5 k2, 492.2 k10, 256.0 k0, 87.5 k1), severely broken world geometry & sky bleed.
    • Default + LATE_WAIT_LISTS=32: 8.8 fps (113.8 ms/frame), 13,732 asked / 2,612 refused (206.6 ms searching), 1,564 indirect dropped/frame (1,107 prepare failed in captured world ops: 794 k2, 256 k0, 54 k1, 3 k10), broken geometry.
    • Default + THIN=0, LATE_WAIT_LISTS=32: 10.9 fps (91.5 ms/frame), 13,556 asked / 1,000 refused (49.0 ms searching), 691 indirect dropped/frame (64 in captured world ops: 0 k2, 46 k10, 18 k1), intact geometry aside from the bottom block band.
    • Default + THIN=0, JOIN_PARTS=1, LATE_WAIT=0: 6.2 fps (161.8 ms/frame), 12,414 asked / 0 refused (1.5 ms searching), 0 indirect dropped/frame, cleanest lighting/shadows aside from the bottom block band.
  • Additional State::tables gaps (crates/victory-gpu/src/draw.rs:3148-3416):
    • State::tables only checks static used offsets (index >= host.count() at line 3179) before deciding whether to clone a table into dynamic slots; dynamically indexed descriptors (RootIndexedView, byte_offset + (constant << shift)) can also reach past 737,855 even if the base/static entries fit.
    • Dynamic table holds stay attached until command-list reset/drop (State::tables_done runs after submission waits); detached relay lists don't release their dynamic ranges immediately upon GPU fence completion.
    • Above 737,855 direct guest views, a paged block-mapped heap (1,024-slot guest blocks into a 1M host heap, as in Marvisak/VIctory#1779) avoids silently truncating high-index bindless views without stealing dynamic capacity.

(Note: the persistent ~20 px bottom-of-screen block strip seen across all 7 runs matches the 65,535 indirect dispatch clamp already targeted by open PR #10.)

Suggested Fix Directions

  1. Release detached list dynamic descriptor ranges as soon as their GPU fence completes (before CPU readback/reset), and coalesce dynamic retention within a list instead of starving concurrent frames under LATE_WAIT.
  2. In State::tables, include RootIndexedView dynamic offsets when checking whether a table exceeds host.count().
  3. Consider paged block mapping above 737,855 guest slots for 1,000,000-view hosts so increasing DYNAMIC doesn't zero out high direct slots.
  4. Keep VICTORY_THIN=0 on Wave32/NVIDIA presets until THIN=1 contention / table interaction is resolved.
**@⁠owsware** on GitHub · 2026-11-25 23:57 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35) ## Summary Controlled 7-run ablation on an **NVIDIA GeForce RTX 5080** (`0a43566`, `diag` profile, `2560x1440`, `VICTORY_SKIP_PIPELINES=none`, zero crashes / zero device removals) isolates why `scripts\play.ps1` **Default** (`THIN=1`, `JOIN_PARTS=8`, `UPLOAD_AHEAD=1`) produces broken geometry and 2.8x slower frame times on NVIDIA while **-Safe** or `THIN=0` / `LATE_WAIT=0` recovers the image. There are **two distinct issues** stacked in the Default failure: 1. **CPU stall from `VICTORY_THIN=1` + `JOIN_PARTS=8`**: slows recording threads (`454.2 ms` across threads in Default vs `164.5 ms` with `THIN=0` on `LATE_WAIT_LISTS=32`) and amplifies dynamic descriptor search overhead (`329.4 ms` vs `49.0 ms`). 2. **Hard `DYNAMIC = 262,144` descriptor pool ceiling under `PORTABLE_VIEWS = 1_000_000`**: when `LATE_WAIT` keeps prior frames' command lists alive for CPU/GPU overlap, dynamic table allocations overflow the `262,144`-slot slice and `State::tables` returns `u32::MAX`, dropping `1,564–1,683` indirect draws/dispatches per frame (`prepare failed`). ## Code Findings (`0a43566`) - **`crates/victory-gpu/src/descriptor/host.rs:1416-1436` (`dynamic_slots`)**: ```rust if null < PORTABLE_VIEWS { return DYNAMIC; } null.saturating_sub(count).min(most).max(DYNAMIC) ``` On NVIDIA Tier-3 (`1,000,000` view limit -> `null = 999_999 < PORTABLE_VIEWS`), `dynamic_slots` returns `DYNAMIC` (`262,144`) and ignores `VICTORY_DYNAMIC_SLOTS`, leaving `737,855` direct title slots (with `raw_twins = false`). Meanwhile AMD gets up to `DYNAMIC << 2` (`1,048,576`) dynamic slots under `UNCAPPED_VIEWS`. - **Ablation Proof (`LATE_WAIT=0` vs `LATE_WAIT_LISTS=32` vs Default)**: - Default (`THIN=1, JOIN_PARTS=8, UPLOAD_AHEAD=1`): `3.9 fps` (`255.4 ms/frame`), `13,353` tables asked / **`2,411` refused** (`329.4 ms` searching), **`1,683` indirect dropped/frame** (`829.5` k2, `492.2` k10, `256.0` k0, `87.5` k1), severely broken world geometry & sky bleed. - Default + `LATE_WAIT_LISTS=32`: `8.8 fps` (`113.8 ms/frame`), `13,732` asked / **`2,612` refused** (`206.6 ms` searching), **`1,564` indirect dropped/frame** (`1,107` `prepare failed` in captured world ops: `794` k2, `256` k0, `54` k1, `3` k10), broken geometry. - Default + `THIN=0, LATE_WAIT_LISTS=32`: `10.9 fps` (`91.5 ms/frame`), `13,556` asked / **`1,000` refused** (`49.0 ms` searching), **`691` indirect dropped/frame** (`64` in captured world ops: `0` k2, `46` k10, `18` k1), intact geometry aside from the bottom block band. - Default + `THIN=0, JOIN_PARTS=1, LATE_WAIT=0`: `6.2 fps` (`161.8 ms/frame`), `12,414` asked / **`0` refused** (`1.5 ms` searching), **`0` indirect dropped/frame**, cleanest lighting/shadows aside from the bottom block band. - **Additional `State::tables` gaps (`crates/victory-gpu/src/draw.rs:3148-3416`)**: - `State::tables` only checks static `used` offsets (`index >= host.count()` at line `3179`) before deciding whether to clone a table into dynamic slots; dynamically indexed descriptors (`RootIndexedView`, `byte_offset + (constant << shift)`) can also reach past `737,855` even if the base/static entries fit. - Dynamic table holds stay attached until command-list reset/drop (`State::tables_done` runs after submission waits); detached relay lists don't release their dynamic ranges immediately upon GPU fence completion. - Above `737,855` direct guest views, a paged block-mapped heap (`1,024`-slot guest blocks into a `1M` host heap, as in `Marvisak/VIctory#1779`) avoids silently truncating high-index bindless views without stealing dynamic capacity. *(Note: the persistent ~20 px bottom-of-screen block strip seen across all 7 runs matches the `65,535` indirect dispatch clamp already targeted by open PR #10.)* ## Suggested Fix Directions 1. Release detached list dynamic descriptor ranges as soon as their GPU fence completes (before CPU readback/reset), and coalesce dynamic retention within a list instead of starving concurrent frames under `LATE_WAIT`. 2. In `State::tables`, include `RootIndexedView` dynamic offsets when checking whether a table exceeds `host.count()`. 3. Consider paged block mapping above `737,855` guest slots for `1,000,000`-view hosts so increasing `DYNAMIC` doesn't zero out high direct slots. 4. Keep `VICTORY_THIN=0` on Wave32/NVIDIA presets until `THIN=1` contention / table interaction is resolved.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:28 +00:00
Author
Owner

@⁠gomeaw on GitHub · 2026-11-26 00:12 UTC · original

The RTX 5080 ablation gives us two independent changes to test against the same route and settings.

  • PR #47 searches coalesced free ranges so a request can skip occupied spans under the allocator lock. Windows passed the 20,000-operation comparison and the descriptor suite. The reported speedup is from a fragmented allocator microbenchmark.
  • PR #48 reclaims each flight's tables at its GPU fence, before CPU readback and list recycling. The Windows test reused the full WARP descriptor pool while the old list was still retained.

Both are in preview f20ad73. It also includes PR #42, which independently reproduced and fixed a threaded color/depth descriptor overwrite, and UwUCammie's PR #24 for the spread scan.

For a matched retest, the most useful comparison is the same route and Default + LATE_WAIT_LISTS=32 on 0a43566 and f20ad73, with cache state, DRED, resolution and shader skip held fixed. The original report's table requests, refusals, search time, prepare failed counts, and presence of missing geometry are the measurements that can attribute an improvement here. The pool size stays fixed in both patches.

**@⁠gomeaw** on GitHub · 2026-11-26 00:12 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7178521740) The RTX 5080 ablation gives us two independent changes to test against the same route and settings. - [PR #47](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/47) searches coalesced free ranges so a request can skip occupied spans under the allocator lock. Windows passed the 20,000-operation comparison and the descriptor suite. The reported speedup is from a fragmented allocator microbenchmark. - [PR #48](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/48) reclaims each flight's tables at its GPU fence, before CPU readback and list recycling. The Windows test reused the full WARP descriptor pool while the old list was still retained. Both are in [preview `f20ad73`](https://github.com/gomeaw/VIctory-7900XTX/tree/f20ad73). It also includes [PR #42](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/42), which independently reproduced and fixed a threaded color/depth descriptor overwrite, and UwUCammie's [PR #24](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/24) for the spread scan. For a matched retest, the most useful comparison is the same route and `Default + LATE_WAIT_LISTS=32` on `0a43566` and `f20ad73`, with cache state, DRED, resolution and shader skip held fixed. The original report's table requests, refusals, search time, `prepare failed` counts, and presence of missing geometry are the measurements that can attribute an improvement here. The pool size stays fixed in both patches.
Author
Owner

@⁠notquiteog on GitHub · 2026-11-26 00:44 UTC · original

Measurements from an RTX 5060 Ti 16 GB (i5-13600K, 32 GB, Windows 11, driver 32.0.16.2114) that bear on this, and on #48.

The heap limit, measured. A separate device on the NVIDIA adapter, asked for shader-visible CBV/SRV/UAV heaps of falling size: 1,000,000 views is accepted and 1,000,001 is refused (E_INVALIDARG), as is every size up to 4,194,304. So on this driver the pool cannot grow by asking for a larger heap.

What holds the slots. On 0a43566 with scripts\play.ps1's default settings, a landed flight's lists are recycled bury_lag() submissions later (64 by default, about two frames at the ~37 submissions a frame seen here), and recycle is what drops their State, so their tables' slots come back only then. I counted what the pool is asked for over 5-second windows in the world:

0a43566 slots given back when the flight lands
tables asked, 5 s 274,891 70,000-170,000
tables refused, 5 s 57,153 0 in ten windows
fewest free slots of 262,144 0 192,628-213,270
dynamic slots ... ms searching, per frame 150-440 0.7-0.8
indirect draws dropped, per frame about 1,969 0

The two columns are the same card and save but different moments of play, so the "asked" row is not like for like. The other rows are the point.

What the tables are. In one 5-second window, 393,310 of the tables made afresh held a constant buffer (9.83 million slots, about 25 each); 19,397 were made only for reaching past the capped heap's title slots (64,744 slots). So nearly all of the demand is the same on any host, and what differs on a capped heap is only the room.

The change I ran is 29 lines: tables_done on a flight's lists at the two places settle pushes them to landed, with the lists and their memory waiting for bury_lag as before. It is on slots-at-landing, one commit on 0a43566, and builds there with the diag command. #48 gives the slots back at the fence, which is earlier than landing, so I expect it to do at least as well; I have not run #48 itself.

In play: a session of about 40 minutes on the build with this change, on a tree that also carries other changes for 32-lane hosts: a mission finished, no device loss. Before it, parts of the picture stayed missing for as long as the pool was empty.

Not measured: frame rate like for like (the samples ranged from 7 to 14 fps, in different scenes), anything on AMD, and #47.

🤖 Generated with Claude Code

**@⁠notquiteog** on GitHub · 2026-11-26 00:44 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7179065792) Measurements from an RTX 5060 Ti 16 GB (i5-13600K, 32 GB, Windows 11, driver 32.0.16.2114) that bear on this, and on #48. **The heap limit, measured.** A separate device on the NVIDIA adapter, asked for shader-visible CBV/SRV/UAV heaps of falling size: 1,000,000 views is accepted and 1,000,001 is refused (`E_INVALIDARG`), as is every size up to 4,194,304. So on this driver the pool cannot grow by asking for a larger heap. **What holds the slots.** On `0a43566` with `scripts\play.ps1`'s default settings, a landed flight's lists are recycled `bury_lag()` submissions later (64 by default, about two frames at the ~37 submissions a frame seen here), and `recycle` is what drops their `State`, so their tables' slots come back only then. I counted what the pool is asked for over 5-second windows in the world: | | `0a43566` | slots given back when the flight lands | |---|---|---| | tables asked, 5 s | 274,891 | 70,000-170,000 | | tables refused, 5 s | 57,153 | 0 in ten windows | | fewest free slots of 262,144 | 0 | 192,628-213,270 | | `dynamic slots ... ms searching`, per frame | 150-440 | 0.7-0.8 | | indirect draws dropped, per frame | about 1,969 | 0 | The two columns are the same card and save but different moments of play, so the "asked" row is not like for like. The other rows are the point. **What the tables are.** In one 5-second window, 393,310 of the tables made afresh held a constant buffer (9.83 million slots, about 25 each); 19,397 were made only for reaching past the capped heap's title slots (64,744 slots). So nearly all of the demand is the same on any host, and what differs on a capped heap is only the room. **The change I ran** is 29 lines: `tables_done` on a flight's lists at the two places `settle` pushes them to `landed`, with the lists and their memory waiting for `bury_lag` as before. It is on [`slots-at-landing`](https://github.com/notquiteog/victory-nvidia/tree/slots-at-landing), one commit on `0a43566`, and builds there with the `diag` command. #48 gives the slots back at the fence, which is earlier than landing, so I expect it to do at least as well; I have not run #48 itself. **In play:** a session of about 40 minutes on the build with this change, on a tree that also carries other changes for 32-lane hosts: a mission finished, no device loss. Before it, parts of the picture stayed missing for as long as the pool was empty. Not measured: frame rate like for like (the samples ranged from 7 to 14 fps, in different scenes), anything on AMD, and #47. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠Yorivel on GitHub · 2026-11-26 02:56 UTC · original

AI-assisted (Claude Code). Numbers and log lines only, no game data.

RTX 4090: gomeaw's preview f20ad73 (#47 + #48 + #42) takes the descriptor refusals to 0, and the flicker is gone. With nothing dropped, though, the frame is much slower than the dropping one.

Setup. RTX 4090 24 GB (32-lane waves), driver 621.40, i9-14900K, 64 GB, Windows 11, Series X profile, diagnostics build, the barracks after the hand-off, settled. The settings are scripts\play.ps1's defaults, apart from what each row says. No -RayTracing.

tree, settings tables asked / refused a frame prepare failed drops a frame ms a frame picture
e2a28ec, play.ps1 default (THIN=1) n/a ~1,270 (784 k2, 264 k0, 157 k10, 70 k1) 60-70 whole picture blurred, flicker
e2a28ec, -Safe n/a ~590 (323 k10, 171 k2, 89 k0, 10 k1) 60-82 flicker
e2a28ec, THIN=0 + LATE_WAIT_LISTS=32 (from this issue) 14,700-14,900 / 1,231-1,244 ~370 (243 k0, 65 k10, 65 k1) 65-66 flicker
f20ad73, THIN=0 + LATE_WAIT_LISTS=32 12,700-15,900 / 0 0 203-241 clean

So on this card the 1,000,000-view cap bites even with THIN=0 and 32 late-wait lists, and #47/#48 fix it outright. 0 exceptions in every run.

The frame time is the other half. With nothing dropped, the frame is three times as long. The parts in the frame line are small: preparing 29-32 ms, on the GPU 28-32 ms, copying back 17-19 ms (30-36 MB). Yet the frame takes 200-240 ms, so most of it is waiting between them. For scale, on the same PC and scene, a tree from fxceless/victory-fork with its #994 stack, #346, and the copy-back switches VICTORY_BACK_QUIET (fxceless PR #1188) + VICTORY_BACK_OWN_VIEW runs 157-168 ms a frame with the structure builder on. A cross-tree comparison is loose, but it suggests the gap on NVIDIA isn't in the parts this fork made fast.

Not yet tried on f20ad73: THIN=1 (the default) and -RayTracing. I can run those if they help.

**@⁠Yorivel** on GitHub · 2026-11-26 02:56 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7181256908) *AI-assisted (Claude Code). Numbers and log lines only, no game data.* **RTX 4090: gomeaw's preview `f20ad73` (#47 + #48 + #42) takes the descriptor refusals to 0, and the flicker is gone. With nothing dropped, though, the frame is much slower than the dropping one.** **Setup.** RTX 4090 24 GB (32-lane waves), driver 621.40, i9-14900K, 64 GB, Windows 11, Series X profile, diagnostics build, the barracks after the hand-off, settled. The settings are `scripts\play.ps1`'s defaults, apart from what each row says. No `-RayTracing`. | tree, settings | tables asked / refused a frame | `prepare failed` drops a frame | ms a frame | picture | |---|---|---|---|---| | `e2a28ec`, play.ps1 default (`THIN=1`) | n/a | ~1,270 (784 k2, 264 k0, 157 k10, 70 k1) | 60-70 | whole picture blurred, flicker | | `e2a28ec`, `-Safe` | n/a | ~590 (323 k10, 171 k2, 89 k0, 10 k1) | 60-82 | flicker | | `e2a28ec`, `THIN=0` + `LATE_WAIT_LISTS=32` (from this issue) | 14,700-14,900 / **1,231-1,244** | ~370 (243 k0, 65 k10, 65 k1) | 65-66 | flicker | | **`f20ad73`**, `THIN=0` + `LATE_WAIT_LISTS=32` | 12,700-15,900 / **0** | **0** | **203-241** | **clean** | So on this card the 1,000,000-view cap bites even with `THIN=0` and 32 late-wait lists, and #47/#48 fix it outright. 0 exceptions in every run. **The frame time is the other half.** With nothing dropped, the frame is three times as long. The parts in the frame line are small: preparing 29-32 ms, on the GPU 28-32 ms, copying back 17-19 ms (30-36 MB). Yet the frame takes 200-240 ms, so most of it is waiting between them. For scale, on the same PC and scene, a tree from fxceless/victory-fork with its #994 stack, #346, and the copy-back switches `VICTORY_BACK_QUIET` (fxceless PR #1188) + `VICTORY_BACK_OWN_VIEW` runs 157-168 ms a frame **with the structure builder on**. A cross-tree comparison is loose, but it suggests the gap on NVIDIA isn't in the parts this fork made fast. Not yet tried on `f20ad73`: `THIN=1` (the default) and `-RayTracing`. I can run those if they help.
Author
Owner

@⁠MoonYueya on GitHub · 2026-11-26 05:28 UTC · original

Follow-up from an RTX 3080 10 GB, driver 32.0.16.1742, Ryzen 7 7700, 31.1 GB RAM, Windows 11 26300, on MoonYueya/VIctory-Kira a3de053 (this repo's e2a28ec plus the open NVIDIA PRs and the change below).

Result on an RTX 3080: the sizing fix holds; no table was refused in three
full runs.

Before the fix, the layer sized its dynamic descriptor region by nothing in
particular and the region could not cover what the title's heap actually
reaches on this adapter. With bbcdb0a the region is sized by where the
title's heap ends (TITLE_REACH ≈ 720,000 slots, honouring
VICTORY_DYNAMIC_SLOTS), and the heap cap logs:

view heap capped at 999999 slots: the title's slots and 279998 dynamic ones
asked=1245184 reach=720000 dynamic=279998 title_slots=720001

Three runs on this branch (prologue save copied to a private data dir, the
layer's own scripted keys, diag build):

run dynamic tables asked (max seen in a line) refused
nvfix-r2-default2 (cold shader cache) 13,639 0
nvfix-r2-warm (warm cache) 19,106 0
nvfix-r2-nothin (warm cache, VICTORY_THIN=0) 17,337 0

title slot past the host heap was 0 in every run. The three runs each
reached the world (an fps < 5 line appears 75 / 74 / 70 times), with
0 shaders left untranslated (2,379 translated in the cold run) and no
device removal, panic or crash
.

The change is commit bbcdb0a in that branch (dynamic_slots / HostHeap::new in crates/victory-gpu/src/descriptor/host.rs). It only says the shortage goes away on this card; nothing here is a claim about frame rate or picture quality.

Reproduce

  1. Build the diagnostic profile — the plain default build has capture and
    scripted keys compiled out and never leaves the menu:

    cargo build --profile diag -p victory --features diagnostics
    
  2. Copy a prologue save into a private data directory (VICTORY_DATA_DIR), so
    the master copy is untouched.

  3. Run with the default switch set from scripts/play.ps1, plus:

    VICTORY_KEYS=8:Enter,14:Enter,20:Enter,26:Enter,32:Down,35:Enter,40:Down,43:Enter,48:Enter,55:Enter,62:Enter,70:Enter
    VICTORY_CAPTURE=<dir>  VICTORY_CAPTURE_FRAMES=1,2,4,...,60000  VICTORY_CAPTURE_WORLD=1
    
  4. Judge the world by an fps < 5 line appearing after the world loads. Judge
    the picture per frame, by the spatial mean and standard deviation of that
    frame's blocks (a washed-out frame is a high mean with a low sd). Do not
    average the means of a run and take their spread: that answers a different
    question and hides exactly the frames this is about.

Caveat worth stating: a cold NVIDIA shader cache produces a black picture for
the first ~110 frames while pipelines compile. That is time, not a bug; the
world segment afterwards is unaffected.

AI-assisted: an AI agent ran the builds, runs and measurements.

**@⁠MoonYueya** on GitHub · 2026-11-26 05:28 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7183516695) Follow-up from an RTX 3080 10 GB, driver 32.0.16.1742, Ryzen 7 7700, 31.1 GB RAM, Windows 11 26300, on [MoonYueya/VIctory-Kira](https://github.com/MoonYueya/VIctory-Kira) `a3de053` (this repo's `e2a28ec` plus the open NVIDIA PRs and the change below). **Result on an RTX 3080: the sizing fix holds; no table was refused in three full runs.** Before the fix, the layer sized its dynamic descriptor region by nothing in particular and the region could not cover what the title's heap actually reaches on this adapter. With `bbcdb0a` the region is sized by where the title's heap ends (`TITLE_REACH` ≈ 720,000 slots, honouring `VICTORY_DYNAMIC_SLOTS`), and the heap cap logs: view heap capped at 999999 slots: the title's slots and 279998 dynamic ones asked=1245184 reach=720000 dynamic=279998 title_slots=720001 Three runs on this branch (prologue save copied to a private data dir, the layer's own scripted keys, diag build): | run | dynamic tables asked (max seen in a line) | refused | |---|---|---| | `nvfix-r2-default2` (cold shader cache) | 13,639 | **0** | | `nvfix-r2-warm` (warm cache) | 19,106 | **0** | | `nvfix-r2-nothin` (warm cache, `VICTORY_THIN=0`) | 17,337 | **0** | `title slot past the host heap` was **0** in every run. The three runs each reached the world (an `fps < 5` line appears 75 / 74 / 70 times), with **0 shaders left untranslated** (2,379 translated in the cold run) and **no device removal, panic or crash**. The change is commit `bbcdb0a` in that branch (`dynamic_slots` / `HostHeap::new` in `crates/victory-gpu/src/descriptor/host.rs`). It only says the shortage goes away on this card; nothing here is a claim about frame rate or picture quality. ### Reproduce 1. Build the diagnostic profile — the plain default build has capture and scripted keys compiled out and never leaves the menu: cargo build --profile diag -p victory --features diagnostics 2. Copy a prologue save into a private data directory (`VICTORY_DATA_DIR`), so the master copy is untouched. 3. Run with the default switch set from `scripts/play.ps1`, plus: VICTORY_KEYS=8:Enter,14:Enter,20:Enter,26:Enter,32:Down,35:Enter,40:Down,43:Enter,48:Enter,55:Enter,62:Enter,70:Enter VICTORY_CAPTURE=<dir> VICTORY_CAPTURE_FRAMES=1,2,4,...,60000 VICTORY_CAPTURE_WORLD=1 4. Judge the world by an `fps < 5` line appearing after the world loads. Judge the picture per frame, by the **spatial** mean and standard deviation of that frame's blocks (a washed-out frame is a high mean with a low sd). Do not average the means of a run and take their spread: that answers a different question and hides exactly the frames this is about. Caveat worth stating: a cold NVIDIA shader cache produces a black picture for the first ~110 frames while pipelines compile. That is time, not a bug; the world segment afterwards is unaffected. *AI-assisted: an AI agent ran the builds, runs and measurements.*
Author
Owner

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

AI-assisted (Claude Code). Numbers and log lines only, no game data.

RTX 3060 12 GB on current main (0dec5dc): the 1,000,000-view cap still costs 20-25% of dynamic tables in the world. You can see it as missing faces, wrong skin and frames that freeze or smear.

Setup. RTX 3060 12 GB, driver 621.01, i5-11400F (6 cores), 32 GB, Windows 10 22H2. Built from 0dec5dc with the Agility SDK exported from the exe (see #64; without it Windows 10 refuses the root signatures). Series X profile, 2560x1440 output, CpuLow in-game settings, pipelines warmed with warm --used. 3-6 fps in the world.

What the log says at start-up:

host view heaps hold 1000000 views; view indices are clamped to the null slot at the end from the first shader on views=1000000 raw_twins=false
host view heap capped at 1000000; views past it read a null slot count=1245184

So probe_view_limit can't get 2^22 for raw twins on this driver either, and the dynamic region stays at DYNAMIC (2^18).

Per-frame dynamic slots, three consecutive frame lines in the world. I added a few counters to copystat's dynamic slots line locally (why tables are made, and constant-buffer alignment). They aren't in main.

frames tables asked refused slots asked tables for a constant buffer past the host's title slots CBs not in place CBs not on 256 bytes
49 (lighter scene) 4,841 453 (9%) 55,751 4,072 231 1,510 5,199
29 13,000 3,141 (24%) 197,014 10,475 397 1,544 11,879
32 12,466 3,063 (25%) 225,386 10,069 378 1,418 11,250

Most of these tables (about 80-85%) exist only for constant buffers. Of those, about 11,000-12,000 a frame aren't on 256 bytes, so they can't be bound as a plain CBV at their own address. That matches what notquiteog saw on the 5060 Ti: the demand is the same on any host, and only the room differs.

What I tried that didn't change the refusals:

  • VICTORY_LATE_WAIT_LISTS=64
  • turning the renderer ports off (-NoPorts)
  • the default card-buffer settings
  • the Series S profile (black screen) and VICTORY_LEVELS_ON_DEMAND (crash at world load). Neither helped.
  • A local experiment that binds 256-aligned constant buffers straight from the title's memory instead of copying them into a table. It only saved about 250-300 tables a frame, because so few are aligned.

What I think follows:

  1. The open fixes here (#47/#48, and the TITLE_REACH sizing in MoonYueya's bbcdb0a) are still the way out on NVIDIA. On 0dec5dc none of them is in, and a 12 GB Ampere card hits the cap in ordinary play.
  2. Renderer port 5 (VICTORY_PORT_CBV) would remove most of this demand, since the tables are mostly constant buffers. But its raw twins need a 2^22 heap, which NVIDIA refuses. A port-5 path without raw twins, or with twins inside the 1,000,000 cap, would help every NVIDIA card. I haven't run VICTORY_PORT_CBV=1 on this card, so I have no numbers for it.

I can rerun with a branch or switch you name and report the same table.

**@⁠aarushkha** on GitHub · 2026-11-26 13:13 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7193048299) *AI-assisted (Claude Code). Numbers and log lines only, no game data.* **RTX 3060 12 GB on current `main` (`0dec5dc`): the 1,000,000-view cap still costs 20-25% of dynamic tables in the world. You can see it as missing faces, wrong skin and frames that freeze or smear.** **Setup.** RTX 3060 12 GB, driver 621.01, i5-11400F (6 cores), 32 GB, Windows 10 22H2. Built from `0dec5dc` with the Agility SDK exported from the exe (see #64; without it Windows 10 refuses the root signatures). Series X profile, 2560x1440 output, `CpuLow` in-game settings, pipelines warmed with `warm --used`. 3-6 fps in the world. **What the log says at start-up:** host view heaps hold 1000000 views; view indices are clamped to the null slot at the end from the first shader on views=1000000 raw_twins=false host view heap capped at 1000000; views past it read a null slot count=1245184 So `probe_view_limit` can't get 2^22 for raw twins on this driver either, and the dynamic region stays at `DYNAMIC` (2^18). **Per-frame dynamic slots, three consecutive frame lines in the world.** I added a few counters to `copystat`'s `dynamic slots` line locally (why tables are made, and constant-buffer alignment). They aren't in `main`. | frames | tables asked | refused | slots asked | tables for a constant buffer | past the host's title slots | CBs not in place | CBs not on 256 bytes | |---|---|---|---|---|---|---|---| | 49 (lighter scene) | 4,841 | 453 (9%) | 55,751 | 4,072 | 231 | 1,510 | 5,199 | | 29 | 13,000 | 3,141 (24%) | 197,014 | 10,475 | 397 | 1,544 | 11,879 | | 32 | 12,466 | 3,063 (25%) | 225,386 | 10,069 | 378 | 1,418 | 11,250 | Most of these tables (about 80-85%) exist only for constant buffers. Of those, about 11,000-12,000 a frame aren't on 256 bytes, so they can't be bound as a plain CBV at their own address. That matches what notquiteog saw on the 5060 Ti: the demand is the same on any host, and only the room differs. **What I tried that didn't change the refusals:** - `VICTORY_LATE_WAIT_LISTS=64` - turning the renderer ports off (`-NoPorts`) - the default card-buffer settings - the Series S profile (black screen) and `VICTORY_LEVELS_ON_DEMAND` (crash at world load). Neither helped. - A local experiment that binds 256-aligned constant buffers straight from the title's memory instead of copying them into a table. It only saved about 250-300 tables a frame, because so few are aligned. **What I think follows:** 1. The open fixes here (#47/#48, and the `TITLE_REACH` sizing in MoonYueya's `bbcdb0a`) are still the way out on NVIDIA. On `0dec5dc` none of them is in, and a 12 GB Ampere card hits the cap in ordinary play. 2. Renderer port 5 (`VICTORY_PORT_CBV`) would remove most of this demand, since the tables are mostly constant buffers. But its raw twins need a 2^22 heap, which NVIDIA refuses. A port-5 path without raw twins, or with twins inside the 1,000,000 cap, would help every NVIDIA card. I haven't run `VICTORY_PORT_CBV=1` on this card, so I have no numbers for it. I can rerun with a branch or switch you name and report the same table.
Author
Owner

@⁠davesousa on GitHub · 2026-11-26 20:29 UTC · original

RTX 3070 Ti 8 GB (Ampere, 32-lane waves): #47 + #48 + #42 together on current main take the dynamic-table refusals of the fast defaults from 197 report lines (up to about 2,500 dropped draws a frame) to 0, and the frame did not get slower here.

Setup: RTX 3070 Ti 8 GB, driver 621.40, Ryzen 7 3700X, 32 GB RAM (commit limit 57.8 GB), Windows 11 26200. main at 2de9980, diag build, scripts\play.ps1 settings with --console series-s (a local copy of the script that only adds that flag), the prologue cell, about 8-minute runs, Enter scripted through the menus.

-Safe fast defaults fast defaults + #47 #48 #42
world frame, median (mean) 789 (886) ms 558 (668) ms 535 (559) ms
slowest sample 1,880 ms 2,274 ms 1,111 ms
no dynamic slots / prepare failed drop lines 0 197, up to 2,528 draws a frame 0 (dynamic slots: 11,308 tables asked, 0 refused)
the card has no room lines 15 92 35
device removals 0 0 0

With the fast defaults alone, a character's head was missing on screen, as aarushkha describes above. Caveat: the third run also had its pipelines made ahead (warm --used after a VICTORY_PIPELINE_BOOK=1 run), which likely accounts for part of the lower mean and slowest frame; the refusal count does not depend on it.

Merging #42 onto current main needed two changes: host.rs conflicts where main added fallback_view_heap/fallback_sampler_heap above the removed rtv() (kept both), and compose.rs, added after #42's base, still calls host.rtv(..) in three places. Wrapping those in host.output_views(|views| views.rtv(..)) builds, and the descriptor, dynamic-slot, fence, output-view and compose tests pass (46).

For other 8 GB cards: the Series X profile stays over the video-memory budget here (7.8 GB in use against a 7.1 GB budget) and the world draws black; Series S fits (6.0-7.0 GB). The first runs of a new build also show a black world until pipelines and textures arrive; the third run drew the cell correctly.

AI-assisted (Claude Code); the runs are on my machine.

**@⁠davesousa** on GitHub · 2026-11-26 20:29 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7202747527) **RTX 3070 Ti 8 GB (Ampere, 32-lane waves): #47 + #48 + #42 together on current `main` take the dynamic-table refusals of the fast defaults from 197 report lines (up to about 2,500 dropped draws a frame) to 0, and the frame did not get slower here.** Setup: RTX 3070 Ti 8 GB, driver 621.40, Ryzen 7 3700X, 32 GB RAM (commit limit 57.8 GB), Windows 11 26200. `main` at `2de9980`, `diag` build, `scripts\play.ps1` settings with `--console series-s` (a local copy of the script that only adds that flag), the prologue cell, about 8-minute runs, Enter scripted through the menus. | | `-Safe` | fast defaults | fast defaults + #47 #48 #42 | |---|---:|---:|---:| | world frame, median (mean) | 789 (886) ms | 558 (668) ms | 535 (559) ms | | slowest sample | 1,880 ms | 2,274 ms | 1,111 ms | | `no dynamic slots` / `prepare failed` drop lines | 0 | 197, up to 2,528 draws a frame | 0 (`dynamic slots: 11,308 tables asked, 0 refused`) | | `the card has no room` lines | 15 | 92 | 35 | | device removals | 0 | 0 | 0 | With the fast defaults alone, a character's head was missing on screen, as aarushkha describes above. Caveat: the third run also had its pipelines made ahead (`warm --used` after a `VICTORY_PIPELINE_BOOK=1` run), which likely accounts for part of the lower mean and slowest frame; the refusal count does not depend on it. Merging #42 onto current `main` needed two changes: `host.rs` conflicts where `main` added `fallback_view_heap`/`fallback_sampler_heap` above the removed `rtv()` (kept both), and `compose.rs`, added after #42's base, still calls `host.rtv(..)` in three places. Wrapping those in `host.output_views(|views| views.rtv(..))` builds, and the descriptor, dynamic-slot, fence, output-view and compose tests pass (46). For other 8 GB cards: the Series X profile stays over the video-memory budget here (7.8 GB in use against a 7.1 GB budget) and the world draws black; Series S fits (6.0-7.0 GB). The first runs of a new build also show a black world until pipelines and textures arrive; the third run drew the cell correctly. AI-assisted (Claude Code); the runs are on my machine.
Author
Owner

@⁠Jesper-Andersson on GitHub · 2026-11-27 02:53 UTC · original

On an RTX 2070 SUPER 8 GB (1,000,000-view cap), PR #96's capped-heap split (750,000 dynamic slots) removed the refusals in a short A/B test with the early table release off: 18.1 % of tables refused → 0, and indirect draws dropped 29,983 → 1. Numbers: #96

This report was made with AI assistance (Claude Code).

**@⁠Jesper-Andersson** on GitHub · 2026-11-27 02:53 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/35#issuecomment-7208525876) On an RTX 2070 SUPER 8 GB (1,000,000-view cap), PR #96's capped-heap split (750,000 dynamic slots) removed the refusals in a short A/B test with the early table release off: 18.1 % of tables refused → 0, and indirect draws dropped 29,983 → 1. Numbers: https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/96 This report was made with AI assistance (Claude Code).
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/avatarmanz--VIctory-7900XTX#35
No description provided.