Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2723"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HailLucifer666 on 2026-11-29T16:37:13Z.
Fixes #2356 and #2339
What it changes
On
v2026.11.29.01,XMemVirtualAllocenforcesTITLE_TOP_BITS = 37(128 GiB, required by the GPU by-address directory:victory_shader::emit::MEMORY_PAGES = 2^21 * 64 KiB). As empirically confirmed in #2356 (and #218), allocating above1 << 37causes green/flickering by-address shader read corruption. After D3D12, Streamline, pipeline caches, and smaller allocations fragment[4 GiB, 128 GiB), no contiguous 6.09 GiB (0x185c00000) VA hole remains for the title'sTileHeapplaceholder, causingVirtualAlloc2to fail withos error 8and crashSystem Init.Solves this strictly inside
< 1 << 37(zero 40-bit fallback, zero GPU directory corruption risk):constassertion tyingTITLE_TOP_BITS = 37to(1 << 21) * 64 KiB.address_ranges_for_size): allocations< 512 MiBsearch[4 GiB, 96 GiB)first; large arenas>= 512 MiBsearch[96 GiB, 128 GiB)first; both fall back to[4 GiB, 128 GiB)only if full.ADDRESS_32BITstays strictly in[0, u32::MAX].MEM_RESERVE | MEM_RESERVE_PLACEHOLDERslab (0 bytes RAM / 0 bytes commit) inside[96 GiB, 128 GiB)during earlyxmem::module()init — before D3D12/Streamline/caches load — and carves large placeholder requests viaVirtualFree(..., MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)if normalVirtualAlloc2fails.memory.rs): rate-limitedtracing::warn!+ABOVE_CEILINGcounter if a plausible 40-bit console address in[128 GiB, 1 TiB)ever reachesmemory.rs::possible().VirtualQueryExVA-map summary (largest free hole, region counts) logged on refusal;VICTORY_VA_BIFURCATION=0restores legacy flat[4 GiB, 128 GiB)search.How it was tested
cargo test -p victory-hle --lib modules::xmem::tests:: -- --test-threads=1→ 46 passed, 0 failed, 1 ignored (includes real 32-scatter + 6.09 GiBTileHeapplaceholder reservation strictly in[96 GiB, 128 GiB)).cargo test -p victory-gpu --lib memory::tests::above_ceiling→ 1 passed, 0 failed.cargo clippy -p victory-hle --lib --testsandcargo clippy -p victory-gpu --lib --tests→ exit 0, 0 new warnings inxmem.rs/memory.rs. (Pre-existingdiagnosticsfeature errors on829188e9untouched.)address_ranges_for_sizeverified red (exit 101) before restore.cargo testpassed for the crates it touches: yesChecked for overlap
829188e9forxmem/TITLE_TOP_BITS/TileHeap/#2356/#2339. Related: #2439 (xmem test parallelism fix, non-colliding; our tests run cleanly under--test-threads=1).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ags-filipe on 2026-11-29T20:54:56Z.
I was having this issue with the latest builds from today (4090) and your fix worked, no more instant crash at the beginning 😸
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HailLucifer666 on 2026-11-29T21:53:38Z.
Closing as superseded by upstream commit
f72cec77(XMem: keep 8 GiB of the title's window spare at start, give it back if the 6.5 GB heap is refused), which directly addresses the 6.5 GB heap refusal (os error 8 / +0x1e6c284) in xmem.rs.Pull request closed