GPU: title memory in place instead of copied, opt-in (VICTORY_IN_PLACE=1; stacked on #2088, towards #880) #2110

Open
desplmfao wants to merge 36 commits from upstream-pr/2112 into main
desplmfao commented 2026-11-25 05:12:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T05:12:08Z.


Stacked on #2088, which is itself stacked on #402. The new commits are the last two here. This is a first, opt-in step towards #880 (reading title memory in place instead of copying it). It covers loose windows (memory outside every buffer object) and, since the third commit, title buffer objects.

Change

With VICTORY_IN_PLACE=1, a loose window is the title's memory itself. The allocation holding it is opened as a host heap with ID3D12Device3::OpenExistingHeapFromAddress (under vkd3d-proton that is VK_EXT_external_memory_host), and a buffer is placed at the window's offset. Nothing is copied to the host or back, and the window needs no page guards: every copy path of Shadow returns early for such a window.

  • Only the committed part of the window around the requested range, cut to 64 KiB (D3D12's placement granularity), is used. A range that isn't inside one committed allocation keeps the copy from #2088. Opening a heap has to start at the allocation's base; the buffer is placed at the window's offset in it.
  • watch::title_memory_remapped drops in-place windows and heaps over the remapped range, so a later lookup opens the new pages. Lists that still hold an old window keep its pinned pages until they are reset.
  • It's off by default, so nothing changes unless the variable is set.

Measured

RTX 5080, Linux, proton-cachyos 11.0, vkd3d-proton 3.2.0, main + #1849. Grand Theft Auto VI, Series X 1.0.2.1, from start into world loading:

loose windows at the same point of loading host memory
main (4 MiB copies) about 3.4 GB
#2088 (256 KiB copies) about 2.2 GB
this PR, VICTORY_IN_PLACE=1 79 MB (1,448 windows in place, none refused)

No device-removed errors or GPU faults in any of these runs. Before the patch above, a quick probe showed that process memory opens as a heap here for a plain VirtualAlloc, a write-watched one and a view of a section (also a second view of the same section). The GPU wrote to such memory, and the CPU read the result at the right offset.

Released title memory

Most of what goes in place (about 570 of 572 MB here) is private memory the title allocates and frees itself, partly through calls VIctory doesn't see. A heap opened over an allocation that is no longer the same (released, another size, or not all committed) is let go, together with the in-place windows and buffers in it. That's checked both when the heap would be reused and once per frame for all opened heaps. Test: a_heap_over_a_released_allocation_is_let_go. Known gap: an allocation that is released and made again at the same address with the same size can't be told apart. Under vkd3d-proton, the GPU would then read the old, still pinned pages: stale data, not someone else's memory. This is one reason the switch is opt-in.

Not measured / limits

  • Under Wine these runs stop at world entry: they hit my video-memory limit (driver memory, not these windows) or the title's watchdog freeze, the same as without this PR. So there are no in-world frames, no frame-time comparison, and no picture comparison yet.
  • Title buffer objects in place (third commit): a copy starts at the 64 KiB boundary at or below the buffer; views find their bytes by address, so the extra bytes in front are never read. Measured: 3,335 title buffers and 2,117 loose windows in place, none refused, no device errors.
  • Still copied: buffers over many separately mapped 64 KiB views (MEM_MAPPED, each its own allocation). Here that's 8 large buffers, 378 MB. One heap can't span them, and tile mappings into heaps opened over process memory weren't reliable under vkd3d-proton (a probe worked once, then not).
  • Not tested on Windows or on AMD.

Tested

  • Three new tests (the third, for released memory, is above): the_committed_part_of_a_window_holds_the_range_or_is_none (pure CPU, a reservation with a committed middle) and committed_memory_opens_as_a_buffer_in_place (GPU; skipped where the host can't open process memory as a heap).
  • cargo test -p victory-gpu -- --test-threads 1: 136 passed, 14 failed. Plain main fails the same 14 on this machine.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean for these files.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:5485577560 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T05:12:08Z. --- Stacked on #2088, which is itself stacked on #402. The new commits are the last two here. This is a first, opt-in step towards #880 (reading title memory in place instead of copying it). It covers loose windows (memory outside every buffer object) and, since the third commit, title buffer objects. ## Change With `VICTORY_IN_PLACE=1`, a loose window is the title's memory itself. The allocation holding it is opened as a host heap with `ID3D12Device3::OpenExistingHeapFromAddress` (under vkd3d-proton that is `VK_EXT_external_memory_host`), and a buffer is placed at the window's offset. Nothing is copied to the host or back, and the window needs no page guards: every copy path of `Shadow` returns early for such a window. - Only the committed part of the window around the requested range, cut to 64 KiB (D3D12's placement granularity), is used. A range that isn't inside one committed allocation keeps the copy from #2088. Opening a heap has to start at the allocation's base; the buffer is placed at the window's offset in it. - `watch::title_memory_remapped` drops in-place windows and heaps over the remapped range, so a later lookup opens the new pages. Lists that still hold an old window keep its pinned pages until they are reset. - It's off by default, so nothing changes unless the variable is set. ## Measured RTX 5080, Linux, proton-cachyos 11.0, vkd3d-proton 3.2.0, `main` + #1849. Grand Theft Auto VI, Series X 1.0.2.1, from start into world loading: | loose windows at the same point of loading | host memory | |---|---| | `main` (4 MiB copies) | about 3.4 GB | | #2088 (256 KiB copies) | about 2.2 GB | | this PR, `VICTORY_IN_PLACE=1` | **79 MB** (1,448 windows in place, none refused) | No device-removed errors or GPU faults in any of these runs. Before the patch above, a quick probe showed that process memory opens as a heap here for a plain `VirtualAlloc`, a write-watched one and a view of a section (also a second view of the same section). The GPU wrote to such memory, and the CPU read the result at the right offset. ## Released title memory Most of what goes in place (about 570 of 572 MB here) is private memory the title allocates and frees itself, partly through calls VIctory doesn't see. A heap opened over an allocation that is no longer the same (released, another size, or not all committed) is let go, together with the in-place windows and buffers in it. That's checked both when the heap would be reused and once per frame for all opened heaps. Test: `a_heap_over_a_released_allocation_is_let_go`. **Known gap:** an allocation that is released and made again at the same address with the same size can't be told apart. Under vkd3d-proton, the GPU would then read the old, still pinned pages: stale data, not someone else's memory. This is one reason the switch is opt-in. ## Not measured / limits - Under Wine these runs stop at world entry: they hit my video-memory limit (driver memory, not these windows) or the title's watchdog freeze, the same as without this PR. So there are no in-world frames, no frame-time comparison, and no picture comparison yet. - Title buffer objects in place (third commit): a copy starts at the 64 KiB boundary at or below the buffer; views find their bytes by address, so the extra bytes in front are never read. Measured: 3,335 title buffers and 2,117 loose windows in place, none refused, no device errors. - Still copied: buffers over many separately mapped 64 KiB views (`MEM_MAPPED`, each its own allocation). Here that's 8 large buffers, 378 MB. One heap can't span them, and tile mappings into heaps opened over process memory weren't reliable under vkd3d-proton (a probe worked once, then not). - Not tested on Windows or on AMD. ## Tested - Three new tests (the third, for released memory, is above): `the_committed_part_of_a_window_holds_the_range_or_is_none` (pure CPU, a reservation with a committed middle) and `committed_memory_opens_as_a_buffer_in_place` (GPU; skipped where the host can't open process memory as a heap). - `cargo test -p victory-gpu -- --test-threads 1`: 136 passed, 14 failed. Plain `main` fails the same 14 on this machine. - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean for these files. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DenRakEiw commented 2026-11-25 05:18:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T05:18:11Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-gpu --lib shadow:: — 10 passed, 0 failed
  • cargo clippy -p victory-gpu --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean opt-in VICTORY_IN_PLACE=1 loose title-memory mapping with remap tracking and solid shadow:: test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6052218381 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#pullrequestreview-6052218381). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T05:18:11Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-gpu --lib shadow::` — **10 passed, 0 failed** - `cargo clippy -p victory-gpu --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean opt-in `VICTORY_IN_PLACE=1` loose title-memory mapping with remap tracking and solid `shadow::` test coverage. Looks good. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 05:48:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T05:48:57Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Title memory in place instead of copied, opt-in via VICTORY_* env — zero-copy path behind a flag; risky default-off is right, needs Windows validation.

<!-- greyfinch-sync:Marvisak/VIctory:review:6052483627 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#pullrequestreview-6052483627). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T05:48:57Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Title memory in place instead of copied, opt-in via VICTORY_* env — zero-copy path behind a flag; risky default-off is right, needs Windows validation.
RKouchoo commented 2026-11-25 06:02:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by RKouchoo on 2026-11-25T05:29:21Z.


#2112 did map real game memory on Windows. In my last loading sample, 243 MiB used that path and 1.11 GiB still used copies. That sample took 2.8 seconds per frame.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7153823912 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7153823912). Originally posted by [RKouchoo](https://github.com/RKouchoo) on 2026-11-25T05:29:21Z. --- #2112 did map real game memory on Windows. In my last loading sample, 243 MiB used that path and 1.11 GiB still used copies. That sample took 2.8 seconds per frame.
yualk commented 2026-11-25 06:02:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by yualk on 2026-11-25T05:38:59Z.


Scoped native Windows result on RTX 5070 Ti 10de:2c05 (610.88) and explicit WARP 1414:008c. The #2112 allocation-base import and COMMON / ALLOW_CROSS_ADAPTER | ALLOW_UNORDERED_ACCESS 128 KiB placement at a 64 KiB offset worked for fully committed private memory, private MEM_WRITE_WATCH, and a fully committed view in an otherwise reserved pagefile section. GetResourceAllocationInfo required exactly 128 KiB/64 KiB. Two different 4,096-byte CPU patterns per class were read and XOR-written by a real root-UAV dispatch. Each fence completed; the CPU saw all exact words and all 258,048 surrounding canary bytes stayed unchanged. For the section, phase 2 wrote through a separate CPU view; both views received the correct GPU result. These were authored stable allocations held until the placed resource and heap died. No guest release, lifetime transplant, title, commit reduction or timing claim.

Separate hold on 1bcef8016a21: find holds BUFFERS and loose holds LOOSE when calling in_place_buffer. On a stale cached extent it calls let_go_in_place synchronously; that function takes both locks. Either caller can reenter its own lock. The current release test calls the helper directly, not these locked callers. This is a source-level finding, not a hung title repro. Consider separating stale detection from eviction/retry outside the caller locks, with a generation comparison on re-entry. Extent polling alone also cannot distinguish a same-address/same-size reuse. Keep the mode off pending ownership tests. AI-assisted; no title files or captures used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7153998798 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7153998798). Originally posted by [yualk](https://github.com/yualk) on 2026-11-25T05:38:59Z. --- Scoped native Windows result on RTX 5070 Ti `10de:2c05` (610.88) and explicit WARP `1414:008c`. The #2112 allocation-base import and `COMMON / ALLOW_CROSS_ADAPTER | ALLOW_UNORDERED_ACCESS` 128 KiB placement at a 64 KiB offset worked for fully committed private memory, private `MEM_WRITE_WATCH`, and a fully committed view in an otherwise reserved pagefile section. `GetResourceAllocationInfo` required exactly 128 KiB/64 KiB. Two different 4,096-byte CPU patterns per class were read and XOR-written by a real root-UAV dispatch. Each fence completed; the CPU saw all exact words and all 258,048 surrounding canary bytes stayed unchanged. For the section, phase 2 wrote through a separate CPU view; both views received the correct GPU result. These were authored stable allocations held until the placed resource and heap died. No guest release, lifetime transplant, title, commit reduction or timing claim. Separate hold on `1bcef8016a21`: [`find`](https://github.com/Marvisak/VIctory/blob/1bcef8016a21cd7e8d0adac5ef7a8f388f9b7f30/crates/victory-gpu/src/shadow.rs#L883-L909) holds `BUFFERS` and [`loose`](https://github.com/Marvisak/VIctory/blob/1bcef8016a21cd7e8d0adac5ef7a8f388f9b7f30/crates/victory-gpu/src/shadow.rs#L1198-L1219) holds `LOOSE` when calling `in_place_buffer`. On a stale cached extent it calls `let_go_in_place` synchronously; that function takes both locks. Either caller can reenter its own lock. The current release test calls the helper directly, not these locked callers. This is a source-level finding, not a hung title repro. Consider separating stale detection from eviction/retry outside the caller locks, with a generation comparison on re-entry. Extent polling alone also cannot distinguish a same-address/same-size reuse. Keep the mode off pending ownership tests. AI-assisted; no title files or captures used.
desplmfao commented 2026-11-25 06:02:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T05:22:42Z.


A note on why this is opt-in and untested in the world: on this machine I currently can't get into the world at all. On the RTX 5080 (16 GB) under Wine, every run fills video memory while the world loads, before the first world frame. That's mostly driver memory that grows while pipelines are created, not these copies, and it's what I'm working on next. So the missing world test is a limit of my setup, not something this PR has been seen to break.

Once the world loads here, I'll:

  • check the picture and frame time with VICTORY_IN_PLACE=1 against without it;
  • cover title memory that is released while an in-place heap is still open over it. Remaps are handled; a plain release isn't yet.
  • then propose making it the default.

Tests on a machine that already reaches the world (Windows or AMD in particular) would help a lot before that.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7153712303 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7153712303). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T05:22:42Z. --- A note on why this is opt-in and untested in the world: on this machine I currently can't get into the world at all. On the RTX 5080 (16 GB) under Wine, every run fills video memory while the world loads, before the first world frame. That's mostly driver memory that grows while pipelines are created, not these copies, and it's what I'm working on next. So the missing world test is a limit of my setup, not something this PR has been seen to break. Once the world loads here, I'll: - check the picture and frame time with `VICTORY_IN_PLACE=1` against without it; - cover title memory that is released while an in-place heap is still open over it. Remaps are handled; a plain release isn't yet. - then propose making it the default. Tests on a machine that already reaches the world (Windows or AMD in particular) would help a lot before that.
desplmfao commented 2026-11-25 06:02:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T05:41:53Z.


Update: CI on Windows showed that Windows doesn't release memory that a heap was opened over while that heap exists; Wine releases it at once. The test now accounts for that (1bcef80). For the title this means something too: on Windows, its own VirtualFree of such memory could fail while VIctory holds a heap over it. That's another reason to keep this opt-in until releases are seen and heaps let go first.

@RKouchoo thanks for the Windows sample (243 MiB in place, 1.11 GiB still copied, 2.8 s per frame). Two things would help:

  • the same point of loading without VICTORY_IN_PLACE, so the 2.8 s can be compared;
  • if your log has them, the reasons memory stayed copied. Here on Wine almost all of it went in place, so the share on Windows is much lower than I expected. Is it memory spread over several allocations (mapped views), or partly uncommitted?

@yualk thanks, both very useful. It's good to have the native Windows placements confirmed, and the reentrancy is a real bug: my release test called the helper directly, without the locks find and loose hold. Fixed in 97503f9: in_place_buffer now only drops a stale heap from the cache and queues it, and check_in_place lets go of its windows and buffers at the next frame, outside BUFFERS and LOOSE. The new test a_stale_heap_is_replaced_under_the_callers_locks calls it while holding both locks. Agreed on the rest: extent polling can't tell a same-address, same-size reuse apart, so the mode stays off until ownership is tracked properly (a generation per allocation, as you suggest).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154050899 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7154050899). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T05:41:53Z. --- **Update:** CI on Windows showed that Windows doesn't release memory that a heap was opened over while that heap exists; Wine releases it at once. The test now accounts for that (`1bcef80`). For the title this means something too: on Windows, its own `VirtualFree` of such memory could fail while VIctory holds a heap over it. That's another reason to keep this opt-in until releases are seen and heaps let go first. @RKouchoo thanks for the Windows sample (243 MiB in place, 1.11 GiB still copied, 2.8 s per frame). Two things would help: - the same point of loading without `VICTORY_IN_PLACE`, so the 2.8 s can be compared; - if your log has them, the reasons memory stayed copied. Here on Wine almost all of it went in place, so the share on Windows is much lower than I expected. Is it memory spread over several allocations (mapped views), or partly uncommitted? @yualk thanks, both very useful. It's good to have the native Windows placements confirmed, and the reentrancy is a real bug: my release test called the helper directly, without the locks `find` and `loose` hold. Fixed in `97503f9`: `in_place_buffer` now only drops a stale heap from the cache and queues it, and `check_in_place` lets go of its windows and buffers at the next frame, outside `BUFFERS` and `LOOSE`. The new test `a_stale_heap_is_replaced_under_the_callers_locks` calls it while holding both locks. Agreed on the rest: extent polling can't tell a same-address, same-size reuse apart, so the mode stays off until ownership is tracked properly (a generation per allocation, as you suggest).
desplmfao commented 2026-11-25 07:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T06:46:53Z.


World result, and it's not a gain yet on Linux/NVIDIA. With #2143 (code tables) I can now get into the world, so here's an A/B on the same build, with and without VICTORY_IN_PLACE=1. Grand Theft Auto VI in the world, RTX 5080, proton-cachyos 11.0, with #2153, #2099 and #2071 applied as well:

process memory in the world without with VICTORY_IN_PLACE=1
anonymous 4.9 GB 6.8 GB (+1.9)
GPU-mapped (host copies) 4.1 GB 2.7 GB (−1.4)
memfd (title memory) 4.5 GB 4.0 GB
RSS 13.5 GB 13.6 GB

In-place works as intended: every loose window and title buffer went in place, refused=0 in all six reasons, with no crash or corruption over several minutes in the world and the same frame time. But the copies it saves come back as anonymous memory. With in-place, 5.7 GB of the anonymous memory sits in 140 regions that are 100% resident.

The likely cause: OpenExistingHeapFromAddress has to start at the allocation base and covers the whole committed allocation. Importing that as host memory makes the driver pin every page of it, including committed pages the title never touched, which would otherwise take no memory on Linux. So for sparsely used allocations, opening the heap costs more than the copy it replaces.

Next, on this branch: before going in place, check how much of the allocation is already resident (QueryWorkingSetEx), and open the heap only for densely used allocations. Sparse ones keep the copy. I'll post the A/B again once that's in.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155150129 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7155150129). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T06:46:53Z. --- **World result, and it's not a gain yet on Linux/NVIDIA.** With #2143 (code tables) I can now get into the world, so here's an A/B on the same build, with and without `VICTORY_IN_PLACE=1`. Grand Theft Auto VI in the world, RTX 5080, proton-cachyos 11.0, with #2153, #2099 and #2071 applied as well: | process memory in the world | without | with `VICTORY_IN_PLACE=1` | |---|---|---| | anonymous | 4.9 GB | 6.8 GB (+1.9) | | GPU-mapped (host copies) | 4.1 GB | 2.7 GB (−1.4) | | memfd (title memory) | 4.5 GB | 4.0 GB | | RSS | 13.5 GB | 13.6 GB | In-place works as intended: every loose window and title buffer went in place, `refused=0` in all six reasons, with no crash or corruption over several minutes in the world and the same frame time. But the copies it saves come back as anonymous memory. With in-place, 5.7 GB of the anonymous memory sits in 140 regions that are 100% resident. The likely cause: `OpenExistingHeapFromAddress` has to start at the allocation base and covers the whole committed allocation. Importing that as host memory makes the driver pin every page of it, including committed pages the title never touched, which would otherwise take no memory on Linux. So for sparsely used allocations, opening the heap costs more than the copy it replaces. Next, on this branch: before going in place, check how much of the allocation is already resident (`QueryWorkingSetEx`), and open the heap only for densely used allocations. Sparse ones keep the copy. I'll post the A/B again once that's in.
desplmfao commented 2026-11-25 08:06:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T07:05:25Z.


Update: two changes for the residency problem from my last comment.

1. Density check (0ae1d5c, keyed per allocation in fcfecd1). With QueryWorkingSetEx, the two pools that held most buffers were far from resident:

allocation size pages resident
0xd89c00000 2.3 GB 10%
0xd40800000 1.2 GB 31%

Opening those whole pinned about 2.9 GB that the title had committed but never touched. A whole allocation now goes in place only if at least 90% of its pages are already resident (VICTORY_IN_PLACE_DENSITY changes the threshold). Sparse allocations keep their copies.

Same build, in the world, average of 9 samples per run:

density RSS anonymous GPU-mapped copies memfd in place
off (no in-place) 12.77 GB 5.03 3.95 3.70 none
90 12.84 GB 4.88 3.87 3.98 11,200 buffers, 729 windows
70 — — — — the GPU hung while the world loaded, and the title's watchdog ended the process; none of 8 other runs did

So on Linux this is now no worse than copies (anonymous memory stays where it is without in-place), but the gain is small. The buffers that matter live in the sparse pools. 70% matches what MrEjecutor saw in #880: putting more in place hangs the GPU.

2. Sub-range heaps where the host has them (fcfecd1, c79c031). If the device has ID3D12Device13, a buffer goes in place through OpenExistingHeapFromAddress1 over its own pages only, so nothing else of the allocation becomes resident and no density check is needed. The placed buffer holds its heap, so the heap goes away with the buffer (and with it on a remap). vkd3d-proton has no ID3D12Device13 (only the interface declaration in its IDL), so Linux keeps the whole-allocation path with the density check. That's also what Witredd measured on AMD/Windows in #880: shared memory grew by the whole 2.15 GiB on each heap opened, and they concluded the sub-range variant is needed. I can't run the Windows path here. The new test a_sub_range_heap_covers_only_the_buffer covers it and skips on hosts without ID3D12Device13. A Windows run with VICTORY_IN_PLACE=1 would be very welcome.

Tests on the RTX 5080 under Proton: victory-gpu 139 passed, 13 failed, the same 13 as main here. All in-place tests pass, including the new a_sparse_allocation_is_not_opened_whole. Clippy is clean. (fcfecd1 alone fails clippy over a missing safety comment; c79c031 fixes it.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155475955 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7155475955). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T07:05:25Z. --- **Update: two changes for the residency problem from my last comment.** **1. Density check (`0ae1d5c`, keyed per allocation in `fcfecd1`).** With `QueryWorkingSetEx`, the two pools that held most buffers were far from resident: | allocation | size | pages resident | |---|---|---| | `0xd89c00000` | 2.3 GB | 10% | | `0xd40800000` | 1.2 GB | 31% | Opening those whole pinned about 2.9 GB that the title had committed but never touched. A whole allocation now goes in place only if at least 90% of its pages are already resident (`VICTORY_IN_PLACE_DENSITY` changes the threshold). Sparse allocations keep their copies. Same build, in the world, average of 9 samples per run: | density | RSS | anonymous | GPU-mapped copies | memfd | in place | |---|---|---|---|---|---| | off (no in-place) | 12.77 GB | 5.03 | 3.95 | 3.70 | none | | 90 | 12.84 GB | 4.88 | 3.87 | 3.98 | 11,200 buffers, 729 windows | | 70 | — | — | — | — | the GPU hung while the world loaded, and the title's watchdog ended the process; none of 8 other runs did | So on Linux this is now no worse than copies (anonymous memory stays where it is without in-place), but the gain is small. The buffers that matter live in the sparse pools. 70% matches what MrEjecutor saw in #880: putting more in place hangs the GPU. **2. Sub-range heaps where the host has them (`fcfecd1`, `c79c031`).** If the device has `ID3D12Device13`, a buffer goes in place through `OpenExistingHeapFromAddress1` over its own pages only, so nothing else of the allocation becomes resident and no density check is needed. The placed buffer holds its heap, so the heap goes away with the buffer (and with it on a remap). vkd3d-proton has no `ID3D12Device13` (only the interface declaration in its IDL), so Linux keeps the whole-allocation path with the density check. That's also what Witredd measured on AMD/Windows in #880: shared memory grew by the whole 2.15 GiB on each heap opened, and they concluded the sub-range variant is needed. I can't run the Windows path here. The new test `a_sub_range_heap_covers_only_the_buffer` covers it and skips on hosts without `ID3D12Device13`. A Windows run with `VICTORY_IN_PLACE=1` would be very welcome. Tests on the RTX 5080 under Proton: `victory-gpu` 139 passed, 13 failed, the same 13 as `main` here. All in-place tests pass, including the new `a_sparse_allocation_is_not_opened_whole`. Clippy is clean. (`fcfecd1` alone fails clippy over a missing safety comment; `c79c031` fixes it.)
desplmfao commented 2026-11-25 08:06:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T07:19:05Z.


Correction to my last two comments here and on #407: I wrote that a 70% density threshold hung the GPU while the world loaded. That rested on one run. A later run without in-place (a different vkd3d build, cold pipeline cache) hung at the same point the same way: a long stall during world load until the title's watchdog ended the process. So the hang is intermittent at world load and isn't shown to come from in-place or the threshold. I've taken the claim out of the README (cd079af follows c79c031). The A/B numbers at 90% and the sub-range change stand.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155727025 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7155727025). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T07:19:05Z. --- **Correction to my last two comments here and on #407:** I wrote that a 70% density threshold hung the GPU while the world loaded. That rested on one run. A later run **without** in-place (a different vkd3d build, cold pipeline cache) hung at the same point the same way: a long stall during world load until the title's watchdog ended the process. So the hang is intermittent at world load and isn't shown to come from in-place or the threshold. I've taken the claim out of the README (`cd079af` follows `c79c031`). The A/B numbers at 90% and the sub-range change stand.
nathanbzrr commented 2026-11-25 09:06:20 +00:00 (Migrated from github.com)

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


Verified head cd079affdbb52b9a8b25ca63dc22751e18d49339 natively on Windows 11 x64 (10.0.26340) / AMD Radeon RX 7600 (ID3D12Device13, --features diagnostics + VICTORY_D3D12_DEBUG=1):

  • Default (VICTORY_IN_PLACE unset): shadow::tests 14/14 passed under D3D12 Debug Layer, including a_sub_range_heap_covers_only_the_buffer (ID3D12Device13::OpenExistingHeapFromAddress1 succeeds cleanly on RX 7600).
  • VICTORY_IN_PLACE=1 + VICTORY_D3D12_DEBUG=1: committed_memory_opens_as_a_buffer_in_place, a_sub_range_heap_covers_only_the_buffer, memory::tests (3/3), and bindless::tests (3/3) pass; the 3 existing copy-tracking shadow::tests fail as expected because in_place shadows bypass tracking/copy-back.

Live Repro & Blocking Findings (Confirming Why Mode Must Stay Opt-In)

  1. Live Repro — STALE_IN_PLACE over-evicts replacement heaps at the same base (shadow.rs:check_in_place / let_go_in_place):
    When Path B replaces a stale heap (base, S1) with a brand-new heap (base, S2) and queues (base, S1) in STALE_IN_PLACE, calling check_in_place() calls let_go_in_place(base, S1) which evicts by address overlap with no generation/heap-ID check — evicting the newly created valid heap S2 (stale_queue_does_not_evict_replacement_heap_at_same_base failed with survived=false).
  2. WDDM Pinning Blocks VirtualProtect & Placeholder Remaps (err=87):
    Measured directly on RX 7600 and WARP (#1905 probes): on Windows, while an OpenExistingHeapFromAddress heap is alive (both MEM_WRITE_WATCH and plain VirtualAlloc), VirtualProtect (PAGE_GUARD / PAGE_READONLY / PAGE_NOACCESS) and UnmapViewOfFile2(MEM_PRESERVE_PLACEHOLDER) fail with ERROR_INVALID_PARAMETER (87) until the ID3D12Heap is released.
  3. Source-level correctness & lifetime blockers before default-on:
    • GPU resource UAF (Shadow::refresh / gpu_writes): Early return skips list.keep(&self.buffer). Any unregister / let_go_in_place / Upload::drop before GPU completion drops the ID3D12Resource (and Path A's sole ID3D12Heap) while command lists hold raw GPU VAs (draw.rs:195,...).
    • Title RAM corruption (indirect::bound): Indirect clamping dispatches a compute shader writing directly to args.buffer (draw.rs:1588-1593), mutating live title RAM in place.
    • Path A (ID3D12Device13) gaps: Path A never records into IN_PLACE_HEAPS, making check_in_place() a no-op on Windows/RX 7600, and committed_part truncates hi to 4 KiB instead of 64 KiB (CreatePlacedResource buffer placement granularity).
    • Shadow coherency & missed safety: s0 = key.0 / 64KiB * 64KiB shifts alignment so structured views in for_view spill into tracked exact() copies on the same 64 KiB pages (remaining stale against GPU UAV writes), and withheld / missed protection (memory.rs:438) is bypassed when GPU writes directly into title RAM.

(Proposed / uncompiled fix directions:) add list.keep(&self.buffer) in Shadow::refresh/gpu_writes, align committed_part hi to 64 KiB, check info.Protect == PAGE_READWRITE, clear None entries in let_go_in_place, tag IN_PLACE_HEAPS with monotonic generation IDs, track Path A allocations/windows in check_in_place(), and route indirect::bound / exact() coherency safely.

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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157336488 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7157336488). Originally posted by [nathanbzrr](https://github.com/nathanbzrr) on 2026-11-25T08:40:48Z. --- Verified head `cd079affdbb52b9a8b25ca63dc22751e18d49339` natively on Windows 11 x64 (`10.0.26340`) / **AMD Radeon RX 7600** (`ID3D12Device13`, `--features diagnostics` + `VICTORY_D3D12_DEBUG=1`): - **Default (`VICTORY_IN_PLACE` unset):** `shadow::tests` **14/14 passed** under D3D12 Debug Layer, including `a_sub_range_heap_covers_only_the_buffer` (`ID3D12Device13::OpenExistingHeapFromAddress1` succeeds cleanly on RX 7600). - **`VICTORY_IN_PLACE=1` + `VICTORY_D3D12_DEBUG=1`:** `committed_memory_opens_as_a_buffer_in_place`, `a_sub_range_heap_covers_only_the_buffer`, `memory::tests` (**3/3**), and `bindless::tests` (**3/3**) pass; the 3 existing copy-tracking `shadow::tests` fail as expected because `in_place` shadows bypass tracking/copy-back. ### Live Repro & Blocking Findings (Confirming Why Mode Must Stay Opt-In) 1. **Live Repro — `STALE_IN_PLACE` over-evicts replacement heaps at the same base (`shadow.rs:check_in_place` / `let_go_in_place`):** When Path B replaces a stale heap `(base, S1)` with a brand-new heap `(base, S2)` and queues `(base, S1)` in `STALE_IN_PLACE`, calling `check_in_place()` calls `let_go_in_place(base, S1)` which evicts by address overlap with no generation/heap-ID check — **evicting the newly created valid heap `S2`** (`stale_queue_does_not_evict_replacement_heap_at_same_base` failed with `survived=false`). 2. **WDDM Pinning Blocks `VirtualProtect` & Placeholder Remaps (`err=87`):** Measured directly on RX 7600 and WARP (#1905 probes): on Windows, while an `OpenExistingHeapFromAddress` heap is alive (both `MEM_WRITE_WATCH` and plain `VirtualAlloc`), `VirtualProtect` (`PAGE_GUARD` / `PAGE_READONLY` / `PAGE_NOACCESS`) and `UnmapViewOfFile2(MEM_PRESERVE_PLACEHOLDER)` fail with `ERROR_INVALID_PARAMETER (87)` until the `ID3D12Heap` is released. 3. **Source-level correctness & lifetime blockers before default-on:** - **GPU resource UAF (`Shadow::refresh` / `gpu_writes`):** Early return skips `list.keep(&self.buffer)`. Any `unregister` / `let_go_in_place` / `Upload::drop` before GPU completion drops the `ID3D12Resource` (and Path A's sole `ID3D12Heap`) while command lists hold raw GPU VAs (`draw.rs:195,...`). - **Title RAM corruption (`indirect::bound`):** Indirect clamping dispatches a compute shader writing directly to `args.buffer` (`draw.rs:1588-1593`), mutating live title RAM in place. - **Path A (`ID3D12Device13`) gaps:** Path A never records into `IN_PLACE_HEAPS`, making `check_in_place()` a no-op on Windows/RX 7600, and `committed_part` truncates `hi` to 4 KiB instead of 64 KiB (`CreatePlacedResource` buffer placement granularity). - **Shadow coherency & `missed` safety:** `s0 = key.0 / 64KiB * 64KiB` shifts alignment so structured views in `for_view` spill into tracked `exact()` copies on the same 64 KiB pages (remaining stale against GPU UAV writes), and `withheld` / `missed` protection (`memory.rs:438`) is bypassed when GPU writes directly into title RAM. *(Proposed / uncompiled fix directions:)* add `list.keep(&self.buffer)` in `Shadow::refresh`/`gpu_writes`, align `committed_part` `hi` to 64 KiB, check `info.Protect == PAGE_READWRITE`, clear `None` entries in `let_go_in_place`, tag `IN_PLACE_HEAPS` with monotonic generation IDs, track Path A allocations/windows in `check_in_place()`, and route `indirect::bound` / `exact()` coherency safely. AI-assisted; synthetic tests only, no game files, dumps, or captures used.
desplmfao commented 2026-11-25 09:06:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T08:44:39Z.


@nathanbzrr thank you, this is a very useful review, and good to see both paths (whole allocation and OpenExistingHeapFromAddress1) pass on an RX 7600.

I agree with the blockers and I'm fixing them as new commits on this branch:

  1. Stale heap at the same base: let_go_in_place goes by address only, so a stale (base, S1) can evict the replacement (base, S2). Heaps get an identity, and only the queued heap and the shadows placed in it are let go. Your stale_queue_does_not_evict_replacement_heap_at_same_base becomes a test.
  2. Lifetime: the in-place early returns in refresh/gpu_writes skip list.keep, so a placed buffer (and its heap) can go while a recorded list still holds its GPU address. In-place shadows will be kept by the lists that use them.
  3. indirect::bound writing into title memory: when the arguments buffer is in place, the clamp will go to a copy instead.

I'm also checking the rest: Path A and check_in_place, committed_part's end granularity, coherence with exact() copies on the same pages, and withheld/missed. And it stays opt-in. The WDDM point (VirtualProtect and remaps failing while an opened heap lives) is a hard reason for that on Windows. I'll reply again with the commits and test results.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157415188 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7157415188). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T08:44:39Z. --- @nathanbzrr thank you, this is a very useful review, and good to see both paths (whole allocation and `OpenExistingHeapFromAddress1`) pass on an RX 7600. I agree with the blockers and I'm fixing them as new commits on this branch: 1. **Stale heap at the same base:** `let_go_in_place` goes by address only, so a stale `(base, S1)` can evict the replacement `(base, S2)`. Heaps get an identity, and only the queued heap and the shadows placed in it are let go. Your `stale_queue_does_not_evict_replacement_heap_at_same_base` becomes a test. 2. **Lifetime:** the in-place early returns in `refresh`/`gpu_writes` skip `list.keep`, so a placed buffer (and its heap) can go while a recorded list still holds its GPU address. In-place shadows will be kept by the lists that use them. 3. **`indirect::bound` writing into title memory:** when the arguments buffer is in place, the clamp will go to a copy instead. I'm also checking the rest: Path A and `check_in_place`, `committed_part`'s end granularity, coherence with `exact()` copies on the same pages, and `withheld`/`missed`. And it stays opt-in. The WDDM point (VirtualProtect and remaps failing while an opened heap lives) is a hard reason for that on Windows. I'll reply again with the commits and test results.
desplmfao commented 2026-11-25 10:07:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T09:28:08Z.


@nathanbzrr all four code findings were real, and they're fixed in new commits:

  • Stale queue over-evicting (9e723e8): every opened heap now has an id. The stale queue and the per-frame check let go of that heap and only what was placed in it, so a new heap at the same base and its buffers stay. Your test is in as stale_queue_does_not_evict_replacement_heap_at_same_base.
  • Use after free (2eb3aa8): refresh/gpu_writes on an in-place buffer now make the list keep the placed buffer until the list is reset. A placed resource holds its heap, so path A's heap lives as long. Test: a_list_keeps_the_in_place_buffers_it_uses.
  • Indirect clamp writing title memory (d25abb7): in-place arguments are copied on the GPU into a per-list buffer, then clamped and executed from there. It's a GPU copy, so it sees what the title's own passes wrote earlier in the same submission. Test: indirect::tests::records_in_place_are_clamped_in_a_copy.
  • Coherence (d6ada9b): writes through in-place buffers now mark their pages changed for every other tracker (small-buffer copies, exact() view copies, textures), as a copy-back does. Test: writes_in_place_mark_other_copies_of_the_page_changed.
  • 2a22bd4: one existing test left a heap cached that a later test tripped over once let-go went by id. Tests only.

On the rest:

  • Path A needs no cache entry. Its buffer holds its heap, unregister drops it, and remaps let go by address, which covers path A.
  • committed_part ending at 4 KiB isn't a correctness issue. Only the offset has to be 64 KiB aligned, and a runtime that refuses a short tail leaves the buffer on its copy.
  • withheld/missed can't apply in place, since the writes are already in title memory.

Together with the WDDM behaviour you measured, that's why the mode stays opt-in. On WDDM: a failing VirtualProtect is already tolerated (the page stays "changed" and is copied every time). The real blocker is the title releasing or remapping memory a heap is open over, and that needs heaps let go before the title releases, so VICTORY_IN_PLACE stays off by default.

Also pushed: fc37315, buffers under 1 MiB keep their copies in place mode (VICTORY_IN_PLACE_MIN_KB).

A correction to what I said earlier: vkd3d-proton 3.2.0 does expose ID3D12Device13. a_sub_range_heap_covers_only_the_buffer runs the sub-range path here instead of returning early. So the OpenExistingHeapFromAddress1 path is live on Linux too, not only on Windows.

Tested on RTX 5080, Linux, Proton with vkd3d-proton 3.2.0: cargo test -p victory-gpu --lib -- --test-threads 1 shadow:: indirect:: gives 23 passed, 0 failed. The full victory-gpu suite fails only tests that also fail on main on this machine. Clippy is clean with and without --features diagnostics.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158371955 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7158371955). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T09:28:08Z. --- @nathanbzrr all four code findings were real, and they're fixed in new commits: - **Stale queue over-evicting** (`9e723e8`): every opened heap now has an id. The stale queue and the per-frame check let go of that heap and only what was placed in it, so a new heap at the same base and its buffers stay. Your test is in as `stale_queue_does_not_evict_replacement_heap_at_same_base`. - **Use after free** (`2eb3aa8`): `refresh`/`gpu_writes` on an in-place buffer now make the list keep the placed buffer until the list is reset. A placed resource holds its heap, so path A's heap lives as long. Test: `a_list_keeps_the_in_place_buffers_it_uses`. - **Indirect clamp writing title memory** (`d25abb7`): in-place arguments are copied on the GPU into a per-list buffer, then clamped and executed from there. It's a GPU copy, so it sees what the title's own passes wrote earlier in the same submission. Test: `indirect::tests::records_in_place_are_clamped_in_a_copy`. - **Coherence** (`d6ada9b`): writes through in-place buffers now mark their pages changed for every other tracker (small-buffer copies, `exact()` view copies, textures), as a copy-back does. Test: `writes_in_place_mark_other_copies_of_the_page_changed`. - `2a22bd4`: one existing test left a heap cached that a later test tripped over once let-go went by id. Tests only. On the rest: - Path A needs no cache entry. Its buffer holds its heap, `unregister` drops it, and remaps let go by address, which covers path A. - `committed_part` ending at 4 KiB isn't a correctness issue. Only the offset has to be 64 KiB aligned, and a runtime that refuses a short tail leaves the buffer on its copy. - `withheld`/`missed` can't apply in place, since the writes are already in title memory. Together with the WDDM behaviour you measured, that's why the mode stays opt-in. On WDDM: a failing `VirtualProtect` is already tolerated (the page stays "changed" and is copied every time). The real blocker is the title releasing or remapping memory a heap is open over, and that needs heaps let go before the title releases, so `VICTORY_IN_PLACE` stays off by default. Also pushed: `fc37315`, buffers under 1 MiB keep their copies in place mode (`VICTORY_IN_PLACE_MIN_KB`). A correction to what I said earlier: vkd3d-proton 3.2.0 **does** expose `ID3D12Device13`. `a_sub_range_heap_covers_only_the_buffer` runs the sub-range path here instead of returning early. So the `OpenExistingHeapFromAddress1` path is live on Linux too, not only on Windows. Tested on RTX 5080, Linux, Proton with vkd3d-proton 3.2.0: `cargo test -p victory-gpu --lib -- --test-threads 1 shadow:: indirect::` gives 23 passed, 0 failed. The full `victory-gpu` suite fails only tests that also fail on `main` on this machine. Clippy is clean with and without `--features diagnostics`.
Marvisak commented 2026-11-25 11:05:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:42:25Z.


Automated triage for the maintainers.

The branch merges cleanly again (head ab2b7ef), so I reviewed it again. Needs work, and you've already said the same: it's a draft and parked.

  • Stacked: it still carries #402 and #2088 (e.g. 022e9c8, b670a33, 2f0590a, 6ebed99, none of them in main). It can only be judged on its own once those land and it's rebased.
  • Correctness with the switch on: your own A/B shows skinned characters breaking (stretched arms, a tilted NPC). The native Windows/NVIDIA run in the latest comment shows flat cutscenes, about half the draws, and frames going from about 0.7–2 s to 6–8 s. Almost all of that extra time is in watches: about 2.5× the bytes checked, at about 400× the time. So in-place memory still seems to go through watch page checking somewhere (shadow.rs, the in-place early returns vs. the watch/tracking paths, and the new memory::bind landed loop are where I'd look). This should be explained and fixed before the mode is offered, even opt-in.
  • Open from the review: an allocation released and made again at the same address and size still can't be told apart (no generation per allocation yet). And on Windows the title's own VirtualFree/VirtualProtect can fail while a heap is open over its memory.

In favour: it's off by default (VICTORY_IN_PLACE), the review findings (stale-heap identity, keep_once lifetime, coherence marking) were fixed with tests, and 0xKaji measured a real memory saving on a 16 GiB / 8 GB machine. What would change the verdict: the stack landing, plus the watch-cost and mid-write artifacts fixed and shown on a Windows run.

CI: passing (01:37 UTC run).


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160063457 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7160063457). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T10:42:25Z. --- <!-- victory-triage v1 head=ab2b7ef7a30ba575e32149a8a42ab4b874d98b2e verdict=needs-work at=2026-11-26T05:46:42Z --> Automated triage for the maintainers. The branch merges cleanly again (head `ab2b7ef`), so I reviewed it again. **Needs work**, and you've already said the same: it's a draft and parked. - **Stacked:** it still carries #402 and #2088 (e.g. `022e9c8`, `b670a33`, `2f0590a`, `6ebed99`, none of them in `main`). It can only be judged on its own once those land and it's rebased. - **Correctness with the switch on:** your own A/B shows skinned characters breaking (stretched arms, a tilted NPC). The native Windows/NVIDIA run in the latest comment shows flat cutscenes, about half the draws, and frames going from about 0.7–2 s to 6–8 s. Almost all of that extra time is in `watches`: about 2.5× the bytes checked, at about 400× the time. So in-place memory still seems to go through `watch` page checking somewhere (`shadow.rs`, the in-place early returns vs. the watch/tracking paths, and the new `memory::bind` `landed` loop are where I'd look). This should be explained and fixed before the mode is offered, even opt-in. - **Open from the review:** an allocation released and made again at the same address and size still can't be told apart (no generation per allocation yet). And on Windows the title's own `VirtualFree`/`VirtualProtect` can fail while a heap is open over its memory. In favour: it's off by default (`VICTORY_IN_PLACE`), the review findings (stale-heap identity, `keep_once` lifetime, coherence marking) were fixed with tests, and 0xKaji measured a real memory saving on a 16 GiB / 8 GB machine. What would change the verdict: the stack landing, plus the watch-cost and mid-write artifacts fixed and shown on a Windows run. CI: passing (01:37 UTC run). --- _Generated by [Claude Code](https://claude.ai/code)_
desplmfao commented 2026-11-25 11:05:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T10:51:17Z.


Thanks for the triage. I agree, and I've marked this as a draft until the following are done:

  1. Order: #2088 (and #402 with it) first. Then I'll rebase so the diff shows only the in-place work.
  2. Allocation ownership: a generation per allocation, so memory released and made again at the same address and size can't leave a heap reading stale pinned pages.
  3. A benefit shown: my Linux A/B at the 90% threshold showed no clear gain, and there's no in-world Windows A/B yet. I'll take it out of draft only with a Windows world run that shows one.

Until then it's parked. The review fixes stay in, since the mode is off by default.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160261381 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7160261381). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T10:51:17Z. --- Thanks for the triage. I agree, and I've marked this as a draft until the following are done: 1. **Order:** #2088 (and #402 with it) first. Then I'll rebase so the diff shows only the in-place work. 2. **Allocation ownership:** a generation per allocation, so memory released and made again at the same address and size can't leave a heap reading stale pinned pages. 3. **A benefit shown:** my Linux A/B at the 90% threshold showed no clear gain, and there's no in-world Windows A/B yet. I'll take it out of draft only with a Windows world run that shows one. Until then it's parked. The review fixes stay in, since the mode is off by default.
desplmfao commented 2026-11-25 16:09:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T15:26:24Z.


First in-title A/B of this PR with the switch on, on top of #2389 and our other open GPU fixes.

Setup: Grand Theft Auto VI Series X, the prison yard. RTX 5080 on Linux, Proton with vkd3d-proton 3.2.0. One exe, run without and with VICTORY_IN_PLACE=1. Medians of the last 10 frame lines after the pipeline queue emptied.

off VICTORY_IN_PLACE=1
ms per frame 933 (900–983) 817 (650–1,617)
preparing: copies 438 ms 331 ms
on the GPU 338 ms 331 ms
host copies of title memory 14,244 (5,458 MB) 15,565 (5,019 MB)
  • Copies drop by about 100 ms a frame (−25 %), with no extra video memory.
  • Only about 440 MB of the roughly 5.5 GB of host copies goes in place. vkd3d-proton logs Failed to allocate 65536/262144 bytes on memory type 3 for some imports, which then fall back to the copy. To see the reasons, 62d8f2f counts in diagnostics builds why a range stays copied (not committed, several allocations, offset, sparse, heap refused, placement refused) and logs it with the views status line.
  • Skinned characters break with the switch on. The player character's arm and several prisoners' arms are stretched into dark wedges, and one prisoner in the background is tilted about 45° instead of sitting. None of this shows in runs without the switch. Static geometry looks right. This looks like skinning data (bone matrices or skinned vertices) read in place while the title is already writing the next frame into the same memory; a copy gives each submission a consistent snapshot, in place doesn't. So with the switch on, buffers the title rewrites every frame shouldn't go in place, or they need to be read through a copy.

How it was found: A/B runs of one exe with the switch off and on, compared on the fps line's preparing/copies and host copies of title memory figures. The user judged the picture by eye.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7166844948 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7166844948). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T15:26:24Z. --- First in-title A/B of this PR with the switch on, on top of #2389 and our other open GPU fixes. **Setup:** Grand Theft Auto VI Series X, the prison yard. RTX 5080 on Linux, Proton with vkd3d-proton 3.2.0. One exe, run without and with `VICTORY_IN_PLACE=1`. Medians of the last 10 frame lines after the pipeline queue emptied. | | off | `VICTORY_IN_PLACE=1` | |---|---|---| | ms per frame | 933 (900–983) | **817** (650–1,617) | | preparing: copies | 438 ms | **331 ms** | | on the GPU | 338 ms | 331 ms | | host copies of title memory | 14,244 (5,458 MB) | 15,565 (5,019 MB) | - **Copies drop by about 100 ms a frame** (−25 %), with no extra video memory. - **Only about 440 MB of the roughly 5.5 GB of host copies goes in place.** vkd3d-proton logs `Failed to allocate 65536/262144 bytes on memory type 3` for some imports, which then fall back to the copy. To see the reasons, `62d8f2f` counts in diagnostics builds why a range stays copied (not committed, several allocations, offset, sparse, heap refused, placement refused) and logs it with the views status line. - **Skinned characters break with the switch on.** The player character's arm and several prisoners' arms are stretched into dark wedges, and one prisoner in the background is tilted about 45° instead of sitting. None of this shows in runs without the switch. Static geometry looks right. This looks like skinning data (bone matrices or skinned vertices) read in place while the title is already writing the next frame into the same memory; a copy gives each submission a consistent snapshot, in place doesn't. So with the switch on, buffers the title rewrites every frame shouldn't go in place, or they need to be read through a copy. **How it was found:** A/B runs of one exe with the switch off and on, compared on the fps line's `preparing`/`copies` and `host copies of title memory` figures. The user judged the picture by eye.
desplmfao commented 2026-11-25 17:05:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-25T16:18:39Z.


Merged main (merge commits, no rebase). main's indirect rework (315cea18) reads the title's records through a root view and writes the clamped ones into a buffer the list owns, so it never writes title memory any more. That makes this PR's "clamp in-place indirect arguments in a copy" commit unnecessary: draw.rs and indirect.rs are now exactly main's. In shadow.rs, main's copies that share one large buffer and this PR's in-place buffers now go through one constructor; in-place buffers stay untracked.

Clippy is clean with and without --features diagnostics, and shadow:: and watch:: pass under Wine. Four or five indirect:: tests fail here, but the same ones fail on plain main under vkd3d-proton, so they don't come from this branch. Still open, as noted above: the skinning artifacts with VICTORY_IN_PLACE=1. A fix for those (a buffer goes in place only once the title has left it unwritten for a while) is next, after an in-title check.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7167775748 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7167775748). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-25T16:18:39Z. --- Merged `main` (merge commits, no rebase). `main`'s indirect rework (`315cea18`) reads the title's records through a root view and writes the clamped ones into a buffer the list owns, so it never writes title memory any more. That makes this PR's "clamp in-place indirect arguments in a copy" commit unnecessary: `draw.rs` and `indirect.rs` are now exactly `main`'s. In `shadow.rs`, `main`'s copies that share one large buffer and this PR's in-place buffers now go through one constructor; in-place buffers stay untracked. Clippy is clean with and without `--features diagnostics`, and `shadow::` and `watch::` pass under Wine. Four or five `indirect::` tests fail here, but the same ones fail on plain `main` under vkd3d-proton, so they don't come from this branch. Still open, as noted above: the skinning artifacts with `VICTORY_IN_PLACE=1`. A fix for those (a buffer goes in place only once the title has left it unwritten for a while) is next, after an in-title check.
0xKaji commented 2026-11-25 20:06:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by 0xKaji on 2026-11-25T19:40:19Z.


Tested on Linux + Wine 11.22 + vkd3d-proton + NVIDIA RTX 3060 (8 GB VRAM, 16 GiB system RAM) in Series S mode:

  • Default VICTORY_IN_PLACE=1 (MIN_KB=1024, DENSITY=90): reduced world-entry memory from 15.67 GiB RSS (17,367 MB working set, 4,757 MB system memory) down to 11.25 GiB RSS (12,898 MB working set, 3,078 MB system memory).
  • Combined with VICTORY_PIPELINE_WORKERS=1 (and #2723), a full 4-minute run completed without OOM/crash (exit=124) at 8.51 GiB peak RSS (~4.9 GiB available).
  • Threshold check: lowering to VICTORY_IN_PLACE_DENSITY=60 / VICTORY_IN_PLACE_MIN_KB=256 made memory worse (earlier exit=137 at ~63 s), confirming the premature-pinning trade-off noted in dense(). The default 1024 KB / 90% works much better here.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7172614158 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7172614158). Originally posted by [0xKaji](https://github.com/0xKaji) on 2026-11-25T19:40:19Z. --- Tested on Linux + Wine 11.22 + vkd3d-proton + NVIDIA RTX 3060 (8 GB VRAM, 16 GiB system RAM) in Series S mode: - **Default `VICTORY_IN_PLACE=1` (`MIN_KB=1024`, `DENSITY=90`):** reduced world-entry memory from **15.67 GiB RSS** (17,367 MB working set, 4,757 MB system memory) down to **11.25 GiB RSS** (12,898 MB working set, 3,078 MB system memory). - Combined with `VICTORY_PIPELINE_WORKERS=1` (and #2723), a full 4-minute run completed without OOM/crash (`exit=124`) at **8.51 GiB peak RSS** (~4.9 GiB available). - **Threshold check:** lowering to `VICTORY_IN_PLACE_DENSITY=60` / `VICTORY_IN_PLACE_MIN_KB=256` made memory worse (earlier `exit=137` at ~63 s), confirming the premature-pinning trade-off noted in `dense()`. The default `1024 KB` / `90%` works much better here.
kotekompotek commented 2026-11-26 02:55:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T02:55:33Z.

Review: APPROVED


LGTM — reviewed the delta over #2088 (8aef2dd9f..f83faa761).

The coherence story holds at every seam:

  • in_place no-ops the whole copy pipeline (refresh/gpu_writes/writing/copy_back*/update) except two deliberate paths: keep_in_place retains the placed buffer — hence its heap, hence the pinned pages — for any list whose commands name the GPU address, and landed marks title pages changed so other shadows (sub-floor buffers, view copies, textures) refresh from memory the shaders wrote in place. memory::bind calls landed on computed-address writes even while withholding — the one path that must not be skipped.
  • committed_part: the VirtualQuery walk down/up one AllocationBase with the 64 KiB floor / 4 KiB ceiling cut and lo <= address && end <= hi guard is exact — including the alignment push-up being guarded rather than clamped silently.
  • in_place_buffer: single-allocation verification walks every region (refuses multi-allocation), offset%64KiB enforced, sub-range opens via OpenExistingHeapFromAddress1 keep heap lifetime bound to the placed buffer, whole-allocation path goes through the cache with extent staleness + the dense() working-set gate (64Ki-page sampling, 10 s cache, 90 % default — the GTA6-on-Linux measurement justifies it).
  • Stale-heap sweep: check_in_place once a frame drains the deferred STALE list plus a fresh extent scan; let_go_heap(id) filters by HeapId so a new heap at the same base survives; deferral under STALE_IN_PLACE correctly avoids re-entering BUFFERS/LOOSE from callers that hold them.
  • keep_once's raw-pointer key contract is documented and keep_in_place uses the buffer pointer — no aliasing.
  • The in_place_remapped hook on title_memory_remapped closes the runtime-map/unmap hole; pin_heap (from #2945) closes the title-side free/protect one — the two halves compose correctly.
  • Tests serialize on IN_PLACE_TESTS and cover committed-part geometry, real heap opens, stale eviction, and overlapping windows.

Noting scope: this reviews #2112's own commits; the 256 KiB loose-window lookup rework is #2088's.

<!-- greyfinch-sync:Marvisak/VIctory:review:6067933873 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#pullrequestreview-6067933873). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-26T02:55:33Z. **Review:** APPROVED --- LGTM — reviewed the delta over #2088 (8aef2dd9f..f83faa761). The coherence story holds at every seam: - **`in_place` no-ops the whole copy pipeline** (refresh/gpu_writes/writing/copy_back*/update) except two deliberate paths: `keep_in_place` retains the placed buffer — hence its heap, hence the pinned pages — for any list whose commands name the GPU address, and `landed` marks title pages changed so *other* shadows (sub-floor buffers, view copies, textures) refresh from memory the shaders wrote in place. `memory::bind` calls `landed` on computed-address writes even while withholding — the one path that must not be skipped. - **`committed_part`**: the VirtualQuery walk down/up one AllocationBase with the 64 KiB floor / 4 KiB ceiling cut and `lo <= address && end <= hi` guard is exact — including the alignment push-up being guarded rather than clamped silently. - **`in_place_buffer`**: single-allocation verification walks every region (refuses multi-allocation), offset%64KiB enforced, sub-range opens via `OpenExistingHeapFromAddress1` keep heap lifetime bound to the placed buffer, whole-allocation path goes through the cache with extent staleness + the `dense()` working-set gate (64Ki-page sampling, 10 s cache, 90 % default — the GTA6-on-Linux measurement justifies it). - **Stale-heap sweep**: `check_in_place` once a frame drains the deferred STALE list plus a fresh extent scan; `let_go_heap(id)` filters by HeapId so a new heap at the same base survives; deferral under STALE_IN_PLACE correctly avoids re-entering BUFFERS/LOOSE from callers that hold them. - **`keep_once`**'s raw-pointer key contract is documented and `keep_in_place` uses the buffer pointer — no aliasing. - The `in_place_remapped` hook on `title_memory_remapped` closes the runtime-map/unmap hole; `pin_heap` (from #2945) closes the title-side free/protect one — the two halves compose correctly. - Tests serialize on IN_PLACE_TESTS and cover committed-part geometry, real heap opens, stale eviction, and overlapping windows. Noting scope: this reviews #2112's own commits; the 256 KiB loose-window lookup rework is #2088's.
desplmfao commented 2026-11-26 03:05:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-26T02:34:19Z.


@0xKaji thanks, this is the measurement this PR was missing. With 8 GB of video memory and 16 GiB RAM in Series S mode, 15.67 GiB RSS down to 11.25 GiB at world entry, and a 4-minute run without running out of memory, is a real benefit on exactly the kind of machine that needs it. The threshold check helps too: it confirms that the 1 MiB / 90 % defaults are the right side of the trade-off.

Still open before this leaves draft: the skinning artifacts with the switch on (stretched arms, a tilted NPC; see the A/B above). Did you see anything like that on characters in your runs?

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180925146 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7180925146). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-26T02:34:19Z. --- @0xKaji thanks, this is the measurement this PR was missing. With 8 GB of video memory and 16 GiB RAM in Series S mode, 15.67 GiB RSS down to 11.25 GiB at world entry, and a 4-minute run without running out of memory, is a real benefit on exactly the kind of machine that needs it. The threshold check helps too: it confirms that the 1 MiB / 90 % defaults are the right side of the trade-off. Still open before this leaves draft: the skinning artifacts with the switch on (stretched arms, a tilted NPC; see the A/B above). Did you see anything like that on characters in your runs?
kawaii-shakal commented 2026-11-26 04:06:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kawaii-shakal on 2026-11-26T03:52:28Z.


A data point from Windows with native D3D12, not vkd3d-proton: RTX 5070 Ti, Windows 11. I merged #2112 with #402 and #2088 on top of current main plus #2870 (copies in GPU upload heaps), and ran it with VICTORY_IN_PLACE=1.

  • Very little went in place. The log shows only refused={"sparse": 1} and refused={"heap refused": 1}, and host copies in system memory went from 6.4 GB to just 4.6 GB.
  • CPU copy time per frame went from 70–90 ms (~420 MB) to ~2.8 s (~1.6 GB), and the frame went from ~1.5 s to ~3.8 s.
  • Cutscenes rendered as a flat white-to-grey screen.

The same build without the variable renders normally. So on Windows/NVIDIA the opt-in currently costs far more than it saves. I'm happy to run a diagnostics build of a newer revision if that helps.

🤖 Generated with Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7182097560 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7182097560). Originally posted by [kawaii-shakal](https://github.com/kawaii-shakal) on 2026-11-26T03:52:28Z. --- A data point from Windows with native D3D12, not vkd3d-proton: RTX 5070 Ti, Windows 11. I merged #2112 with #402 and #2088 on top of current main plus #2870 (copies in GPU upload heaps), and ran it with `VICTORY_IN_PLACE=1`. - Very little went in place. The log shows only `refused={"sparse": 1}` and `refused={"heap refused": 1}`, and host copies in system memory went from 6.4 GB to just 4.6 GB. - CPU copy time per frame went from 70–90 ms (~420 MB) to ~2.8 s (~1.6 GB), and the frame went from ~1.5 s to ~3.8 s. - Cutscenes rendered as a flat white-to-grey screen. The same build without the variable renders normally. So on Windows/NVIDIA the opt-in currently costs far more than it saves. I'm happy to run a diagnostics build of a newer revision if that helps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) (Claude Opus 5.5)
desplmfao commented 2026-11-26 05:04:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-26T04:16:08Z.


@kawaii-shakal thanks, the first native D3D12 numbers for this, and they're clear. With the switch on, copies per frame go from ~420 MB to ~1.6 GB while almost nothing goes in place, and cutscenes go flat. So on a discrete NVIDIA card under Windows the opt-in costs far more than it saves. That matches my Linux A/B (no clear gain at 90 %). The benefit so far has only shown up where system RAM is the limit (0xKaji's 16 GiB RAM machine with an 8 GB card: RSS down from 15.67 to 11.25 GiB) and on shared-memory hosts (#2945). The switch stays off by default, and this PR stays a draft.

Three things would help pin down where the extra 1.2 GB per frame comes from:

  1. Which #2112 head did you build? Since 2f0590a (#2088), loose windows are 4 MiB by default again. The 256 KiB ones copy several times the bytes per frame, which looks a lot like your numbers. The current head is ab2b7ef.
  2. The same run without #2870, if that's easy. In-place buffers are left out of the copy tracking, and I haven't checked how that interacts with copies placed in upload heaps.
  3. From a diagnostics build: the copies per frame lines (copystat) with the switch on and off, and the in place: refusal counts.

The flat cutscenes are probably the same problem as the stretched arms I saw: a buffer the title writes every frame, read in place mid-write. The fix I have in mind keeps a buffer copied until the title has left it unwritten for a few seconds.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7182445247 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7182445247). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-26T04:16:08Z. --- @kawaii-shakal thanks, the first native D3D12 numbers for this, and they're clear. With the switch on, copies per frame go from ~420 MB to ~1.6 GB while almost nothing goes in place, and cutscenes go flat. So on a discrete NVIDIA card under Windows the opt-in costs far more than it saves. That matches my Linux A/B (no clear gain at 90 %). The benefit so far has only shown up where system RAM is the limit (0xKaji's 16 GiB RAM machine with an 8 GB card: RSS down from 15.67 to 11.25 GiB) and on shared-memory hosts (#2945). The switch stays off by default, and this PR stays a draft. Three things would help pin down where the extra 1.2 GB per frame comes from: 1. **Which #2112 head did you build?** Since `2f0590a` (#2088), loose windows are 4 MiB by default again. The 256 KiB ones copy several times the bytes per frame, which looks a lot like your numbers. The current head is `ab2b7ef`. 2. **The same run without #2870**, if that's easy. In-place buffers are left out of the copy tracking, and I haven't checked how that interacts with copies placed in upload heaps. 3. **From a diagnostics build:** the `copies per frame` lines (`copystat`) with the switch on and off, and the `in place:` refusal counts. The flat cutscenes are probably the same problem as the stretched arms I saw: a buffer the title writes every frame, read in place mid-write. The fix I have in mind keeps a buffer copied until the title has left it unwritten for a few seconds.
kawaii-shakal commented 2026-11-26 06:03:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kawaii-shakal on 2026-11-26T05:04:41Z.


@desplmfao answers in order:

  1. Head: it was ab2b7ef, so the 4 MiB loose windows were the default and the 256 KiB windows aren't the cause.
  2. Without #2870: I reran on plain current main merged with ab2b7ef (a fast-forward), with nothing else in the tree: no #2870, none of the other PRs from my first run. RTX 5070 Ti, Windows 11, native D3D12, diagnostics build, same save, ~3 min each into the world. The cost is the same without #2870.
  3. copystat and refusals, three consecutive 5 s lines each:
per frame VICTORY_IN_PLACE unset VICTORY_IN_PLACE=1
frame 0.67–2.0 s 6.3–8.3 s
preparing: copies 69–118 ms, 456–529 MB 7.6–10.9 s, 2.3–2.4 GB
refreshes 14,925–15,442, 11.5–12.1 GB 4,950–5,282, 5.1–5.2 GB
watches 13–19 ms, 4.1–5.6 GB checked (3.6–5.1 GB unchanged) 5.7–7.7 s, 11.3–13.2 GB checked (9.0–10.9 GB unchanged)
snapshots 646–957 MB in 72–76 ms 38–53 MB in 1.3–1.8 ms
on the GPU 0.23–1.7 s 0.21–0.24 s
draws / dropped / dropped indirect 2,095–2,717 / 827–1,311 / 420–1,282 1,140–1,222 / 228–269 / 42
host copies of title memory at the end 5,023 (6,032 MB) 6,157 (4,992 MB)

The only in place refusal line in the whole run is title memory kept as a copy, not in place (since the line before) refused={"sparse": 1}.

So almost all of the extra time is in watches: about 2.5× as many bytes checked per frame, at roughly 400× the time. Refreshes and snapshots actually go down. That looks like whatever the in-place buffers still go through in watch (checking or guarding pages of memory that is now read in place) rather than copies proper. Also, with the switch on the frame draws about half as much, which fits the flat cutscenes you suspect come from buffers read mid-write.

🤖 Generated with Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7183159392 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7183159392). Originally posted by [kawaii-shakal](https://github.com/kawaii-shakal) on 2026-11-26T05:04:41Z. --- @desplmfao answers in order: 1. **Head:** it was `ab2b7ef`, so the 4 MiB loose windows were the default and the 256 KiB windows aren't the cause. 2. **Without #2870:** I reran on plain current `main` merged with `ab2b7ef` (a fast-forward), with nothing else in the tree: no #2870, none of the other PRs from my first run. RTX 5070 Ti, Windows 11, native D3D12, `diagnostics` build, same save, ~3 min each into the world. The cost is the same without #2870. 3. **`copystat` and refusals**, three consecutive 5 s lines each: | per frame | `VICTORY_IN_PLACE` unset | `VICTORY_IN_PLACE=1` | |---|---|---| | frame | 0.67–2.0 s | 6.3–8.3 s | | preparing: copies | 69–118 ms, 456–529 MB | **7.6–10.9 s**, 2.3–2.4 GB | | refreshes | 14,925–15,442, 11.5–12.1 GB | 4,950–5,282, 5.1–5.2 GB | | watches | **13–19 ms**, 4.1–5.6 GB checked (3.6–5.1 GB unchanged) | **5.7–7.7 s**, 11.3–13.2 GB checked (9.0–10.9 GB unchanged) | | snapshots | 646–957 MB in 72–76 ms | 38–53 MB in 1.3–1.8 ms | | on the GPU | 0.23–1.7 s | 0.21–0.24 s | | draws / dropped / dropped indirect | 2,095–2,717 / 827–1,311 / 420–1,282 | 1,140–1,222 / 228–269 / 42 | | host copies of title memory at the end | 5,023 (6,032 MB) | 6,157 (4,992 MB) | The only `in place` refusal line in the whole run is `title memory kept as a copy, not in place (since the line before) refused={"sparse": 1}`. So almost all of the extra time is in **watches**: about 2.5× as many bytes checked per frame, at roughly 400× the time. Refreshes and snapshots actually go down. That looks like whatever the in-place buffers still go through in `watch` (checking or guarding pages of memory that is now read in place) rather than copies proper. Also, with the switch on the frame draws about half as much, which fits the flat cutscenes you suspect come from buffers read mid-write. 🤖 Generated with [Claude Code](https://claude.com/claude-code) (Claude Opus 5.5)
desplmfao commented 2026-11-26 06:03:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-26T05:24:26Z.


@kawaii-shakal thanks, the watches line pinned it down. It was this PR, in Shadow::landed. After every submission, a buffer in place marks the whole range its shaders may write as changed, and it did that through watch::writing. That function is meant for kernel writes into title memory: every tracker holding a page saves its bytes first, and the guards are opened, so those pages get compared again at every later refresh. Over whole buffer ranges, every submission, that is the 11–13 GB checked (9–11 GB unchanged) and the 5.7–7.7 s in your table.

29decb3 adds watch::gpu_wrote. It marks the pages, and pages aliased to them, as changed in every tracker, as before. It saves nothing, because the write has already happened and there is no "before" to keep. It opens no guards, because a GPU write doesn't go through the CPU's page protection, so the title's own writes stay seen. shadow:: and watch:: give 40 passed under Wine, including writes_in_place_mark_other_copies_of_the_page_changed, and clippy is clean.

If you can, the same A/B on 29decb3 would show whether the watch time is back near the switch-off level. Your table also shows the switch-on frame drawing about half as much (1,140–1,222 draws against 2,095–2,717). This fix doesn't explain that, and it fits the buffers read mid-write. That part is still open.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7183456989 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7183456989). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-26T05:24:26Z. --- @kawaii-shakal thanks, the watches line pinned it down. It was this PR, in `Shadow::landed`. After every submission, a buffer in place marks the whole range its shaders may write as changed, and it did that through `watch::writing`. That function is meant for kernel writes into title memory: every tracker holding a page saves its bytes first, and the guards are opened, so those pages get compared again at every later refresh. Over whole buffer ranges, every submission, that is the 11–13 GB checked (9–11 GB unchanged) and the 5.7–7.7 s in your table. `29decb3` adds `watch::gpu_wrote`. It marks the pages, and pages aliased to them, as changed in every tracker, as before. It saves nothing, because the write has already happened and there is no "before" to keep. It opens no guards, because a GPU write doesn't go through the CPU's page protection, so the title's own writes stay seen. `shadow::` and `watch::` give 40 passed under Wine, including `writes_in_place_mark_other_copies_of_the_page_changed`, and clippy is clean. If you can, the same A/B on `29decb3` would show whether the watch time is back near the switch-off level. Your table also shows the switch-on frame drawing about half as much (1,140–1,222 draws against 2,095–2,717). This fix doesn't explain that, and it fits the buffers read mid-write. That part is still open.
MeMako commented 2026-11-26 08:03:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MeMako on 2026-11-26T07:16:58Z.


Tested #2112 (29decb3, VICTORY_IN_PLACE=1) on native Windows 11 (10.0.26200) + AMD Radeon RX 9070 XT (RDNA 4, driver 32.0.32029.2010, Ryzen 9 7950X, 32 GB RAM).

Unit Tests

  • cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings: clean.
  • cargo test -p victory-gpu --lib --locked -- --test-threads=1: 287/287 passed, 0 failed (10 ignored benchmarks), including committed_memory_opens_as_a_buffer_in_place, a_sub_range_heap_covers_only_the_buffer, a_heap_over_a_released_allocation_is_let_go, a_list_keeps_the_in_place_buffers_it_uses, writes_in_place_mark_other_copies_of_the_page_changed, and stale_queue_does_not_evict_replacement_heap_at_same_base.

Live Title Run (VICTORY_IN_PLACE=1, default 1 MiB min)

  • Setup: Local integration stack on main 63bcca4 + #2051 + #2472 + #2918 (shadow.rs/watch.rs) + #1010 + #2130 (VRAM upload flags off, shadow.rs) + #3055 (shadow.rs/descriptor) + #2914 (shadow.rs) + #2985 + #2849 (watch.rs) + #3035 (watch.rs) + #2958 (no xmem.rs changes). Comparing VICTORY_IN_PLACE unset (0 crashes across 65 world frames) vs. VICTORY_IN_PLACE=1 on the same tree:
  1. Crash during world load (0xc0000005 in title) preceded by 21× xmem os error 487:
    • Baseline (VICTORY_IN_PLACE unset): 0 xmem remap warnings.
    • With VICTORY_IN_PLACE=1: 21× WARN victory_hle::modules::xmem: mapping physical pages failed (not a placeholder?) address=0x717c10000 len=65536 error=Attempt to access invalid address. (os error 487), followed shortly by a title access violation (0xc0000005).
    • Likely cause: on native Windows D3D12, OpenExistingHeapFromAddress1 pins the virtual pages until the underlying ID3D12Heap and placed ID3D12Resource COM objects are actually destroyed. title_memory_remapped() removes entries from BUFFERS/LOOSE, but either a recorded HostList (keep_in_place) or an in-flight/retired resource still sitting in RETIRED waiting on a GPU fence keeps those COM objects alive when xmem calls UnmapViewOfFile2(..., MEM_PRESERVE_PLACEHOLDER) (whose return value is unchecked), preventing the range from reverting to a placeholder unless the GPU is drained and those objects are dropped first.
  2. Large copy blow-up still occurs on 29decb3:
    • On the two world-entry frames right before the crash, preparing: copies jumped from ~468 MB to 2,295–3,478 MB/frame (local profiler stage timers: deferred 1,455–2,490 ms, flush 2,366–3,840 ms, post-copy-back after covering check_in_place 123–156 ms; total 4,683–7,081 ms/frame). Even without opening guards or saving bytes in watch::gpu_wrote, marking whole in-place written ranges changed still appears to trigger massive re-refreshes on overlapping copied buffers.

Hardware runs were performed by me on my 7950X / RX 9070 XT; comment drafted with Antigravity.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7185289390 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7185289390). Originally posted by [MeMako](https://github.com/MeMako) on 2026-11-26T07:16:58Z. --- Tested `#2112` (`29decb3`, `VICTORY_IN_PLACE=1`) on native Windows 11 (`10.0.26200`) + AMD Radeon RX 9070 XT (RDNA 4, driver `32.0.32029.2010`, Ryzen 9 7950X, 32 GB RAM). ### Unit Tests - `cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings`: clean. - `cargo test -p victory-gpu --lib --locked -- --test-threads=1`: **287/287 passed**, 0 failed (10 ignored benchmarks), including `committed_memory_opens_as_a_buffer_in_place`, `a_sub_range_heap_covers_only_the_buffer`, `a_heap_over_a_released_allocation_is_let_go`, `a_list_keeps_the_in_place_buffers_it_uses`, `writes_in_place_mark_other_copies_of_the_page_changed`, and `stale_queue_does_not_evict_replacement_heap_at_same_base`. ### Live Title Run (`VICTORY_IN_PLACE=1`, default `1 MiB` min) - **Setup:** Local integration stack on `main` `63bcca4` + `#2051` + `#2472` + `#2918` (`shadow.rs`/`watch.rs`) + `#1010` + `#2130` (VRAM upload flags off, `shadow.rs`) + `#3055` (`shadow.rs`/`descriptor`) + `#2914` (`shadow.rs`) + `#2985` + `#2849` (`watch.rs`) + `#3035` (`watch.rs`) + `#2958` (no `xmem.rs` changes). Comparing `VICTORY_IN_PLACE` unset (0 crashes across 65 world frames) vs. `VICTORY_IN_PLACE=1` on the same tree: 1. **Crash during world load (`0xc0000005` in title) preceded by 21× `xmem` `os error 487`:** - Baseline (`VICTORY_IN_PLACE` unset): **0** `xmem` remap warnings. - With `VICTORY_IN_PLACE=1`: **21×** ``WARN victory_hle::modules::xmem: mapping physical pages failed (not a placeholder?) address=0x717c10000 len=65536 error=Attempt to access invalid address. (os error 487)``, followed shortly by a title access violation (`0xc0000005`). - Likely cause: on native Windows D3D12, `OpenExistingHeapFromAddress1` pins the virtual pages until the underlying `ID3D12Heap` and placed `ID3D12Resource` COM objects are actually destroyed. `title_memory_remapped()` removes entries from `BUFFERS`/`LOOSE`, but either a recorded `HostList` (`keep_in_place`) or an in-flight/retired resource still sitting in `RETIRED` waiting on a GPU fence keeps those COM objects alive when `xmem` calls `UnmapViewOfFile2(..., MEM_PRESERVE_PLACEHOLDER)` (whose return value is unchecked), preventing the range from reverting to a placeholder unless the GPU is drained and those objects are dropped first. 2. **Large copy blow-up still occurs on `29decb3`:** - On the two world-entry frames right before the crash, `preparing: copies` jumped from ~468 MB to **2,295–3,478 MB/frame** (local profiler stage timers: `deferred` **1,455–2,490 ms**, `flush` **2,366–3,840 ms**, post-copy-back `after` covering `check_in_place` **123–156 ms**; total **4,683–7,081 ms/frame**). Even without opening guards or saving bytes in `watch::gpu_wrote`, marking whole in-place written ranges changed still appears to trigger massive re-refreshes on overlapping copied buffers. *Hardware runs were performed by me on my 7950X / RX 9070 XT; comment drafted with Antigravity.*
crashbashash commented 2026-11-26 11:03:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by crashbashash on 2026-11-26T10:20:01Z.


A data point from AMD on Linux, where this ends differently than on the 5080 or on Windows: RX 6800 XT, RADV
(Mesa 26.2.6), vkd3d-proton 71cae091b in GE-Proton11-14, this PR merged onto main 219878a plus our Linux
commits, diag build, start from a save in the prison.

head VICTORY_IN_PLACE runs result
ab2b7ef unset 2 into the world, 120 s, normal
ab2b7ef 1 2 device removed about 50 s in, before the world
29decb3 unset 1 into the world, 120 s, normal
29decb3 1 2 device removed about 45 s in, before the world

All four in-place runs end the same way, with no GPU fault and no reset in the kernel log:

vkd3d_import_host_memory: Failed to import host memory, hr 0x8007000e     (1,594 to 2,054 times a run)
radv/amdgpu: The CS has been rejected, see dmesg for more information (-1).
d3d12_command_queue_execute: Failed to submit queue(s), vr -4.
d3d12_device_mark_as_removed: ... VK_ERROR_DEVICE_LOST

The crate's tests pass under Wine at 29decb3, the in-place ones included
(committed_memory_opens_as_a_buffer_in_place, a_list_keeps_the_in_place_buffers_it_uses,
writes_in_place_mark_other_copies_of_the_page_changed): a fresh private allocation imports fine.

So the kernel refuses a submission instead of the GPU faulting. What I think happens, from the sources (I have not
traced the failing BO itself):

  • RADV imports host memory through libdrm's amdgpu_create_bo_from_user_mem, which always asks for
    AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER | AMDGPU_GEM_USERPTR_VALIDATE
    (amdgpu_bo.c).
  • With ANONONLY, amdgpu_ttm_tt_get_user_pages returns -EPERM when the range is file-backed or does not lie
    inside a single VMA
    (amdgpu_ttm.c).
    That check runs at import and again when a submission revalidates the pages after they changed.
  • Under Wine, an mprotect of a single page splits the VMA. vkd3d-proton imports the whole allocation (the PR notes
    this), so one page guarded anywhere in it (a buffer under VICTORY_IN_PLACE_MIN_KB that keeps its copy and its
    guard, or another copy's tracker) leaves the imported range across several VMAs. Memory mapped as a section view is
    file-backed under Wine, which ANONONLY refuses outright.

That fits the fresh allocation in the tests importing fine (one anonymous VMA), the failed imports in the game, and a
later submission being refused once a guard or a remap touches an allocation that was imported earlier. NVIDIA's
driver doesn't have this restriction, which fits your runs getting further.

If that's right, on amdgpu an allocation can only go in place if nothing guards any page of it for as long as it's
imported, and it must be private memory (no section views). Happy to test a change on this card.

AI-assisted (Claude Code). No game data attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7189224750 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7189224750). Originally posted by [crashbashash](https://github.com/crashbashash) on 2026-11-26T10:20:01Z. --- A data point from AMD on Linux, where this ends differently than on the 5080 or on Windows: RX 6800 XT, RADV (Mesa 26.2.6), vkd3d-proton `71cae091b` in GE-Proton11-14, this PR merged onto `main` `219878a` plus our Linux commits, `diag` build, start from a save in the prison. | head | `VICTORY_IN_PLACE` | runs | result | |---|---|---|---| | `ab2b7ef` | unset | 2 | into the world, 120 s, normal | | `ab2b7ef` | `1` | 2 | device removed about 50 s in, before the world | | `29decb3` | unset | 1 | into the world, 120 s, normal | | `29decb3` | `1` | 2 | device removed about 45 s in, before the world | All four in-place runs end the same way, with no GPU fault and no reset in the kernel log: ``` vkd3d_import_host_memory: Failed to import host memory, hr 0x8007000e (1,594 to 2,054 times a run) radv/amdgpu: The CS has been rejected, see dmesg for more information (-1). d3d12_command_queue_execute: Failed to submit queue(s), vr -4. d3d12_device_mark_as_removed: ... VK_ERROR_DEVICE_LOST ``` The crate's tests pass under Wine at `29decb3`, the in-place ones included (`committed_memory_opens_as_a_buffer_in_place`, `a_list_keeps_the_in_place_buffers_it_uses`, `writes_in_place_mark_other_copies_of_the_page_changed`): a fresh private allocation imports fine. So the kernel refuses a submission instead of the GPU faulting. What I think happens, from the sources (I have not traced the failing BO itself): - RADV imports host memory through libdrm's `amdgpu_create_bo_from_user_mem`, which always asks for `AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER | AMDGPU_GEM_USERPTR_VALIDATE` ([amdgpu_bo.c](https://gitlab.freedesktop.org/mesa/drm/-/blob/main/amdgpu/amdgpu_bo.c)). - With `ANONONLY`, `amdgpu_ttm_tt_get_user_pages` returns `-EPERM` when the range is file-backed **or does not lie inside a single VMA** ([amdgpu_ttm.c](https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c)). That check runs at import and again when a submission revalidates the pages after they changed. - Under Wine, an `mprotect` of a single page splits the VMA. vkd3d-proton imports the whole allocation (the PR notes this), so one page guarded anywhere in it (a buffer under `VICTORY_IN_PLACE_MIN_KB` that keeps its copy and its guard, or another copy's tracker) leaves the imported range across several VMAs. Memory mapped as a section view is file-backed under Wine, which `ANONONLY` refuses outright. That fits the fresh allocation in the tests importing fine (one anonymous VMA), the failed imports in the game, and a later submission being refused once a guard or a remap touches an allocation that was imported earlier. NVIDIA's driver doesn't have this restriction, which fits your runs getting further. If that's right, on amdgpu an allocation can only go in place if nothing guards any page of it for as long as it's imported, and it must be private memory (no section views). Happy to test a change on this card. AI-assisted (Claude Code). No game data attached.
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:18Z.


Unit-test run on native Windows with NVIDIA, the combination the description lists as untested: RTX 4060 8 GB (PCIe 4.0 x8, Resizable BAR on), driver 621.14, Windows 11 Pro 26300. Head 29decb3 merged onto main 63bcca4, cargo test -p victory-gpu --lib --locked -- --test-threads=1. No game files.

  • 244 passed, 2 failed. The 2 are the known capped-heap failures that main also has on this card (#1835).
  • All the in-place tests pass on the hardware adapter: committed_memory_opens_as_a_buffer_in_place, a_sub_range_heap_covers_only_the_buffer, a_heap_over_a_released_allocation_is_let_go, a_list_keeps_the_in_place_buffers_it_uses, writes_in_place_mark_other_copies_of_the_page_changed. So OpenExistingHeapFromAddress over process memory works on this driver.

A cost data point for in place on a discrete card, from #3102's synthetic benchmark on the same 4060 (its in-place path also opens title memory as heaps; comment there). 200 dispatches over 320 MiB of title buffers, ms per submission: copies in system memory 160.8, in place 113-122, copies in video memory 53-106. On a narrow link, shaders reading title memory across the bus cost more than keeping a VRAM copy. That fits #2734 putting hot buffers in VRAM on top of this.

AI-assisted (Claude)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7195353863 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7195353863). Originally posted by [potatoe0100](https://github.com/potatoe0100) on 2026-11-26T14:48:18Z. --- Unit-test run on native Windows with NVIDIA, the combination the description lists as untested: **RTX 4060 8 GB** (PCIe 4.0 x8, Resizable BAR on), driver 621.14, Windows 11 Pro 26300. Head `29decb3` merged onto `main` `63bcca4`, `cargo test -p victory-gpu --lib --locked -- --test-threads=1`. No game files. - 244 passed, 2 failed. The 2 are the known capped-heap failures that `main` also has on this card (#1835). - All the in-place tests pass on the hardware adapter: `committed_memory_opens_as_a_buffer_in_place`, `a_sub_range_heap_covers_only_the_buffer`, `a_heap_over_a_released_allocation_is_let_go`, `a_list_keeps_the_in_place_buffers_it_uses`, `writes_in_place_mark_other_copies_of_the_page_changed`. So `OpenExistingHeapFromAddress` over process memory works on this driver. A cost data point for in place on a discrete card, from #3102's synthetic benchmark on the same 4060 (its in-place path also opens title memory as heaps; [comment there](https://github.com/Marvisak/VIctory/pull/3102#issuecomment-7194296926)). 200 dispatches over 320 MiB of title buffers, ms per submission: copies in system memory 160.8, **in place 113-122**, copies in video memory 53-106. On a narrow link, shaders reading title memory across the bus cost more than keeping a VRAM copy. That fits #2734 putting hot buffers in VRAM on top of this. AI-assisted (Claude)
borosf commented 2026-11-27 07:21:30 +00:00 (Migrated from github.com)

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


@desplmfao — facts about the three in-place PRs are in #880 (comment 7212390146). One thing from it worth your attention: #402 is CONFLICTING with main, and #2088 → #2112 sit on top of it, so the chain cannot be judged until it is rebased — 1,210 of the 1,690 lines are in shadow.rs. Nothing else in the comparison contradicts your design: your coverage (loose windows + buffer objects) is disjoint from #2494's (physical-page sections).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7212393252 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7212393252). Originally posted by [borosf](https://github.com/borosf) on 2026-11-27T07:21:30Z. --- @desplmfao — facts about the three in-place PRs are in #880 (comment 7212390146). One thing from it worth your attention: **#402 is CONFLICTING with main**, and #2088 → #2112 sit on top of it, so the chain cannot be judged until it is rebased — 1,210 of the 1,690 lines are in `shadow.rs`. Nothing else in the comparison contradicts your design: your coverage (loose windows + buffer objects) is disjoint from #2494's (physical-page sections).
desplmfao commented 2026-11-27 08:17:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-27T08:17:33Z.


Thanks @MeMako, @crashbashash and @potatoe0100. Together these settle where the switch stands:

  • AMD on Windows (RX 9070 XT): a title crash while loading the world, after 21× xmem … os error 487. The heaps opened over title memory still hold the pages when the title remaps them.
  • AMD on Linux (RADV): device lost before the world. The host-memory import fails once our guards have split the allocation across VMAs, so it can't be fixed from this side.
  • Discrete NVIDIA: the tests pass, but reading title memory in place is slower than a copy in video memory (potatoe0100's 113–122 ms against 53–106 ms per submission), and it was far slower in kawaii-shakal's Windows run.

So in place only helps where RAM is the limit (0xKaji's 16 GiB machine) or the GPU shares memory with the CPU (#2945). It stays opt-in and stays a draft, and I'd not use it on AMD or discrete NVIDIA.

@borosf, on the chain: #2088 doesn't wait for #402. It carries #402's commit with current main merged in (update/402-main, the commit itself unchanged), and both #2088 and this PR merge cleanly with main 63bcca4. If #402 is updated upstream, #2088 follows it.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7213369717 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2112#issuecomment-7213369717). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-27T08:17:33Z. --- Thanks @MeMako, @crashbashash and @potatoe0100. Together these settle where the switch stands: - **AMD on Windows (RX 9070 XT):** a title crash while loading the world, after 21× `xmem … os error 487`. The heaps opened over title memory still hold the pages when the title remaps them. - **AMD on Linux (RADV):** device lost before the world. The host-memory import fails once our guards have split the allocation across VMAs, so it can't be fixed from this side. - **Discrete NVIDIA:** the tests pass, but reading title memory in place is slower than a copy in video memory (potatoe0100's 113–122 ms against 53–106 ms per submission), and it was far slower in kawaii-shakal's Windows run. So in place only helps where RAM is the limit (0xKaji's 16 GiB machine) or the GPU shares memory with the CPU (#2945). It stays opt-in and stays a draft, and I'd not use it on AMD or discrete NVIDIA. @borosf, on the chain: #2088 doesn't wait for #402. It carries #402's commit with current `main` merged in ([`update/402-main`](https://github.com/desplmfao/VIctory/tree/update/402-main), the commit itself unchanged), and both #2088 and this PR merge cleanly with `main` `63bcca4`. If #402 is updated upstream, #2088 follows it.
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/2112:upstream-pr/2112'
git switch 'upstream-pr/2112'

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