[BUNDLE] XAsync, kernel, lifecycle and DirectStorage HLE: #114 #122 #247 #1098 #186 #373 #512 #451 #1080 #430 #577 #1238 #1363

Open
MamaLeVrai wants to merge 28 commits from upstream-pr/1363 into main
MamaLeVrai commented 2026-11-24 17:36:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T17:36:44Z.


One PR in place of 12. The HLE PRs on XAsync, the kernel module, window lifecycle and DirectStorage: call completion and cancel races, GetModuleFileName, relaunch and suspend, queued reads. Every head is merged unchanged onto main (70564ae, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below, so one run covers all of it.

What is inside

PR Author Head Title
#114 AndyLatimer 0b729de6e XAsync: run a failed call's cleanup without the completion lock
#122 Dufftwt d01b17070 XAsync: end the call that finished, not whatever call the block holds now
#247 Maraco91 5cff0007a XAsync: a new block where a result was left behind begins a call
#1098 BastienRodz 44ce06784 XAsync: canceling a call that already completed leaves it alone, as documented
#186 Maraco91 3c7d845b3 Kernel: a title image's file name that fits clears the last error
#373 marquezinii c000581df Kernel: GetModuleFileName of a title image into a null buffer
#512 Quat3rnion 829f77472 HLE: resolve ordinals on pseudo-module handles
#451 enzoduarte1 8ff871b71 HLE: keep fitted window dimensions positive
#1080 giusepperainone a7847a520 HLE: constrain the title before suspending it (window close never suspended)
#430 marquezinii 129d2897c DirectStorage: Close completes what was submitted
#577 DenRakEiw 40816378b dstorage: retain queued file references and validate null out pointers
#1238 Jitheswar 591932ac8 Grow DirectStorage BCPack intermediates as zlib inflates

Changes made while bundling

No merge conflicts. One change of mine, in its own commit: the test #512 adds passed a pointer written 1 as *const u8 to GetProcAddress, which clippy::manual_dangling_ptr rejects under -D warnings (#512's own CI run fails on it). It is now std::ptr::dangling::<u8>(), the same address (1). A second commit makes a flaky test race-free: factory_methods_reject_null_out_without_leaking (#577) counted all the lanes of the shared DirectStorage scheduler before and after a call while the other tests of the module create and close queues at the same time; with cargo test -p victory-hle dstorage it failed on every run here (3 of 3), and in the full workspace run only some of the time. It now creates its queue with a capacity no other test uses (0x5EED) and checks that no lane of that capacity exists afterwards (8 of 8 runs pass).

Rebuilt on the new main. The branch is the previous one with main merged in (no textual conflict), plus one line: main moved a DirectStorage request into QueuedRead, so a line of one of this bundle's PRs that counts page-destination jobs (job.request.options) merged cleanly but no longer compiled; it reads job.read.request.options now (a separate commit).

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 491 passed, 0 failed, 7 ignored (4 of 5 runs; the fifth failed in emit::memory_tests::title_memory_is_read_and_written_at_computed_addresses, a test of main in victory-shader that passes alone and that also failed once on two other trees here; main: 476 passed, 7 ignored)

The title was not run, so this says nothing about in-game effect. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/hle-async
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

To confirm that no component PR moved since this was built, compare each Head above with gh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.

If this lands

The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6587760195 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1363). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T17:36:44Z. --- **One PR in place of 12.** The HLE PRs on XAsync, the kernel module, window lifecycle and DirectStorage: call completion and cancel races, `GetModuleFileName`, relaunch and suspend, queued reads. Every head is merged unchanged onto `main` (`70564ae`, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR. The re-verification commands are below, so one run covers all of it. ## What is inside | PR | Author | Head | Title | |---|---|---|---| | #114 | AndyLatimer | `0b729de6e` | XAsync: run a failed call's cleanup without the completion lock | | #122 | Dufftwt | `d01b17070` | XAsync: end the call that finished, not whatever call the block holds now | | #247 | Maraco91 | `5cff0007a` | XAsync: a new block where a result was left behind begins a call | | #1098 | BastienRodz | `44ce06784` | XAsync: canceling a call that already completed leaves it alone, as documented | | #186 | Maraco91 | `3c7d845b3` | Kernel: a title image's file name that fits clears the last error | | #373 | marquezinii | `c000581df` | Kernel: GetModuleFileName of a title image into a null buffer | | #512 | Quat3rnion | `829f77472` | HLE: resolve ordinals on pseudo-module handles | | #451 | enzoduarte1 | `8ff871b71` | HLE: keep fitted window dimensions positive | | #1080 | giusepperainone | `a7847a520` | HLE: constrain the title before suspending it (window close never suspended) | | #430 | marquezinii | `129d2897c` | DirectStorage: Close completes what was submitted | | #577 | DenRakEiw | `40816378b` | dstorage: retain queued file references and validate null out pointers | | #1238 | Jitheswar | `591932ac8` | Grow DirectStorage BCPack intermediates as zlib inflates | ## Changes made while bundling No merge conflicts. One change of mine, in its own commit: the test #512 adds passed a pointer written `1 as *const u8` to `GetProcAddress`, which `clippy::manual_dangling_ptr` rejects under `-D warnings` (#512's own CI run fails on it). It is now `std::ptr::dangling::<u8>()`, the same address (1). A second commit makes a flaky test race-free: `factory_methods_reject_null_out_without_leaking` (#577) counted all the lanes of the shared DirectStorage scheduler before and after a call while the other tests of the module create and close queues at the same time; with `cargo test -p victory-hle dstorage` it failed on every run here (3 of 3), and in the full workspace run only some of the time. It now creates its queue with a capacity no other test uses (`0x5EED`) and checks that no lane of that capacity exists afterwards (8 of 8 runs pass). **Rebuilt on the new `main`.** The branch is the previous one with `main` merged in (no textual conflict), plus one line: `main` moved a DirectStorage request into `QueuedRead`, so a line of one of this bundle's PRs that counts page-destination jobs (`job.request.options`) merged cleanly but no longer compiled; it reads `job.read.request.options` now (a separate commit). ## Verification Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 491 passed, 0 failed, 7 ignored (4 of 5 runs; the fifth failed in `emit::memory_tests::title_memory_is_read_and_written_at_computed_addresses`, a test of `main` in `victory-shader` that passes alone and that also failed once on two other trees here; `main`: 476 passed, 7 ignored) | The title was not run, so this says nothing about in-game effect. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/hle-async git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` To confirm that no component PR moved since this was built, compare each `Head` above with `gh pr view <n> --repo Marvisak/VIctory --json headRefOid`. If one differs, the branch needs a rebuild: merge the new head in the same order. ## If this lands The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot commented 2026-11-24 18:04:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T17:36:53Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:Marvisak/VIctory:review:6044307846 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1363#pullrequestreview-6044307846). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-24T17:36:53Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
sinan-cmyk commented 2026-11-24 19:04:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-24T18:45:23Z.


Runtime boot check on real hardware with a retail dump

Result: no difference from main in this test.

I merged head 490668a onto main ffe310e (clean merge), built it (release), and ran victory run <title exe> --execute with an empty data folder for 100 s, without any input. I compared the run with main built and run the same way.

main ffe310e this PR
Reaches the first-boot screens yes yes
Caption at 100 s (one sample) 30 fps, 12 draws/frame 30 fps, 12 draws/frame
Frames presented 2,048 2,048
crashes.log entries 0 0
Committed memory 11.1 GB 11.1 GB

Warnings: 7, the same kinds and counts as on main. 0 errors.

Limits. Without input, the title stays on the first-boot screens. This run does not exercise saves, the intro video, the start screen, loading or the world. It shows only that the change does not break startup or the first menus on this machine. I did not run the PR's tests.

Machine: Ryzen 7 7800X3D, RTX 4070 SUPER, Windows 11 25H2, game 1.0.2.1. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7141106861 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1363#issuecomment-7141106861). Originally posted by [sinan-cmyk](https://github.com/sinan-cmyk) on 2026-11-24T18:45:23Z. --- ### Runtime boot check on real hardware with a retail dump **Result: no difference from `main` in this test.** I merged head 490668a onto `main` ffe310e (clean merge), built it (release), and ran `victory run <title exe> --execute` with an empty data folder for 100 s, without any input. I compared the run with `main` built and run the same way. | | `main` ffe310e | this PR | |---|---|---| | Reaches the first-boot screens | yes | yes | | Caption at 100 s (one sample) | 30 fps, 12 draws/frame | 30 fps, 12 draws/frame | | Frames presented | 2,048 | 2,048 | | `crashes.log` entries | 0 | 0 | | Committed memory | 11.1 GB | 11.1 GB | **Warnings:** 7, the same kinds and counts as on `main`. 0 errors. **Limits.** Without input, the title stays on the first-boot screens. This run does not exercise saves, the intro video, the start screen, loading or the world. It shows only that the change does not break startup or the first menus on this machine. I did not run the PR's tests. Machine: Ryzen 7 7800X3D, RTX 4070 SUPER, Windows 11 25H2, game 1.0.2.1. AI-assisted (Claude Code).
Marvisak commented 2026-11-25 02:05:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:24:13Z.


Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-hle/src/modules/xasync.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149508776 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1363#issuecomment-7149508776). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:24:13Z. --- <!-- victory-triage v1 head=8e6d0b71b6f94af6431df16abc055bd5daf9446a verdict=needs-rebase at=2026-11-25T01:24:12Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-hle/src/modules/xasync.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1363:upstream-pr/1363'
git switch 'upstream-pr/1363'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1363'
git switch 'upstream-pr/1363'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1363'
git switch 'upstream-pr/1363'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1363'
git switch 'main'
git merge --squash 'upstream-pr/1363'
git switch 'main'
git merge --ff-only 'upstream-pr/1363'
git switch 'main'
git merge 'upstream-pr/1363'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1363
No description provided.