Repository navigation
GPU/HLE: import committed physical-page sections in place for title memory (#1905) - #2494
nathanbzrr wants to merge 1 commit into
Conversation
ee6c082 to
e34b586
Compare
|
Automated triage for the maintainers. Thanks for the detailed write-up of the Win32/D3D12 findings. As it stands the PR is not mergeable, for these reasons:
What would change the verdict: split the work. First, a small PR with only the Generated by Claude Code |
e34b586 to
1a20686
Compare
|
Addressed the triage items at head
Verified on Windows MSVC (
|
|
First run on NVIDIA hardware, as far as I can see (the description and comments only mention WARP): RTX 4060 8 GB, driver 621.14, Windows 11 Pro 26300. Head
Suggestion: assert that the pair is a valid slot of AI-assisted (Claude) |
Addresses #1905.
Summary
Wires zero-reimport in-place physical-page section views directly into the runtime GPU title-memory page table (
crates/victory-gpu/src/memory.rs) andxmemphysical-page mappings (crates/victory-hle/src/modules/xmem.rs):crates/victory-hle/src/modules/xmem.rs:SEC_COMMITon Windows as on Wine (falling back toSEC_RESERVEfor multi-gigabyte reservations or ifSEC_COMMITfails).victory_gpu::title_memory_mapped) inxmem::mapand section closure (victory_gpu::title_memory_section_freed) inSection::drop, while leavingxmem::map's placeholder splitting unchanged (avoiding overlap with xmem: map a run of physical pages over several placeholders #76 / fix(hle): coalesce split placeholders when mapping physical pages #1224 /victory-hle(xmem): coalesce contiguous 64 KiBMapViewOfFile3runs and add lock-free VEH retry around split-and-remap #2425).crates/victory-gpu/src/memory.rs&crates/victory-gpu/src/watch.rs:ID3D12Device3::OpenExistingHeapFromFileMapping+CreatePlacedResource(ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER) and keeps one persistent raw(SRV, UAV)descriptor pair per view heap (Shared::rewrite).write_tableto[pair_slot, (page_va as u32).wrapping_sub(sec_offset as u32)](IN_PLACEowner), and trims/clears mappings onwatch::title_memory_remapped.VirtualProtectguard pages (PAGE_GUARD/PAGE_NOACCESS) update only the two-level GPU page table with 0 heap re-imports and 0 new resources.Empirical D3D12/Win32 notes and remap benchmarks remain in #1905.
Verification
cargo run -p xtask -- policy:191 files okcargo clippy --workspace --all-targets --locked -- -D warnings: 0 warningscargo clippy --workspace --all-targets --all-features --locked -- -D warnings: 0 warningscargo test -p victory-gpu --lib memory --locked: 22/22 passed (includingsection_views_resolve_offsets_and_aliases_in_placeandsection_views_survive_guards_and_remaps_with_one_import)VICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --lib memory --locked: 22/22 passed (0 D3D12 debug errors)cargo test -p victory-hle --lib xmem --locked: 15/15 passed (includinga_live_range_survives_a_guard_page_and_subrange_remaps)AI-assisted; synthetic tests only, no game files used.