Draws: fresh tables with no constant views are shared by a frame's lists, refcounted (VICTORY_SHARED_TABLES=1) #1715
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1715
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@101Leafy on GitHub · 2026-11-28 23:42 UTC · original
101Leafy:nv/shared-tables→main· +171 −21 · 11 files · 4 commits · merged 2026-11-29 08:16 UTCWhen 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.
986afd05ccto50e82e3617@lorddie on GitHub · 2026-11-29 14:36 UTC · original
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.
@lorddie on GitHub · 2026-11-29 15:04 UTC · original
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.@lorddie on GitHub · 2026-11-29 22:11 UTC · original
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.