Under Wine: title pages shown with the host's mmap, and renderer port 1's heap opened in place (VICTORY_WINE_MAP, VICTORY_PORT_HOME) #2455

Open
borntofrag34 wants to merge 3 commits from upstream-pr/2455 into main
borntofrag34 commented 2026-11-29 13:13:16 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by borntofrag34 on 2026-11-29T13:13:16Z.


Two changes for running under Wine/Proton, each behind its own switch. On Windows nothing changes: both act only when ntdll exports wine_get_version. They come from borntofrag34/VIctory-7900XTX's linux-wine branch, where they have been in use since 2026-11-26/27. They are ported here onto this tree's xmem, which has soft and lazy views, file-backed sections and the batched page mapper.

What changes

VICTORY_WINE_MAP (on under Wine; =0 brings back today's behaviour)

  • The problem: the title shows its physical pages one 64 KiB view at a time. The stock Wine server walks a linked list of all the process's views for every map and unmap (is_valid_view_addr, find_mapped_view). It does that while the calling thread holds ntdll's virtual_mutex, the lock every NtProtectVirtualMemory, NtGetWriteWatch, query and fault also takes. (docs/linux-proton.md already describes this list, with a patched wineserver as the workaround.)
  • What it does: where the host would have a placeholder, the reservation is a plain one.
    • A page is shown by mapping its section's file there with the C library's mmap (MAP_SHARED | MAP_FIXED; the descriptor comes from wine_server_handle_to_fd), then committing the range.
    • A page is taken away with MEM_DECOMMIT.
    • The title's VirtualFree of placeholders (split, coalesce, release) is done on pieces of the reservation that we keep track of.
  • Telling the GPU side: a query calls these pages "private", so the GPU side learns where these reservations are through title_view_space, which watch's is_view / readable_view / placeholder and inplace::private_whole use.
  • Safety net: at start-up, a page of a section of our own is shown this way, then read, written, protected and taken away. If any step fails, pages are shown as views, as before.

VICTORY_PORT_HOME (on with VICTORY_PORT_CONSTANTS=1 and VICTORY_WINE_MAP; =0: off)

  • The problem: vkd3d-proton opens a host heap on existing memory by importing it into Vulkan. With RADV that works for private memory and fails for a view of a section. vkd3d-proton then gives the heap memory of its own and reports success, so the card reads zeros and renderer port 1's frames are black. The kernel (amdgpu_ttm_tt_get_user_pages) also takes memory by address only as one mapping that the process owns.
  • What it does: before the 32-bit graphics heap's section is first shown, its whole stretch is made one anonymous mapping. Its pages then live there as private memory at the address the title maps them at; their bytes are copied in from the section, and back out when the title unmaps them.
    • If the title shows a page at a second address, the section goes back to being its file everywhere.
  • Opening the heap: port.rs opens the heap right there, with no view of ours. It checks through the card that the bytes really arrive, makes up to four attempts, and otherwise gives the stretch up (copied and guarded as before).
  • Guard rule: the guards never make these pages read-only. While one is read-only, the kernel refuses every submission and the device is lost. That rule is UwUCammie's 73d7b690 in the fork, credited in the commit.
  • Views under Wine: a stretch that is a view is now refused for the port under Wine, unless a one-time probe at start shows the card reads a view's bytes through such a heap. This avoids the black picture.

Side note, not changed here: with VICTORY_PORT_CONSTANTS unset, the GPU side's port is on by default (except on Ampere), but xmem's half (port_on, which runs arrange) defaults to off. The 32-bit heap is then never in one stretch, the log says not one native-import-eligible stretch of a section: Scattered, and nothing is ported. I think the same happens on Windows, but I have not checked. VICTORY_PORT_HOME only acts where VICTORY_PORT_CONSTANTS=1 is set explicitly.

Measured

  • Machine: RX 7900 GRE 16 GB + Ryzen 9 9900X, Arch with CachyOS kernel 7.3.6.
  • Software: Proton Experimental 11.0-20261112 (Wine 11.0, ntsync), vkd3d-proton 3.2.0, RADV (Mesa 26.3.1).
  • Settings: this tree's victory play settings with the frame clock at 16.667 ms. A save another player shared (issue 332) in a town, the same scripted walk each time. 300 s per run, read from 150 s on, diagnostics build, one run per setting.
Run Build / settings Frame (median) fps Submitting thread Waiting for the guards Changing protections Card busy
287 main 829188e9 (+ #2048 to build diagnostics) 63.5 ms 15.7 51.2 ms 49.4 ms 29.7 ms 68 %
291 this PR, VICTORY_WINE_MAP=0 62.2 ms 16.1 49.5 ms 44.3 ms 28.4 ms 70 %
292 this PR (defaults) 64.7 ms 15.5 51.5 ms 41.0 ms 28.0 ms 69 %
293 this PR, VICTORY_PORT_CONSTANTS=1 55.0 ms 18.2 40.8 ms 31.3 ms 20.9 ms 78 %
  • VICTORY_WINE_MAP alone does not make the frame shorter here. It takes the Wine server from 6.1 % to 0.4 % of a processor, the write-watch askings from 7.1 to 3.1 ms a frame and the texture refreshes from 9.9 to 5.5 ms. This tree's soft views and section windows already avoid most mapping calls. In the fork, which has neither, the same change took the guards' wait from 171 to 23 ms a frame and protection changes from 48 to 11 ms (first scene, 4K).
  • With the 32-bit heap in place (run 293):
    • 334 blocks a frame are made read-only instead of 494;
    • the frame is about 7 ms shorter, while drawing more per frame (6,435 draws against 5,771);
    • the card is busier (78 % against 70 %).
  • Noise: two runs of one setting lie 1 to 2 ms apart (287 against 291).
  • Still unexplained: each protection change still costs about 60 µs in this tree, against 17 µs in the fork on the same PC.
  • Picture: the frames kept from runs 291 to 293 are whole. The colour noise on the parked car's sill is there on main too.
  • Stability: no device lost and no amdgpu timeout in any of the runs.
  • The same numbers are written up in docs/linux-proton.md.

Not verified

  • Windows: not run. The code paths are behind on_wine(), but nothing was measured there.
  • Other hardware: NVIDIA under Proton, and any card other than this RX 7900 GRE. VICTORY_WINE_MAP is on by default under Wine for every card. Whether NVIDIA's driver imports private memory the same way was not checked; the port's own check through the card guards against zeros.
  • Scenes: only the town walk in these runs. In the fork, both changes have also run in the opening, the prison and missions since 2026-11-27.
  • Soft pool views: with VICTORY_SOFT_VIEWS covering the pool (1 or pool), the 32-bit heap is shown lazily and the port finds it uncommitted, so it falls back to copies. The launcher uses copies, which is fine.

Tests (under Wine, in a headless gamescope, on the card)

  • victory-hle xmem and wine_map: 49 passed, 1 failed. The failure, a_read_by_range_waits_only_for_a_remapping_that_meets_it, also fails on main. main gives 44 passed, 2 failed (that one and a_title_thread_goes_on_using_the_rest_of_a_view).
  • New tests, all passing:
    • under_wine_the_32_bit_heap_is_shown_as_memory_of_its_own;
    • under_wine_a_stretch_at_home_is_opened_where_it_is_and_a_view_only_if_shared, which runs on the card;
    • pages_at_home_are_never_made_read_only;
    • wine_map's three.
  • victory-gpu watch::, inplace::, port::: 73 passed, 4 failed. The four are many_askers_tests ×3 and what_is_left_alone_is_no_known_hole; main gives 71 passed and the same 4 failed.
  • Builds: release and diagnostics (with #2048) build.
  • Clippy: finds nothing new in the changed files. cargo clippy -D warnings and cargo xtask policy already fail on main (victory-shader, victory-loader, heap_sites/frame_users.rs).

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5551049746 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2455). Originally posted by [borntofrag34](https://github.com/borntofrag34) on 2026-11-29T13:13:16Z. --- Two changes for running under Wine/Proton, each behind its own switch. **On Windows nothing changes**: both act only when ntdll exports `wine_get_version`. They come from borntofrag34/VIctory-7900XTX's `linux-wine` branch, where they have been in use since 2026-11-26/27. They are ported here onto this tree's `xmem`, which has soft and lazy views, file-backed sections and the batched page mapper. ## What changes **`VICTORY_WINE_MAP`** (on under Wine; `=0` brings back today's behaviour) - **The problem:** the title shows its physical pages one 64 KiB view at a time. The stock Wine server walks a linked list of all the process's views for every map and unmap (`is_valid_view_addr`, `find_mapped_view`). It does that while the calling thread holds ntdll's `virtual_mutex`, the lock every `NtProtectVirtualMemory`, `NtGetWriteWatch`, query and fault also takes. (`docs/linux-proton.md` already describes this list, with a patched wineserver as the workaround.) - **What it does:** where the host would have a placeholder, the reservation is a plain one. - A page is shown by mapping its section's file there with the C library's `mmap` (`MAP_SHARED | MAP_FIXED`; the descriptor comes from `wine_server_handle_to_fd`), then committing the range. - A page is taken away with `MEM_DECOMMIT`. - The title's `VirtualFree` of placeholders (split, coalesce, release) is done on pieces of the reservation that we keep track of. - **Telling the GPU side:** a query calls these pages "private", so the GPU side learns where these reservations are through `title_view_space`, which `watch`'s `is_view` / `readable_view` / `placeholder` and `inplace::private_whole` use. - **Safety net:** at start-up, a page of a section of our own is shown this way, then read, written, protected and taken away. If any step fails, pages are shown as views, as before. **`VICTORY_PORT_HOME`** (on with `VICTORY_PORT_CONSTANTS=1` and `VICTORY_WINE_MAP`; `=0`: off) - **The problem:** vkd3d-proton opens a host heap on existing memory by importing it into Vulkan. With RADV that works for private memory and fails for a view of a section. vkd3d-proton then gives the heap memory of its own and reports success, so the card reads zeros and renderer port 1's frames are black. The kernel (`amdgpu_ttm_tt_get_user_pages`) also takes memory by address only as one mapping that the process owns. - **What it does:** before the 32-bit graphics heap's section is first shown, its whole stretch is made one anonymous mapping. Its pages then live there as private memory at the address the title maps them at; their bytes are copied in from the section, and back out when the title unmaps them. - If the title shows a page at a second address, the section goes back to being its file everywhere. - **Opening the heap:** `port.rs` opens the heap right there, with no view of ours. It checks through the card that the bytes really arrive, makes up to four attempts, and otherwise gives the stretch up (copied and guarded as before). - **Guard rule:** the guards never make these pages read-only. While one is read-only, the kernel refuses every submission and the device is lost. That rule is UwUCammie's 73d7b690 in the fork, credited in the commit. - **Views under Wine:** a stretch that is a view is now refused for the port under Wine, unless a one-time probe at start shows the card reads a view's bytes through such a heap. This avoids the black picture. **Side note, not changed here:** with `VICTORY_PORT_CONSTANTS` unset, the GPU side's port is on by default (except on Ampere), but `xmem`'s half (`port_on`, which runs `arrange`) defaults to off. The 32-bit heap is then never in one stretch, the log says `not one native-import-eligible stretch of a section: Scattered`, and nothing is ported. I think the same happens on Windows, but I have not checked. `VICTORY_PORT_HOME` only acts where `VICTORY_PORT_CONSTANTS=1` is set explicitly. ## Measured - **Machine:** RX 7900 GRE 16 GB + Ryzen 9 9900X, Arch with CachyOS kernel 7.3.6. - **Software:** Proton Experimental 11.0-20261112 (Wine 11.0, ntsync), vkd3d-proton 3.2.0, RADV (Mesa 26.3.1). - **Settings:** this tree's `victory play` settings with the frame clock at 16.667 ms. A save another player shared (issue 332) in a town, the same scripted walk each time. 300 s per run, read from 150 s on, diagnostics build, one run per setting. | Run | Build / settings | Frame (median) | fps | Submitting thread | Waiting for the guards | Changing protections | Card busy | |---|---|---|---|---|---|---|---| | 287 | `main` 829188e9 (+ #2048 to build diagnostics) | 63.5 ms | 15.7 | 51.2 ms | 49.4 ms | 29.7 ms | 68 % | | 291 | this PR, `VICTORY_WINE_MAP=0` | 62.2 ms | 16.1 | 49.5 ms | 44.3 ms | 28.4 ms | 70 % | | 292 | this PR (defaults) | 64.7 ms | 15.5 | 51.5 ms | 41.0 ms | 28.0 ms | 69 % | | 293 | this PR, `VICTORY_PORT_CONSTANTS=1` | **55.0 ms** | **18.2** | 40.8 ms | 31.3 ms | 20.9 ms | 78 % | - **`VICTORY_WINE_MAP` alone does not make the frame shorter here.** It takes the Wine server from 6.1 % to 0.4 % of a processor, the write-watch askings from 7.1 to 3.1 ms a frame and the texture refreshes from 9.9 to 5.5 ms. This tree's soft views and section windows already avoid most mapping calls. In the fork, which has neither, the same change took the guards' wait from 171 to 23 ms a frame and protection changes from 48 to 11 ms (first scene, 4K). - **With the 32-bit heap in place (run 293):** - 334 blocks a frame are made read-only instead of 494; - the frame is about 7 ms shorter, while drawing more per frame (6,435 draws against 5,771); - the card is busier (78 % against 70 %). - **Noise:** two runs of one setting lie 1 to 2 ms apart (287 against 291). - **Still unexplained:** each protection change still costs about 60 µs in this tree, against 17 µs in the fork on the same PC. - **Picture:** the frames kept from runs 291 to 293 are whole. The colour noise on the parked car's sill is there on `main` too. - **Stability:** no device lost and no amdgpu timeout in any of the runs. - The same numbers are written up in `docs/linux-proton.md`. ## Not verified - **Windows:** not run. The code paths are behind `on_wine()`, but nothing was measured there. - **Other hardware:** NVIDIA under Proton, and any card other than this RX 7900 GRE. `VICTORY_WINE_MAP` is on by default under Wine for every card. Whether NVIDIA's driver imports private memory the same way was not checked; the port's own check through the card guards against zeros. - **Scenes:** only the town walk in these runs. In the fork, both changes have also run in the opening, the prison and missions since 2026-11-27. - **Soft pool views:** with `VICTORY_SOFT_VIEWS` covering the pool (`1` or `pool`), the 32-bit heap is shown lazily and the port finds it uncommitted, so it falls back to copies. The launcher uses `copies`, which is fine. ## Tests (under Wine, in a headless gamescope, on the card) - **`victory-hle` `xmem` and `wine_map`:** 49 passed, 1 failed. The failure, `a_read_by_range_waits_only_for_a_remapping_that_meets_it`, also fails on `main`. `main` gives 44 passed, 2 failed (that one and `a_title_thread_goes_on_using_the_rest_of_a_view`). - **New tests, all passing:** - `under_wine_the_32_bit_heap_is_shown_as_memory_of_its_own`; - `under_wine_a_stretch_at_home_is_opened_where_it_is_and_a_view_only_if_shared`, which runs on the card; - `pages_at_home_are_never_made_read_only`; - `wine_map`'s three. - **`victory-gpu` `watch::`, `inplace::`, `port::`:** 73 passed, 4 failed. The four are `many_askers_tests` ×3 and `what_is_left_alone_is_no_known_hole`; `main` gives 71 passed and the same 4 failed. - **Builds:** release and diagnostics (with #2048) build. - **Clippy:** finds nothing new in the changed files. `cargo clippy -D warnings` and `cargo xtask policy` already fail on `main` (victory-shader, victory-loader, `heap_sites/frame_users.rs`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
borntofrag34 commented 2026-11-29 13:40:34 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by borntofrag34 on 2026-11-29T13:40:34Z.


Follow-up on "each protection change still costs about 60 µs here … not explained yet": a run with VICTORY_AB=10,VICTORY_FAULT_UNLOCKED (run 294, same town walk, 600 s, 22 phases each side) explains it. With unlocked faults (default) protections are 20.4 ms a frame and the faults never wait for the guards' lock. With the locked way they are 6.2 ms, but the faults wait 28.9 ms for the guards' lock, and the frame is the same (45.5 against 46.4 ms). About 310 faults a frame either way. The 55-60 µs is the faults' VirtualProtect calls queuing on Wine's virtual_mutex with each other, so the wait only moves from one counter to the other. Nothing to change there; the gap to the fork is elsewhere (its submitting thread works ~30 ms a frame here against ~40).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256716922 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2455#issuecomment-7256716922). Originally posted by [borntofrag34](https://github.com/borntofrag34) on 2026-11-29T13:40:34Z. --- Follow-up on "each protection change still costs about 60 µs here … not explained yet": a run with `VICTORY_AB=10,VICTORY_FAULT_UNLOCKED` (run 294, same town walk, 600 s, 22 phases each side) explains it. With unlocked faults (default) protections are 20.4 ms a frame and the faults never wait for the guards' lock. With the locked way they are 6.2 ms, but the faults wait 28.9 ms for the guards' lock, and the frame is the same (45.5 against 46.4 ms). About 310 faults a frame either way. The 55-60 µs is the faults' `VirtualProtect` calls queuing on Wine's `virtual_mutex` with each other, so the wait only moves from one counter to the other. Nothing to change there; the gap to the fork is elsewhere (its submitting thread works ~30 ms a frame here against ~40).
theotherp commented 2026-11-29 20:28:54 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by theotherp on 2026-11-29T20:28:54Z.


A data point for "NVIDIA under Proton: not checked". On NVIDIA this froze the whole system when the game was closed.

Setup: RTX 5080 16 GB, NVIDIA 620.73.04 (open kernel module), CachyOS kernel 7.3.6, Ryzen 9 7950X. Proton Experimental 11.0-20261112 (stock Wine server, run through umu-run), vkd3d-proton master 71cae091b beside victory.exe, VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains, VKD3D_CONFIG=no_descriptor_heap. Build: fork main f889bb07, plus #2034, #2035, #2160, #2745, #2834 and #2854, plus this PR. Release build, Series X profile, DLSS quality, VICTORY_VRAM_BUDGET_MB=11000. VICTORY_PORT_CONSTANTS was not set, so only VICTORY_WINE_MAP (its default under Wine) was active.

What happened: the log showed title pages are shown with the host's mmap, beside Wine's server, and play was normal for about 4 minutes. 1 to 2 minutes after start, the kernel logged about 40 NVRM errors within two minutes:

NVRM: GPU0 nvAssertFailedNoLog: Assertion failed: NV_OK == status @ gpu_vaspace.c:4155
NVRM: GPU0 nvAssertFailedNoLog: Assertion failed: NV_OK == status @ gpu_vaspace.c:1846
NVRM: nvCheckFailedNoLog: Check failed: status != NV_OK @ gpu_vaspace.c:4088
NVRM: nvCheckOkFailedNoLog: Check failed: Invalid argument to call [NV_ERR_INVALID_ARGUMENT] (0x0000001F) returned from _gvaspaceMappingInsert(...)
NVRM: nvCheckFailedNoLog: Check failed: NV_OK == status @ virt_mem_allocator_gm107.c:2459
NVRM: dmaAllocMapping_GM107: can't update VA space for mapping @vaddr=0x671ac0000

The game kept running. On Alt+F4 the log reached title suspended; ending the title, and then the whole desktop froze. Only a hard reset recovered it.

Without this PR: in the other runs that day on the same machine (about ten, three of them this build with VICTORY_WINE_MAP=0), none of these NVRM errors appeared, and closing the game worked. A separate issue: there were three Xid 109 hangs that day, all with a patched Wine server, and none with the stock one used here.

It's a single run, so it isn't proof. But the timing points at the mmap'd title pages and the NVIDIA driver's GPU mappings of that memory. It may be worth keeping VICTORY_WINE_MAP off on non-AMD adapters until it's checked there.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262114457 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2455#issuecomment-7262114457). Originally posted by [theotherp](https://github.com/theotherp) on 2026-11-29T20:28:54Z. --- A data point for "NVIDIA under Proton: not checked". On NVIDIA this froze the whole system when the game was closed. **Setup:** RTX 5080 16 GB, NVIDIA 620.73.04 (open kernel module), CachyOS kernel 7.3.6, Ryzen 9 7950X. Proton Experimental 11.0-20261112 (stock Wine server, run through `umu-run`), vkd3d-proton master `71cae091b` beside `victory.exe`, `VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains`, `VKD3D_CONFIG=no_descriptor_heap`. Build: fork `main` `f889bb07`, plus #2034, #2035, #2160, #2745, #2834 and #2854, plus this PR. Release build, Series X profile, DLSS quality, `VICTORY_VRAM_BUDGET_MB=11000`. `VICTORY_PORT_CONSTANTS` was not set, so only `VICTORY_WINE_MAP` (its default under Wine) was active. **What happened:** the log showed `title pages are shown with the host's mmap, beside Wine's server`, and play was normal for about 4 minutes. 1 to 2 minutes after start, the kernel logged about 40 NVRM errors within two minutes: ``` NVRM: GPU0 nvAssertFailedNoLog: Assertion failed: NV_OK == status @ gpu_vaspace.c:4155 NVRM: GPU0 nvAssertFailedNoLog: Assertion failed: NV_OK == status @ gpu_vaspace.c:1846 NVRM: nvCheckFailedNoLog: Check failed: status != NV_OK @ gpu_vaspace.c:4088 NVRM: nvCheckOkFailedNoLog: Check failed: Invalid argument to call [NV_ERR_INVALID_ARGUMENT] (0x0000001F) returned from _gvaspaceMappingInsert(...) NVRM: nvCheckFailedNoLog: Check failed: NV_OK == status @ virt_mem_allocator_gm107.c:2459 NVRM: dmaAllocMapping_GM107: can't update VA space for mapping @vaddr=0x671ac0000 ``` The game kept running. On Alt+F4 the log reached `title suspended; ending the title`, and then the whole desktop froze. Only a hard reset recovered it. **Without this PR:** in the other runs that day on the same machine (about ten, three of them this build with `VICTORY_WINE_MAP=0`), none of these NVRM errors appeared, and closing the game worked. A separate issue: there were three Xid 109 hangs that day, all with a patched Wine server, and none with the stock one used here. It's a single run, so it isn't proof. But the timing points at the mmap'd title pages and the NVIDIA driver's GPU mappings of that memory. It may be worth keeping `VICTORY_WINE_MAP` off on non-AMD adapters until it's checked there.
Kassadd commented 2026-11-29 21:41:23 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Kassadd on 2026-11-29T21:41:23Z.


A Wine run on the current tree, and one number that may be worth a look.

Built main at cec481f4 (the tree of v2026.11.29.03) with this PR merged on top — it
applied with no conflict — plus #2585, and ran it under Proton.

Environment: RTX 4080 SUPER 16 GB, i9-14900K, 62 GB, CachyOS, Hyprland (Wayland),
NVIDIA 620.73.04, Proton Experimental ...-20261128 (vkd3d-proton 71cae0), Series X
1.0.2.1, --res 1080to1440, shader cache emptied first as the release notes ask.

The start-up check runs. The log has
wine_map: title pages are shown with the host's mmap, beside Wine's server (VICTORY_WINE_MAP=0: as views), then the VirtualFree lines for reservations that stand
for placeholders. Nothing warns and nothing falls back to views. VICTORY_PORT_HOME I
did not test separately.

The run: 6m 13s, 19–29 fps, up to 11,795 draws/frame, no Xid in the kernel log and
no device lost; I stopped it, it did not die. That is the longest run I have had under
Wine, but I cannot attribute it to this PR. Three runs, one variable apart:

run duration ended
.03 as released 1–3 min 0xc000001d
.03 + #2585 only 5m 06s stopped; no fault
.03 + #2585 + #2455 6m 13s stopped; no fault

The difference between the last two is 1m 7s and I did not exercise VICTORY_WINE_MAP=0
to isolate it, so I am not claiming the extra minute as this PR's. What this run does
establish is that the Wine mmap path works for six minutes of play without a fault of
its own.

The number I think matters. With the camera still, a frame is 51 ms, and the layer's
own breakdown puts 34 ms in preparing, 18 ms of it in copies for 77 MB, with the
card at 3.8 ms (7% busy) and 67,000 list calls a frame. Turning the camera makes it
worse — the frame goes to 8 fps — but I do not have that breakdown for a turning frame,
so I cannot say the 34 ms is what grows. If this PR is meant to help the memory path
rather than to fix a fault, that 18 ms is where I would expect it to show, and on this
one machine and this one measurement I did not see it move. I have no A/B for copies
without the PR, so that is an observation to check, not a finding against it.

What I did not do: Windows, a patched wineserver to compare against, or a longer run.
Logs and the exact invocation are available on request.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7263072403 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2455#issuecomment-7263072403). Originally posted by [Kassadd](https://github.com/Kassadd) on 2026-11-29T21:41:23Z. --- **A Wine run on the current tree, and one number that may be worth a look.** Built `main` at `cec481f4` (the tree of v2026.11.29.03) with this PR merged on top — it applied with no conflict — plus #2585, and ran it under Proton. **Environment:** RTX 4080 SUPER 16 GB, i9-14900K, 62 GB, CachyOS, Hyprland (Wayland), NVIDIA 620.73.04, Proton Experimental `...-20261128` (vkd3d-proton `71cae0`), Series X `1.0.2.1`, `--res 1080to1440`, shader cache emptied first as the release notes ask. **The start-up check runs.** The log has `wine_map: title pages are shown with the host's mmap, beside Wine's server (VICTORY_WINE_MAP=0: as views)`, then the `VirtualFree` lines for reservations that stand for placeholders. Nothing warns and nothing falls back to views. `VICTORY_PORT_HOME` I did not test separately. **The run:** 6m 13s, 19–29 fps, up to 11,795 draws/frame, no `Xid` in the kernel log and no `device lost`; I stopped it, it did not die. That is the longest run I have had under Wine, but I cannot attribute it to this PR. Three runs, one variable apart: | run | duration | ended | |---|---:|---| | .03 as released | 1–3 min | `0xc000001d` | | .03 + #2585 only | 5m 06s | stopped; no fault | | .03 + #2585 + #2455 | 6m 13s | stopped; no fault | The difference between the last two is 1m 7s and I did not exercise `VICTORY_WINE_MAP=0` to isolate it, so I am not claiming the extra minute as this PR's. What this run does establish is that the Wine `mmap` path works for six minutes of play without a fault of its own. **The number I think matters.** With the camera still, a frame is 51 ms, and the layer's own breakdown puts **34 ms in `preparing`, 18 ms of it in `copies` for 77 MB**, with the card at 3.8 ms (7% busy) and 67,000 list calls a frame. Turning the camera makes it worse — the frame goes to 8 fps — but I do not have that breakdown for a turning frame, so I cannot say the 34 ms is what grows. If this PR is meant to help the memory path rather than to fix a fault, that 18 ms is where I would expect it to show, and on this one machine and this one measurement I did not see it move. I have no A/B for `copies` without the PR, so that is an observation to check, not a finding against it. What I did not do: Windows, a patched wineserver to compare against, or a longer run. Logs and the exact invocation are available on request.
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/2455:upstream-pr/2455'
git switch 'upstream-pr/2455'

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/2455'
git switch 'upstream-pr/2455'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2455'
git switch 'upstream-pr/2455'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2455'
git switch 'main'
git merge --squash 'upstream-pr/2455'
git switch 'main'
git merge --ff-only 'upstream-pr/2455'
git switch 'main'
git merge 'upstream-pr/2455'
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
trustno1-coder/VIctory-NVIDIA!2455
No description provided.