GPU/HLE: import committed physical-page sections in place for title memory (#1905) #2492

Open
nathanbzrr wants to merge 1 commit from upstream-pr/2494 into main
nathanbzrr commented 2026-11-25 14:48:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by nathanbzrr on 2026-11-25T14:48:41Z.


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) and xmem physical-page mappings (crates/victory-hle/src/modules/xmem.rs):

  • crates/victory-hle/src/modules/xmem.rs:
    • Commits physical-page sections up to 512 MiB (a raw buffer view's limit) whole with SEC_COMMIT on Windows as on Wine (falling back to SEC_RESERVE for multi-gigabyte reservations or if SEC_COMMIT fails).
    • Reports mapped committed section views (victory_gpu::title_memory_mapped) in xmem::map and section closure (victory_gpu::title_memory_section_freed) in Section::drop, while leaving xmem::map's placeholder splitting unchanged (avoiding overlap with #76 / #1224 / #2425).
  • crates/victory-gpu/src/memory.rs & crates/victory-gpu/src/watch.rs:
    • Imports each committed section handle once via ID3D12Device3::OpenExistingHeapFromFileMapping + CreatePlacedResource (ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER) and keeps one persistent raw (SRV, UAV) descriptor pair per view heap (Shared::rewrite).
    • Maps 64 KiB physical-page views in write_table to [pair_slot, (page_va as u32).wrapping_sub(sec_offset as u32)] (IN_PLACE owner), and trims/clears mappings on watch::title_memory_remapped.
    • Remaps, aliases, unmaps, and CPU VirtualProtect guard 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 ok
  • cargo clippy --workspace --all-targets --locked -- -D warnings: 0 warnings
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: 0 warnings
  • cargo test -p victory-gpu --lib memory --locked: 22/22 passed (including section_views_resolve_offsets_and_aliases_in_place and section_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 (including a_live_range_survives_a_guard_page_and_subrange_remaps)

AI-assisted; synthetic tests only, no game files used.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5493624918 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494). Originally posted by [nathanbzrr](https://github.com/nathanbzrr) on 2026-11-25T14:48:41Z. --- 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`) and `xmem` physical-page mappings (`crates/victory-hle/src/modules/xmem.rs`): - **`crates/victory-hle/src/modules/xmem.rs`**: - Commits physical-page sections up to 512 MiB (a raw buffer view's limit) whole with `SEC_COMMIT` on Windows as on Wine (falling back to `SEC_RESERVE` for multi-gigabyte reservations or if `SEC_COMMIT` fails). - Reports mapped committed section views (`victory_gpu::title_memory_mapped`) in `xmem::map` and section closure (`victory_gpu::title_memory_section_freed`) in `Section::drop`, while leaving `xmem::map`'s placeholder splitting unchanged (avoiding overlap with #76 / #1224 / #2425). - **`crates/victory-gpu/src/memory.rs` & `crates/victory-gpu/src/watch.rs`**: - Imports each committed section handle once via `ID3D12Device3::OpenExistingHeapFromFileMapping` + `CreatePlacedResource` (`ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER`) and keeps one persistent raw `(SRV, UAV)` descriptor pair per view heap (`Shared::rewrite`). - Maps 64 KiB physical-page views in `write_table` to `[pair_slot, (page_va as u32).wrapping_sub(sec_offset as u32)]` (`IN_PLACE` owner), and trims/clears mappings on `watch::title_memory_remapped`. - Remaps, aliases, unmaps, and CPU `VirtualProtect` guard 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 ok` - `cargo clippy --workspace --all-targets --locked -- -D warnings`: 0 warnings - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: 0 warnings - `cargo test -p victory-gpu --lib memory --locked`: 22/22 passed (including `section_views_resolve_offsets_and_aliases_in_place` and `section_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 (including `a_live_range_survives_a_guard_page_and_subrange_remaps`) AI-assisted; synthetic tests only, no game files used.
Marvisak commented 2026-11-26 07:01:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T06:15:58Z.


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:

  • The new module isn't used by the runtime. crates/victory-gpu/src/inplace.rs (about 2,900 lines) adds InplaceArena/InplaceContext, capability probes and a benchmark. Nothing in the GPU path calls it, and the new xmem::mapped_runs and xmem::allocate_committed_physical_pages have no callers outside tests. Merging it would add a large unused module, plus public API in victory-hle that exists only for it.
  • The design notes need to move out of the code. The module header and much of the PR body give the design rationale. The repo keeps docs and comments short, so this material fits better in the issue (#1905).
  • One change affects the live game. xmem::map now goes through the new prepare_placeholder split/coalesce path, which every physical-page mapping the title makes will use. That is a real behaviour change, and a 3,800-line prototype hides it. The PR also notes it overlaps #76, #1224 and #2425.

What would change the verdict: split the work. First, a small PR with only the prepare_placeholder fix to xmem::map, its unit tests, and evidence that it fixes a failure the title hits (for example, the VirtualFree error 87 from #1947 reproduced on an actual mapping sequence). Second, the arena itself, once it is wired into the GPU memory path, with the probes and benchmark left out or kept much smaller.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7184258139 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494#issuecomment-7184258139). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T06:15:58Z. --- <!-- victory-triage v1 head=e34b586eb85caf0c7bb896f1c32470a65c22a73e verdict=needs-work at=2026-11-26T06:16:00Z --> 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: - **The new module isn't used by the runtime.** `crates/victory-gpu/src/inplace.rs` (about 2,900 lines) adds `InplaceArena`/`InplaceContext`, capability probes and a benchmark. Nothing in the GPU path calls it, and the new `xmem::mapped_runs` and `xmem::allocate_committed_physical_pages` have no callers outside tests. Merging it would add a large unused module, plus public API in `victory-hle` that exists only for it. - **The design notes need to move out of the code.** The module header and much of the PR body give the design rationale. The repo keeps docs and comments short, so this material fits better in the issue (#1905). - **One change affects the live game.** `xmem::map` now goes through the new `prepare_placeholder` split/coalesce path, which every physical-page mapping the title makes will use. That is a real behaviour change, and a 3,800-line prototype hides it. The PR also notes it overlaps #76, #1224 and #2425. What would change the verdict: split the work. First, a small PR with only the `prepare_placeholder` fix to `xmem::map`, its unit tests, and evidence that it fixes a failure the title hits (for example, the `VirtualFree` error 87 from #1947 reproduced on an actual mapping sequence). Second, the arena itself, once it is wired into the GPU memory path, with the probes and benchmark left out or kept much smaller. --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync changed title from [PR #2494] GPU/HLE: zero-reimport in-place memory remap prototype over SEC_COMMIT sections (#1905) to [PR #2494] GPU/HLE: import committed physical-page sections in place for title memory (#1905) 2026-11-26 08:02:25 +00:00
nathanbzrr commented 2026-11-26 08:03:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by nathanbzrr on 2026-11-26T07:20:03Z.


Addressed the triage items at head 1a20686 (rebased on origin/main 63bcca4):

  1. Wired into the runtime GPU memory path (crates/victory-gpu/src/memory.rs, crates/victory-gpu/src/watch.rs, crates/victory-hle/src/modules/xmem.rs) and removed unused code/APIs:
    • Removed the standalone crates/victory-gpu/src/inplace.rs module (including InplaceArena, InplaceContext, capability probes, and benchmark) and removed the test-only public items in xmem.rs (PhysicalSection, MappedRun, mapped_runs, allocate_committed_physical_pages).
    • xmem::map and Section::drop now notify victory_gpu::title_memory_mapped and victory_gpu::title_memory_section_freed, and watch::title_memory_remapped updates memory::unmapped.
    • memory::Shared::rewrite imports each committed physical-page section once via OpenExistingHeapFromFileMapping + CreatePlacedResource (ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER), allocates one persistent raw (SRV, UAV) pair per view heap, and populates write_table with [pair_slot, (page_va as u32).wrapping_sub(sec_offset as u32)] (IN_PLACE owner).
  2. Removed the overlapping prepare_placeholder change in xmem::map:
    • Reverted xmem::map's placeholder coalescing back to main's implementation so it does not overlap #76, #1224, or #2425.
  3. Moved design notes out of the code and shortened the PR description:
    • Kept comments in memory.rs and xmem.rs and the PR body concise (referencing #1905 for the empirical D3D12 findings and benchmarks).

Verified on Windows MSVC (1a20686):

  • cargo run -p xtask -- policy: 191 files ok
  • cargo clippy --workspace --all-targets --locked -- -D warnings & --all-features: 0 warnings
  • cargo test -p victory-gpu --lib memory --locked: 22/22 passed
  • VICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --lib memory --locked: 22/22 passed
  • cargo test -p victory-hle --lib xmem --locked: 15/15 passed
<!-- greyfinch-sync:Marvisak/VIctory:comment:7185343795 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494#issuecomment-7185343795). Originally posted by [nathanbzrr](https://github.com/nathanbzrr) on 2026-11-26T07:20:03Z. --- Addressed the triage items at head `1a20686` (rebased on `origin/main` `63bcca4`): 1. **Wired into the runtime GPU memory path (`crates/victory-gpu/src/memory.rs`, `crates/victory-gpu/src/watch.rs`, `crates/victory-hle/src/modules/xmem.rs`) and removed unused code/APIs**: - Removed the standalone `crates/victory-gpu/src/inplace.rs` module (including `InplaceArena`, `InplaceContext`, capability probes, and benchmark) and removed the test-only public items in `xmem.rs` (`PhysicalSection`, `MappedRun`, `mapped_runs`, `allocate_committed_physical_pages`). - `xmem::map` and `Section::drop` now notify `victory_gpu::title_memory_mapped` and `victory_gpu::title_memory_section_freed`, and `watch::title_memory_remapped` updates `memory::unmapped`. - `memory::Shared::rewrite` imports each committed physical-page section once via `OpenExistingHeapFromFileMapping` + `CreatePlacedResource` (`ALLOW_UNORDERED_ACCESS | ALLOW_CROSS_ADAPTER`), allocates one persistent raw `(SRV, UAV)` pair per view heap, and populates `write_table` with `[pair_slot, (page_va as u32).wrapping_sub(sec_offset as u32)]` (`IN_PLACE` owner). 2. **Removed the overlapping `prepare_placeholder` change in `xmem::map`**: - Reverted `xmem::map`'s placeholder coalescing back to `main`'s implementation so it does not overlap #76, #1224, or #2425. 3. **Moved design notes out of the code and shortened the PR description**: - Kept comments in `memory.rs` and `xmem.rs` and the PR body concise (referencing #1905 for the empirical D3D12 findings and benchmarks). Verified on Windows MSVC (`1a20686`): - `cargo run -p xtask -- policy`: `191 files ok` - `cargo clippy --workspace --all-targets --locked -- -D warnings` & `--all-features`: 0 warnings - `cargo test -p victory-gpu --lib memory --locked`: 22/22 passed - `VICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics --lib memory --locked`: 22/22 passed - `cargo test -p victory-hle --lib xmem --locked`: 15/15 passed
potatoe0100 commented 2026-11-26 15:02:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by potatoe0100 on 2026-11-26T14:48:15Z.


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 1a20686 merged onto main 63bcca4, cargo test -p victory-gpu --lib --locked -- --test-threads=1. Synthetic only, no game files.

  • section_views_resolve_offsets_and_aliases_in_place: passes.
  • section_views_survive_guards_and_remaps_with_one_import: fails, but only on the test's heap-layout assumption. It stops at assert!(initial_pair >= 1 << 18) (memory.rs:1614). Before that, the GPU reads through the imported section (OpenExistingHeapFromFileMapping + placed buffer) return the right markers for all six pages, so the import works on this driver. NVIDIA caps the view heap at 1,000,000, so HostHeap::new takes the capped layout and pair() comes from the dynamic slots. Here the section's pair was slot 2. With that assert replaced by a print, the whole test passes (guard page, PAGE_NOACCESS, the remap into three pieces, one import).
  • Otherwise the same as main on this card: the 2 known capped-heap failures (#1835).

Suggestion: assert that the pair is a valid slot of heap() (for example initial_pair < views.count + views.dynamic and not the null pair) rather than >= 1 << 18, so the test holds on capped hosts.

AI-assisted (Claude)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7195352382 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494#issuecomment-7195352382). Originally posted by [potatoe0100](https://github.com/potatoe0100) on 2026-11-26T14:48:15Z. --- 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 `1a20686` merged onto `main` `63bcca4`, `cargo test -p victory-gpu --lib --locked -- --test-threads=1`. Synthetic only, no game files. - `section_views_resolve_offsets_and_aliases_in_place`: passes. - `section_views_survive_guards_and_remaps_with_one_import`: **fails, but only on the test's heap-layout assumption.** It stops at `assert!(initial_pair >= 1 << 18)` (memory.rs:1614). Before that, the GPU reads through the imported section (`OpenExistingHeapFromFileMapping` + placed buffer) return the right markers for all six pages, so the import works on this driver. NVIDIA caps the view heap at 1,000,000, so `HostHeap::new` takes the capped layout and `pair()` comes from the dynamic slots. Here the section's pair was slot **2**. With that assert replaced by a print, the whole test passes (guard page, `PAGE_NOACCESS`, the remap into three pieces, one import). - Otherwise the same as `main` on this card: the 2 known capped-heap failures (#1835). Suggestion: assert that the pair is a valid slot of `heap()` (for example `initial_pair < views.count + views.dynamic` and not the null pair) rather than `>= 1 << 18`, so the test holds on capped hosts. AI-assisted (Claude)
borosf commented 2026-11-27 07:21:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T07:21:29Z.


@nathanbzrr — I put a comparison of the three open in-place PRs in #880 (comment 7212390146): yours is the only one that is self-contained (no shadow.rs), and it is the one that makes a second CPU view of a title section possible, since it keeps the SEC_COMMIT section handle and its (at, len, size, offset).

That matters for a follow-up nobody has: the title's own stores into guarded memory still open a guard (~5 µs, one process-wide at a time; codec-d/cool_fox measures 590 write faults a frame, 69 ms of thread time → ~6 ms) by writing through a second, unguarded view instead. If you want that to stack on your PR, I'll write it as an increment on your head and keep your authorship — but only with your nod; otherwise ignore this and I'll verify the winner instead. No game data, synthetic only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7212392887 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494#issuecomment-7212392887). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T07:21:29Z. --- @nathanbzrr — I put a comparison of the three open in-place PRs in #880 (comment 7212390146): yours is the only one that is self-contained (no `shadow.rs`), and it is the one that makes a **second CPU view** of a title section possible, since it keeps the `SEC_COMMIT` section handle and its `(at, len, size, offset)`. That matters for a follow-up nobody has: the title's own stores into guarded memory still open a guard (~5 µs, one process-wide at a time; codec-d/cool_fox measures 590 write faults a frame, 69 ms of thread time → ~6 ms) by writing through a second, unguarded view instead. If you want that to stack on your PR, I'll write it as an increment on your head and keep your authorship — but only with your nod; otherwise ignore this and I'll verify the winner instead. No game data, synthetic only.
nathanbzrr commented 2026-11-27 07:33:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by nathanbzrr on 2026-11-27T07:33:58Z.


@nathanbzrr — I put a comparison of the three open in-place PRs in #880 (comment 7212390146): yours is the only one that is self-contained (no shadow.rs), and it is the one that makes a second CPU view of a title section possible, since it keeps the SEC_COMMIT section handle and its (at, len, size, offset).

That matters for a follow-up nobody has: the title's own stores into guarded memory still open a guard (~5 µs, one process-wide at a time; codec-d/cool_fox measures 590 write faults a frame, 69 ms of thread time → ~6 ms) by writing through a second, unguarded view instead. If you want that to stack on your PR, I'll write it as an increment on your head and keep your authorship — but only with your nod; otherwise ignore this and I'll verify the winner instead. No game data, synthetic only.

@borosf Sure, go ahead

<!-- greyfinch-sync:Marvisak/VIctory:comment:7212596737 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494#issuecomment-7212596737). Originally posted by [nathanbzrr](https://github.com/nathanbzrr) on 2026-11-27T07:33:58Z. --- > @nathanbzrr — I put a comparison of the three open in-place PRs in #880 (comment 7212390146): yours is the only one that is self-contained (no `shadow.rs`), and it is the one that makes a **second CPU view** of a title section possible, since it keeps the `SEC_COMMIT` section handle and its `(at, len, size, offset)`. > > That matters for a follow-up nobody has: the title's own stores into guarded memory still open a guard (~5 µs, one process-wide at a time; codec-d/cool_fox measures 590 write faults a frame, 69 ms of thread time → ~6 ms) by writing through a second, unguarded view instead. If you want that to stack on your PR, I'll write it as an increment on your head and keep your authorship — but only with your nod; otherwise ignore this and I'll verify the winner instead. No game data, synthetic only. @borosf Sure, go ahead
rpmaster2 commented 2026-11-27 08:21:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by rpmaster2 on 2026-11-27T08:21:47Z.


RDNA4 (RX 9070 XT, 32 GB) test of 1a20686 against main (63bcca4): copies drop 3-6x, total memory does not, black frames go up.

Setup: Radeon RX 9070 XT 16 GB, Adrenalin 26.11.2 (32.0.32029.2010), Ryzen 5 5600, 32 GB DDR4-3600, Windows 11 10.0.26100.9974. cargo build --locked --profile diag -p victory --features diagnostics, both builds from this repository, one dump, the same save. Series X, VICTORY_PRESENT_TARGET=1x1:1, scripted keys. Shader and pipeline caches warm; the driver's shader cache was emptied before the two runs and the machine rebooted, so both started from the same state.

Method: 300 s each, private bytes and page-file usage sampled every 20 s, control first and the PR second, nothing else on the machine.

main 63bcca4 this PR, 1a20686
private at 300 s 28.1 GB 28.9 GB
page file at 300 s 2.86 GB 2.87 GB
frame, settled 810-2,126 ms (0.5-1.2 fps) 936-985 ms (1.0-1.1 fps)
draws a frame 2,004-7,195 3,088-3,448
copies 137-492 ms, 465-994 MB 68-77 ms, 145-151 MB
copy back 104-142 ms 109-114 ms
on the GPU 211-270 ms 162-166 ms
black frames logged 5 28

What I take from it:

  • The in-place sections work as advertised for copies: 465-994 MB a frame becomes 145-151 MB, and the GPU time drops a little. No device loss, no D3D12 errors, and no crash in this run.
  • Total memory does not move. 28.9 against 28.1 GB private, the same page file. In this scene the copies were not what held the memory, so #880's memory argument needs a scene where they are: a smaller-card or lower-RAM case, or a longer session.
  • Black frames go up from 5 to 28, and the picture flickers grey/black on screen. In an earlier run (before the reboot, with the compiler in a stuck state) subtitles also drew on top of each other and the process exited after 140 s; I would not count that run, but the black frames reproduce here.
  • Neither build is playable on this card at 1 fps, and that is not this PR's doing: it lacks the input batching and copy work the AMD fork has. The comparison above is only about what this PR changes.

If it helps, I can repeat this pair with a smaller --console series-s and with VICTORY_D3D12_DEBUG=1 to see whether the black frames come with a D3D12 warning, and with a scene that is known to hold more title memory.

AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; commits, counts, timings and driver version only, no game files or paths.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7213454693 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2494#issuecomment-7213454693). Originally posted by [rpmaster2](https://github.com/rpmaster2) on 2026-11-27T08:21:47Z. --- **RDNA4 (RX 9070 XT, 32 GB) test of `1a20686` against `main` (`63bcca4`): copies drop 3-6x, total memory does not, black frames go up.** Setup: Radeon RX 9070 XT 16 GB, Adrenalin 26.11.2 (32.0.32029.2010), Ryzen 5 5600, 32 GB DDR4-3600, Windows 11 10.0.26100.9974. `cargo build --locked --profile diag -p victory --features diagnostics`, both builds from this repository, one dump, the same save. Series X, `VICTORY_PRESENT_TARGET=1x1:1`, scripted keys. Shader and pipeline caches warm; the driver's shader cache was emptied before the two runs and the machine rebooted, so both started from the same state. Method: 300 s each, private bytes and page-file usage sampled every 20 s, control first and the PR second, nothing else on the machine. | | `main` 63bcca4 | this PR, 1a20686 | |---|---|---| | private at 300 s | 28.1 GB | 28.9 GB | | page file at 300 s | 2.86 GB | 2.87 GB | | frame, settled | 810-2,126 ms (0.5-1.2 fps) | 936-985 ms (1.0-1.1 fps) | | draws a frame | 2,004-7,195 | 3,088-3,448 | | **copies** | 137-492 ms, **465-994 MB** | 68-77 ms, **145-151 MB** | | copy back | 104-142 ms | 109-114 ms | | on the GPU | 211-270 ms | 162-166 ms | | black frames logged | 5 | **28** | What I take from it: - The in-place sections work as advertised for copies: 465-994 MB a frame becomes 145-151 MB, and the GPU time drops a little. No device loss, no D3D12 errors, and no crash in this run. - **Total memory does not move.** 28.9 against 28.1 GB private, the same page file. In this scene the copies were not what held the memory, so #880's memory argument needs a scene where they are: a smaller-card or lower-RAM case, or a longer session. - **Black frames go up from 5 to 28**, and the picture flickers grey/black on screen. In an earlier run (before the reboot, with the compiler in a stuck state) subtitles also drew on top of each other and the process exited after 140 s; I would not count that run, but the black frames reproduce here. - Neither build is playable on this card at 1 fps, and that is not this PR's doing: it lacks the input batching and copy work the AMD fork has. The comparison above is only about what this PR changes. If it helps, I can repeat this pair with a smaller `--console series-s` and with `VICTORY_D3D12_DEBUG=1` to see whether the black frames come with a D3D12 warning, and with a scene that is known to hold more title memory. AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; commits, counts, timings and driver version only, no game files or paths.
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/2494:upstream-pr/2494'
git switch 'upstream-pr/2494'

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/2494'
git switch 'upstream-pr/2494'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2494'
git switch 'upstream-pr/2494'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2494'
git switch 'main'
git merge --squash 'upstream-pr/2494'
git switch 'main'
git merge --ff-only 'upstream-pr/2494'
git switch 'main'
git merge 'upstream-pr/2494'
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!2492
No description provided.