HLE: report the host's commit headroom before the title starts #224
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!224
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-224"
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?
@WallasSCRIPTS on GitHub · 2026-11-24 01:35 UTC · original
WallasSCRIPTS:hle/startup-commit-headroom→main· +60 −3 · 3 files · 1 commits · openCompletes the startup check #23 asks for, on top of #51's failure message.
What
XMemAllocatePhysicalPagesreserves a pagefile-backed section, andmapcommits its view in oneVirtualAlloc. On its first boot the title asks for 99,776 64 KiB pages (6.1 GiB) in one call. When Windows cannot commit that, the mapping fails, the title gets a null back, and it stops on a breakpoint that reads like a title crash.#51 now names the limit when the commit fails. This adds the check that runs before it:
xmem::commit_headroom()readsK32GetPerformanceInfoand returns what Windows can still commit and the commit limit, in bytes.victory runprints both in the startup block, next to the 6.1 GiB the first boot asks for, and adds a second line when the headroom is short of it.Since bug reports paste the startup block, every one of them now carries the host's commit state beside the build hash and the console mode.
Verification
Windows 11 x64, AMD RX 7600, Rust 1.98.1 (the pinned toolchain).
cargo test --workspace: 265 passed, 0 failed, 4 ignored (264 before this change; the new test is invictory-hle).cargo clippy -p victory-hle -p victory --all-targets: clean.rustfmt --edition 2024 --checkon both touched files: clean.One honest gap: this host has no title dump, so I could not run
victory runagainst the game. The line prints after binding and before the title starts, so seeing it needs a real run; the numbers behind it are covered bycommit_headroom_is_within_the_limit.Note
The
PERFORMANCE_INFORMATIONinitializer incommitis fixed here as clippy asks (field assignment outsideDefault::default()), since it is the same struct and its warning was the crate's only one. Say the word if you would rather keep that out of this PR.@jeremygold02 on GitHub · 2026-11-24 05:22 UTC · original
Thanks @WallasSCRIPTS for reporting host commit headroom before the title starts.
I tested commit
b87a9682e3462491bed43e99d91fcc51b39ba7a9with:The targeted HLE test passed (1 passed, 0 failed; 86 filtered).
commit_headroom_is_within_the_limitverifies that the host query returns a nonzero commit limit and that available commit does not exceed that limit. The app compile check succeeded and includes the startupreport_commitpath.There is no test here for the printed values or the low-headroom warning branch, and I did not launch a title.
@BaggyALPHA on GitHub · 2026-11-24 15:27 UTC · original
Live startup verification on
b87a968, title v1.0.2.1, using the diagnostics profile and WARP. The commit line printed in the startup block in both Series X and Series S modes.One mode-specific mismatch showed up. The preflight says “first boot asks 6.1 GiB” in both modes, but the corresponding large physical-page request was 99,776 × 64 KiB (6.1 GiB) in Series X mode and 63,632 × 64 KiB (3.9 GiB) in Series S mode. The cutoff uses the same constant, so Series S can receive the short-headroom warning even when that particular mapping fits.
Could the reference size use the selected console mode, or be labeled explicitly as a Series X example? I'd also keep it clear that this describes one mapping. Overall startup can commit more memory. I verified the normal startup line and did not force the low-headroom branch.
AI-assisted test execution and write-up (OpenAI Codex).
@Marvisak on GitHub · 2026-11-25 00:21 UTC · original · edited 2026-11-25 18:18 UTC
Automated triage for the maintainers.
Needs rebase.
mainhas moved, and this branch now conflicts with it inREADME.md. It will be reviewed again once it is rebased.The points from the earlier review still apply.
FIRST_BOOT_BYTESinapps/victory/src/run.rsis the Series X figure. In Series S mode the same request is 63,632 × 64 KiB (3.9 GiB), so the size should come fromvictory_hle::console::current(), or the line should be labelled as the Series X case. The README sentence should match, and say it is one mapping.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.