Apply outstanding XMA sample skips to the final overlap #2710
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!2710
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2710"
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?
@VlREX on GitHub · 2026-11-25 18:37 UTC · original
VlREX:fix/xma-tail-skip→main· +65 −21 · 1 files · 1 commits · openA one-frame XMA voice emits 512 samples plus a 256-sample overlap per channel. With a start skip of five subframes (640 samples), the decoder previously queued 256 samples instead of the remaining 128 because flushing bypassed the skip counter. Route flushed samples through the same skip handling as ordinary frame data. A synthetic one-frame test covers skips of four through seven subframes, including an empty tail. Confirmed the five-subframe case failed before the fix. All nine audio module tests pass in an isolated Windows GNU run using the real XMA decoder. This concerns PCM queued by the voice, complementary to the ring-writer fix in #2709.
@kotekompotek on GitHub · 2026-11-25 18:51 UTC · original
Clean unification - routing the flush tail through append_samples applies the outstanding skip in the same units (skip in subframes, pcm in samples x channels, decrement by skip/channels). The 4..=7 sweep covers the case where the tail is entirely consumed by the skip.
@oni-swr on GitHub · 2026-11-25 18:54 UTC · original
Independent WARP/CPU verification
PR head:
fdfd7c25fdf2882507d051382fe6cb8b6e5d04c3Environment: Windows 11 Pro 10.0.26200, rustc/cargo 1.98.1, WARP only (
VICTORY_WARP=1+VICTORY_D3D12_WARP=1),dxil.dll1.8.2502.11 (Windows SDK 10.0.26100.0), no physical GPU touched, no game files/dumps/retail hashes.CARGO_TARGET_DIRon D:,--lockedthroughout.origin/main=13f91caee25f2fdf2c062be5f7a27f058e51cbca; merges cleanly (git merge-tree); open, non-draft, nooni-swrcomment on this head.Commands / results (
cargo test --locked -p victory-formats -p victory-hle):a_start_skip_can_reach_into_the_final_overlap).cargo clippy --locked -p victory-formats -p victory-hle --all-targets -- -D warnings→ clean.voice.pcm.extend(tail)makes the new test FAIL at "skip 5 subframes" (audio.rs:1310); the other 146 pass.Baseline note: on the very first baseline
victory-hlerun,dstorage::tests::a_page_list_filled_after_its_request_startsfailed once (assertion left==right); it passed 3/3 reruns in isolation and in a full rerun (146/146), so it looks like a flaky pre-existing test unrelated to this PR.Review: no bugs found.
append_samplesis the old skip logic factored out (minclamps, whole-sample accounting bychannels) and now also applies to the flushed overlap; the loop path's behavior is unchanged. The test sweeps skip = 4..7 subframes across the frame/overlap boundary including a fully-consumed tail (expected 0). Thetest_voicehelper also dedups the loop test.channelsis taken beforeflush— fine.Not tested: physical hardware GPU, retail game run, release build.
AI use: Claude Code (Claude Sonnet 5.5). Claim: #1633
@fuzeofficlal on GitHub · 2026-11-25 19:38 UTC · original
Independent Windows 11 verification and review of
fdfd7c2(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo xtask policy: 184 files ok.cargo clippy --locked -p victory-formats -p victory-hle --all-targets -- -D warnings: 0 warnings.cargo test --locked -p victory-formats: 38 passed, 0 failed, 5 ignored.cargo test --locked -p victory-hle: 147 passed, 0 failed (lib, includinga_start_skip_can_reach_into_the_final_overlap), plusfidelityfx(1) andno_dll_planting(1) clean.git merge-treeacross the entire 5-PR stack #2694 + #2708 + #2709 + #2710 + #2714.Review Notes
Voice::append_samplesondecoder.flush(&mut tail)cleanly applies any remainingvoice.skipinto the 256-sample overlap tail without breaking channel interleaving (tail.len() == 256 * channels), and pairs directly with #2709 for skips>= 5subframes. Clean and ready to merge.@Marvisak on GitHub · 2026-11-25 22:23 UTC · original
Automated triage for the maintainers.
Merge candidate (recommend a look). The outstanding start skip in
crates/victory-hle/src/modules/audio.rswas applied to decoded frames but not to the overlap tail thatdecodeflushes when input runs out. A one-frame voice with a skip of five subframes therefore queued 256 tail samples instead of 128. The skip logic moves unchanged intoVoice::append_samplesand is used for both, so the loop path behaves exactly as before. The test sweeps skips of four to seven subframes across the frame/tail boundary, including a tail consumed entirely, and fails on main at five.test_voicealso removes a duplicated struct literal from the loop test.CI:
checkpassing on this head. Merges cleanly with #2708, #2709 and #2714.Generated by Claude Code
@Dukestar69 on GitHub · 2026-11-26 05:11 UTC · original · approved these changes
Tested merged onto
origin/main(63bcca4) on Windows 11 x64:cargo test -p victory-hle --lib modules::audio::: 9 passed, 0 failed (including newa_start_skip_can_reach_into_the_final_overlap).cargo clippy -p victory-hle --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@futurepro62 on GitHub · 2026-11-26 12:09 UTC · original
NVIDIA full-suite run, to go with the reports above by Dukestar69, fuzeofficlal, oni-swr, since none of them names a GPU run. Tested exact head
fdfd7c2(on its base13f91ca).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 774 passed, 0 failed, 9 ignored.a_start_skip_can_reach_into_the_final_overlap.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
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.