dsp: a VICTORY_DUMP_DSP capture stops at 64 MiB, and the docs say cap… #385
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/385"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T16:00:18Z.
What this changes
VICTORY_DUMP_DSPappended each stream's blocks and outputs for as long as the title ran, so a capture grew without bound. Now:DUMP_MAX), with onewarn!line when it reaches the cap, so a capture is the first bytes the title plays rather than an ever-growing file;ir_floats,DUMP_IR_MAX) and moved to its ownappend_ir, so the cap applies to the streaming files only;docs/native-host.mdsays the capture files are the title's own audio data and are never committed, attached or posted — the same rule the shader dumps carry.No issue claimed: found while reading
crates/victory-hle/src/modules/dsp.rsfor #17. I will open one and link it if you would rather have one.How it was tested
cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: all pass — victory 19, victory-hle 327, native_probe 17, victory-loader 29, 0 failed.tools/macos/test-native.sh -p victory-hle -p victory -p victory-gpu -p xtaskon the arm64 host (the native gate, with Apple's converter installed): victory-gpu 412 passed, 0 failed, 6 ignored; victory-hle 144 passed; victory 14; xtask 6.cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: no warnings (victory-hlere-checked).cargo xtask policy: 398 files ok.VICTORY_DUMP_DSP=<dir>set, the block and output files stop at 64 MiB with one warning, the_ir.f32capture is unchanged, and audio sounds as before.The branch now carries current
main(b998bb65) as a merge commit, so what this changes is down todsp.rs(+70/−17) andnative-host.md(+8/−2), and the failure the branch used to show —host_posix::ucrt::tests::dlls_that_are_not_the_c_runtime_are_left_alone, from its staleucrt.rs— is gone.Checklist
VICTORY_GUESS_DSP=1VICTORY_*variable and documented: the cap belongs to the existingVICTORY_DUMP_DSP, and the docs now state the cap and the data-handling ruleImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T16:00:27Z.
What this changes
Follow-up to #287, its reviewer's two notes: the docs (module and docs/native-host.md) now say the capture files are the title's own audio data, never committed, attached or posted, as for the shader dumps; and a stream's block and output capture stops at 64 MiB (about a few minutes at 48 kHz, one line when it caps) instead of growing for as long as the title runs. The one-shot IR capture keeps its DUMP_IR_MAX bound.
How it was tested
cargo test -p victory-hle --target x86_64-unknown-linux-gnu (95 passed, including the existing dump-capture test through the capped path)
cargo clippy -p victory-hle --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings, cargo xtask policy (384 files ok)
A title run — for whoever runs it; the cap is a per-stream counter plus one comparison per appended block
Checklist
No game files, game code, disassembly listings or SDK files are included
No guesses about console behaviour
Existing diagnostic (VICTORY_DUMP_DSP), docs updated
Based on the hostless-fix branch (bottom commit is that PR's change).
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T16:44:29Z.
Reviewed and merged locally with 384/385 together. Tests, Windows clippy, policy and the release build all pass. I haven't pushed it yet because it still needs a game run, and the machine's GPU memory was held by another run when I tried. I'll land it after that run.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:42:18Z.
Brought this branch up to current
main(b998bb65) so its gate stops failing on a staleness that has nothing to do with the cap.What changed on the branch: one merge commit, no conflicts.
dsp.rsandnative-host.mdauto-merged onto the rewritten DSP; the result isdsp.rs+70/−17 andnative-host.md+8/−2 againstmain, and nothing else. I re-read the merged code rather than trusting the auto-merge:DUMP_MAX, theCell<u64>inStream::dump,append_f32(dir, n, name, written, floats),append_irand thedump_blockcallers all land coherently on the current file.Gates on the merged tree:
cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victorypasses 327 + 17 + 29 + 19, 0 failed —host_posix::ucrt::tests::dlls_that_are_not_the_c_runtime_are_left_alonepasses now; clippy forx86_64-pc-windows-gnullvmis clean;cargo xtask policysays 398 files ok.One nit I left alone rather than edit code someone else wrote: the old
dump_irdoc paragraph ("Writes a convolution stream's own impulse response ... Off by default") now sits aboveappend_ir, soappend_ircarries two doc blocks anddump_irhas none. Moving those four lines back ontodump_iris the fix; say the word and I will push it.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:44:41Z.
Apple's Metal Shader Converter is installed on this Mac now (
/usr/local/lib/libmetalirconverter.dylib), so the native gate runs whole here and I re-ran it on the merged tree:tools/macos/test-native.sh -p victory-hle -p victory -p victory-gpu -p xtaskgives victory-gpu 412 passed, 0 failed, 6 ignored (the 10 that used to fail atdlopenare gone), victory-hle 144, victory 14, xtask 6. The earlier "victory-gpu could not be run" caveat in this description no longer applies; the body now records the full gate.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T22:04:57Z.
One more commit after the copy you merged locally:
596314d5moves the impulse-response doc paragraph back ontodump_ir— it had been left aboveappend_irwhen the two appends were split, soappend_ircarried two doc blocks anddump_irhad none. Comment move only, no code line touched, and the gate still passes here. Pull it before landing.While I am here: the
VICTORY_TEXTURE_BACKquestion on #384 applies to this one too in a way worth knowing — nothing in the DSP path is behind a switch beyondVICTORY_DUMP_DSPitself, so this change acts in any run that sets it, which is what a capture run does.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:32:16Z.
Merged current public
main(26817285) into the branch (clean merge, no conflicts; new head0e7ab8ca) to refresh it against the moved main.Gates on the new head:
cargo test -p victory-hle -p victory -p victory-gpu -p xtask(host) green;cargo test --target x86_64-apple-darwin -p victory-hlegreen on rerun (338 passed — onewait_on_addresstiming test flaked once under parallel Rosetta and passes in isolation and on rerun, same class as #548);cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningsclean;cargo xtask policyok.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.