gpu: copy the title's streamed geometry once to the card (VICTORY_GEOMETRY_ON_CARD) #611

Open
github-bot wants to merge 1 commit from github-bot/gh-611 into main AGit
Owner

@⁠SoRadGaming on GitHub · 2026-12-05 17:45 UTC · original
SoRadGaming:geometry-on-card → main · +975 −0 · 8 files · 1 commits · open

Problem

With unified memory, the pool the title gets from XMemAllocatePhysicalPages for its streaming heap (about 6.2 GB on Series X) stays in system RAM. It has to: the title's own threads read that pool constantly. An earlier crude experiment that started the whole pool on the card ran at 1-2 fps for that reason.

The cost is that the card reads the streamed geometry placed in that pool (vertex, index, meshlet and instance buffers) in place over PCIe, at every draw. It shows up as per-draw card time in the shadow and G-buffer passes, time that does not shrink when the resolution goes down.

What it does

The buffers the title places from that pool are final once placed: the loader writes them and the title's CPU code does not write them again. So the split is made per buffer, not per pool. Each placed buffer gets one copy in card memory. The card reads the copy; the title's CPU keeps its own bytes.

Verified against Series X 1.0.2.1 (game_scarlett_master.exe, BLAKE3 b99f876b74d4a77f…).

  • gbuf_create_resource (+0x6dc20) is detoured. It is the only writer of a buffer object's CPU memory (+0x18) and GPU address (+0x38) for created and placed buffers.
    • After it returns, a buffer is copied if all of these hold:
      • its memory was given by the caller;
      • the memory lies in the streaming pager's windows;
      • the object is of the placed-buffer class;
      • its bind has neither the constant (4) nor the unordered-access (0x80) bit.
    • Then count × stride bytes are copied into card memory and +0x38 is pointed at the copy.
    • +0x18 and the resource object are left as they were.
  • The 13 root-view loads. These places load +0x18 and pass it to the root-view setters (gctx_set_root_srv / cctx_set_root_srv). They are rewritten to load +0x38.
    • For buffers without a copy, the setter ends up with the same window-B address as before.
    • VICTORY_GEOMETRY_ON_CARD=views leaves these loads untouched, so only views made from +0x38 read copies. It exists to rule this rewrite out if something looks wrong.
  • Aliases. gbuf_uav_alias_slot_create_q: an alias made over a copied buffer is made over the copy, so what programs write through it is what the draws read.
  • When a copy ends:
    • at gbuf_release (+0x4fafdb0);
    • when the pager takes the memory back: xmem_stream_free_single_chunk_q (+0x4f8eb60) for a physical chunk, xmem_resource_map_release_q (+0x4f8ea40) for a map's physical chunks;
    • when the same object is created again.
  • Rest period. An ended copy's space is reused only after 4 frames and 500 ms, because lists recorded earlier may still read it. The space stays mapped whatever happens, so a late read gives wrong geometry, never a fault.
  • tex_lock (+0x5121690) only counts locks of copied buffers. A CPU write through one would not reach the copy.
  • Memory for the copies:
    • comes from um::own_card, a thin wrapper over the existing um::own;
    • is title-address memory on the card, read through shadow::loose windows like any other;
    • is taken 128 MiB at a time up to VICTORY_GEOMETRY_ON_CARD_MB (default 1024);
    • stays within the card's room for title memory and counts against it;
    • is never given back.
    • A buffer that finds no room, or is over 32 MiB, is simply read in place as before.
  • Refusal on other builds. Every prologue and every load is compared byte for byte before anything is written. On any other bytes nothing is placed and the log says so.
  • Log line. stats: geometry on card, once a second: copies made, alive and ended, MB alive, region MB and free MB, refusals for room and size, aliases and locks.

Measurements

This branch (current main + this commit), software ray-tracing walk

Same machine and scene as below, VICTORY_BVH_BUILDER=1 VICTORY_BVH_IN_PLACE=1, two runs each, alternating, about 60 s measured per run, frame times from the present log:

off VICTORY_GEOMETRY_ON_CARD=1
Frames per second 24.15, 24.23 28.49, 27.95
Median frame 40.8, 40.7 ms 34.4, 35.2 ms
99th percentile frame 73.5, 69.2 ms 56.4, 58.5 ms
Card memory 9.12 GB 9.85 GB (+0.73 GB)

Counters at the end of a run: 54,385 copies alive (744 MB in 896 MB of regions), 78,634 ended, 0 refused for room, 0 locks of copied buffers. No crash or device loss in four runs. The copies fit in main's fixed room for title memory on a 16 GB card.

With per-pass timings (local stack)

The per-pass numbers were measured on a local stack, not on this branch alone:

  • upstream main as of 2026-12-05;
  • LOCKhart07's hardware-RT series merged locally;
  • local diagnostics (per-list GPU timestamps).

Setup:

  • Ryzen 7 5800X3D, RX 9070 XT 16 GB, on a PCIe 3.0 board (B450).
  • Fedora; RADV from Mesa 26.3.1 with the repo's patches.
  • Native 1080p, FSR 4 at scale 1.0.
  • Ray tracing on: VICTORY_HW_RT=1 VICTORY_HW_RT_LEAN_BUILDER=1.
  • A fixed standing scene from one save, 2 runs each, ~60 s measured per run.
  • Timed with per-list GPU timestamps.
off VICTORY_GEOMETRY_ON_CARD=1
Frame 37.50 ± 0.07 ms (26.7 fps) 30.95 ± 0.11 ms (32.3 fps)
GPU time 34.68 ms 28.05 ms
Shadow atlas 4.57 ms 2.48 ms
G-buffer 4.11 ms 2.35 ms
Compute lists 11.18 ms 10.04 ms
Submit thread waiting on the card 17.55 ms 11.79 ms
Card memory 10.13 GB 10.97 GB (+0.84 GB)

Camera-pan route (single runs): 44.15 → 38.85 ms.

Counters at the end of a standing run: about 54,600 copies alive (748 MB), about 100,900 ended, 0 refused for room, 0 locks of copied buffers.

Limits of these numbers:

  • One machine and one PCIe 3.0 board. The gain should be smaller on PCIe 4.0/5.0; that is unmeasured.
  • Short runs only. There was no long-session or driving soak beyond one informal play session; six benchmark runs had no crash.
  • The local-stack runs had the card's room for title memory raised with a local switch that is not in this PR; the runs on this branch above used main's fixed room and nothing was refused.

Switch

Setting Default Values Effect
VICTORY_GEOMETRY_ON_CARD unset 1, views Copies placed streamed buffers to the card (views: root-view loads left alone). Off by default
VICTORY_GEOMETRY_ON_CARD_MB 1024 128 and up Card memory for the copies at most, in MiB

Both are added to docs/SETTINGS.md, and the first to run.conf.default.

Risks

  • Stale geometry if the title ever writes a placed buffer after placing it. Nothing in the title was found that does, and locked stayed 0.
  • Stale geometry after release if the title keeps drawing a buffer after releasing its memory. The rest period covers lists recorded before the release. The console would read garbage in that case too.
  • The root-view load rewrite assumes +0x38 holds a GPU address at those 13 sites, as the fork the title-side facts come from also assumes. =views turns it off.
  • Card-memory pressure. Copies take card memory that write-combined pools could otherwise use. On 8-12 GB cards this may cost more than it gains; it should stay opt-in.
  • CPU reads of copies. Runtime code that reads geometry on the CPU would now read uncached card memory, which is slow. No such slowdown was seen.

Not done

  • Other buffer classes were tried and measured flat on the same scene: placed constant buffers (with their constant-view record rewritten), CPU-refilled vertex copies, ray-tracing builder inputs pointed at copies, and all of them together. They are not part of this PR.
  • Unordered-access buffers are never copied: programs write them, and the title can read the results back through +0x18.
  • No numbers on other cards, other PCIe generations or Series S.
  • No long soak.

Credit

  • The idea and the title-side knowledge come from reading the GPL-3.0 source of the "larp" fork of VIctory by CNF (its "pieces" / streamed-geometry mechanism): which function sets the GPU address, the field offsets, the root-view load sites, and that placed buffers are final. This PR is an independent re-implementation for the xmem unified-memory design, not a copy of that code.
  • It builds on this repository's unified-memory machinery (um::own, shadow::loose) by the lobomfz/VIctory-xmem maintainers.
  • The measurements used LOCKhart07's hardware-RT series.
  • The code and this description were written with Claude (AI-assisted) and tested by SoRadGaming.

🤖 Generated with Claude Code

**@⁠SoRadGaming** on GitHub · 2026-12-05 17:45 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/611) `SoRadGaming:geometry-on-card` → `main` · +975 −0 · 8 files · 1 commits · open ## Problem With unified memory, the pool the title gets from `XMemAllocatePhysicalPages` for its streaming heap (about 6.2 GB on Series X) stays in system RAM. It has to: the title's own threads read that pool constantly. An earlier crude experiment that started the whole pool on the card ran at 1-2 fps for that reason. The cost is that the card reads the streamed geometry placed in that pool (vertex, index, meshlet and instance buffers) in place over PCIe, at every draw. It shows up as per-draw card time in the shadow and G-buffer passes, time that does not shrink when the resolution goes down. ## What it does The buffers the title places from that pool are final once placed: the loader writes them and the title's CPU code does not write them again. So the split is made per buffer, not per pool. Each placed buffer gets one copy in card memory. The card reads the copy; the title's CPU keeps its own bytes. Verified against Series X 1.0.2.1 (`game_scarlett_master.exe`, BLAKE3 `b99f876b74d4a77f…`). - **`gbuf_create_resource` (+0x6dc20) is detoured.** It is the only writer of a buffer object's CPU memory (+0x18) and GPU address (+0x38) for created and placed buffers. - After it returns, a buffer is copied if all of these hold: - its memory was given by the caller; - the memory lies in the streaming pager's windows; - the object is of the placed-buffer class; - its bind has neither the constant (4) nor the unordered-access (0x80) bit. - Then `count × stride` bytes are copied into card memory and +0x38 is pointed at the copy. - +0x18 and the resource object are left as they were. - **The 13 root-view loads.** These places load +0x18 and pass it to the root-view setters (`gctx_set_root_srv` / `cctx_set_root_srv`). They are rewritten to load +0x38. - For buffers without a copy, the setter ends up with the same window-B address as before. - `VICTORY_GEOMETRY_ON_CARD=views` leaves these loads untouched, so only views made from +0x38 read copies. It exists to rule this rewrite out if something looks wrong. - **Aliases.** `gbuf_uav_alias_slot_create_q`: an alias made over a copied buffer is made over the copy, so what programs write through it is what the draws read. - **When a copy ends:** - at `gbuf_release` (+0x4fafdb0); - when the pager takes the memory back: `xmem_stream_free_single_chunk_q` (+0x4f8eb60) for a physical chunk, `xmem_resource_map_release_q` (+0x4f8ea40) for a map's physical chunks; - when the same object is created again. - **Rest period.** An ended copy's space is reused only after 4 frames and 500 ms, because lists recorded earlier may still read it. The space stays mapped whatever happens, so a late read gives wrong geometry, never a fault. - **`tex_lock` (+0x5121690)** only counts locks of copied buffers. A CPU write through one would not reach the copy. - **Memory for the copies:** - comes from `um::own_card`, a thin wrapper over the existing `um::own`; - is title-address memory on the card, read through `shadow::loose` windows like any other; - is taken 128 MiB at a time up to `VICTORY_GEOMETRY_ON_CARD_MB` (default 1024); - stays within the card's room for title memory and counts against it; - is never given back. - A buffer that finds no room, or is over 32 MiB, is simply read in place as before. - **Refusal on other builds.** Every prologue and every load is compared byte for byte before anything is written. On any other bytes nothing is placed and the log says so. - **Log line.** `stats: geometry on card`, once a second: copies made, alive and ended, MB alive, region MB and free MB, refusals for room and size, aliases and locks. ## Measurements ### This branch (current main + this commit), software ray-tracing walk Same machine and scene as below, `VICTORY_BVH_BUILDER=1 VICTORY_BVH_IN_PLACE=1`, two runs each, alternating, about 60 s measured per run, frame times from the present log: | | off | `VICTORY_GEOMETRY_ON_CARD=1` | |---|---|---| | Frames per second | 24.15, 24.23 | 28.49, 27.95 | | Median frame | 40.8, 40.7 ms | 34.4, 35.2 ms | | 99th percentile frame | 73.5, 69.2 ms | 56.4, 58.5 ms | | Card memory | 9.12 GB | 9.85 GB (+0.73 GB) | Counters at the end of a run: 54,385 copies alive (744 MB in 896 MB of regions), 78,634 ended, 0 refused for room, 0 locks of copied buffers. No crash or device loss in four runs. The copies fit in main's fixed room for title memory on a 16 GB card. ### With per-pass timings (local stack) The per-pass numbers were measured on a **local stack**, not on this branch alone: - upstream main as of 2026-12-05; - LOCKhart07's hardware-RT series merged locally; - local diagnostics (per-list GPU timestamps). **Setup:** - Ryzen 7 5800X3D, RX 9070 XT 16 GB, on a PCIe 3.0 board (B450). - Fedora; RADV from Mesa 26.3.1 with the repo's patches. - Native 1080p, FSR 4 at scale 1.0. - Ray tracing on: `VICTORY_HW_RT=1 VICTORY_HW_RT_LEAN_BUILDER=1`. - A fixed standing scene from one save, 2 runs each, ~60 s measured per run. - Timed with per-list GPU timestamps. | | off | `VICTORY_GEOMETRY_ON_CARD=1` | |---|---|---| | Frame | 37.50 ± 0.07 ms (26.7 fps) | 30.95 ± 0.11 ms (32.3 fps) | | GPU time | 34.68 ms | 28.05 ms | | Shadow atlas | 4.57 ms | 2.48 ms | | G-buffer | 4.11 ms | 2.35 ms | | Compute lists | 11.18 ms | 10.04 ms | | Submit thread waiting on the card | 17.55 ms | 11.79 ms | | Card memory | 10.13 GB | 10.97 GB (+0.84 GB) | **Camera-pan route** (single runs): 44.15 → 38.85 ms. **Counters at the end of a standing run:** about 54,600 copies alive (748 MB), about 100,900 ended, 0 refused for room, 0 locks of copied buffers. **Limits of these numbers:** - One machine and one PCIe 3.0 board. The gain should be smaller on PCIe 4.0/5.0; that is unmeasured. - Short runs only. There was no long-session or driving soak beyond one informal play session; six benchmark runs had no crash. - The local-stack runs had the card's room for title memory raised with a local switch that is not in this PR; the runs on this branch above used main's fixed room and nothing was refused. ## Switch | Setting | Default | Values | Effect | |---|---|---|---| | `VICTORY_GEOMETRY_ON_CARD` | unset | 1, views | Copies placed streamed buffers to the card (`views`: root-view loads left alone). Off by default | | `VICTORY_GEOMETRY_ON_CARD_MB` | `1024` | 128 and up | Card memory for the copies at most, in MiB | Both are added to `docs/SETTINGS.md`, and the first to `run.conf.default`. ## Risks - **Stale geometry** if the title ever writes a placed buffer after placing it. Nothing in the title was found that does, and `locked` stayed 0. - **Stale geometry after release** if the title keeps drawing a buffer after releasing its memory. The rest period covers lists recorded before the release. The console would read garbage in that case too. - **The root-view load rewrite** assumes +0x38 holds a GPU address at those 13 sites, as the fork the title-side facts come from also assumes. `=views` turns it off. - **Card-memory pressure.** Copies take card memory that write-combined pools could otherwise use. On 8-12 GB cards this may cost more than it gains; it should stay opt-in. - **CPU reads of copies.** Runtime code that reads geometry on the CPU would now read uncached card memory, which is slow. No such slowdown was seen. ## Not done - **Other buffer classes were tried and measured flat** on the same scene: placed constant buffers (with their constant-view record rewritten), CPU-refilled vertex copies, ray-tracing builder inputs pointed at copies, and all of them together. They are not part of this PR. - Unordered-access buffers are never copied: programs write them, and the title can read the results back through +0x18. - No numbers on other cards, other PCIe generations or Series S. - No long soak. ## Credit - **The idea and the title-side knowledge** come from reading the GPL-3.0 source of the "larp" fork of VIctory by CNF (its "pieces" / streamed-geometry mechanism): which function sets the GPU address, the field offsets, the root-view load sites, and that placed buffers are final. This PR is an independent re-implementation for the xmem unified-memory design, not a copy of that code. - **It builds on this repository's unified-memory machinery** (`um::own`, `shadow::loose`) by the lobomfz/VIctory-xmem maintainers. - **The measurements used LOCKhart07's hardware-RT series.** - The code and this description were written with Claude (AI-assisted) and tested by SoRadGaming. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With unified memory the title's streaming heap (its XMemAllocatePhysicalPages
pool, 6.2 GB on Series X) stays in system RAM, because the title's own
threads read it constantly, and the card reads the vertex, index, meshlet and
instance buffers placed there in place over the bus at every draw.

Placed buffers are final once placed, so with VICTORY_GEOMETRY_ON_CARD=1
each one gets a copy in card memory of ours (um::own_card, regions of
128 MiB up to VICTORY_GEOMETRY_ON_CARD_MB, default 1024, within the card's
room for title memory) and its GPU address (+0x38) names the copy, while its
CPU memory (+0x18) stays the title's:
- gbuf_create_resource is detoured; after it, a buffer placed in the pager's
  windows (placed-buffer class, no constant or unordered-access bind) is
  copied and pointed at the copy;
- the thirteen loads of +0x18 the root view setters are given read +0x38
  (`=views` leaves them alone);
- an alias made over a copied buffer names the copy;
- a copy ends at gbuf_release or when the pager takes its chunk back, and its
  space is used again only after 4 frames and 500 ms; the space stays mapped.
Every prologue and load is compared first; on any other bytes nothing is
placed and the log says so (verified against Series X 1.0.2.1).
Counts in a `stats: geometry on card` line. Off by default.

The title-side facts follow the GPL-3.0 "larp" fork of VIctory; this is an
independent implementation on the unified-memory machinery.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:49:52 +00:00
Author
Owner

@⁠fsrajner on GitHub · 2026-12-05 19:17 UTC · original

A/B data point on RDNA 4, tested together with #596 in one build (both opt-in, so the arms differ only by env).

Setup: RX 9070 XT 16 GB, Ryzen 7 7800X3D, CachyOS, repo-patched Mesa 26.3.1 RADV + vkd3d-proton, proton-cachyos-slr. Series X profile, 4K output with FSR 4.1.2 Quality, hardware RT (HW_RT + LEAN_BUILDER + REUSE), frame generation off, headless gamescope. Base: main @ 8bf4878 + rt-7-reuse + #542, then this PR (d1f1944) and #596 (e2dc089) merged in. The only conflict was the page residency format string.

Method: the same intro snapshot every run (standing, light streaming), 120 s after the first A press. One warm-up run, then two rounds of base / GEOMETRY_ON_CARD=1 / #596 / both, interleaved. "Long frames" are the long frame log lines (≥ 50 ms).

arm ms/frame 5 s windows > 40 ms worst window gpu_wait long frames
base 42 / 41 24/36 54.4 / 47.9 ms 16.7 / 16.1 ms 261 / 251
GEOMETRY_ON_CARD=1 40 / 41 22/36 48.3 / 56.9 ms 15.7 / 16.2 ms 226 / 221 (−13 %)
#596 (RESIDENCY_STICKY=1, KICK_SPLIT=64) 41 / 41 26/36 48.9 / 49.0 ms 16.1 / 16.8 ms 234 / 239 (−8 %)
both 39 / 40 19/36 49.6 / 58.9 ms 15.9 / 17.0 ms 206 / 203 (−20 %)
  • It works here: stats: geometry on card shows ~39k buffers / ~550 MB alive in 768–896 MB of regions, with 0 refused for room or size, 0 locks, and no device loss or visual problems.
  • In this scene the mean frame time and the worst window stay within run-to-run noise. The count of ≥ 50 ms frames drops consistently, by about 13 % alone and about 20 % together with #596. My guess for the smaller average gain than in your numbers: a PCIe 4.0 host and a standing intro scene with little geometry streaming. A driving route would probably show more.
**@⁠fsrajner** on GitHub · 2026-12-05 19:17 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/611#issuecomment-7443861532) A/B data point on RDNA 4, tested together with #596 in one build (both opt-in, so the arms differ only by env). **Setup:** RX 9070 XT 16 GB, Ryzen 7 7800X3D, CachyOS, repo-patched Mesa 26.3.1 RADV + vkd3d-proton, proton-cachyos-slr. Series X profile, 4K output with FSR 4.1.2 Quality, hardware RT (`HW_RT` + `LEAN_BUILDER` + `REUSE`), frame generation off, headless gamescope. Base: `main` @ `8bf4878` + `rt-7-reuse` + #542, then this PR (`d1f1944`) and #596 (`e2dc089`) merged in. The only conflict was the `page residency` format string. **Method:** the same intro snapshot every run (standing, light streaming), 120 s after the first A press. One warm-up run, then two rounds of base / `GEOMETRY_ON_CARD=1` / #596 / both, interleaved. "Long frames" are the `long frame` log lines (≥ 50 ms). | arm | ms/frame | 5 s windows > 40 ms | worst window | gpu_wait | long frames | |---|---|---|---|---|---| | base | 42 / 41 | 24/36 | 54.4 / 47.9 ms | 16.7 / 16.1 ms | 261 / 251 | | `GEOMETRY_ON_CARD=1` | 40 / 41 | 22/36 | 48.3 / 56.9 ms | 15.7 / 16.2 ms | 226 / 221 (−13 %) | | #596 (`RESIDENCY_STICKY=1`, `KICK_SPLIT=64`) | 41 / 41 | 26/36 | 48.9 / 49.0 ms | 16.1 / 16.8 ms | 234 / 239 (−8 %) | | both | 39 / 40 | 19/36 | 49.6 / 58.9 ms | 15.9 / 17.0 ms | 206 / 203 (−20 %) | - It works here: `stats: geometry on card` shows ~39k buffers / ~550 MB alive in 768–896 MB of regions, with 0 refused for room or size, 0 locks, and no device loss or visual problems. - In this scene the mean frame time and the worst window stay within run-to-run noise. The count of ≥ 50 ms frames drops consistently, by about 13 % alone and about 20 % together with #596. My guess for the smaller average gain than in your numbers: a PCIe 4.0 host and a standing intro scene with little geometry streaming. A driving route would probably show more.
Author
Owner

@⁠DrArroway on GitHub · 2026-12-05 20:44 UTC · original

37-minute real-play soak data point on RDNA 2 / PCIe 4.0 (main + #611 alone, software RT).

Setup & build

  • GPU / System: AMD Radeon RX 6900 XT (1002:73bf) (RDNA 2, 16 GB VRAM, PCIe 4.0), Ryzen 9 7900X (12C/24T), 64 GB DDR5-6000 EXPO, CachyOS kernel 7.3.7-1-cachyos, GE-Proton11-15-x86_64, repo-patched Mesa (deps/mesa-inst) + vkd3d-proton.
  • Build: main (a5c6484) + #611 merged cleanly with 0 conflicts (52.3 s release build; shaders + 94,449 pipelines warmed cleanly).
  • Settings: Series X profile, VICTORY_OUTPUT=2560x1440, VICTORY_FSR_4K=quality, VICTORY_FIDELITYFX_FRAMEGEN=1, VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1, VICTORY_UI_PLANE=3840x2160, VICTORY_GEOMETRY_ON_CARD=1 (default cap_mb=1024), VICTORY_PLACED_COPIED=1, VICTORY_PARTS_ONE_CALL=1, VICTORY_KEEP_HOST_BUFFERS=1, VICTORY_SKIP_INTRO=1, software RT (VICTORY_BVH_BUILDER=1).

Soak results (37m 08s, free play + driving + story progression, clean voluntary exit)

  • Stability & visuals: 0 errors, 0 crashes, 0 visual glitches or mesh corruption across 2.34 million copied buffers (53.7 GB copied).
  • locked=0 and made_again=0 throughout the entire 37-minute session (refused_size=0, aliased=97).
  • Real-soak observation on card_mb_for_title ceiling (896 MB vs cap_mb=1024):
    • 38 seconds in, the 8th 128 MB region hit main's fixed card_mb_for_title=4080 room ceiling:
      2026-12-05T20:03:51.427425Z  INFO victory_gpu::geometry_card: geometry on card: the card's room for title memory is taken; buffers that find no room stay read in place mb=896
      
    • During heavier streaming around minute 18, alive_mb reached 878 / 896 MB (free_mb=9, largest_free_kb=1932), causing 56,874 buffers (2,026 MB) over the full soak to fall back gracefully to in-place PCIe reads — with zero issues — even though total card VRAM still had >2 GB of headroom (12,999 / 15,264 MB, peak 13,231 MB, shared 11,752 MB / peak 13,179 MB).
  • Final stats: geometry on card line (at 37m 08s):
    2026-12-05T20:40:20.103315Z  INFO stats: geometry on card copied=2337525 copied_mb=53741 alive=59894 alive_mb=777 regions_mb=896 ended=2277631 resting=1044 free_mb=71 largest_free_kb=7232 refused_room=56874 refused_room_mb=2026 refused_size=0 made_again=0 aliased=97 locked=0
    
  • Performance (not an A/B, single soak run): tools/session-fps.sh (371 samples): 23.9 median / 24.5 avg real FPS, min_fps=14.6 (no single-digit drops), avg_preparing_ms=4.5 ms, avg_copy_ms=1.2 ms; Direct Framegen finished at 29.0 real / 29.0 gen (~58 presented FPS, 0 resets, 0.66 ms interp).
**@⁠DrArroway** on GitHub · 2026-12-05 20:44 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/611#issuecomment-7445073098) 37-minute real-play soak data point on RDNA 2 / PCIe 4.0 (`main` + `#611` alone, software RT). ### Setup & build - **GPU / System:** `AMD Radeon RX 6900 XT (1002:73bf)` (RDNA 2, 16 GB VRAM, PCIe 4.0), Ryzen 9 7900X (12C/24T), 64 GB DDR5-6000 EXPO, CachyOS kernel `7.3.7-1-cachyos`, `GE-Proton11-15-x86_64`, repo-patched Mesa (`deps/mesa-inst`) + vkd3d-proton. - **Build:** `main` (`a5c6484`) + `#611` merged cleanly with 0 conflicts (`52.3 s` release build; shaders + `94,449` pipelines warmed cleanly). - **Settings:** Series X profile, `VICTORY_OUTPUT=2560x1440`, `VICTORY_FSR_4K=quality`, `VICTORY_FIDELITYFX_FRAMEGEN=1`, `VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1`, `VICTORY_UI_PLANE=3840x2160`, `VICTORY_GEOMETRY_ON_CARD=1` (default `cap_mb=1024`), `VICTORY_PLACED_COPIED=1`, `VICTORY_PARTS_ONE_CALL=1`, `VICTORY_KEEP_HOST_BUFFERS=1`, `VICTORY_SKIP_INTRO=1`, software RT (`VICTORY_BVH_BUILDER=1`). ### Soak results (`37m 08s`, free play + driving + story progression, clean voluntary exit) - **Stability & visuals:** **`0` errors, `0` crashes, `0` visual glitches or mesh corruption** across **2.34 million copied buffers (`53.7 GB` copied)**. - **`locked=0` and `made_again=0`** throughout the entire 37-minute session (`refused_size=0`, `aliased=97`). - **Real-soak observation on `card_mb_for_title` ceiling (`896 MB` vs `cap_mb=1024`):** - 38 seconds in, the 8th 128 MB region hit `main`'s fixed `card_mb_for_title=4080` room ceiling: ```text 2026-12-05T20:03:51.427425Z INFO victory_gpu::geometry_card: geometry on card: the card's room for title memory is taken; buffers that find no room stay read in place mb=896 ``` - During heavier streaming around minute 18, `alive_mb` reached `878 / 896 MB` (`free_mb=9`, `largest_free_kb=1932`), causing **`56,874` buffers (`2,026 MB`)** over the full soak to fall back gracefully to in-place PCIe reads — with zero issues — even though total card VRAM still had >2 GB of headroom (`12,999 / 15,264 MB`, peak `13,231 MB`, shared `11,752 MB` / peak `13,179 MB`). - **Final `stats: geometry on card` line (at `37m 08s`):** ```text 2026-12-05T20:40:20.103315Z INFO stats: geometry on card copied=2337525 copied_mb=53741 alive=59894 alive_mb=777 regions_mb=896 ended=2277631 resting=1044 free_mb=71 largest_free_kb=7232 refused_room=56874 refused_room_mb=2026 refused_size=0 made_again=0 aliased=97 locked=0 ``` - **Performance (not an A/B, single soak run):** `tools/session-fps.sh` (`371` samples): `23.9` median / `24.5` avg real FPS, **`min_fps=14.6`** (no single-digit drops), `avg_preparing_ms=4.5 ms`, `avg_copy_ms=1.2 ms`; Direct Framegen finished at `29.0` real / `29.0` gen (`~58` presented FPS, `0` resets, `0.66 ms` interp).
Author
Owner

@⁠Milkhaus-tech on GitHub · 2026-12-06 04:01 UTC · original

RDNA 4 A/B for VICTORY_GEOMETRY_ON_CARD=1. It was the clearest gain of everything we tested, and we now run it by default.

Setup: RX 9060 XT 16 GB (RDNA 4, Navi 44), Ryzen 7 5800X, 32 GB RAM, Ubuntu 26.04 (kernel 7.0.0-44), repo Mesa 26.3.1 RADV, GE-Proton11-11, resizable BAR on. Series X profile, potato preset, 1920x1080 output, VICTORY_FSR_4K=balanced, ML frame generation, ray tracing off. Build: main @ 8c4e663 + #596 + #637 + #639 + #599 + #626 + this PR, with all other switches off. No pipeline was missed at first use in any run.

Method: VICTORY_BENCH_ROUTE=downtown with the same save restored before every run. Measured from route start +30 s to +330 s using the stats: frame 5 s windows (about 59 per run). Rendered fps only; generated frames are not counted. Arms were interleaved and run on the same build.

Arm Runs avg fps p10 worst 5 s frames >100 ms /min
default 5 32.0, 32.3, 32.4, 33.1, 33.4 (mean 32.6) 19.3-23.7 16.2-20.2 2.6-4.9
GEOMETRY_ON_CARD=1 3 35.1, 33.1, 33.4 (mean 33.9) 23.7, 21.5, 19.8 20.5, 16.0, 15.9 1.8, 1.8, 4.3
GEOMETRY_ON_CARD=1 + RECORD_PLACES=1 + RECORD_RANGES=1 3 35.9, 35.5, 35.3 (mean 35.6) 20.1, 22.6, 21.8 15.0, 18.2, 17.9 3.7, 2.6, 3.3
  • On its own, the switch gave about +4% average. Two of its three runs had the fewest long frames of any arm.
  • Combined with the RECORD switches (#517), it gave +9%. RECORD alone measured 33.2, 33.8 and 34.2, so the two effects seem to add up.
  • The log shows geometry on card: a region of 128 MB for copies. A screenshot at +150 s matches the default: full city, correct vehicle and foliage. No errors or crashes over 6 runs, plus a normal play session started on it.
**@⁠Milkhaus-tech** on GitHub · 2026-12-06 04:01 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/611#issuecomment-7451169831) RDNA 4 A/B for `VICTORY_GEOMETRY_ON_CARD=1`. It was the clearest gain of everything we tested, and we now run it by default. **Setup:** RX 9060 XT 16 GB (RDNA 4, Navi 44), Ryzen 7 5800X, 32 GB RAM, Ubuntu 26.04 (kernel 7.0.0-44), repo Mesa 26.3.1 RADV, GE-Proton11-11, resizable BAR on. Series X profile, potato preset, 1920x1080 output, `VICTORY_FSR_4K=balanced`, ML frame generation, ray tracing off. Build: `main` @ `8c4e663` + #596 + #637 + #639 + #599 + #626 + this PR, with all other switches off. No pipeline was missed at first use in any run. **Method:** `VICTORY_BENCH_ROUTE=downtown` with the same save restored before every run. Measured from route start +30 s to +330 s using the `stats: frame` 5 s windows (about 59 per run). Rendered fps only; generated frames are not counted. Arms were interleaved and run on the same build. | Arm | Runs | avg fps | p10 | worst 5 s | frames >100 ms /min | |---|---|---|---|---|---| | default | 5 | 32.0, 32.3, 32.4, 33.1, 33.4 (mean **32.6**) | 19.3-23.7 | 16.2-20.2 | 2.6-4.9 | | GEOMETRY_ON_CARD=1 | 3 | 35.1, 33.1, 33.4 (mean **33.9**) | 23.7, 21.5, 19.8 | 20.5, 16.0, 15.9 | 1.8, 1.8, 4.3 | | GEOMETRY_ON_CARD=1 + `RECORD_PLACES=1` + `RECORD_RANGES=1` | 3 | 35.9, 35.5, 35.3 (mean **35.6**) | 20.1, 22.6, 21.8 | 15.0, 18.2, 17.9 | 3.7, 2.6, 3.3 | - On its own, the switch gave about +4% average. Two of its three runs had the fewest long frames of any arm. - Combined with the RECORD switches (#517), it gave +9%. RECORD alone measured 33.2, 33.8 and 34.2, so the two effects seem to add up. - The log shows `geometry on card: a region of 128 MB for copies`. A screenshot at +150 s matches the default: full city, correct vehicle and foliage. No errors or crashes over 6 runs, plus a normal play session started on it.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/611/head:github-bot/gh-611'
git switch 'github-bot/gh-611'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-611'
git switch 'github-bot/gh-611'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-611'
git switch 'github-bot/gh-611'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-611'
git switch 'main'
git merge --squash 'github-bot/gh-611'
git switch 'main'
git merge --ff-only 'github-bot/gh-611'
git switch 'main'
git merge 'github-bot/gh-611'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.