DSP: convolution streams play the title's IRs (phones, TVs, radios): its IR layout on top of #2483 #3332
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3332
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3332"
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?
@thebigredder on GitHub · 2026-11-26 18:44 UTC · original
thebigredder:dsp-title-ir-layout→main· +612 −10 · 3 files · 6 commits · openWhat
Phone calls, videos played on the in-game phone, TVs and radios placed in the world are silent: the title plays them through the audio DSP's convolution streams (
chad.dll,XDspActivate/XDspSubmitCommand), anddsp.rsreturns zeros for those. #240 (by @Quat3rnion), rebased as #2483 (by @kais7654), adds a host convolver; with it alone the title's convolution output is infinite in every sample (loud crackling, and the rest of the mix lost). This PR stacks on #2483's three commits, rebased onto currentmain, and adds what makes it work with the title's own IRs.The fixes
2 * blockfloats that starts with the word0xfffface1, a NaN as a float: 51,200 floats with it at 49,152; 40,960 at 38,912; 83,968 at 81,920. Fed to the convolver, that one NaN makes every output sample non-finite. The filter is now the partitions before the first such one, and any other non-finite word counts as zero. omonkeyz/xbox-emulator (crates/compat/chad, GPL-3.0) independently treats the same word as an IR metadata marker; no code is taken from it.blocksamples zero-padded, so every overlap counted twice: a click at each block boundary (a constant crackle). Each window is now cut to its first half, zero-padded; the next partition holds the rest.ir_floatsis one channel's length, so a stereo-IR activation sliced half the IR and was refused, and each refused activation kept its slot reserved (128 slots, then every activation failed).shortcut:the convolver's output is kept finite and clamped to [-1, 1], so an IR in a layout not seen yet cannot blast the mix. A refused convolution stream logs a warning.FFT and IFFT streams still return silence, as in #2483.
Testing
dsp.rsanddsp_convolve.rsmatch this PR's apart from temporary diagnostics, which are left out here.victory-hle,dsp): 9 pass, among them a new one,the_title_s_ir_layout_convolves_exactly, which encodes an IR as the title lays it out (2-block windows and the trailing marker partition) and checks against direct convolution. With fix 2 taken out it fails (largest error 3.3 against under 0.02 with it), so it tests the fix. Run on Windows binaries under Wine.cargo clippy -p victory-hle --all-targets: no warnings.Not done: a check against reference output from console hardware; only the title's IRs and its audio by ear.
🤖 Generated with Claude Code
https://claude.ai/code/session_01R8b3MamTtfh5yW9Go2svhi
@Dukestar69 on GitHub · 2026-11-26 18:47 UTC · original · reviewed
Tested on Windows against
origin/main(63bcca4).The DSP convolution changes look solid and pass all checks:
cargo test -p victory-hle --lib modules::dsp -- --test-threads=1: 9 passed, 0 failed.cargo clippy -p victory-hle -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.One scope issue to clean up before merge: this PR also includes unrelated changes in
crates/victory-gpu/src/descriptor/host.rs(pair_base+ heap-cap test skip) andcrates/victory-gpu/src/memory.rs(which appear to belong to a separate GPU/NVIDIA heap-cap PR). Dropping those twovictory-gpufiles from the branch would keep this PR cleanly scoped to DSP convolution.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@cloph-dsp on GitHub · 2026-11-26 19:03 UTC · original
Independent local verification of PR #3332 (
DSP: convolution streams play the title's IRs), headce9cf32aad.cargo test --locked,CARGO_BUILD_JOBS=2, per-worktreeCARGO_TARGET_DIR(D:\Victory-Contrib\target-3332).cargo test --locked -p victory-hle --lib -- --exact modules::dsp_convolve::tests::the_title_s_ir_layout_convolves_exactly modules::dsp::tests::convolution_through_the_api_returns_wet_audio-> 2 passed, 0 failed, 158 filtered, exit 0.git diff --check origin/main HEAD-> clean.63bcca43..., so they are genuinely added by this PR.victory-gpufiles in this PR were outside the tests I exercised.AI-assisted (Hy4 flash). GPU/driver: N/A for these CPU tests. No game data used.
2b6bb33): not part of the DSP fix a6cf62ef60@thebigredder on GitHub · 2026-11-26 20:16 UTC · original
Thanks @Dukestar69, right: the two
victory-gpufiles came from #2483's descriptor-heap test commit (2b6bb33), which this branch carried along with #2483's DSP commits. Reverted ina6cf62e; the PR's diff againstmainis nowdsp.rs,dsp_convolve.rsandmodules/mod.rsonly. Thanks also @cloph-dsp for the independent run.@sawetco on GitHub · 2026-11-27 00:51 UTC · original
Downstream Series X report from Windows 11, RTX 5070 12 GB (621.40), native D3D12, 1440p. Our PR48 build uses avatarmanz/VIctory-7900XTX at
d78024bwith local renderer changes. In a new playthrough through Jason’s house, the player heard phone conversations in cutscenes, but the far end of calls during free roam was silent. Earlier on this machine that included Lucia’s prison call, its automated announcement, and the following morning’s call. Jason’s side and the car radio were audible.The three-file diff at
a6cf62eapplies cleanly to our HLE source. I ran the same synthetic 512-sample input throughXDspActivateandXDspSubmitCommandon both versions. The baseline reportedwet return, energy 0. After the patch, the wet-return test passed its mean-square threshold of 0.5, and all nine DSP tests passed in an isolated Windows CPU build of the two modules. The game observation is from the original build. Listening to a free-roam call on the patched Series X build is still pending.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.