Linux experiments on top of SlaktarnVI: WC memory in VRAM (+3-6 fps), list cap 512, DirectStorage readers, guard work (results and branches) #15

Open
opened 2026-12-01 03:06:26 +00:00 by github-bot · 2 comments
Owner

@⁠Fran-co-F on GitHub · 2026-11-29 03:25 UTC · original

Thanks for SlaktarnVI. We spent a few days measuring on top of it and want to hand back what we found, good and bad. All of it is opt-in switches, off by default, on branches of a fork: Fran-co-F/SlaktarnVI (vram-wc, dstorage-workers). None of it is ready to merge as is (see "Known problems").

Setup: Ryzen 7 9800X3D, RX 9070 XT 16 GB, 31 GB RAM, CachyOS. Your S70 preset, with two differences: a self-built Wine 11.17 and a patched vkd3d-proton, both needed for F1. Same save for every run: the prison cell, plus 15-minute play sessions.

What helped

F1/F2: write-combined title memory in VRAM, in place (VICTORY_INPLACE=1 VICTORY_INPLACE_WC_ONLY=1 VICTORY_INPLACE_BLOCKS=1 VICTORY_VIEW_WC_VRAM=1, plus VKD3D_INPLACE_VRAM=1 on the vkd3d side)

  • Private memory with protect 0x400 (WC), and pure-WC view sections, get VRAM at the title's own addresses. Everything in a 32 MiB block moved to the card is placed in place.
  • A WC-only filter keeps anything the CPU reads in RAM.
static scene (prison) 15 min of play
fork as is 17.9 fps, copy-back 42 MB 16.2 fps
F1+F2 20.7 fps, copy-back 0 MB, copies 98 → 31 MB 19.9 fps (+2 to +6 in every draw bin)

The prologue cutscene goes from 19.9 to 28.7 fps.

VICTORY_LATE_WAIT_LISTS=512: the submit thread stops waiting for "lists in the air" (median 4 ms a frame, peaks up to 48 ms, down to 0), with 0 tables refused. Its work falls from about 21 to 13 ms in the static scene.

What did not help (so nobody repeats it)

  • DirectStorage workers: 48 instead of 16 (VICTORY_DSTORAGE_WORKERS, new) with VICTORY_DSTORAGE_STAGING_MB=128. Scene-cut hitches are pread latency (about 2 ms per 76 KB request, NVMe 20 % busy), not BCPack (≤1.5 workers) or staging. More synchronous readers did not clearly fix the worst windows. VICTORY_DSTORAGE_IO=overlapped|direct didn't either.
  • Guards:
    • VICTORY_PORT_GUARD=1: protect time ×4 under Wine's global virtual_mutex.
    • Coalescing VirtualProtect: blocks are isolated, 1.1-1.3 per call.
    • COPY_BESIDE/STORE_BESIDE/WRITE_SITES: about 2 ms off the submit thread, but wrong textures on screen in some combinations.
  • A prefetch of card-compare pieces for synchronous submissions (VICTORY_CARD_PREFETCH): it never triggers, because every submission with card copies is flown through the relay. The 2.3 extra waits a frame (about 10 ms) for 0.1-0.2 MB happen on the relay thread.

Known problems

  • With F1/F2: flicker in dark areas and on trees, and missing glyphs in menu text (e.g. "R i i i p t d" instead of full words). The fork as is under the same Wine looks stable.
  • In the 15-minute play session (F1+F2 + VICTORY_LATE_WAIT_LISTS=512 + 48 DirectStorage workers + 128 MiB staging, all at once), driving left textures and assets unloaded or badly loaded, and some flickered. The fork as is, driving the same way under the same Wine, did not show this. We did not isolate which switch causes it.
  • VICTORY_SKIP_VIEW_KERNEL=1 (skips GetWriteWatch calls that are refused anyway) also showed wrong textures once, so don't trust it either.
  • Needs our Wine and vkd3d-proton patches (placed maps for 64-bit). It does not work under stock Proton.

The real limit while playing

Fps tracks draws per frame (correlation −0.68): about 29 fps under 3,000 draws, 12 fps over 7,000. The street runs 6,000-14,000. Memory work moves a cost that is roughly fixed per frame, while draw translation grows. Details and the upstream discussion: Marvisak/VIctory#3703, #2586.

**@⁠Fran-co-F** on GitHub · 2026-11-29 03:25 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/15) Thanks for SlaktarnVI. We spent a few days measuring on top of it and want to hand back what we found, good and bad. All of it is opt-in switches, off by default, on branches of a fork: [Fran-co-F/SlaktarnVI](https://github.com/Fran-co-F/SlaktarnVI) (`vram-wc`, `dstorage-workers`). None of it is ready to merge as is (see "Known problems"). **Setup:** Ryzen 7 9800X3D, RX 9070 XT 16 GB, 31 GB RAM, CachyOS. Your S70 preset, with two differences: a self-built Wine 11.17 and a patched vkd3d-proton, both needed for F1. Same save for every run: the prison cell, plus 15-minute play sessions. ## What helped **F1/F2: write-combined title memory in VRAM, in place** (`VICTORY_INPLACE=1 VICTORY_INPLACE_WC_ONLY=1 VICTORY_INPLACE_BLOCKS=1 VICTORY_VIEW_WC_VRAM=1`, plus `VKD3D_INPLACE_VRAM=1` on the vkd3d side) - Private memory with protect `0x400` (WC), and pure-WC view sections, get VRAM at the title's own addresses. Everything in a 32 MiB block moved to the card is placed in place. - A WC-only filter keeps anything the CPU reads in RAM. | | static scene (prison) | 15 min of play | |---|---|---| | fork as is | 17.9 fps, copy-back 42 MB | 16.2 fps | | F1+F2 | 20.7 fps, copy-back **0 MB**, copies 98 → 31 MB | 19.9 fps (+2 to +6 in every draw bin) | The prologue cutscene goes from 19.9 to 28.7 fps. **`VICTORY_LATE_WAIT_LISTS=512`:** the submit thread stops waiting for "lists in the air" (median 4 ms a frame, peaks up to 48 ms, down to 0), with 0 tables refused. Its work falls from about 21 to 13 ms in the static scene. ## What did not help (so nobody repeats it) - **DirectStorage workers:** 48 instead of 16 (`VICTORY_DSTORAGE_WORKERS`, new) with `VICTORY_DSTORAGE_STAGING_MB=128`. Scene-cut hitches are `pread` latency (about 2 ms per 76 KB request, NVMe 20 % busy), not BCPack (≤1.5 workers) or staging. More synchronous readers did not clearly fix the worst windows. `VICTORY_DSTORAGE_IO=overlapped|direct` didn't either. - **Guards:** - `VICTORY_PORT_GUARD=1`: protect time ×4 under Wine's global `virtual_mutex`. - Coalescing `VirtualProtect`: blocks are isolated, 1.1-1.3 per call. - `COPY_BESIDE`/`STORE_BESIDE`/`WRITE_SITES`: about 2 ms off the submit thread, but wrong textures on screen in some combinations. - **A prefetch of card-compare pieces for synchronous submissions** (`VICTORY_CARD_PREFETCH`): it never triggers, because every submission with card copies is flown through the relay. The 2.3 extra waits a frame (about 10 ms) for 0.1-0.2 MB happen on the relay thread. ## Known problems - With F1/F2: flicker in dark areas and on trees, and missing glyphs in menu text (e.g. "R i i i p t d" instead of full words). The fork as is under the same Wine looks stable. - In the 15-minute play session (F1+F2 + `VICTORY_LATE_WAIT_LISTS=512` + 48 DirectStorage workers + 128 MiB staging, all at once), driving left textures and assets unloaded or badly loaded, and some flickered. The fork as is, driving the same way under the same Wine, did not show this. We did not isolate which switch causes it. - `VICTORY_SKIP_VIEW_KERNEL=1` (skips GetWriteWatch calls that are refused anyway) also showed wrong textures once, so don't trust it either. - Needs our Wine and vkd3d-proton patches (placed maps for 64-bit). It does not work under stock Proton. ## The real limit while playing Fps tracks draws per frame (correlation −0.68): about 29 fps under 3,000 draws, 12 fps over 7,000. The street runs 6,000-14,000. Memory work moves a cost that is roughly fixed per frame, while draw translation grows. Details and the upstream discussion: Marvisak/VIctory#3703, #2586.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 03:06:26 +00:00
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-11-29 11:17 UTC · original

Thank you for measuring this so carefully and for listing what did not help. I checked VICTORY_LATE_WAIT_LISTS in my own logs instead of trying it: no lists were in the air there, so it has nothing to win on my PC. I will not merge the in-place WC work yet because of the flicker and missing glyphs you describe and because it needs a patched Wine and vkd3d-proton. If you find out which switch causes the missing textures, please post it here.

**@⁠Slaktarn700** on GitHub · 2026-11-29 11:17 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/15#issuecomment-7255012574) Thank you for measuring this so carefully and for listing what did not help. I checked `VICTORY_LATE_WAIT_LISTS` in my own logs instead of trying it: no lists were in the air there, so it has nothing to win on my PC. I will not merge the in-place WC work yet because of the flicker and missing glyphs you describe and because it needs a patched Wine and vkd3d-proton. If you find out which switch causes the missing textures, please post it here.
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-12-05 03:25 UTC · original

Thank you for this. Since 2026-12-02 the repository is on a new base (VIctory-xmem), and this was about the earlier one. Many things changed. A new release is out (https://github.com/Slaktarn700/SlaktarnVI/releases/tag/2026-12-05). Update with the same one command as the install (curl -fsSL https://raw.githubusercontent.com/Slaktarn700/SlaktarnVI/main/install.sh | bash). If it still happens there, please write here with the new log and I will look again.

**@⁠Slaktarn700** on GitHub · 2026-12-05 03:25 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/15#issuecomment-7431040996) Thank you for this. Since 2026-12-02 the repository is on a new base (VIctory-xmem), and this was about the earlier one. Many things changed. A new release is out (https://github.com/Slaktarn700/SlaktarnVI/releases/tag/2026-12-05). Update with the same one command as the install (`curl -fsSL https://raw.githubusercontent.com/Slaktarn700/SlaktarnVI/main/install.sh | bash`). If it still happens there, please write here with the new log and I will look again.
This discussion has been locked. Commenting is limited to contributors.
No description provided.