HLE: preserve non-S_OK success HRESULTs in xasync::finished #2402
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2402
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2402"
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?
@fuzeofficlal on GitHub · 2026-11-29 12:44 UTC · original
fuzeofficlal:fix/hle-xasync-finished-status→main· +54 −16 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCSummary
Ported from
Marvisak/VIctory#3132(52d69c7e24).xasync::finishedis documented to complete anAsyncBlockwith the caller-suppliedHRESULTand no payload, andXAsyncGetResultSizetreats nonnegative statuses such asS_FALSE(1) as valid completion codes. Previously,finishedmapped every nonnegative value toOk(Vec::new())infinished_with, whoseOP_BEGINhandler overwrote everyOkresult withS_OK(0), silently droppingS_FALSEand other positiveHRESULTcodes.Changes
finished_statusshared byfinishedandfinished_withincrates/victory-hle/src/modules/xasync.rssofinishedpreserveshrdirectly whilefinished_with(Ok(bytes))continues to complete withS_OK.modules::xasync::tests::finished_preserves_the_completion_statusverifyingS_FALSE, positiveHRESULT,S_OK, andE_ABORTacrossXAsyncGetStatus,XAsyncGetResultSize, andXAsyncGetResult.Verification
cargo test --locked -p victory-hle: all passing.cargo clippy --locked -p victory-hle --all-targets -- -D warningsand--all-features: 0 warnings.cargo xtask policy --staged: passed.@Dukestar69 on GitHub · 2026-11-29 12:46 UTC · original · approved these changes
Tested locally merged onto
main(829188e9).crates/victory-hle/src/modules/xasync.rs.cargo test -p victory-hle --lib xasyncpassed (32 passed; 0 failed, includingfinished_preserves_the_completion_statusanda_nonnegative_completion_still_returns_its_payload) with 0 warnings invictory-hle.Clean HRESULT preservation fix for non-
S_OKsuccess codes inxasync::finished. LGTM.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).