HLE: write decoded Opus samples through unaligned output buffers #1214
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!1214
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1214/head"
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?
@divyeshganta on GitHub · 2026-11-24 16:26 UTC · original
divyeshganta:codex/hle-apu-unaligned-output-ub→main· +165 −11 · 1 files · 1 commits · merged 2026-11-25 00:17 UTCFixes #839.
XApuEnqueueCommandreceives a packed process command whose output is a byte pointer with no 4-byte alignment guarantee. The decoder now writes sample bytes through au8slice, preserving interleaved and deinterleaved layouts without constructing a potentially misaligned&mut [f32]. Zero-frame requests skip slice construction.Also reject invalid channel counts before constructing the Opus decoder, and free the connection allocation if optional result-event creation fails.
Patch by AndyLatimer, carried from commit
13df0dad39c78af7c6479116cc185ab22ce44f05.The branch adds synthetic tests for unaligned output, both stereo layouts, zero frames, invalid channels, and bit-for-bit parity. Independent Windows 10/11 reports on the source branch say the focused tests and
cargo test -p victory-hlepassed; Clippy with-D warningswas clean. I attemptedcargo test -p victory-hle --lockedlocally on this PR head after installing Rust 1.98.1, but compilation stopped before tests ran becauselink.exe(the MSVC linker) is unavailable in this environment. GitHub shows the workflow awaiting maintainer approval, so this PR has no check result yet. No game data used.@Zipettte on GitHub · 2026-11-24 17:59 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
643fc6d:cargo test -p victory-hlepasses, 96 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).