Draws: fresh tables with no constant views are shared by a frame's lists, refcounted (VICTORY_SHARED_TABLES=1) #1715
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1715"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-28T23:42:46Z.
When several of a frame's lists bind the same table, and it has to be made afresh, each list makes its own copy in the dynamic slots and writes every view into it again.
VICTORY_SHARED_TABLES=1 lets a list use the copy another list made this frame. Tables holding constant views are left out, since those bytes belong to the list that copied them. The shared copy is brought up to date the same way a list's own known table is. Its slots are refcounted and go back when the last list using them is done. A test covers the refcounts.
Off by default.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by lorddie on 2026-11-29T14:36:18Z.
Measurements on AMD (RX 9070 XT, Ryzen 5 5600X, Windows 11), busy city spot. Our fork is VIctory-7900XTX-based, not this tree;
VICTORY_SHARED_TABLESand theState::tablesstages were ported by hand.VICTORY_CALL_STATS=1:bind.tablesis ~17,500 calls/frame at 15–17 µs, ~250–300 ms of the recording threads per frame. Of it,tables.new~15,600/frame at ~12 µs (~185 ms),tables.hit~10,600/frame at ~2.2 µs (~24 ms),tables.direct~70 ms. Same picture as tikD1337's NVIDIA numbers.VICTORY_SHARED_TABLESnever finds a table to share here. A/B in one run (20 s phases, ~8,800 draws/frame): 63.9 ms on vs 63.0 ms off, fresh tables unchanged.If this holds on your side too, whole-table reuse can't help this title. Reusing a table's non-constant entries and writing only the constant views per draw might. We're measuring where a fresh table's 12 µs go (constant views vs made views vs readable) and will post it.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by lorddie on 2026-11-29T15:04:59Z.
Follow-up, same setup (RX 9070 XT, 5600X), where a fresh table's time goes: of ~310 ms/frame in
bind.tables, ~135 ms is entries the list already made (themake_listedpath), ~89,000 a frame at 1.5 µs, 5–6 per table. Constant views are only ~19 ms (22,000 at 0.9 µs), views made anew are negligible,readableon buffers ~41 ms,tables.direct~61 ms. So the cost is copying known views one by one into each of ~16,000 runs, not the constants. A per-list template (same non-constant records → one block copy, then only the constant slots written) looks like the lever. CPU balance per frame here: title threads ~250 ms, list translation ~470 ms, rest of the layer ~110–140 ms; card idle 38–44 ms of a ~62 ms frame.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by lorddie on 2026-11-29T22:11:01Z.
Black ground / black signs up close: what we ruled out and what we know (RX 9070 XT, Windows)
We added a pixel-history diagnostic of our own (diagnostics builds only): with
VICTORY_PIXEL=x,y;...and a capture, the colour targets' pixels at those points are copied before every draw of the captured frames, givingframe-<n>-pixels.txt(draw line, list, target, value).Findings:
VICTORY_KEEP_SHOWN=2;VICTORY_HELD_LEVELS=0; running the 929 indirect computes/frame left out by theCS_RaytracingResolvename match (VICTORY_RT_RESOLVE=1);VICTORY_MAPPED_BY_VIEWS=0.Our current suspicion is the streaming path that fills that memory (DirectStorage destinations). If anyone has seen sharper texture levels whose memory never gets mapped, we'd be glad to compare notes.