Linux/Proton on AMD (RX 7900 XT, RADV): in-game like on Windows; what it takes (wineserver view list, d3dcompiler, AMD faults) #184

Open
opened 2026-11-26 03:37:44 +00:00 by github-bot · 6 comments
Owner

@⁠datingesp-hash on GitHub · 2026-11-24 22:18 UTC · original

Thank you for the fork. It's the first build that renders the world on my machine. Under Linux/Proton it now gets into the game the same way it does on Windows. Below is what it took and what I measured along the way, so others on Linux can get there too.

Setup: RX 7900 XT (RDNA3, Navi31), Mesa 26.3.1 RADV, Ryzen 9 9900X, 30 GB, CachyOS kernel 7.3.5. GE-Proton11-14 (wine-11.0 staging; vkd3d-proton v3.1-83-gcae8353ed-GE), its wine run directly, with VKD3D_CONFIG=descriptor_heap. Series X files, 1.0.2.1. Fork at 4e17478 (earlier 004bf69, 1684989), release build, unmodified except where noted. My launcher is a script that builds the fork with cargo-xwin and runs it under bwrap, with the game folder read-only.

Where it stands now: with the points below it behaves like the fork on Windows. The opening cutscenes play, and the prison prologue renders with textures and sunlight: the yard, the buildings, inmates, Lucia's hair and clothes. The player can move the camera and walk. Faces and skin are missing (only teeth and lashes show), some walls are missing, and shadowed areas are black, as the README describes.

In short, on Linux it needs:

  1. A wineserver that doesn't walk a list of every mapped view on each map and unmap (section 1). Without it the world crawls at seconds per frame and looks broken.
  2. Microsoft's d3dcompiler_47, or a DXC fallback (section 2). Without it the world is black.
  3. VKD3D_CONFIG=descriptor_heap. Without it vkd3d-proton caps the view heap at 1,000,000; the title asks for 1,245,184, and the GPU faults about 45 s in.
  4. GE-Proton 11-13 or newer: older dxil-spirv emits invalid SPIR-V for the first mesh pipeline (exit code 3).
  5. On AMD: VICTORY_SKIP_PIPELINES=fc5e66f8f873d3bb, and not the late-wait switches (sections 3-4).

1. wineserver walks a list of every mapped view on each map and unmap (the main Linux-only problem)

In the world, texture refreshes cost 0.2-3 s per frame. Almost all of that was the line "waiting for title memory to hold still (the runtime remapping it)", meaning the title_memory_remapping write lock. I timed xmem.rs with counters around map, unmap and the lock:

  • 500-1,200 host map/unmap calls per second, almost all from map_alias (the GPU page-mapping copies). Each is one 64 KiB page: I tried merging consecutive pages into runs, and the average run was 1.0 pages.
  • Under Wine, each MapViewOfFile3 cost 450-900 µs and each UnmapViewOfFile2 300-500 µs. The remap lock was held 460-930 ms of every second.
  • The process had 22,552 memfd:wine-mapping views (/proc/PID/maps).
  • wineserver sat at 57-91 % of a core. perf on wineserver: 54.7 % is_valid_view_addr, 44.3 % req_unmap_view. Both walk process->views, a linked list, on every map_view and unmap_view request (server/mapping.c).

So this is O(views) per call, inside a single-threaded server. On Windows these calls take microseconds, which is probably why it never showed up there.

I patched wineserver to also index views in a red-black tree keyed by (process, base), using wine/rbtree.h, which the server already uses. find_mapped_view, find_mapped_addr and is_valid_view_addr become O(log n). The patch is about 85 lines in server/mapping.c, with no protocol change, and it falls back to the list if two views of a process ever share a base. I built it from GE-Proton11-14's own wine tree, so the protocol matches. Same scene, same settings:

stock wineserver patched
map / unmap 450-900 / 300-500 µs 9-12 / 10-15 µs
remap lock held 460-930 ms per second 12-43 ms per second
"textures" per frame 0.2-3 s 30-57 ms
preparing per frame 0.5-3 s 110-150 ms
wineserver CPU 57-91 % 3 %

With it, the world runs like it does on Windows. Nothing needs to change in the fork. I mention it because anyone testing under Proton will see this as "VIctory is slow" or "the world doesn't load", and from Windows it looks like a different program. I'd also like to send the patch to Wine. One possible relief on the fork's side: fewer, larger views for the tiled-heap aliases, if the console's page granularity allows it.

2. Runtime D3DCompile under Wine (confirming #6)

Same as the reports in #6, on AMD too. Wine's builtin d3dcompiler_47 fails with E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer'. Then no argument clamp: indirect execution dropped, and the world is black except subtitles and credits (max ~1,500 draws/frame). Microsoft's d3dcompiler_47.dll (winetricks d3dcompiler_47) fixes it: about 7,000 draws/frame, and the world renders. A DXC fallback as proposed in #6 would make that step unnecessary.

3. AMD: the late-wait switches fault the GPU as the loading screen ends

With the patched wineserver, I compared configurations from the same start:

Configuration Result
default (no speed switches) gets into the world; no fault in 3 runs
VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024 3 of 4 runs lost the device right as the loading screen ended; when it got in, only slightly faster than the default
VICTORY_RELAY=2 (with VICTORY_LATE_WAIT=3) lost the device at the end of loading (1 of 1)

The faults are RADV GPUVM faults. The kernel shows a [gfxhub] page fault with Faulty UTCL2 client ID: TCP (0x8) (a texture read) at a mapped-looking address, for example 0x8002e9631000. The log has host GPU device removed after 1 submissions sent ahead (VICTORY_LATE_WAIT=1) of 1 lists; device removed: 0x887A0005, about 50 s after launch with a warm cache. My guess, which I haven't verified: work in flight reads tiled-heap pages that the title remaps (map_alias) before the flight lands. With the wineserver fix those remaps now happen in microseconds, so the window is much wider than it was. A diagnostics build with VICTORY_D3D12_DEBUG=1 could name the command; I haven't run one yet.

4. AMD: fc5e66f8f873d3bb (as in #3)

Without VICTORY_SKIP_PIPELINES=fc5e66f8f873d3bb, one run in the world lost the device about 9 minutes in. That was a GPUVM fault at address 0x00000000, kernel Faulty UTCL2 client ID: SQC (data). That run also had the late-wait switches, so the two are confounded. With the skip and VICTORY_NO_WATCHDOG=1 I have walked around the prologue without a fault.

5. Where the frame goes now (default switches, patched wineserver)

This is in case it helps the speed work. As far as I can tell it matches Windows, so it isn't a Linux problem:

  • Your lines: preparing ~100-130 ms (copies ~50-60 ms for ~150-190 MB; textures 15-35 ms); GPU 75-105 ms; copying back ~50 ms for ~70-100 MB. Host copies in the card's memory: ~1,100-1,300 hash passes per frame and ~1,370 pieces fetched (~89 MB).

  • the card's clock per frame: nothing of ours queued 410-470 ms (the card about 25-28 % busy). Of that, 55-75 ms was while the submitting thread was working, and the rest while the title had not submitted.

  • CPU (perf, user space, whole process, 20 s): about 1.1 cores busy in total out of 24. 67 % is PE code (title + VIctory). Wine is ~15 %, mostly RtlQueryPerformanceCounter polling and heap allocation, plus virtual_check_buffer_for_write and NtGetWriteWatch at ~3.5 %. RADV is 2.5 %.

  • Title waits: I timed the title's WaitForSingleObject(Ex), WaitForMultipleObjects(Ex), Sleep(Ex), WaitOnAddress and SleepConditionVariable* by caller and thread, with an HLE override. None of the waits are on events passed to SetEventOnCompletion, so the title isn't waiting for our fences. What I saw:

    • One thread waits about once per frame at title+0x4e7f358, for 620-700 ms per second.
    • The job workers wait at title+0x2215eca; the busiest work 30-60 % of the time.
    • Most other threads wait over 90 % of the time.

    Title threads that aren't in those waits mostly sit in ntsync waits or futexes, which suggests direct ntdll waits or our locks.

So the frame looks like a serial chain: the title, then our prepare, wait and copy-back, then the GPU. Nothing in it is saturated.

6. Shaders that don't translate in the prologue (8)

compute 5dc3b25986622949  GFX10 code at 0x7e8:  v_cvt_f32_f64 is not supported
compute 6f225b641c5b0708  GFX10 code at 0x7f8:  v_cvt_f32_f64 is not supported
compute a929109552ce1e84  GFX10 code at 0xd00:  v_permlanex16_b32 is not supported
compute b22a16a178976e1b  GFX10 code at 0x22c:  a wave sum of 16-bit floats where not every lane runs is not supported
compute ceb5eb68cd99cb07  GFX10 code at 0x38:   a descriptor's address or format read as data is not supported
pixel   6b6db9f1a526daeb  GFX10 code at 0x49dc: a descriptor read only as data is not supported
pixel   78f3f2fc53a69531  GFX10 code at 0x1464: the first half of an interpolation is not supported
pixel   7d0f14ce44746d7e  GFX10 code at 0x5204: a descriptor read only as data is not supported

The two "descriptor read only as data" pixel programs may be the skin and face materials: Lucia shows only teeth and lashes. In the world, 350-400 draws per frame are dropped "without a host pipeline".

7. Smaller notes

  • The intro video flicker reported in #6 happens here too (AMD).
  • VICTORY_TEXTURE_NO_WAIT=1 (before the wineserver fix) moved the time from "textures" to "copying back" (1.4-2.9 s) and the screen went black. I didn't dig further, since the wineserver fix removed the need for it.
  • Each new commit changes the exe hash, so the whole shader cache rebuilds. The first run after an update loads much slower, and with perf about 40 % of the CPU was RADV compiling. It's expected, but worth knowing when comparing runs.

I'm happy to run a diagnostics build, test VICTORY_INPLACE, or try anything else on AMD/Linux.

AI-assisted: Claude Code ran the builds and measurements on my machine, wrote the wineserver patch, and drafted this report. No game data, screenshots or names beyond hashes and offsets.

**@⁠datingesp-hash** on GitHub · 2026-11-24 22:18 UTC · [original](https://github.com/fxceless/victory-fork/issues/184) Thank you for the fork. It's the first build that renders the world on my machine. Under Linux/Proton it now gets into the game the same way it does on Windows. Below is what it took and what I measured along the way, so others on Linux can get there too. **Setup:** RX 7900 XT (RDNA3, Navi31), Mesa 26.3.1 RADV, Ryzen 9 9900X, 30 GB, CachyOS kernel 7.3.5. GE-Proton11-14 (wine-11.0 staging; vkd3d-proton v3.1-83-gcae8353ed-GE), its `wine` run directly, with `VKD3D_CONFIG=descriptor_heap`. Series X files, 1.0.2.1. Fork at `4e17478` (earlier `004bf69`, `1684989`), release build, unmodified except where noted. My launcher is a script that builds the fork with cargo-xwin and runs it under bwrap, with the game folder read-only. **Where it stands now:** with the points below it behaves like the fork on Windows. The opening cutscenes play, and the prison prologue renders with textures and sunlight: the yard, the buildings, inmates, Lucia's hair and clothes. The player can move the camera and walk. Faces and skin are missing (only teeth and lashes show), some walls are missing, and shadowed areas are black, as the README describes. **In short, on Linux it needs:** 1. A wineserver that doesn't walk a list of every mapped view on each map and unmap (section 1). Without it the world crawls at seconds per frame and looks broken. 2. Microsoft's `d3dcompiler_47`, or a DXC fallback (section 2). Without it the world is black. 3. `VKD3D_CONFIG=descriptor_heap`. Without it vkd3d-proton caps the view heap at 1,000,000; the title asks for 1,245,184, and the GPU faults about 45 s in. 4. GE-Proton 11-13 or newer: older dxil-spirv emits invalid SPIR-V for the first mesh pipeline (exit code 3). 5. On AMD: `VICTORY_SKIP_PIPELINES=fc5e66f8f873d3bb`, and **not** the late-wait switches (sections 3-4). ## 1. wineserver walks a list of every mapped view on each map and unmap (the main Linux-only problem) In the world, texture refreshes cost **0.2-3 s per frame**. Almost all of that was the line *"waiting for title memory to hold still (the runtime remapping it)"*, meaning the `title_memory_remapping` write lock. I timed `xmem.rs` with counters around `map`, `unmap` and the lock: - 500-1,200 host map/unmap calls per second, almost all from `map_alias` (the GPU page-mapping copies). Each is **one 64 KiB page**: I tried merging consecutive pages into runs, and the average run was 1.0 pages. - Under Wine, each `MapViewOfFile3` cost **450-900 µs** and each `UnmapViewOfFile2` **300-500 µs**. The remap lock was held **460-930 ms of every second**. - The process had **22,552 `memfd:wine-mapping` views** (`/proc/PID/maps`). - wineserver sat at **57-91 % of a core**. `perf` on wineserver: **54.7 % `is_valid_view_addr`, 44.3 % `req_unmap_view`**. Both walk `process->views`, a linked list, on every `map_view` and `unmap_view` request (`server/mapping.c`). So this is O(views) per call, inside a single-threaded server. On Windows these calls take microseconds, which is probably why it never showed up there. I patched wineserver to also index views in a red-black tree keyed by (process, base), using `wine/rbtree.h`, which the server already uses. `find_mapped_view`, `find_mapped_addr` and `is_valid_view_addr` become O(log n). The patch is about 85 lines in `server/mapping.c`, with no protocol change, and it falls back to the list if two views of a process ever share a base. I built it from GE-Proton11-14's own wine tree, so the protocol matches. Same scene, same settings: | | stock wineserver | patched | |---|---|---| | `map` / `unmap` | 450-900 / 300-500 µs | **9-12 / 10-15 µs** | | remap lock held | 460-930 ms per second | **12-43 ms per second** | | "textures" per frame | 0.2-3 s | **30-57 ms** | | preparing per frame | 0.5-3 s | **110-150 ms** | | wineserver CPU | 57-91 % | 3 % | With it, the world runs like it does on Windows. Nothing needs to change in the fork. I mention it because anyone testing under Proton will see this as "VIctory is slow" or "the world doesn't load", and from Windows it looks like a different program. I'd also like to send the patch to Wine. One possible relief on the fork's side: fewer, larger views for the tiled-heap aliases, if the console's page granularity allows it. ## 2. Runtime `D3DCompile` under Wine (confirming #6) Same as the reports in #6, on AMD too. Wine's builtin `d3dcompiler_47` fails with `E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer'`. Then `no argument clamp: indirect execution dropped`, and the world is black except subtitles and credits (max ~1,500 draws/frame). Microsoft's `d3dcompiler_47.dll` (`winetricks d3dcompiler_47`) fixes it: about 7,000 draws/frame, and the world renders. A DXC fallback as proposed in #6 would make that step unnecessary. ## 3. AMD: the late-wait switches fault the GPU as the loading screen ends With the patched wineserver, I compared configurations from the same start: | Configuration | Result | |---|---| | default (no speed switches) | gets into the world; no fault in 3 runs | | `VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024` | **3 of 4 runs lost the device right as the loading screen ended**; when it got in, only slightly faster than the default | | `VICTORY_RELAY=2` (with `VICTORY_LATE_WAIT=3`) | lost the device at the end of loading (1 of 1) | The faults are RADV `GPUVM fault`s. The kernel shows a `[gfxhub] page fault` with `Faulty UTCL2 client ID: TCP (0x8)` (a texture read) at a mapped-looking address, for example `0x8002e9631000`. The log has `host GPU device removed after 1 submissions sent ahead (VICTORY_LATE_WAIT=1) of 1 lists; device removed: 0x887A0005`, about 50 s after launch with a warm cache. My guess, which I haven't verified: work in flight reads tiled-heap pages that the title remaps (`map_alias`) before the flight lands. With the wineserver fix those remaps now happen in microseconds, so the window is much wider than it was. A diagnostics build with `VICTORY_D3D12_DEBUG=1` could name the command; I haven't run one yet. ## 4. AMD: `fc5e66f8f873d3bb` (as in #3) Without `VICTORY_SKIP_PIPELINES=fc5e66f8f873d3bb`, one run in the world lost the device about 9 minutes in. That was a `GPUVM fault at address 0x00000000`, kernel `Faulty UTCL2 client ID: SQC (data)`. That run also had the late-wait switches, so the two are confounded. With the skip and `VICTORY_NO_WATCHDOG=1` I have walked around the prologue without a fault. ## 5. Where the frame goes now (default switches, patched wineserver) This is in case it helps the speed work. As far as I can tell it matches Windows, so it isn't a Linux problem: - **Your lines:** preparing ~100-130 ms (copies ~50-60 ms for **~150-190 MB**; textures 15-35 ms); GPU 75-105 ms; copying back ~50 ms for **~70-100 MB**. Host copies in the card's memory: ~1,100-1,300 hash passes per frame and ~1,370 pieces fetched (~89 MB). - **`the card's clock per frame`:** *nothing of ours queued* **410-470 ms** (the card about **25-28 % busy**). Of that, 55-75 ms was while the submitting thread was working, and the rest *while the title had not submitted*. - **CPU (`perf`, user space, whole process, 20 s):** about **1.1 cores** busy in total out of 24. 67 % is PE code (title + VIctory). Wine is ~15 %, mostly `RtlQueryPerformanceCounter` polling and heap allocation, plus `virtual_check_buffer_for_write` and `NtGetWriteWatch` at ~3.5 %. RADV is 2.5 %. - **Title waits:** I timed the title's `WaitForSingleObject(Ex)`, `WaitForMultipleObjects(Ex)`, `Sleep(Ex)`, `WaitOnAddress` and `SleepConditionVariable*` by caller and thread, with an HLE override. **None of the waits are on events passed to `SetEventOnCompletion`**, so the title isn't waiting for our fences. What I saw: - One thread waits about once per frame at `title+0x4e7f358`, for 620-700 ms per second. - The job workers wait at `title+0x2215eca`; the busiest work 30-60 % of the time. - Most other threads wait over 90 % of the time. Title threads that aren't in those waits mostly sit in `ntsync` waits or futexes, which suggests direct `ntdll` waits or our locks. So the frame looks like a serial chain: the title, then our prepare, wait and copy-back, then the GPU. Nothing in it is saturated. ## 6. Shaders that don't translate in the prologue (8) ``` compute 5dc3b25986622949 GFX10 code at 0x7e8: v_cvt_f32_f64 is not supported compute 6f225b641c5b0708 GFX10 code at 0x7f8: v_cvt_f32_f64 is not supported compute a929109552ce1e84 GFX10 code at 0xd00: v_permlanex16_b32 is not supported compute b22a16a178976e1b GFX10 code at 0x22c: a wave sum of 16-bit floats where not every lane runs is not supported compute ceb5eb68cd99cb07 GFX10 code at 0x38: a descriptor's address or format read as data is not supported pixel 6b6db9f1a526daeb GFX10 code at 0x49dc: a descriptor read only as data is not supported pixel 78f3f2fc53a69531 GFX10 code at 0x1464: the first half of an interpolation is not supported pixel 7d0f14ce44746d7e GFX10 code at 0x5204: a descriptor read only as data is not supported ``` The two "descriptor read only as data" pixel programs may be the skin and face materials: Lucia shows only teeth and lashes. In the world, 350-400 draws per frame are dropped "without a host pipeline". ## 7. Smaller notes - The **intro video flicker** reported in #6 happens here too (AMD). - `VICTORY_TEXTURE_NO_WAIT=1` (before the wineserver fix) moved the time from "textures" to "copying back" (1.4-2.9 s) and the screen went black. I didn't dig further, since the wineserver fix removed the need for it. - Each new commit changes the exe hash, so the whole shader cache rebuilds. The first run after an update loads much slower, and with `perf` about 40 % of the CPU was RADV compiling. It's expected, but worth knowing when comparing runs. I'm happy to run a diagnostics build, test `VICTORY_INPLACE`, or try anything else on AMD/Linux. *AI-assisted: Claude Code ran the builds and measurements on my machine, wrote the wineserver patch, and drafted this report. No game data, screenshots or names beyond hashes and offsets.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:37:44 +00:00
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-25 00:12 UTC · original · edited 2026-11-25 06:36 UTC

Independent reproduction of section 1, plus a second wineserver patch and a few facts that may save others time. No game data below, only counters.

Setup: RX 7900 XT, Mesa 26.3.1, CachyOS, the distro's stock Wine 11.22 (not GE/Proton), official dxvk dxgi plus GE-Proton11-14's vkd3d-proton (cae8353ed, needed for VKD3D_CONFIG=descriptor_heap), Microsoft's d3dcompiler_47. Fork 2119b0e + upstream #454 (VICTORY_NO_WATCHDOG).

1. The stock server is the bottleneck here too. With the opening cutscene running (3,000-6,000 draws/frame): stock wineserver climbed to an average of ~75 % of a core over a 5-minute run and world frames took 5-20 s (preparing 5-17 s: copies 1-16 s, textures 2-10 s). With a patched server (below), wineserver sits at ~3 % and frames take 580-650 ms (preparing ~250 ms, GPU ~210 ms, copying back ~120 ms). That matches the 410-470 ms in this report on the same card.

2. WINESERVER=/path/to/patched is ignored by Wine 11.22. exec_wineserver() in dlls/ntdll/unix/loader.c tries bin_dir/wineserver first and only then $WINESERVER, so the system server always wins and a patched build looks like it does nothing (it cost me two runs). Start the patched server for the prefix before the client, and clients connect to whichever server owns the prefix socket:

WINEPREFIX=... wineserver -k; WINEPREFIX=... /path/to/patched/wineserver -p; WINEPREFIX=... wine victory.exe ...

It must be built from the same Wine version as the client (I built it from the wine-11.22 tag; ./configure --enable-win64 ... && make server/wineserver is enough).

3. My patch (same idea as the one described above: views also indexed in a red-black tree by base; the views of a process never overlap, so find_mapped_view, find_mapped_addr and is_valid_view_addr become O(log n); no protocol change; a view whose base is already in the tree, which cannot happen while views do not overlap, stays list-only and is found by a walk). 196 lines of diff against wine-11.22:

wineserver-views-rbtree.patch
diff --git a/server/file.h b/server/file.h
index 99215b8..15aa296 100644
--- a/server/file.h
+++ b/server/file.h
@@ -180,6 +180,7 @@ extern struct file *get_view_file( const struct memory_view *view, unsigned int
 extern const struct pe_image_info *get_view_image_info( const struct memory_view *view, client_ptr_t *base );
 extern int get_view_nt_name( const struct memory_view *view, struct unicode_str *name );
 extern void free_mapped_views( struct process *process );
+extern void init_mapped_views( struct process *process );
 extern size_t get_page_size(void);
 extern struct mapping *create_fd_mapping( struct object *root, struct unicode_str name, struct fd *fd,
                                           unsigned int attr, const struct security_descriptor *sd );
diff --git a/server/mapping.c b/server/mapping.c
index d1b0fc3..4233509 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -98,6 +98,8 @@ static struct list shared_map_list = LIST_INIT( shared_map_list );
 struct memory_view
 {
     struct list     entry;           /* entry in per-process view list */
+    struct wine_rb_entry rb_entry;   /* entry in the per-process tree of views by base */
+    struct wine_rb_tree *tree;       /* the tree rb_entry is in, NULL if the view is only in the list */
     struct fd      *fd;              /* fd for mapped file */
     struct ranges  *committed;       /* list of committed ranges in this mapping */
     struct shared_map *shared;       /* temp file for shared PE mapping */
@@ -384,13 +386,57 @@ static int create_temp_file( file_pos_t size )
     return fd;
 }
 
+/* The views of a process never overlap, so they are also kept in a tree by base address: the map and unmap
+ * requests then cost O(log n) instead of a walk over every view of the process (a title that maps 64 KiB pages by
+ * the thousand made wineserver spend most of a core in these loops). A view whose base is already in the tree
+ * (cannot happen while views do not overlap) stays list-only and is found by a walk of the list. */
+static int untracked_views;
+
+static int compare_view_base( const void *key, const struct wine_rb_entry *entry )
+{
+    const struct memory_view *view = WINE_RB_ENTRY_VALUE( entry, struct memory_view, rb_entry );
+    client_ptr_t base = *(const client_ptr_t *)key;
+
+    if (base < view->base) return -1;
+    return base > view->base;
+}
+
+void init_mapped_views( struct process *process )
+{
+    wine_rb_init( &process->views_tree, compare_view_base );
+}
+
+/* the view with the greatest base not above addr, or NULL */
+static struct memory_view *find_view_at_or_below( struct process *process, client_ptr_t addr )
+{
+    struct wine_rb_entry *entry = process->views_tree.root, *best = NULL;
+
+    while (entry)
+    {
+        struct memory_view *view = WINE_RB_ENTRY_VALUE( entry, struct memory_view, rb_entry );
+        if (view->base <= addr)
+        {
+            best = entry;
+            entry = entry->right;
+        }
+        else entry = entry->left;
+    }
+    return best ? WINE_RB_ENTRY_VALUE( best, struct memory_view, rb_entry ) : NULL;
+}
+
 /* find a memory view from its base address */
 struct memory_view *find_mapped_view( struct process *process, client_ptr_t base )
 {
     struct memory_view *view;
+    struct wine_rb_entry *entry = wine_rb_get( &process->views_tree, &base );
 
-    LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry )
-        if (view->base == base) return view;
+    if (entry) return WINE_RB_ENTRY_VALUE( entry, struct memory_view, rb_entry );
+
+    if (untracked_views)
+    {
+        LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry )
+            if (!view->tree && view->base == base) return view;
+    }
 
     set_error( STATUS_NOT_MAPPED_VIEW );
     return NULL;
@@ -399,10 +445,15 @@ struct memory_view *find_mapped_view( struct process *process, client_ptr_t base
 /* find a memory view from any address inside it */
 static struct memory_view *find_mapped_addr( struct process *process, client_ptr_t addr )
 {
-    struct memory_view *view;
+    struct memory_view *view = find_view_at_or_below( process, addr );
 
-    LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry )
-        if (addr >= view->base && addr < view->base + view->size) return view;
+    if (view && addr < view->base + view->size) return view;
+
+    if (untracked_views)
+    {
+        LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry )
+            if (!view->tree && addr >= view->base && addr < view->base + view->size) return view;
+    }
 
     set_error( STATUS_NOT_MAPPED_VIEW );
     return NULL;
@@ -417,12 +468,19 @@ static int is_valid_view_addr( struct process *process, client_ptr_t addr, mem_s
     if (addr & (process->page_size - 1)) return 0;
     if (addr + size < addr) return 0;  /* overflow */
 
-    /* check for overlapping view */
-    LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry )
+    /* check for overlapping view: the last view starting below the end of the range is the only candidate,
+     * as the views before it end before it starts */
+    if ((view = find_view_at_or_below( process, addr + size - 1 )) && view->base + view->size > addr) return 0;
+
+    if (untracked_views)
     {
-        if (view->base + view->size <= addr) continue;
-        if (view->base >= addr + size) continue;
-        return 0;
+        LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry )
+        {
+            if (view->tree) continue;
+            if (view->base + view->size <= addr) continue;
+            if (view->base >= addr + size) continue;
+            return 0;
+        }
     }
     return 1;
 }
@@ -440,6 +498,12 @@ static int generate_dll_event( struct thread *thread, int code, struct memory_vi
     return 1;
 }
 
+static void add_view_to_tree( struct process *process, struct memory_view *view )
+{
+    if (!wine_rb_put( &process->views_tree, &view->base, &view->rb_entry )) view->tree = &process->views_tree;
+    else untracked_views++;
+}
+
 /* add a view to the process list */
 /* return 1 if this is the main exe view */
 static int add_process_view( struct thread *thread, struct memory_view *view )
@@ -462,10 +526,12 @@ static int add_process_view( struct thread *thread, struct memory_view *view )
                 process->imagelen = name.len;
             process->image_info = view->image;
             list_add_head( &process->views, &view->entry );
+            add_view_to_tree( process, view );
             return 1;
         }
     }
     list_add_tail( &process->views, &view->entry );
+    add_view_to_tree( process, view );
     return 0;
 }
 
@@ -474,6 +540,8 @@ static void free_memory_view( struct memory_view *view )
     if (view->fd) release_object( view->fd );
     if (view->committed) release_object( view->committed );
     if (view->shared) release_object( view->shared );
+    if (view->tree) wine_rb_remove( view->tree, &view->rb_entry );
+    else if (view->entry.next) untracked_views--;
     list_remove( &view->entry );
     free( view );
 }
diff --git a/server/process.c b/server/process.c
index 510faf1..a3aa6e3 100644
--- a/server/process.c
+++ b/server/process.c
@@ -648,6 +648,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
     list_init( &process->asyncs );
     list_init( &process->classes );
     list_init( &process->views );
+    init_mapped_views( process );
 
     process->end_time = 0;
 
diff --git a/server/process.h b/server/process.h
index dff766d..f907e56 100644
--- a/server/process.h
+++ b/server/process.h
@@ -22,6 +22,7 @@
 #define __WINE_SERVER_PROCESS_H
 
 #include "object.h"
+#include "wine/rbtree.h"
 
 struct atom_table;
 struct handle_table;
@@ -80,6 +81,7 @@ struct process
     obj_handle_t         desktop;         /* handle to desktop to use for new threads */
     struct token        *token;           /* security token associated with this process */
     struct list          views;           /* list of memory views */
+    struct wine_rb_tree  views_tree;      /* the same views by base address (they never overlap) */
     client_ptr_t         peb;             /* PEB address in client address space */
     struct dir_cache    *dir_cache;       /* map of client-side directory cache */
     unsigned int         trace_data;      /* opaque data used by the process tracing mechanism */

4. Differential test. A small program maps, overlaps, unmaps and remaps views at fixed addresses with a fixed random sequence and prints every result (including the error codes of overlapping maps). The output of the stock and the patched server is identical over 45,970 results (20,000 slots, ~10,000 live views at the end, overlap-same/inside/tail all fail with the same codes on both). Time for the same run: 1,232 ms stock vs 404 ms patched (client-side cost remains; the server's share grows with the number of views, a game with ~22,000 views is the case above). I can post the test source if it is useful.

I have not sent this to Wine; the report above mentioned wanting to, so I left it to its author.

**@⁠UwUCammie** on GitHub · 2026-11-25 00:12 UTC · [original](https://github.com/fxceless/victory-fork/issues/184#issuecomment-7148271684) · edited 2026-11-25 06:36 UTC Independent reproduction of section 1, plus a second wineserver patch and a few facts that may save others time. No game data below, only counters. **Setup:** RX 7900 XT, Mesa 26.3.1, CachyOS, the **distro's stock Wine 11.22** (not GE/Proton), official dxvk `dxgi` plus GE-Proton11-14's vkd3d-proton (`cae8353ed`, needed for `VKD3D_CONFIG=descriptor_heap`), Microsoft's `d3dcompiler_47`. Fork `2119b0e` + upstream #454 (`VICTORY_NO_WATCHDOG`). **1. The stock server is the bottleneck here too.** With the opening cutscene running (3,000-6,000 draws/frame): stock `wineserver` climbed to an average of ~75 % of a core over a 5-minute run and world frames took **5-20 s** (`preparing` 5-17 s: copies 1-16 s, textures 2-10 s). With a patched server (below), wineserver sits at **~3 %** and frames take **580-650 ms** (`preparing` ~250 ms, GPU ~210 ms, `copying back` ~120 ms). That matches the 410-470 ms in this report on the same card. **2. `WINESERVER=/path/to/patched` is ignored by Wine 11.22.** `exec_wineserver()` in `dlls/ntdll/unix/loader.c` tries `bin_dir/wineserver` first and only then `$WINESERVER`, so the system server always wins and a patched build looks like it does nothing (it cost me two runs). Start the patched server for the prefix before the client, and clients connect to whichever server owns the prefix socket: ```sh WINEPREFIX=... wineserver -k; WINEPREFIX=... /path/to/patched/wineserver -p; WINEPREFIX=... wine victory.exe ... ``` It must be built from the same Wine version as the client (I built it from the `wine-11.22` tag; `./configure --enable-win64 ... && make server/wineserver` is enough). **3. My patch** (same idea as the one described above: views also indexed in a red-black tree by base; the views of a process never overlap, so `find_mapped_view`, `find_mapped_addr` and `is_valid_view_addr` become O(log n); no protocol change; a view whose base is already in the tree, which cannot happen while views do not overlap, stays list-only and is found by a walk). 196 lines of diff against `wine-11.22`: <details><summary>wineserver-views-rbtree.patch</summary> ```diff diff --git a/server/file.h b/server/file.h index 99215b8..15aa296 100644 --- a/server/file.h +++ b/server/file.h @@ -180,6 +180,7 @@ extern struct file *get_view_file( const struct memory_view *view, unsigned int extern const struct pe_image_info *get_view_image_info( const struct memory_view *view, client_ptr_t *base ); extern int get_view_nt_name( const struct memory_view *view, struct unicode_str *name ); extern void free_mapped_views( struct process *process ); +extern void init_mapped_views( struct process *process ); extern size_t get_page_size(void); extern struct mapping *create_fd_mapping( struct object *root, struct unicode_str name, struct fd *fd, unsigned int attr, const struct security_descriptor *sd ); diff --git a/server/mapping.c b/server/mapping.c index d1b0fc3..4233509 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -98,6 +98,8 @@ static struct list shared_map_list = LIST_INIT( shared_map_list ); struct memory_view { struct list entry; /* entry in per-process view list */ + struct wine_rb_entry rb_entry; /* entry in the per-process tree of views by base */ + struct wine_rb_tree *tree; /* the tree rb_entry is in, NULL if the view is only in the list */ struct fd *fd; /* fd for mapped file */ struct ranges *committed; /* list of committed ranges in this mapping */ struct shared_map *shared; /* temp file for shared PE mapping */ @@ -384,13 +386,57 @@ static int create_temp_file( file_pos_t size ) return fd; } +/* The views of a process never overlap, so they are also kept in a tree by base address: the map and unmap + * requests then cost O(log n) instead of a walk over every view of the process (a title that maps 64 KiB pages by + * the thousand made wineserver spend most of a core in these loops). A view whose base is already in the tree + * (cannot happen while views do not overlap) stays list-only and is found by a walk of the list. */ +static int untracked_views; + +static int compare_view_base( const void *key, const struct wine_rb_entry *entry ) +{ + const struct memory_view *view = WINE_RB_ENTRY_VALUE( entry, struct memory_view, rb_entry ); + client_ptr_t base = *(const client_ptr_t *)key; + + if (base < view->base) return -1; + return base > view->base; +} + +void init_mapped_views( struct process *process ) +{ + wine_rb_init( &process->views_tree, compare_view_base ); +} + +/* the view with the greatest base not above addr, or NULL */ +static struct memory_view *find_view_at_or_below( struct process *process, client_ptr_t addr ) +{ + struct wine_rb_entry *entry = process->views_tree.root, *best = NULL; + + while (entry) + { + struct memory_view *view = WINE_RB_ENTRY_VALUE( entry, struct memory_view, rb_entry ); + if (view->base <= addr) + { + best = entry; + entry = entry->right; + } + else entry = entry->left; + } + return best ? WINE_RB_ENTRY_VALUE( best, struct memory_view, rb_entry ) : NULL; +} + /* find a memory view from its base address */ struct memory_view *find_mapped_view( struct process *process, client_ptr_t base ) { struct memory_view *view; + struct wine_rb_entry *entry = wine_rb_get( &process->views_tree, &base ); - LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) - if (view->base == base) return view; + if (entry) return WINE_RB_ENTRY_VALUE( entry, struct memory_view, rb_entry ); + + if (untracked_views) + { + LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) + if (!view->tree && view->base == base) return view; + } set_error( STATUS_NOT_MAPPED_VIEW ); return NULL; @@ -399,10 +445,15 @@ struct memory_view *find_mapped_view( struct process *process, client_ptr_t base /* find a memory view from any address inside it */ static struct memory_view *find_mapped_addr( struct process *process, client_ptr_t addr ) { - struct memory_view *view; + struct memory_view *view = find_view_at_or_below( process, addr ); - LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) - if (addr >= view->base && addr < view->base + view->size) return view; + if (view && addr < view->base + view->size) return view; + + if (untracked_views) + { + LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) + if (!view->tree && addr >= view->base && addr < view->base + view->size) return view; + } set_error( STATUS_NOT_MAPPED_VIEW ); return NULL; @@ -417,12 +468,19 @@ static int is_valid_view_addr( struct process *process, client_ptr_t addr, mem_s if (addr & (process->page_size - 1)) return 0; if (addr + size < addr) return 0; /* overflow */ - /* check for overlapping view */ - LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) + /* check for overlapping view: the last view starting below the end of the range is the only candidate, + * as the views before it end before it starts */ + if ((view = find_view_at_or_below( process, addr + size - 1 )) && view->base + view->size > addr) return 0; + + if (untracked_views) { - if (view->base + view->size <= addr) continue; - if (view->base >= addr + size) continue; - return 0; + LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) + { + if (view->tree) continue; + if (view->base + view->size <= addr) continue; + if (view->base >= addr + size) continue; + return 0; + } } return 1; } @@ -440,6 +498,12 @@ static int generate_dll_event( struct thread *thread, int code, struct memory_vi return 1; } +static void add_view_to_tree( struct process *process, struct memory_view *view ) +{ + if (!wine_rb_put( &process->views_tree, &view->base, &view->rb_entry )) view->tree = &process->views_tree; + else untracked_views++; +} + /* add a view to the process list */ /* return 1 if this is the main exe view */ static int add_process_view( struct thread *thread, struct memory_view *view ) @@ -462,10 +526,12 @@ static int add_process_view( struct thread *thread, struct memory_view *view ) process->imagelen = name.len; process->image_info = view->image; list_add_head( &process->views, &view->entry ); + add_view_to_tree( process, view ); return 1; } } list_add_tail( &process->views, &view->entry ); + add_view_to_tree( process, view ); return 0; } @@ -474,6 +540,8 @@ static void free_memory_view( struct memory_view *view ) if (view->fd) release_object( view->fd ); if (view->committed) release_object( view->committed ); if (view->shared) release_object( view->shared ); + if (view->tree) wine_rb_remove( view->tree, &view->rb_entry ); + else if (view->entry.next) untracked_views--; list_remove( &view->entry ); free( view ); } diff --git a/server/process.c b/server/process.c index 510faf1..a3aa6e3 100644 --- a/server/process.c +++ b/server/process.c @@ -648,6 +648,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla list_init( &process->asyncs ); list_init( &process->classes ); list_init( &process->views ); + init_mapped_views( process ); process->end_time = 0; diff --git a/server/process.h b/server/process.h index dff766d..f907e56 100644 --- a/server/process.h +++ b/server/process.h @@ -22,6 +22,7 @@ #define __WINE_SERVER_PROCESS_H #include "object.h" +#include "wine/rbtree.h" struct atom_table; struct handle_table; @@ -80,6 +81,7 @@ struct process obj_handle_t desktop; /* handle to desktop to use for new threads */ struct token *token; /* security token associated with this process */ struct list views; /* list of memory views */ + struct wine_rb_tree views_tree; /* the same views by base address (they never overlap) */ client_ptr_t peb; /* PEB address in client address space */ struct dir_cache *dir_cache; /* map of client-side directory cache */ unsigned int trace_data; /* opaque data used by the process tracing mechanism */ ``` </details> **4. Differential test.** A small program maps, overlaps, unmaps and remaps views at fixed addresses with a fixed random sequence and prints every result (including the error codes of overlapping maps). The output of the stock and the patched server is identical over **45,970 results** (20,000 slots, ~10,000 live views at the end, overlap-same/inside/tail all fail with the same codes on both). Time for the same run: **1,232 ms stock vs 404 ms patched** (client-side cost remains; the server's share grows with the number of views, a game with ~22,000 views is the case above). I can post the test source if it is useful. I have not sent this to Wine; the report above mentioned wanting to, so I left it to its author.
Author
Owner

@⁠slauko on GitHub · 2026-11-25 14:01 UTC · original

A third data point, on NVIDIA and on Proton Experimental's own Wine, with a tree-indexed wineserver (the same idea as the patch above, written independently).

RTX 3080 Ti, driver 595.112.07, Proton Experimental experimental-11.0-20261112 (Wine 11.0), vkd3d-proton master@ec20719, this fork's line at 1.3–2.5 fps in the intro. Medians over all world frames, machine to itself:

stock wineserver tree-indexed
frame 5,398 ms 624 ms
preparing 2,315 ms 109 ms
└ copies 1,149 ms 70 ms
└ textures 385 ms 14 ms
copying back 2,080 ms 120 ms

wineserver sits at 2.8 % of a core with the tree.

For those on Proton Experimental rather than a distro Wine: its Wine is ValveSoftware/wine, branch experimental_11.0, at 5b557605b4e5 — the tip of 2026-11-11, the last commit before that build, so a server made from it speaks the client's protocol. This tree still has autogen.sh: ./autogen.sh, mkdir build && cd build && ../configure --enable-win64 …, make server/wineserver is enough.

WINESERVER is ignored there as well (UwUCammie's note above): the server has to be started for the prefix before the client.

**@⁠slauko** on GitHub · 2026-11-25 14:01 UTC · [original](https://github.com/fxceless/victory-fork/issues/184#issuecomment-7164637651) A third data point, on NVIDIA and on Proton Experimental's own Wine, with a tree-indexed wineserver (the same idea as the patch above, written independently). RTX 3080 Ti, driver 595.112.07, Proton Experimental `experimental-11.0-20261112` (Wine 11.0), vkd3d-proton `master@ec20719`, this fork's line at 1.3–2.5 fps in the intro. Medians over all world frames, machine to itself: | | stock wineserver | tree-indexed | |---|---:|---:| | frame | 5,398 ms | **624 ms** | | preparing | 2,315 ms | 109 ms | | └ copies | 1,149 ms | 70 ms | | └ textures | 385 ms | 14 ms | | copying back | 2,080 ms | 120 ms | wineserver sits at 2.8 % of a core with the tree. For those on Proton Experimental rather than a distro Wine: its Wine is `ValveSoftware/wine`, branch `experimental_11.0`, at `5b557605b4e5` — the tip of 2026-11-11, the last commit before that build, so a server made from it speaks the client's protocol. This tree still has `autogen.sh`: `./autogen.sh`, `mkdir build && cd build && ../configure --enable-win64 …`, `make server/wineserver` is enough. `WINESERVER` is ignored there as well (UwUCammie's note above): the server has to be started for the prefix before the client.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-25 22:00 UTC · original

Another RX 7900 XT result on RADV 26.3.1 and Wine 11.22. A local experimental build averaged 10.15 FPS at 4,805 draws/frame in the first room over seconds 150–225, then lost the device about 246 seconds into the run. RADV reported a GPUVM fault and vkd3d returned DXGI_ERROR_DEVICE_REMOVED. Gamescope exited with status 0, so status alone missed the failure.

This build used asynchronous submission and relay copy-back, with grouped refresh and a clean-page read optimization alternating during the run. I don’t have evidence attributing the loss to either setting. I’m keeping it out of the stable results.

**@⁠UwUCammie** on GitHub · 2026-11-25 22:00 UTC · [original](https://github.com/fxceless/victory-fork/issues/184#issuecomment-7175825487) Another RX 7900 XT result on RADV 26.3.1 and Wine 11.22. A local experimental build averaged 10.15 FPS at 4,805 draws/frame in the first room over seconds 150–225, then lost the device about 246 seconds into the run. RADV reported a GPUVM fault and vkd3d returned DXGI_ERROR_DEVICE_REMOVED. Gamescope exited with status 0, so status alone missed the failure. This build used asynchronous submission and relay copy-back, with grouped refresh and a clean-page read optimization alternating during the run. I don’t have evidence attributing the loss to either setting. I’m keeping it out of the stable results.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-25 22:51 UTC · original · edited 2026-11-25 23:24 UTC

I put the first-room measurements and sampling tools on my fork. The log reader counts successful presents over complete intervals, and the optional release sampler records viewport sizes and host read call sites. The branch also has a synthetic benchmark that runs the actual worker-pool code from two Git revisions.

On the RX 7900 XT, the best completed run so far was 752 presents in 74.31 seconds (10.12 FPS, 4,829 draws/frame). Most graphics binds sampled a 2560×1440 viewport. The 1920×1080 display setting still gave a 3840×2160 swapchain and the same dominant viewport. Sampling confirmed that refreshing previously copied buffer pages was the largest host read cost in the measured scene.

The readback-size tests are in #1164 and the copy-worker fix is in #1172. I also published the scratch-reuse experiment. It passed 31 shadow tests. Its synthetic merge benchmark was slower in the first eight pairs (64.06 vs 59.20 ms); that result doesn’t justify changing the default.

The same 16 KiB baseline repeated at 538 presents in 73.74 s (7.30 FPS, 4,867 draws/frame). The 10.12 figure is the fastest run. With reusable scratch, the parent/worker-pool builds measured 7.96 and 9.32 FPS in one run each. The renderer trial sources include the readback command experiment, a revision-checked buffer lookup cache and the integer-hash descriptor benchmark. No default change is proposed from those timings.

A separate trial of the 100 ms unmapped-block cache from 44bff61b, on the same RX 7900 XT integration build, reported device removal and a GPU VM fault around 81 s. The process returned zero. I excluded it from the FPS table and have kept the setting off. The isolated run does not identify the cause. The system enumerated the same physical Vulkan adapter afterward.

**@⁠UwUCammie** on GitHub · 2026-11-25 22:51 UTC · [original](https://github.com/fxceless/victory-fork/issues/184#issuecomment-7176869256) · edited 2026-11-25 23:24 UTC I put the [first-room measurements and sampling tools](https://github.com/UwUCammie/victory-amd/tree/bench/first-room-radv/benchmarks) on my fork. The log reader counts successful presents over complete intervals, and the optional release sampler records viewport sizes and host read call sites. The branch also has a synthetic benchmark that runs the actual worker-pool code from two Git revisions. On the RX 7900 XT, the best completed run so far was 752 presents in 74.31 seconds (10.12 FPS, 4,829 draws/frame). Most graphics binds sampled a 2560×1440 viewport. The 1920×1080 display setting still gave a 3840×2160 swapchain and the same dominant viewport. Sampling confirmed that refreshing previously copied buffer pages was the largest host read cost in the measured scene. The readback-size tests are in #1164 and the copy-worker fix is in #1172. I also [published the scratch-reuse experiment](https://github.com/UwUCammie/victory-amd/commit/5b1602485cec519332ff6233815af279042a5a75). It passed 31 shadow tests. Its synthetic merge benchmark was slower in the first eight pairs (64.06 vs 59.20 ms); that result doesn’t justify changing the default. The same 16 KiB baseline repeated at 538 presents in 73.74 s (7.30 FPS, 4,867 draws/frame). The 10.12 figure is the fastest run. With reusable scratch, the parent/worker-pool builds measured 7.96 and 9.32 FPS in one run each. The [renderer trial sources](https://github.com/UwUCammie/victory-amd/tree/bench/radv-renderer-trials) include the readback command experiment, a revision-checked buffer lookup cache and the integer-hash descriptor benchmark. No default change is proposed from those timings. A separate trial of the 100 ms unmapped-block cache from `44bff61b`, on the same RX 7900 XT integration build, reported device removal and a GPU VM fault around 81 s. The process returned zero. I excluded it from the FPS table and have kept the setting off. The isolated run does not identify the cause. The system enumerated the same physical Vulkan adapter afterward.
Author
Owner

@⁠Alm0stSurely on GitHub · 2026-11-26 07:06 UTC · original

I reproduced the view-index result on an RTX 5080, NVIDIA 620.73.04 and GE-Proton11-6, using a ZTRX-derived build. I ported the per-process tree approach from this thread to the Wine server sources for that GE release. The client DLLs stayed stock.

First I compared two locally built servers on the same toolchain, alternating stock/index/index/stock in fresh prefixes. With 4,096 live 64 KiB views of one section, the median unmap + remap cost was 23.0 / 10.2 / 11.5 / 24.7 µs per pair. With 64 views all four runs were around 9 µs. The benchmark checked the contents after each remap. I verified the live server executable in each prefix.

In the title, one run with the distributed server and one with the rebuilt index, same executable, initial shader-cache seed, settings and inputs. At the Written By credit:

Distributed Indexed
Capture time 217.0 s 138.5 s
Page queries per presented frame 1,797 2,078
Time in those queries per presented frame 1,420 ms 17 ms
Submit-thread GPU wait per frame 140 ms 150 ms

Over capture seconds 153–288, the server alone averaged 68.6% vs 2.9% of one CPU core. The runs were at different points in the sequence during that interval. The indexed run got past more credits and drew a daytime character and a night scene before our local VRAM reserve stopped it (5,110 MiB free, limit 5,120 MiB). No verified movement or gameplay FPS from this pair.

AI-assisted with OpenAI Codex (gpt-6.2-astra).

**@⁠Alm0stSurely** on GitHub · 2026-11-26 07:06 UTC · [original](https://github.com/fxceless/victory-fork/issues/184#issuecomment-7185104346) I reproduced the view-index result on an RTX 5080, NVIDIA 620.73.04 and GE-Proton11-6, using a ZTRX-derived build. I ported the per-process tree approach from this thread to the Wine server sources for that GE release. The client DLLs stayed stock. First I compared two locally built servers on the same toolchain, alternating stock/index/index/stock in fresh prefixes. With 4,096 live 64 KiB views of one section, the median unmap + remap cost was 23.0 / 10.2 / 11.5 / 24.7 µs per pair. With 64 views all four runs were around 9 µs. The benchmark checked the contents after each remap. I verified the live server executable in each prefix. In the title, one run with the distributed server and one with the rebuilt index, same executable, initial shader-cache seed, settings and inputs. At the Written By credit: | | Distributed | Indexed | | --- | ---: | ---: | | Capture time | 217.0 s | 138.5 s | | Page queries per presented frame | 1,797 | 2,078 | | Time in those queries per presented frame | 1,420 ms | 17 ms | | Submit-thread GPU wait per frame | 140 ms | 150 ms | Over capture seconds 153–288, the server alone averaged 68.6% vs 2.9% of one CPU core. The runs were at different points in the sequence during that interval. The indexed run got past more credits and drew a daytime character and a night scene before our local VRAM reserve stopped it (5,110 MiB free, limit 5,120 MiB). No verified movement or gameplay FPS from this pair. AI-assisted with OpenAI Codex (gpt-6.2-astra).
Author
Owner

@⁠Alm0stSurely on GitHub · 2026-11-26 07:28 UTC · original

Follow-up to the indexed wineserver test on the RTX 5080. I kept the same ZTRX-derived executable, GE-Proton11-6 server, shader-cache seed and menu inputs, and lowered VICTORY_TEXTURE_BUDGET_MB from 3072 to 2560. At the same “Additional Score” credit, the sandbox processes used 8,549 MiB of GPU memory, down from 8,977 MiB. One run per setting.

The 2560 run reached the prison prologue. Opposite right-stick inputs moved the camera from the bunks towards the tower and back. With forward, neutral, then backward input, the character approached the bunk, held position, then moved away. The next prompt was “Approach a cellmate to interact with them.” I did not test that interaction.

The prologue was visible for 6 min 53 s before the 900 s test timeout. Across 76 complete sampling windows in that scene, the host presented 795 frames in 404.626 s (1.96 fps). During a turn, the capture showed 18 distinct visual changes over 20 presents in 10.226 s. Some floors and other surfaces were still missing. The lowest sampled free VRAM was 5,129 MiB, just above the 5,120 MiB local cutoff.

AI-assisted with OpenAI Codex (gpt-6.2-astra).

**@⁠Alm0stSurely** on GitHub · 2026-11-26 07:28 UTC · [original](https://github.com/fxceless/victory-fork/issues/184#issuecomment-7185499795) Follow-up to [the indexed wineserver test on the RTX 5080](https://git.gtahub.st/github/fxceless--victory-fork/issues/184). I kept the same ZTRX-derived executable, GE-Proton11-6 server, shader-cache seed and menu inputs, and lowered `VICTORY_TEXTURE_BUDGET_MB` from 3072 to 2560. At the same “Additional Score” credit, the sandbox processes used 8,549 MiB of GPU memory, down from 8,977 MiB. One run per setting. The 2560 run reached the prison prologue. Opposite right-stick inputs moved the camera from the bunks towards the tower and back. With forward, neutral, then backward input, the character approached the bunk, held position, then moved away. The next prompt was “Approach a cellmate to interact with them.” I did not test that interaction. The prologue was visible for 6 min 53 s before the 900 s test timeout. Across 76 complete sampling windows in that scene, the host presented 795 frames in 404.626 s (1.96 fps). During a turn, the capture showed 18 distinct visual changes over 20 presents in 10.226 s. Some floors and other surfaces were still missing. The lowest sampled free VRAM was 5,129 MiB, just above the 5,120 MiB local cutoff. AI-assisted with OpenAI Codex (gpt-6.2-astra).
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#184
No description provided.