Replay: --retranslate translates for the host it is told (#302) #388
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!388
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-388"
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?
@hussainmussa on GitHub · 2026-11-26 23:27 UTC · original
hussainmussa:fix/retranslate-host→a-publier· +139 −7 · 2 files · 2 commits · openFixes #302.
What was wrong
victory replay --retranslateset a 64-lane RDNA host whatever the run said (set_host_max_wave(64),set_host_rdna(true)), andreplay.rsread no environment variable. On a 32-lane card (NVIDIA, Intel) the folder held shaders that no run on that card makes, and--shadersthen took them without a word.What this does
Each of the two (widest wave, RDNA or not) is now taken, on its own, from:
--host-wave <lanes>,--host-rdna,--no-host-rdna(the last two refuse each other);VICTORY_HOST_WAVE(and its aliasVICTORY_HOST_MAX_WAVE) through the sametranslate::host_wave::selectthatvictory translateuses, andVICTORY_HOST_RDNAwith the same meaning (1is on);Host::translation_caps), asked only when one of the two is still open;The summary line and a log line name the host used:
N of M shaders translated for a 32-lane host (not RDNA), 1.2 s.docs/replay.mdlists the flags.This goes one step past the issue. It suggested 64-lane RDNA as the only fallback; step 3 puts the card in front of it, as
victory translatedoes. On an RDNA card nothing changes. On an NVIDIA or Intel card,--retranslatewith nothing set now writes that card's shaders, andVICTORY_HOST_WAVE=32alone no longer leaves the RDNA float paths on. If you would rather keep 64-lane RDNA as the plain default, step 3 is one closure to take out.Testing
RTX 4070, Windows 11, Rust 1.98.1.
cargo test -p victory --locked --features diagnostics: the new teststhe_host_retranslate_translates_forandthe_host_flagspass, with the rest.cargo test -p xtask --locked: 9 passed,documented_switches_are_readamong them.cargo clippy -p victory --no-deps --all-targets --locked -- -D warnings, with and without--features diagnostics: clean.translation_capsanswers(32, false), and with nothing set the host comes out as 32 lanes, not RDNA; with--host-wave 64alone, 64 lanes, not RDNA.Not tested: an actual
--retranslaterun. I have no game files and so no capture. The translation itself is untouched, only the two values handed to it. An RDNA card was not tried either.Note
#312 took the issue's approach and was closed by its author without review. This is written separately, but the flags are the issue's own, so the two look alike.
Written with help from Claude; everything above was built and run on my machine.
@adrianmjim on GitHub · 2026-11-27 11:11 UTC · original
I ran
--retranslateon a real capture on an RDNA card. RX 7900 XT (RDNA 3), driver 32.0.32029.2010, Windows 11 26300,diagprofile. PR head82482daagainst a-publier4eb6cfd.Capture: one world frame recorded with
VICTORY_RECORDon4eb6cfd(1,024 pipelines, 1,183 title shaders).4eb6cfd,replay <capture> --retranslate <folder> --view-limit 2097151 --raw-views 2097152:21 containers not found, then1162 of 1183 shaders translated, 19.5 s.82482da, the same plus--host-wave 64 --host-rdna:21 containers not found, then1162 of 1183 shaders translated for a 64-lane host (RDNA), 18.6 s. The log line readsreplay: shaders retranslated done=1162 of=1183 host_wave=64 host_rdna=true. This run reused the containers the first run had collected..dxilfiles and 91,831,118 bytes each,diff -rqreports nothing, andsha256sum * | sha256sumgives07062de70536e84d...for both.--compare --shaders-b <folder> --loops 11):994 of 1024 pipelines made with shaders of the folder given, 0 refused, 17.41 ms on the card (median of 11 loops) against 17.44 ms with the recorded shaders.So with the host named by flags, the PR writes what
4eb6cfdwrites, on a real capture.Not covered:
--retranslatenow makes a D3D12 device (emit::host::Host::new(false)), where4eb6cfdset the two constants and made none. If that fails it falls back to 64-lane RDNA. I did not run that path.The replay above ran on
4eb6cfdplus the fix in #550. Without it,replay(not--retranslate) of a capture made with default settings loses the device on this card while it loads the contents.--retranslatedoes not load the capture onto the card, so it is not affected.@hussainmussa on GitHub · 2026-11-27 17:11 UTC · original
Thanks @adrianmjim. Here are the parts you listed as not covered, on a 32-lane card: RTX 4070, Windows 11, diag build, head
82482daagainst4eb6cfd. Capture: one frame of the sign-in screen (7 pipelines, 11 title shaders; 9 translate, 2 containers not found),--view-limit 2097151 --raw-views 2097152.4eb6cfd, nothing set:9 of 11 shaders translated. Folder X.82482da, nothing set:translating for this PC's card: NVIDIA GeForce RTX 4070, then9 of 11 shaders translated for a 32-lane host (not RDNA). Folder Y; 6 of the 9 files differ from X.--host-wave 32 --no-host-rdna, andVICTORY_HOST_WAVE=32alone: byte-identical to Y.--host-wave 64 --host-rdna, andVICTORY_HOST_WAVE=64 VICTORY_HOST_RDNA=1: byte-identical to X.Not covered: the capture is small, and I could not check the folders by replaying them.
replayof this capture loses the device here (0x887A0006) on4eb6cfdtoo, with no--shaders, which looks like what you describe before #550.Written with help from Claude; everything above was run on my machine.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.