Audio: XMA decoding keeps up while frames are slow (MMCSS thread, the mixer never waits for a decode) #2788

Open
github-bot wants to merge 6 commits from github-bot/gh-2788 into main AGit
Owner

@⁠0xkn0wh3r3 on GitHub · 2026-11-25 20:23 UTC · original
0xkn0wh3r3:audio/steady-under-slow-frames → main · +226 −68 · 1 files · 6 commits · open

Audio could cut out while world frames take about a second each. VIctory doesn't drive the audio device: the title mixes on its own time-critical thread and writes to the host's WASAPI. Our part is XMA decoding, on one thread, into output rings of at most 31 blocks of 256 bytes (about 83 ms of mono at 48 kHz).

Two things on our side could let a ring run dry while frames are slow. One commit for each, both in crates/victory-hle/src/modules/audio.rs. A third commit, resuming a voice whose input ran out, was dropped after review (reverted in 2314c249) and is left to #1880.

Changes

1. The decoding thread is scheduled like a host audio engine's (raise_priority, called when the "victory XMA decoder" thread starts).

  • It ran at normal priority. During slow world frames it competed with bulk work: DirectStorage's workers (one per core) and submission preparation.
  • It now registers with MMCSS as "Pro Audio" (AvSetMmThreadCharacteristicsW). If that fails it falls back to THREAD_PRIORITY_TIME_CRITICAL, then THREAD_PRIORITY_HIGHEST.
  • It logs once which one it got (XMA decoder: MMCSS "Pro Audio", or XMA decoder: no MMCSS with the error and the priority).
  • It only works while a ring has room, so it cannot hog a core.

2. The read-advance command never waits for a decode (Slot, pump, fill_block, advance_read).

  • The title sends command 18 (read-advance) from its time-critical mixer thread. It took the same per-voice mutex that pump held while it decoded until the ring was full.
  • A decoding thread preempted while holding that lock stalled the mixer, and with it every voice. A Windows SRW lock does not raise the holder's priority.
  • Each context now has two locks:
    • voice: the decoder, its samples and its trace;
    • ring: only the read block and "writable", which both sides change, plus the take counts.
  • advance_read takes only ring.
  • pump holds voice one block at a time (at most one frame's decode), so enable and disable wait for one frame at most.
  • fill_block takes ring only after writing a block, to decide whether the ring is full.
  • What is written, and when the ring counts as full, are unchanged.

Overlap with other PRs

  • #1880 (refill XMA rings from a decoded reserve on the title's thread) resumes an ended voice, which this PR leaves to it, and raises the decoder to time-critical without MMCSS, as part of a larger rework.
    • Of the two priority changes, only one should survive.
    • Commit 2 is not in #1880, but it touches the same pump, so they will conflict textually.
  • #2444, #2709, #2714 change pump and decode for other bugs; there is no functional overlap, but #2444 and #2709 rewrite the same pump loop, so expect rebase conflicts.
  • #443 and #237 don't overlap.

Tests

  • read_advance_does_not_wait_for_decoding holds the voice lock as a decode does and sends command 18 from another thread.
    • It returns at once, and the next pass fills up to the new read block.
    • With the old single lock, the test fails at its 5 s timeout.
  • cargo test -p victory-hle: lib 153 passed, 0 failed; the other test binaries pass.
  • cargo clippy -p victory-hle --all-targets -- -D warnings: clean, with and without --features diagnostics.

Not verified

  • Not run with the title (no game data here), so whether audio now holds through slow frames is unverified. The priority log line, and the take counts in the "XMA voice disabled" debug line (VICTORY_LOG=victory_hle::modules::audio=debug), will show what happened.
**@⁠0xkn0wh3r3** on GitHub · 2026-11-25 20:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788) `0xkn0wh3r3:audio/steady-under-slow-frames` → `main` · +226 −68 · 1 files · 6 commits · open Audio could cut out while world frames take about a second each. VIctory doesn't drive the audio device: the title mixes on its own time-critical thread and writes to the host's WASAPI. Our part is XMA decoding, on one thread, into output rings of at most 31 blocks of 256 bytes (about 83 ms of mono at 48 kHz). Two things on our side could let a ring run dry while frames are slow. One commit for each, both in `crates/victory-hle/src/modules/audio.rs`. A third commit, resuming a voice whose input ran out, was dropped after review (reverted in 2314c249) and is left to #1880. ## Changes **1. The decoding thread is scheduled like a host audio engine's** (`raise_priority`, called when the "victory XMA decoder" thread starts). - It ran at normal priority. During slow world frames it competed with bulk work: DirectStorage's workers (one per core) and submission preparation. - It now registers with MMCSS as "Pro Audio" (`AvSetMmThreadCharacteristicsW`). If that fails it falls back to `THREAD_PRIORITY_TIME_CRITICAL`, then `THREAD_PRIORITY_HIGHEST`. - It logs once which one it got (`XMA decoder: MMCSS "Pro Audio"`, or `XMA decoder: no MMCSS` with the error and the priority). - It only works while a ring has room, so it cannot hog a core. **2. The read-advance command never waits for a decode** (`Slot`, `pump`, `fill_block`, `advance_read`). - The title sends command 18 (read-advance) from its time-critical mixer thread. It took the same per-voice mutex that `pump` held while it decoded until the ring was full. - A decoding thread preempted while holding that lock stalled the mixer, and with it every voice. A Windows SRW lock does not raise the holder's priority. - Each context now has two locks: - `voice`: the decoder, its samples and its trace; - `ring`: only the read block and "writable", which both sides change, plus the take counts. - `advance_read` takes only `ring`. - `pump` holds `voice` one block at a time (at most one frame's decode), so enable and disable wait for one frame at most. - `fill_block` takes `ring` only after writing a block, to decide whether the ring is full. - What is written, and when the ring counts as full, are unchanged. ## Overlap with other PRs - **#1880** (refill XMA rings from a decoded reserve on the title's thread) resumes an ended voice, which this PR leaves to it, and raises the decoder to time-critical without MMCSS, as part of a larger rework. - Of the two priority changes, only one should survive. - Commit 2 is not in #1880, but it touches the same `pump`, so they will conflict textually. - **#2444, #2709, #2714** change `pump` and `decode` for other bugs; there is no functional overlap, but #2444 and #2709 rewrite the same `pump` loop, so expect rebase conflicts. - #443 and #237 don't overlap. ## Tests - `read_advance_does_not_wait_for_decoding` holds the voice lock as a decode does and sends command 18 from another thread. - It returns at once, and the next pass fills up to the new read block. - With the old single lock, the test fails at its 5 s timeout. - `cargo test -p victory-hle`: lib 153 passed, 0 failed; the other test binaries pass. - `cargo clippy -p victory-hle --all-targets -- -D warnings`: clean, with and without `--features diagnostics`. ## Not verified - Not run with the title (no game data here), so whether audio now holds through slow frames is unverified. The priority log line, and the take counts in the "XMA voice disabled" debug line (`VICTORY_LOG=victory_hle::modules::audio=debug`), will show what happened.
The title mixes on its own time-critical thread and takes what our
decoding thread puts in the XMA output rings, which hold at most 31
blocks of 256 bytes (83 ms of 48 kHz mono). The decoding thread ran at
normal priority, so while frames took about a second it competed with
the bulk workers (DirectStorage's, one per core) and the rings could
run dry.

It now registers with MMCSS as "Pro Audio", as host audio engines'
threads do, and falls back to time-critical, then highest, priority if
that fails; which one it got is logged once. It works only while a ring
has room, so it cannot hog a core.

Open PR #1880 also raises this thread (to time-critical, without
MMCSS); whichever of the two lands second keeps one.
The title sends the read-advance command (18) from its time-critical
mixer thread. It took the same per-voice lock the decoding thread held
while it decoded frames until the voice's ring was full. Windows' locks
do not boost the thread holding them, so a decoding thread preempted
while frames were slow stalled the title's mixer, and every voice went
quiet with it.

Each context now has two locks. The voice's (its decoder, decoded
samples and trace) is held by the decoding thread for one frame and the
block it completes at a time, so enabling or disabling a voice waits for
one frame's decoding at most. A ring lock covers only what the command
and the decoding thread both change in the context, the read block and
"writable": the decoding thread takes it after writing a block, to see
whether the ring is full, and the command takes nothing else. What is
written, and when the ring counts as full, is unchanged. The command's
counts for the debug log moved under the ring lock.

Test: read_advance_does_not_wait_for_decoding holds a voice's lock as a
decode does and sends the command from another thread; it returns at
once and the next pass fills up to the new read block. With the command
taking the voice's lock again, the test fails after its 5 s timeout.
When both of a voice's inputs had run out, the decoder flushed its
tail, set the input-invalid error and never decoded that voice again
until it was enabled anew. A streaming title paces its refills by its
frames; with frames taking about a second it marks an input valid
again after the voice ran dry, and the hardware then decodes it, but
we stayed silent for good.

A voice that ran out now resumes when an input is valid again: from a
cold decoder (its tail was already flushed) at the start of the input,
with the error status cleared as enabling clears it. The debug log of a
disabled voice counts its resumes.

Open PR #1880 does the same as part of a larger change (a decoded
reserve refilled on the title's thread); this is that one piece, kept
on its own so it can be dropped if #1880 lands first.

Test: a_voice_that_ran_out_resumes_on_new_input decodes a stream to its
end, checks the error and that nothing more decodes, then marks input
1 valid and gets a frame with the error cleared. It fails without the
change ("resumed").
The decoding thread moved the write block, then took the ring lock to
check whether the ring was full. A read-advance between the two could
take the block just written, leaving read at write with the ring empty;
the check then marked the empty ring full and the voice stopped for
good. The lock is now taken before the write block moves, still after
the decode, so a read-advance still never waits for decoding.
Reverts b9bf1b6. Resuming a voice whose input ran out changes emulation
behaviour, and nothing public says whether the hardware restarts at the
start of the input or goes on from its read position (nor that the
title refills an ended voice expecting output); it also cleared all of
word 2, the input read position with the error. #1880 covers the resume.
This PR is the locking and scheduling fix alone.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:14:14 +00:00
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 20:40 UTC · original

Right threading model: MMCSS 'Pro Audio' with the graceful fallback chain (time-critical -> normal) is the correct way to keep XMA decoding ahead of the mixer on busy systems, and decoupling the mixer's read from the in-flight decode (ring + never-wait) kills the stall. Ended voices resuming on new input (ended=false in decode) fixes the real silence-after-stream-restart bug. Non-Windows stub keeps the build portable.

**@⁠kotekompotek** on GitHub · 2026-11-25 20:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7174022081) Right threading model: MMCSS 'Pro Audio' with the graceful fallback chain (time-critical -> normal) is the correct way to keep XMA decoding ahead of the mixer on busy systems, and decoupling the mixer's read from the in-flight decode (ring + never-wait) kills the stall. Ended voices resuming on new input (ended=false in decode) fixes the real silence-after-stream-restart bug. Non-Windows stub keeps the build portable.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 20:58 UTC · original

WARP/CPU verification of head b9bf1b6afa2b18811ed8e3141432245cead0a808

Environment: Windows 11 x64, rustc/cargo 1.98.1, WARP/CPU only (VICTORY_WARP=1, VICTORY_D3D12_WARP=1), no physical GPU, no game files. DXIL validation with Windows SDK 10.0.26100.0 x64 dxil.dll 1.8.2502.11. PR head merged cleanly onto origin/main 13f91caee2.

Tests (cargo test --no-fail-fast -p victory-hle)

  • origin/main baseline: lib 146 passed, plus fidelityfx 1 and no_dll_planting 1; 0 failed.
  • With this PR: lib 148 passed, fidelityfx 1, no_dll_planting 1; 0 failed (+2: read_advance_does_not_wait_for_decoding, a_voice_that_ran_out_resumes_on_new_input). The two new tests passed on 5 consecutive extra runs (no flakiness seen).

Negative control (each applied alone, then reverted)

  • advance_read also takes the voice lock (the old behaviour): read_advance_does_not_wait_for_decoding fails (after its 5 s timeout), the other test passes.
  • Ended voice never resumes: a_voice_that_ran_out_resumes_on_new_input fails, the other passes.

Lint: cargo clippy --all-targets -- -D warnings clean. cargo fmt --check: no new hunks (audio.rs 3 on main, 2 with the PR). Note: cargo fmt --check is already red on origin/main here (891 hunks, none from these PRs), so I compared per-file hunk counts against that baseline.

Review: read the full diff. The split into a voice lock (held per block) and a ring lock (taken after it, never during a decode) is consistent, and the lock order is respected in disable and fill_block; reading "writable" without the ring lock is sound because only the decoder clears it and the read-advance only sets it. Not covered here: the MMCSS / thread-priority path (raise_priority) is not exercised by any test, and I ran no audio device. No game files, dumps, shader names, or retail hashes.

AI disclosure: this verification was done by Claude Code (Claude Sonnet 5.5).

**@⁠oni-swr** on GitHub · 2026-11-25 20:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7174446505) **WARP/CPU verification of head `b9bf1b6afa2b18811ed8e3141432245cead0a808`** **Environment:** Windows 11 x64, rustc/cargo 1.98.1, WARP/CPU only (VICTORY_WARP=1, VICTORY_D3D12_WARP=1), no physical GPU, no game files. DXIL validation with Windows SDK 10.0.26100.0 x64 dxil.dll 1.8.2502.11. PR head merged cleanly onto origin/main 13f91caee25f2fdf2c062be5f7a27f058e51cbca. **Tests (`cargo test --no-fail-fast -p victory-hle`)** - `origin/main` baseline: lib 146 passed, plus `fidelityfx` 1 and `no_dll_planting` 1; 0 failed. - With this PR: lib 148 passed, `fidelityfx` 1, `no_dll_planting` 1; 0 failed (+2: `read_advance_does_not_wait_for_decoding`, `a_voice_that_ran_out_resumes_on_new_input`). The two new tests passed on 5 consecutive extra runs (no flakiness seen). **Negative control** (each applied alone, then reverted) - `advance_read` also takes the voice lock (the old behaviour): `read_advance_does_not_wait_for_decoding` fails (after its 5 s timeout), the other test passes. - Ended voice never resumes: `a_voice_that_ran_out_resumes_on_new_input` fails, the other passes. **Lint:** `cargo clippy --all-targets -- -D warnings` clean. `cargo fmt --check`: no new hunks (`audio.rs` 3 on main, 2 with the PR). Note: `cargo fmt --check` is already red on `origin/main` here (891 hunks, none from these PRs), so I compared per-file hunk counts against that baseline. **Review:** read the full diff. The split into a `voice` lock (held per block) and a `ring` lock (taken after it, never during a decode) is consistent, and the lock order is respected in `disable` and `fill_block`; reading "writable" without the ring lock is sound because only the decoder clears it and the read-advance only sets it. Not covered here: the MMCSS / thread-priority path (`raise_priority`) is not exercised by any test, and I ran no audio device. No game files, dumps, shader names, or retail hashes. AI disclosure: this verification was done by Claude Code (Claude Sonnet 5.5).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 21:05 UTC · original

Reviewed and tested b9bf1b6a on Windows 11 (rustc 1.98.1 MSVC) against main (13f91ca).

Concurrency bug found in fill_block (audio.rs:588-599): empty ring can be marked full and permanently stall a voice

In commit b15cc7a (Slot { voice, ring }), fill_block publishes the updated write block before acquiring ring:

context.set_field(0, 27, 5, write); // line 589: unlocked
let _ring = lock(ring);             // line 591
if write == context.field(9, 0, 5) % size {
    context.set_field(1, 31, 1, 0); // marks ring full
}

If the mixer thread consumes that newly written block between lines 589 and 591 and calls advance_read, advance_read moves read forward to equal write (leaving the ring empty) and sets writable = 1. When fill_block then acquires ring at line 591, it observes write == read and clears writable = 0, marking an empty ring as full and stalling the voice indefinitely (the mixer sees read == write so it will never issue another ADVANCE_XMA_READ).

Moving let _ring = lock(ring); just above line 589 (still after decode(), so mixer advance_read still never blocks on decoding) closes that window completely.

Minor note on commit b9bf1b6 (resuming ended voices, audio.rs:605-618)

When an ended voice resumes on new valid input, voice.ended and voice.decoder are reset, but any leftover partial-block samples in voice.pcm (< 128) or unconsumed voice.skip from the previous stream are kept instead of cleared/re-read from word 1[26:24]. Worth double-checking whether a resumed voice should start with a fresh pcm/skip.

Verification & merge compatibility

  • cargo test --locked -p victory-hle (3 consecutive runs): 3/3 passed (148 passed, 0 failed unit + fidelityfx + no_dll_planting, including both new tests).
  • cargo clippy --locked -p victory-hle --all-targets -- -D warnings (default & --features diagnostics): 0 warnings; cargo xtask policy: 184 files ok.
  • Merge-tree: clean vs 13f91ca, #2708, #2714; conflicts in audio.rs with #2709 and #2710.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 21:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7174596102) Reviewed and tested `b9bf1b6a` on Windows 11 (`rustc 1.98.1` MSVC) against `main` (`13f91ca`). ### Concurrency bug found in `fill_block` (`audio.rs:588-599`): empty ring can be marked full and permanently stall a voice In commit `b15cc7a` (`Slot { voice, ring }`), `fill_block` publishes the updated `write` block *before* acquiring `ring`: ```rust context.set_field(0, 27, 5, write); // line 589: unlocked let _ring = lock(ring); // line 591 if write == context.field(9, 0, 5) % size { context.set_field(1, 31, 1, 0); // marks ring full } ``` If the mixer thread consumes that newly written block between lines 589 and 591 and calls `advance_read`, `advance_read` moves `read` forward to equal `write` (leaving the ring **empty**) and sets `writable = 1`. When `fill_block` then acquires `ring` at line 591, it observes `write == read` and clears `writable = 0`, marking an **empty** ring as full and stalling the voice indefinitely (the mixer sees `read == write` so it will never issue another `ADVANCE_XMA_READ`). Moving `let _ring = lock(ring);` just above line 589 (still after `decode()`, so mixer `advance_read` still never blocks on decoding) closes that window completely. ### Minor note on commit `b9bf1b6` (resuming ended voices, `audio.rs:605-618`) When an ended voice resumes on new valid input, `voice.ended` and `voice.decoder` are reset, but any leftover partial-block samples in `voice.pcm` (`< 128`) or unconsumed `voice.skip` from the previous stream are kept instead of cleared/re-read from `word 1[26:24]`. Worth double-checking whether a resumed voice should start with a fresh `pcm`/`skip`. ### Verification & merge compatibility - `cargo test --locked -p victory-hle` (3 consecutive runs): **3/3 passed** (`148 passed, 0 failed` unit + `fidelityfx` + `no_dll_planting`, including both new tests). - `cargo clippy --locked -p victory-hle --all-targets -- -D warnings` (default & `--features diagnostics`): **0 warnings**; `cargo xtask policy`: **184 files ok**. - Merge-tree: clean vs `13f91ca`, `#2708`, `#2714`; conflicts in `audio.rs` with `#2709` and `#2710`.
Author
Owner

@⁠0xkn0wh3r3 on GitHub · 2026-11-25 21:35 UTC · original

@⁠fuzeofficlal thanks, that window is real. Fixed in 36d80c3: fill_block now takes the ring lock before it moves the write block, still after the decode, so a read-advance still never waits for decoding. A read-advance can't land between publishing the block and the full check any more.

On the resumed voice:

  • Samples in pcm: what's left there is the ended stream's flushed tail, which would have played had the title refilled in time, so it's kept.
  • skip: a leftover skip can only survive a stream that ended before its first frames were decoded. Re-reading word 1[26:24] on resume would treat a late refill as a new stream start. I don't know which the hardware does, so it's unchanged.

cargo test -p victory-hle (148 lib, including both new tests), clippy and policy pass. @⁠oni-swr @⁠kotekompotek thanks for the WARP run, the negative controls and the review.

**@⁠0xkn0wh3r3** on GitHub · 2026-11-25 21:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7175288585) @⁠fuzeofficlal thanks, that window is real. Fixed in 36d80c3: `fill_block` now takes the ring lock before it moves the write block, still after the decode, so a read-advance still never waits for decoding. A read-advance can't land between publishing the block and the full check any more. On the resumed voice: - **Samples in `pcm`:** what's left there is the ended stream's flushed tail, which would have played had the title refilled in time, so it's kept. - **`skip`:** a leftover skip can only survive a stream that ended before its first frames were decoded. Re-reading word 1[26:24] on resume would treat a late refill as a new stream start. I don't know which the hardware does, so it's unchanged. `cargo test -p victory-hle` (148 lib, including both new tests), clippy and policy pass. @⁠oni-swr @⁠kotekompotek thanks for the WARP run, the negative controls and the review.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 23:20 UTC · original · edited 2026-11-26 02:19 UTC

Automated triage for the maintainers.

Merge candidate (recommending a look, not an approval). Thanks for dropping commit 3: the diff since the last review (6b73b07..2314c24) only removes the resume-an-ended-voice path (Voice::new, resumes, the word-2 reset), so decode behaves as on main for ended voices and that case is left to #1880. What remains in crates/victory-hle/src/modules/audio.rs: the per-context lock split (Slot with voice and ring; advance_read takes only ring, pump holds voice one block at a time, lock order voice then ring), with read_advance_does_not_wait_for_decoding covering it, and raise_priority registering the decoder thread with MMCSS "Pro Audio" and falling back to time-critical/highest, which changes host scheduling only. No Cargo.toml change. It merges cleanly and CI check is passing. Only one of this and #1880's priority change should land.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 23:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7177437661) · edited 2026-11-26 02:19 UTC <!-- victory-triage v1 head=2314c2490616e561056bc6f2d2b28bbe91279dcf verdict=merge-candidate at=2026-11-26T02:19:25Z --> Automated triage for the maintainers. **Merge candidate** (recommending a look, not an approval). Thanks for dropping commit 3: the diff since the last review (`6b73b07`..`2314c24`) only removes the resume-an-ended-voice path (`Voice::new`, `resumes`, the word-2 reset), so `decode` behaves as on `main` for ended voices and that case is left to #1880. What remains in `crates/victory-hle/src/modules/audio.rs`: the per-context lock split (`Slot` with `voice` and `ring`; `advance_read` takes only `ring`, `pump` holds `voice` one block at a time, lock order voice then ring), with `read_advance_does_not_wait_for_decoding` covering it, and `raise_priority` registering the decoder thread with MMCSS "Pro Audio" and falling back to time-critical/highest, which changes host scheduling only. No Cargo.toml change. It merges cleanly and CI `check` is passing. Only one of this and #1880's priority change should land. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠0xkn0wh3r3 on GitHub · 2026-11-26 00:01 UTC · original

Thanks. Commit 3, resuming an ended voice, is reverted in 2314c249, and that case is left to #1880, which is now credited in the description. The PR is now the lock split and the decoding thread's scheduling only.

**@⁠0xkn0wh3r3** on GitHub · 2026-11-26 00:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7178309917) Thanks. Commit 3, resuming an ended voice, is reverted in 2314c249, and that case is left to #1880, which is now credited in the description. The PR is now the lock split and the decoding thread's scheduling only.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 03:50 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 new read_advance_does_not_wait_for_decoding).
  • 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).

**@⁠Dukestar69** on GitHub · 2026-11-26 03:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#pullrequestreview-6068306040) · **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 new `read_advance_does_not_wait_for_decoding`). - `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).
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 13:42 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 2314c24 (on its base 842b0cb).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo 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: 867 passed, 0 failed, 10 ignored.
  • The new tests ran and passed: read_advance_does_not_wait_for_decoding.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#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_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 13:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/2788#issuecomment-7193724978) 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 `2314c24` (on its base `842b0cb`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo 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`: **867 passed, 0 failed, 10 ignored**. - The new tests ran and passed: `read_advance_does_not_wait_for_decoding`. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#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_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2788/head:github-bot/gh-2788'
git switch 'github-bot/gh-2788'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2788'
git switch 'github-bot/gh-2788'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2788'
git switch 'github-bot/gh-2788'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2788'
git switch 'main'
git merge --squash 'github-bot/gh-2788'
git switch 'main'
git merge --ff-only 'github-bot/gh-2788'
git switch 'main'
git merge 'github-bot/gh-2788'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2788
No description provided.