NVIDIA: Fixed 262,144 dynamic descriptor cap (PORTABLE_VIEWS) starves LATE_WAIT pipelining and causes Default corruption #35
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@owsware on GitHub · 2026-11-25 23:57 UTC · original
Summary
Controlled 7-run ablation on an NVIDIA GeForce RTX 5080 (
0a43566,diagprofile,2560x1440,VICTORY_SKIP_PIPELINES=none, zero crashes / zero device removals) isolates whyscripts\play.ps1Default (THIN=1,JOIN_PARTS=8,UPLOAD_AHEAD=1) produces broken geometry and 2.8x slower frame times on NVIDIA while -Safe orTHIN=0/LATE_WAIT=0recovers the image.There are two distinct issues stacked in the Default failure:
VICTORY_THIN=1+JOIN_PARTS=8: slows recording threads (454.2 msacross threads in Default vs164.5 mswithTHIN=0onLATE_WAIT_LISTS=32) and amplifies dynamic descriptor search overhead (329.4 msvs49.0 ms).DYNAMIC = 262,144descriptor pool ceiling underPORTABLE_VIEWS = 1_000_000: whenLATE_WAITkeeps prior frames' command lists alive for CPU/GPU overlap, dynamic table allocations overflow the262,144-slot slice andState::tablesreturnsu32::MAX, dropping1,564–1,683indirect draws/dispatches per frame (prepare failed).Code Findings (
0a43566)crates/victory-gpu/src/descriptor/host.rs:1416-1436(dynamic_slots): On NVIDIA Tier-3 (1,000,000view limit ->null = 999_999 < PORTABLE_VIEWS),dynamic_slotsreturnsDYNAMIC(262,144) and ignoresVICTORY_DYNAMIC_SLOTS, leaving737,855direct title slots (withraw_twins = false). Meanwhile AMD gets up toDYNAMIC << 2(1,048,576) dynamic slots underUNCAPPED_VIEWS.LATE_WAIT=0vsLATE_WAIT_LISTS=32vs Default):THIN=1, JOIN_PARTS=8, UPLOAD_AHEAD=1):3.9 fps(255.4 ms/frame),13,353tables asked /2,411refused (329.4 mssearching),1,683indirect dropped/frame (829.5k2,492.2k10,256.0k0,87.5k1), severely broken world geometry & sky bleed.LATE_WAIT_LISTS=32:8.8 fps(113.8 ms/frame),13,732asked /2,612refused (206.6 mssearching),1,564indirect dropped/frame (1,107prepare failedin captured world ops:794k2,256k0,54k1,3k10), broken geometry.THIN=0, LATE_WAIT_LISTS=32:10.9 fps(91.5 ms/frame),13,556asked /1,000refused (49.0 mssearching),691indirect dropped/frame (64in captured world ops:0k2,46k10,18k1), intact geometry aside from the bottom block band.THIN=0, JOIN_PARTS=1, LATE_WAIT=0:6.2 fps(161.8 ms/frame),12,414asked /0refused (1.5 mssearching),0indirect dropped/frame, cleanest lighting/shadows aside from the bottom block band.State::tablesgaps (crates/victory-gpu/src/draw.rs:3148-3416):State::tablesonly checks staticusedoffsets (index >= host.count()at line3179) before deciding whether to clone a table into dynamic slots; dynamically indexed descriptors (RootIndexedView,byte_offset + (constant << shift)) can also reach past737,855even if the base/static entries fit.State::tables_doneruns after submission waits); detached relay lists don't release their dynamic ranges immediately upon GPU fence completion.737,855direct guest views, a paged block-mapped heap (1,024-slot guest blocks into a1Mhost heap, as inMarvisak/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,535indirect dispatch clamp already targeted by open PR #10.)Suggested Fix Directions
LATE_WAIT.State::tables, includeRootIndexedViewdynamic offsets when checking whether a table exceedshost.count().737,855guest slots for1,000,000-view hosts so increasingDYNAMICdoesn't zero out high direct slots.VICTORY_THIN=0on Wave32/NVIDIA presets untilTHIN=1contention / table interaction is resolved.@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.
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=32on0a43566andf20ad73, with cache state, DRED, resolution and shader skip held fixed. The original report's table requests, refusals, search time,prepare failedcounts, and presence of missing geometry are the measurements that can attribute an improvement here. The pool size stays fixed in both patches.@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
0a43566withscripts\play.ps1's default settings, a landed flight's lists are recycledbury_lag()submissions later (64 by default, about two frames at the ~37 submissions a frame seen here), andrecycleis what drops theirState, so their tables' slots come back only then. I counted what the pool is asked for over 5-second windows in the world:0a43566dynamic slots ... ms searching, per frameThe 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_doneon a flight's lists at the two placessettlepushes them tolanded, with the lists and their memory waiting forbury_lagas before. It is onslots-at-landing, one commit on0a43566, and builds there with thediagcommand. #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
@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.prepare faileddrops a framee2a28ec, play.ps1 default (THIN=1)e2a28ec,-Safee2a28ec,THIN=0+LATE_WAIT_LISTS=32(from this issue)f20ad73,THIN=0+LATE_WAIT_LISTS=32So on this card the 1,000,000-view cap bites even with
THIN=0and 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_VIEWruns 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.@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'se2a28ecplus 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
bbcdb0athe region is sized by where thetitle's heap ends (
TITLE_REACH≈ 720,000 slots, honouringVICTORY_DYNAMIC_SLOTS), and the heap cap logs:Three runs on this branch (prologue save copied to a private data dir, the
layer's own scripted keys, diag build):
nvfix-r2-default2(cold shader cache)nvfix-r2-warm(warm cache)nvfix-r2-nothin(warm cache,VICTORY_THIN=0)title slot past the host heapwas 0 in every run. The three runs eachreached the world (an
fps < 5line appears 75 / 74 / 70 times), with0 shaders left untranslated (2,379 translated in the cold run) and no
device removal, panic or crash.
The change is commit
bbcdb0ain that branch (dynamic_slots/HostHeap::newincrates/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
Build the diagnostic profile — the plain default build has capture and
scripted keys compiled out and never leaves the menu:
Copy a prologue save into a private data directory (
VICTORY_DATA_DIR), sothe master copy is untouched.
Run with the default switch set from
scripts/play.ps1, plus:Judge the world by an
fps < 5line appearing after the world loads. Judgethe 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.
@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
0dec5dcwith the Agility SDK exported from the exe (see #64; without it Windows 10 refuses the root signatures). Series X profile, 2560x1440 output,CpuLowin-game settings, pipelines warmed withwarm --used. 3-6 fps in the world.What the log says at start-up:
So
probe_view_limitcan't get 2^22 for raw twins on this driver either, and the dynamic region stays atDYNAMIC(2^18).Per-frame dynamic slots, three consecutive frame lines in the world. I added a few counters to
copystat'sdynamic slotsline locally (why tables are made, and constant-buffer alignment). They aren't inmain.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-NoPorts)VICTORY_LEVELS_ON_DEMAND(crash at world load). Neither helped.What I think follows:
TITLE_REACHsizing in MoonYueya'sbbcdb0a) are still the way out on NVIDIA. On0dec5dcnone of them is in, and a 12 GB Ampere card hits the cap in ordinary play.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 runVICTORY_PORT_CBV=1on this card, so I have no numbers for it.I can rerun with a branch or switch you name and report the same table.
@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
maintake 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.
mainat2de9980,diagbuild,scripts\play.ps1settings 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.-Safeno dynamic slots/prepare faileddrop linesdynamic slots: 11,308 tables asked, 0 refused)the card has no roomlinesWith 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 --usedafter aVICTORY_PIPELINE_BOOK=1run), which likely accounts for part of the lower mean and slowest frame; the refusal count does not depend on it.Merging #42 onto current
mainneeded two changes:host.rsconflicts wheremainaddedfallback_view_heap/fallback_sampler_heapabove the removedrtv()(kept both), andcompose.rs, added after #42's base, still callshost.rtv(..)in three places. Wrapping those inhost.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.
@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).