thin: split a big list across translating threads (VICTORY_THIN_SPLIT, newer version) #56
No reviewers
Labels
No labels
accessibility
amd
bug
crash
device-removed
documentation
duplicate
enhancement
feature-request
good first issue
help wanted
input
invalid
launcher
memory
needs-logs
nvidia
off-topic
performance
question
shaders
stutter
visuals
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VGLALALA--ReVictory-RDNA3!56
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-56"
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?
@Kal0s-design on GitHub · 2026-12-05 19:27 UTC · original
Kal0s-design:port/thin-split→main· +36 −15 · 1 files · 1 commits · merged 2026-12-05 19:57 UTCThis brings over the newer version of upstream ReVIctory's list split, 0a29302 by Jonas G. Morsch, author kept. It is opt-in with VICTORY_THIN_SPLIT=1, under F1 > Pipelines, and off by default.
Every frame the game hands one direct list of around 1,500 draws to a single translating thread, which takes 33 to 47 ms on one core while the submitting thread waits for it (the "thin" figure on the status line) and most cores sit idle. With the switch on, when a direct list has 8 or more pieces queued behind its thread, another thread takes the later half into a list of its own, and a later part can split again, up to VICTORY_THIN_SPLIT_PARTS (4). Each part starts from the state the game set at that point, followed from the words by its own threads, and the parts join back in recording order. VICTORY_THIN_SPLIT_CHECK=1 compares the followed state with the translating thread's at every piece. Upstream measured, in one spot with off, on, off for about two minutes each, 1% lows from 15.0 to 18.1 fps, frames over 50 ms from 219 to 83, and thin from 14.7 to 10.7 ms. That's the CPU-side stall people describe in #53.
This fork already had an earlier version of the split in list/thin.rs, so five hunks overlapped. They take the newer code, which aborts a split whose second part would start from a state other than the game's, never splits a recording that is waiting for its back list, and follows the whole split chain in for_external. In list.rs the fork's cut_after_external stays next to join_split. The commit message has a note on this.
Merged with current main and the test fixes from #48, victory-gpu passes (695) and clippy -D warnings reports nothing new. I tested on one NVIDIA desktop card and haven't measured the frame times in game, so the numbers above are upstream's, and the switch stays off unless someone turns it on.
AI-assisted: yes
🤖 Generated with Claude Code
Every frame the title hands one direct list of ~1,500 draws / ~9,000 calls to a single translating thread: 33-47 ms on one core, which the submitting thread waits for ("thin") while most cores idle. Its words arrive long before that thread gets to them (up to 50-60 pieces queued behind it). With VICTORY_THIN_SPLIT=1 (F1 > Pipelines, off by default): when a direct list has 8 or more pieces queued behind its thread, another thread takes the later ones from about the middle, plus everything handed over after, into a list of ours of its own. A later part can split again, up to VICTORY_THIN_SPLIT_PARTS (4). Each part begins with what the title set where it begins, followed from the words by threads of their own (draw::checkpoint::TitleShadow, applied to a fresh State). When all parts are translated, each joins the one before it as cut parts do (list::join_split): its host lists run after the earlier part's, in recording order, each part keeping its own draw state (dynamic slots) until it has run. VICTORY_THIN_SPLIT_CHECK=1 (F1, off by default) compares the followed state with the translating thread's at every piece, in 8 parts; ~2.8M pieces matched in a 3-minute run. The longest list's line also says how many pieces it had and how many were queued behind its thread. Measured on RX 6800 + Xeon E5-2696 v3 (Series S mode, same spot, off -> on -> off, ~2 min each): 1% low 15.0 -> 18.1 fps, 0.1% low 13.4 -> 16.2, frames over 50 ms 219 -> 83, average 25.5 -> 27.4, thin 14.7 -> 10.7 ms. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 0a29302e7cb01277ffc65885216498150306a6ce) Ported to ReVictory-RDNA3: this fork already had an earlier version of the split in list/thin.rs; the five overlapping hunks take this commit's newer version (abort a split whose second part would begin from a state other than the title's, never split a recording waiting for its back list, and follow the whole split chain in for_external). In list.rs the fork's cut_after_external stays beside join_split.5f5207cb64to38859b9945