Frame drops when entering new areas track texture upload volume (RX 9070 XT / 5700X3D) #159

Open
opened 2026-12-02 04:24:39 +00:00 by github-bot · 7 comments
Owner

@⁠joaowtrdev on GitHub · 2026-12-02 04:19 UTC · original

Possibly related to item 2 of #37 (same GPU, slow texture streaming). This report focuses on the CPU-side
cost per frame, with measurements.

Setup

  • CPU: Ryzen 7 5700X3D (8C/16T), RAM: 32 GB
  • GPU: Radeon RX 9070 XT 16 GB, Mesa 26.2.6 (RADV with the unified-memory patch from setup.sh)
  • OS: CachyOS, kernel 7.3.4, KDE Plasma 6.8 Wayland (XWayland), system Wine 11.22 (USE_SYSTEM_WINE=1)
  • VIctory-xmem 6dbc3e7
  • Game files on an NVMe drive (ntfs3, read-only mount)

run.conf (relevant lines):

VICTORY_OUTPUT=3840x2160
VICTORY_FULLSCREEN=1
VICTORY_FSR_4K=performance
VICTORY_UI_PLANE=3840x2160
VICTORY_BVH_BUILDER=0
VICTORY_CARD_PULL=0      # with the default paging this machine drops from ~30 to ~14 fps
VICTORY_PAGES_SEEN=1
VICTORY_PRESENT_TIMING=1
LSFGVK_PROFILE=...       # lsfg-vk 2.0, 2x (it does not change the real frame rate, see below)

What happens

Most of the time the title runs at 33–38 fps (real frames, from present timing). When I walk or drive
into an area I have not been to during the session, it drops to 14–22 fps for several seconds. The 1% low
across a ~5 min session stays around 9 fps.

Real frames only (present timing intervals, loading screens excluded):

Run Avg fps Median 1% low Frames > 100 ms
no frame generation 27.9 32.0 9.7 97 in 303 s
lsfg-vk 2x 29.1 33.6 9.2 110 in 286 s

What I ruled out

  • Pipeline creation: every pipeline is loaded from the warm cache (host pipelines all made made=0 loaded=...
    in every process).
  • Draw count: VICTORY_LOD_SCALE=0.35 VICTORY_SMALL_CULL=2.5 VICTORY_VEHICLE_LOD_BIAS=0.5 cut the median
    draws per frame by 24% (8375 → 6341) and the frame rate did not move (27.9 → 27.4 fps, 1% low 9.7 → 9.3).
  • Disk: the drive is NVMe with the kernel ntfs3 driver, and memory is not under pressure (~25 GB available).

What changes in the slow blocks

5-second stats: frame blocks from the lsfg-vk run, grouped by fps (menus and loading excluded):

Group Blocks fps frame_ms preparing_ms copy_ms texture_mb gpu_wait_ms draws
fast (≥ 32 fps) 16 34.6 29.0 3.9 1.6 3.1 7.7 5114
medium 26 28.7 35.1 5.9 2.5 7.0 6.5 6700
slow (< 24 fps) 13 20.0 51.4 10.1 4.8 13.8 8.1 7019

The worst blocks reach 15–25 MB of textures per frame, with preparing_ms 16–18 and copy_ms 8–10, while
gpu_wait_ms stays flat. So the time seems to go into preparing and uploading new textures on the frame's
path rather than into GPU work. Draws also rise in the slow blocks, but the LOD test above suggests they are
not what costs the time. texture_late written_to_shown averages 27 ms over the session, with p99 mostly
under 166 ms and a few blocks reaching "<4000 ms".

Questions

  1. Is this the expected cost of texture detiling and upload on a CPU like this one, or does something in the
    numbers above look wrong?
  2. Is there a setting that moves this work off the frame's path (more threads, spreading the uploads over
    several frames, showing a smaller mip first)? I am happy to run with any of the VICTORY_TEXTURE_*
    diagnostic variables and post the output.
  3. Would a disk cache of converted textures be possible, so that areas seen in earlier sessions do not pay the
    cost again?

Two smaller things

  • FidelityFX frame generation halves the real frame rate here. With VICTORY_FIDELITYFX_FRAMEGEN=1,
    real frames fall from ~28 to ~14 fps (the screen shows ~28). It is the same under XWayland and with Wine's
    Wayland driver. From reading the code, Present(1, ...) in host.rs blocks the sender thread for 10–40 ms,
    and the frame generation config uses allow_async: false. lsfg-vk 2x on the same scene costs nothing
    measurable (table above), so the card has room for it.
  • An empty LSFGVK_PROFILE= is treated as off by run.sh and as on by run.rs. run.sh tests -n
    and sets DISABLE_LSFGVK=1, while run.rs checks var_os(...).is_some() and sets VICTORY_LSFG=1.
    A run started with ./run.sh play LSFGVK_PROFILE= therefore has no layer but still logs "native pipeline
    key: none saved ... by a run without lsfg-vk" and does not save native-id.bin. Checking for a non-empty
    value in run.rs would make the two agree.
**@⁠joaowtrdev** on GitHub · 2026-12-02 04:19 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159) Possibly related to item 2 of #37 (same GPU, slow texture streaming). This report focuses on the CPU-side cost per frame, with measurements. ### Setup - CPU: Ryzen 7 5700X3D (8C/16T), RAM: 32 GB - GPU: Radeon RX 9070 XT 16 GB, Mesa 26.2.6 (RADV with the unified-memory patch from `setup.sh`) - OS: CachyOS, kernel 7.3.4, KDE Plasma 6.8 Wayland (XWayland), system Wine 11.22 (`USE_SYSTEM_WINE=1`) - VIctory-xmem `6dbc3e7` - Game files on an NVMe drive (ntfs3, read-only mount) `run.conf` (relevant lines): ``` VICTORY_OUTPUT=3840x2160 VICTORY_FULLSCREEN=1 VICTORY_FSR_4K=performance VICTORY_UI_PLANE=3840x2160 VICTORY_BVH_BUILDER=0 VICTORY_CARD_PULL=0 # with the default paging this machine drops from ~30 to ~14 fps VICTORY_PAGES_SEEN=1 VICTORY_PRESENT_TIMING=1 LSFGVK_PROFILE=... # lsfg-vk 2.0, 2x (it does not change the real frame rate, see below) ``` ### What happens Most of the time the title runs at 33–38 fps (real frames, from `present timing`). When I walk or drive into an area I have not been to during the session, it drops to 14–22 fps for several seconds. The 1% low across a ~5 min session stays around 9 fps. Real frames only (`present timing` intervals, loading screens excluded): | Run | Avg fps | Median | 1% low | Frames > 100 ms | |---|---|---|---|---| | no frame generation | 27.9 | 32.0 | 9.7 | 97 in 303 s | | lsfg-vk 2x | 29.1 | 33.6 | 9.2 | 110 in 286 s | ### What I ruled out - **Pipeline creation:** every pipeline is loaded from the warm cache (`host pipelines all made made=0 loaded=...` in every process). - **Draw count:** `VICTORY_LOD_SCALE=0.35 VICTORY_SMALL_CULL=2.5 VICTORY_VEHICLE_LOD_BIAS=0.5` cut the median draws per frame by 24% (8375 → 6341) and the frame rate did not move (27.9 → 27.4 fps, 1% low 9.7 → 9.3). - **Disk:** the drive is NVMe with the kernel ntfs3 driver, and memory is not under pressure (~25 GB available). ### What changes in the slow blocks 5-second `stats: frame` blocks from the lsfg-vk run, grouped by fps (menus and loading excluded): | Group | Blocks | fps | frame_ms | preparing_ms | copy_ms | texture_mb | gpu_wait_ms | draws | |---|---|---|---|---|---|---|---|---| | fast (≥ 32 fps) | 16 | 34.6 | 29.0 | 3.9 | 1.6 | 3.1 | 7.7 | 5114 | | medium | 26 | 28.7 | 35.1 | 5.9 | 2.5 | 7.0 | 6.5 | 6700 | | slow (< 24 fps) | 13 | 20.0 | 51.4 | 10.1 | 4.8 | 13.8 | 8.1 | 7019 | The worst blocks reach 15–25 MB of textures per frame, with `preparing_ms` 16–18 and `copy_ms` 8–10, while `gpu_wait_ms` stays flat. So the time seems to go into preparing and uploading new textures on the frame's path rather than into GPU work. Draws also rise in the slow blocks, but the LOD test above suggests they are not what costs the time. `texture_late written_to_shown` averages 27 ms over the session, with p99 mostly under 166 ms and a few blocks reaching "<4000 ms". ### Questions 1. Is this the expected cost of texture detiling and upload on a CPU like this one, or does something in the numbers above look wrong? 2. Is there a setting that moves this work off the frame's path (more threads, spreading the uploads over several frames, showing a smaller mip first)? I am happy to run with any of the `VICTORY_TEXTURE_*` diagnostic variables and post the output. 3. Would a disk cache of converted textures be possible, so that areas seen in earlier sessions do not pay the cost again? ### Two smaller things - **FidelityFX frame generation halves the real frame rate here.** With `VICTORY_FIDELITYFX_FRAMEGEN=1`, real frames fall from ~28 to ~14 fps (the screen shows ~28). It is the same under XWayland and with Wine's Wayland driver. From reading the code, `Present(1, ...)` in `host.rs` blocks the sender thread for 10–40 ms, and the frame generation config uses `allow_async: false`. lsfg-vk 2x on the same scene costs nothing measurable (table above), so the card has room for it. - **An empty `LSFGVK_PROFILE=` is treated as off by `run.sh` and as on by `run.rs`.** `run.sh` tests `-n` and sets `DISABLE_LSFGVK=1`, while `run.rs` checks `var_os(...).is_some()` and sets `VICTORY_LSFG=1`. A run started with `./run.sh play LSFGVK_PROFILE=` therefore has no layer but still logs "native pipeline key: none saved ... by a run without lsfg-vk" and does not save `native-id.bin`. Checking for a non-empty value in `run.rs` would make the two agree.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 04:24:39 +00:00
Author
Owner

@⁠coil111 on GitHub · 2026-12-02 08:08 UTC · original

About framegen:
I tried to reproduce this and couldn't, FidelityFX frame generation costs no real frames by three runs back to back

Setup

  • Ryzen 7 9800X3D, RX 9070 XT (RDNA4, 16 GB), Gentoo, kernel 7.3.4, Wine 11.22 (system), Mesa 26.3.1 + mesa.patch (RADV)
  • Wayland session, fullscreen, 2560x1440 monitor at 280 Hz, VRR off
  • main at d044248, plus a local switch for the sync interval of generated presents (below)
  • run.conf: VICTORY_FSR_4K=performance (1920x1080 -> 3840x2160), VICTORY_FULLSCREEN=1, VICTORY_UI_PLANE=3840x2160, VICTORY_FIDELITYFX_FRAMEGEN=1, VICTORY_BVH_BUILDER=1, VICTORY_DEPTH_TEST_ONLY=1, VICTORY_ZERO_READ_KEEP=0, VICTORY_PARTIAL_WRITTEN=1, VICTORY_SKIP_BINK=1, VICTORY_TEXTURE_ROOM_CAP_PERCENT=95, VICTORY_TEXTURE_ROOM_PERCENT=90
  • every run with VICTORY_PRESENT_TIMING=1

Runs

  1. FG as on main: Present(1, 0) on the proxy
  2. FG with Present(0, 0) on the proxy (VICTORY_FIDELITYFX_FRAMEGEN_SYNC=0, local switch)
  3. no FG: VICTORY_FIDELITYFX_FRAMEGEN=0

Medians over the 5 s frame stats lines in gameplay (loading and menu windows left out), and over the sender and present timing lines:

FG, interval 1 FG, interval 0 no FG
real fps ~20 (16–22) ~20 (15–23) ~20 (15–23)
gpu_wait_ms ~0 ~0 4–8
proxy Present blocked, median / p90 1.8 / 30.1 ms 1.4 / 28.0 ms 0 / 0 ms
sender busy_ms 49.5 46.4 26.2
sender title_present_ms, median / p90 9.8 / 28.5 7.0 / 19.5 4.2 / 9.0

What I take from it:

  • The mechanism you describe is there: the proxy's Present sometimes blocks for ~30 ms, on the sender thread, which every submission goes through. But here it doesn't lower the real frame rate. The frame is bound by the title's CPU side at ~50 ms, so the sender has the room, and the time it spends in Present replaces time it would otherwise sit idle.
  • The blocking isn't vsync. At 280 Hz a vblank is 3.6 ms, and the ~30 ms blocks are the same at interval 0, so they come from the proxy's own frame queue (it holds the next present until the previous generated + real pair is out). Interval 0 only trims the worst stalls (title_present_ms p90 28.5 -> 19.5 ms). That felt a bit smoother, but the median frame rate didn't change.
  • allow_async: false only decides which queue the interpolation compute runs on; that's a few ms of GPU time, and the GPU is mostly idle here anyway.
  • Comparing with lsfg-vk doesn't show GPU room: it works inside the Vulkan present under vkd3d-proton and never pushes back at the DXGI level, so it can't block the sender.

That said, my base rate is ~20 fps and yours is ~30–35 on the same card (I run VICTORY_BVH_BUILDER=1 and the default paging, you run VICTORY_BVH_BUILDER=0, VICTORY_CARD_PULL=0, VICTORY_PAGES_SEEN=1). At ~30 ms per frame the sender has far less slack to absorb a ~30 ms block, so it may well cost you frames where it costs me none. I will run tests on your settings later to see if it changes my findings

Two things would help tell:

  • your refresh rate and whether VRR is on. At 60 Hz with interval 1 there's also a cliff: any frame over 33.3 ms makes the generated + real pair take four vblanks instead of two, which gives ~14 real with ~28 on screen. I couldn't test that one.
  • the frame, sender and present timing lines from a run with FG and one without. If busy_ms reaches your frame time with FG on, the sender is the limit, and moving the present off the sender thread would be the fix.
**@⁠coil111** on GitHub · 2026-12-02 08:08 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7339046865) About framegen: I tried to reproduce this and couldn't, FidelityFX frame generation costs no real frames by three runs back to back **Setup** - Ryzen 7 9800X3D, RX 9070 XT (RDNA4, 16 GB), Gentoo, kernel 7.3.4, Wine 11.22 (system), Mesa 26.3.1 + `mesa.patch` (RADV) - Wayland session, fullscreen, 2560x1440 monitor at 280 Hz, VRR off - main at `d044248`, plus a local switch for the sync interval of generated presents (below) - `run.conf`: `VICTORY_FSR_4K=performance` (1920x1080 -> 3840x2160), `VICTORY_FULLSCREEN=1`, `VICTORY_UI_PLANE=3840x2160`, `VICTORY_FIDELITYFX_FRAMEGEN=1`, `VICTORY_BVH_BUILDER=1`, `VICTORY_DEPTH_TEST_ONLY=1`, `VICTORY_ZERO_READ_KEEP=0`, `VICTORY_PARTIAL_WRITTEN=1`, `VICTORY_SKIP_BINK=1`, `VICTORY_TEXTURE_ROOM_CAP_PERCENT=95`, `VICTORY_TEXTURE_ROOM_PERCENT=90` - every run with `VICTORY_PRESENT_TIMING=1` **Runs** 1. FG as on main: `Present(1, 0)` on the proxy 2. FG with `Present(0, 0)` on the proxy (`VICTORY_FIDELITYFX_FRAMEGEN_SYNC=0`, local switch) 3. no FG: `VICTORY_FIDELITYFX_FRAMEGEN=0` Medians over the 5 s `frame` stats lines in gameplay (loading and menu windows left out), and over the `sender` and `present timing` lines: | | FG, interval 1 | FG, interval 0 | no FG | |---|---|---|---| | real fps | ~20 (16–22) | ~20 (15–23) | ~20 (15–23) | | `gpu_wait_ms` | ~0 | ~0 | 4–8 | | proxy `Present` blocked, median / p90 | 1.8 / 30.1 ms | 1.4 / 28.0 ms | 0 / 0 ms | | sender `busy_ms` | 49.5 | 46.4 | 26.2 | | sender `title_present_ms`, median / p90 | 9.8 / 28.5 | 7.0 / 19.5 | 4.2 / 9.0 | What I take from it: - The mechanism you describe is there: the proxy's `Present` sometimes blocks for ~30 ms, on the sender thread, which every submission goes through. But here it doesn't lower the real frame rate. The frame is bound by the title's CPU side at ~50 ms, so the sender has the room, and the time it spends in `Present` replaces time it would otherwise sit idle. - The blocking isn't vsync. At 280 Hz a vblank is 3.6 ms, and the ~30 ms blocks are the same at interval 0, so they come from the proxy's own frame queue (it holds the next present until the previous generated + real pair is out). Interval 0 only trims the worst stalls (`title_present_ms` p90 28.5 -> 19.5 ms). That felt a bit smoother, but the median frame rate didn't change. - `allow_async: false` only decides which queue the interpolation compute runs on; that's a few ms of GPU time, and the GPU is mostly idle here anyway. - Comparing with lsfg-vk doesn't show GPU room: it works inside the Vulkan present under vkd3d-proton and never pushes back at the DXGI level, so it can't block the sender. That said, my base rate is ~20 fps and yours is ~30–35 on the same card (I run `VICTORY_BVH_BUILDER=1` and the default paging, you run `VICTORY_BVH_BUILDER=0`, `VICTORY_CARD_PULL=0`, `VICTORY_PAGES_SEEN=1`). At ~30 ms per frame the sender has far less slack to absorb a ~30 ms block, so it may well cost you frames where it costs me none. I will run tests on your settings later to see if it changes my findings Two things would help tell: - your refresh rate and whether VRR is on. At 60 Hz with interval 1 there's also a cliff: any frame over 33.3 ms makes the generated + real pair take four vblanks instead of two, which gives ~14 real with ~28 on screen. I couldn't test that one. - the `frame`, `sender` and `present timing` lines from a run with FG and one without. If `busy_ms` reaches your frame time with FG on, the sender is the limit, and moving the present off the sender thread would be the fix.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-02 10:57 UTC · original

A controlled data point from the vkback codebase (different implementation, same GPU class): disabling partial fills does not recover frame time here, so texture-fill work does not look like the dominant cost in a streaming walk.

Setup: main d59b4f8, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X, 3840x2160, house save rt3, scripted camera walk (W/I/K/J/L at 20/45/70/95/120 s), warm store, 135 s per run, A/B/B/A with VKB_FILL_PARTIAL=1 (default) vs =0, VKB_LAT=1 for per-frame labels.

Run Partial fills Mean fps (last 40 host windows) Frame ms Frames >=50 ms tex: fill prepare per slow frame slot_reads at Execute per slow frame Remap wait per slow frame
A1 on 27.62 36.27 183 1.20 ms 6.90 ms 5.90 ms
B1 off 26.79 37.42 206 0 7.15 ms 3.47 ms
B2 off 25.73 38.98 245 0 7.24 ms 5.35 ms
A2 on 26.53 37.84 215 1.29 ms 7.34 ms 5.09 ms

So turning partial fills off removes ~1.2 ms of fill-prepare work per slow frame but the run gets slightly slower and has more slow frames; index slot reads are ~6–7 ms and remapper waits ~3–6 ms per slow frame. That agrees with our earlier cost model (posted on vktory6/VKtory#138): in steady frames the fill path is smaller than slot resolution and remap waits. This does not disprove your upload-volume correlation — our scene, backend and output size differ — but it suggests that if you A/B a fill optimisation, keep slot reads and remap waits in the same profile so a small fill win is not outweighed. Evidence: /home/shlong/Documents/VKtory-capture/partial-ab-{A1,B1,B2,A2}/.

**@⁠TheRifai** on GitHub · 2026-12-02 10:57 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7343214757) A controlled data point from the vkback codebase (different implementation, same GPU class): disabling partial fills does **not** recover frame time here, so texture-fill work does not look like the dominant cost in a streaming walk. Setup: main `d59b4f8`, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X, 3840x2160, house save `rt3`, scripted camera walk (W/I/K/J/L at 20/45/70/95/120 s), warm store, 135 s per run, A/B/B/A with `VKB_FILL_PARTIAL=1` (default) vs `=0`, `VKB_LAT=1` for per-frame labels. | Run | Partial fills | Mean fps (last 40 host windows) | Frame ms | Frames >=50 ms | `tex: fill prepare` per slow frame | `slot_reads at Execute` per slow frame | Remap wait per slow frame | |---|---|---:|---:|---:|---:|---:|---:| | A1 | on | 27.62 | 36.27 | 183 | 1.20 ms | 6.90 ms | 5.90 ms | | B1 | off | 26.79 | 37.42 | 206 | 0 | 7.15 ms | 3.47 ms | | B2 | off | 25.73 | 38.98 | 245 | 0 | 7.24 ms | 5.35 ms | | A2 | on | 26.53 | 37.84 | 215 | 1.29 ms | 7.34 ms | 5.09 ms | So turning partial fills off removes ~1.2 ms of fill-prepare work per slow frame but the run gets slightly slower and has more slow frames; index slot reads are ~6–7 ms and remapper waits ~3–6 ms per slow frame. That agrees with our earlier cost model (posted on vktory6/VKtory#138): in steady frames the fill path is smaller than slot resolution and remap waits. This does not disprove your upload-volume correlation — our scene, backend and output size differ — but it suggests that if you A/B a fill optimisation, keep slot reads and remap waits in the same profile so a small fill win is not outweighed. Evidence: `/home/shlong/Documents/VKtory-capture/partial-ab-{A1,B1,B2,A2}/`.
Author
Owner

@⁠audunleganger on GitHub · 2026-12-02 11:32 UTC · original

A data point the other way on the same card: on my RX 9070 XT, FidelityFX frame generation halves the real frame rate.

Setup: RX 9070 XT 16 GB, i7-13700KF, Arch (kernel 7.3.6), KDE Plasma Wayland, this repo's patched Mesa and vkd3d-proton. Build d044248 + #163 + #164. Series X profile, VICTORY_OUTPUT=1920x1080, VICTORY_FSR_4K=performance, ray tracing on, VICTORY_CARD_PULL=0. Fullscreen on a 1920x1080 144 Hz screen with VRR on (KDE "Automatic"), plus a second 60 Hz screen.

Scene: a scripted 5-minute camera orbit on the first safehouse's balcony. Numbers are the mean of 5-s windows of real frames over the orbit.

real fps GPU ms/frame frame ms
no frame gen 26.2 31.5 ~38
VICTORY_FIDELITYFX_FRAMEGEN=1 15.2 48.4 ~63
frame gen + VICTORY_UI_PLANE=0 15.8 47.2 ~63

With ray tracing off it's the same pattern (38.7 → 20.7 real fps). The log says "generated frames ... rendered=3 generated=3 presents=4". Taking the 4K interface plane out of the interpolation doesn't change it, and the frame time comes out close to double. That looks like pacing (each generated present holding the title back) rather than the cost of generating.

The one setup difference I can see from your run is VRR (yours off, mine on). I haven't tried with it off yet.

AI assistance: Claude Code (Claude Opus 5.5) ran the builds and the measurements, read the logs and wrote this report, on the hardware above.

**@⁠audunleganger** on GitHub · 2026-12-02 11:32 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7344069767) A data point the other way on the same card: on my RX 9070 XT, FidelityFX frame generation halves the real frame rate. **Setup:** RX 9070 XT 16 GB, i7-13700KF, Arch (kernel 7.3.6), KDE Plasma Wayland, this repo's patched Mesa and vkd3d-proton. Build `d044248` + #163 + #164. Series X profile, `VICTORY_OUTPUT=1920x1080`, `VICTORY_FSR_4K=performance`, ray tracing on, `VICTORY_CARD_PULL=0`. Fullscreen on a 1920x1080 144 Hz screen with **VRR on** (KDE "Automatic"), plus a second 60 Hz screen. **Scene:** a scripted 5-minute camera orbit on the first safehouse's balcony. Numbers are the mean of 5-s windows of real frames over the orbit. | | real fps | GPU ms/frame | frame ms | |---|---|---|---| | no frame gen | 26.2 | 31.5 | ~38 | | `VICTORY_FIDELITYFX_FRAMEGEN=1` | 15.2 | 48.4 | ~63 | | frame gen + `VICTORY_UI_PLANE=0` | 15.8 | 47.2 | ~63 | With ray tracing off it's the same pattern (38.7 → 20.7 real fps). The log says "generated frames ... rendered=3 generated=3 presents=4". Taking the 4K interface plane out of the interpolation doesn't change it, and the frame time comes out close to double. That looks like pacing (each generated present holding the title back) rather than the cost of generating. The one setup difference I can see from your run is VRR (yours off, mine on). I haven't tried with it off yet. AI assistance: Claude Code (Claude Opus 5.5) ran the builds and the measurements, read the logs and wrote this report, on the hardware above.
Author
Owner

@⁠joaowtrdev on GitHub · 2026-12-02 11:43 UTC · original

Thanks for testing it on the same card. Here is what you asked for.

Display: 2560x1440 at 210 Hz, VRR off (KDE Plasma 6.8 Wayland, the game under XWayland unless noted).

Runs: all three use a 4K output with FSR 4 Performance (1920x1080 render), RT off, VICTORY_CARD_PULL=0 VICTORY_PAGES_SEEN=1, on f7f0360. Same route each time: on foot around a house, then driving. They are not back-to-back: they were played one after another in the same evening, 4–7 min each.

Medians / p90 over the 5 s blocks in the world (menus and loading excluded):

FG on (XWayland) FG off FG on (Wine Wayland driver)
Real fps (stats: frame) 14.8 / 19.5 28.6 / 33.9 13.4 / 17.8
gpu_wait_ms 0.0 / 8.5 5.9 / 8.1 0.0 / 3.7
Present blocked_us (present timing, frames > 20 ms) 1836 / 32182 8 / 14 449 / 40852
Sender busy_ms 63.2 / 81.3 22.4 / 32.4 67.1 / 85.2
Sender title_present_ms 7.0 / 21.0 0.5 / 4.0 6.8 / 28.5

So here the real frame rate halves with FG on, with either presentation path. That matches @⁠audunleganger's numbers above. My display has VRR off and theirs has it on, and both halve, so VRR does not seem to be the difference. gpu_wait_ms drops to zero at the same time, so the frame is not waiting on the GPU. Present blocks for tens of ms at p90, and the title spends more time waiting on present. Your point about the base rate fits: at ~29 fps without FG there is less slack per frame than at ~20.

I could not try VICTORY_FIDELITYFX_FRAMEGEN_SYNC=0, because it is not in main. If you push it, I will run the same three cases with it. I can also redo the runs at 2560x1440 output to match yours.

Attached, with paths removed: every stats: frame and stats: sender line of each run, then the present timing lines for 60 s in the world.

  • fg-on-xwayland.txt
  • fg-off.txt
  • fg-on-winewayland.txt

Correction to the issue: the LOD comparison used a run with FG on as its baseline. The baseline without FG is 8074 median draws per frame (not 8375), so the LOD settings cut draws by 21%, not 24%. The conclusion does not change: the frame rate did not move.

For context: lsfg-vk 2x on the same scene costs no real frames (29.1 fps, median 33.6), so I am using that for now.

fg-on-winewayland.txt
fg-off.txt
fg-on-xwayland.txt

**@⁠joaowtrdev** on GitHub · 2026-12-02 11:43 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7344326622) Thanks for testing it on the same card. Here is what you asked for. **Display:** 2560x1440 at 210 Hz, VRR off (KDE Plasma 6.8 Wayland, the game under XWayland unless noted). **Runs:** all three use a 4K output with FSR 4 Performance (1920x1080 render), RT off, `VICTORY_CARD_PULL=0 VICTORY_PAGES_SEEN=1`, on `f7f0360`. Same route each time: on foot around a house, then driving. They are not back-to-back: they were played one after another in the same evening, 4–7 min each. Medians / p90 over the 5 s blocks in the world (menus and loading excluded): | | FG on (XWayland) | FG off | FG on (Wine Wayland driver) | |---|---|---|---| | Real fps (`stats: frame`) | 14.8 / 19.5 | 28.6 / 33.9 | 13.4 / 17.8 | | `gpu_wait_ms` | 0.0 / 8.5 | 5.9 / 8.1 | 0.0 / 3.7 | | Present `blocked_us` (`present timing`, frames > 20 ms) | 1836 / 32182 | 8 / 14 | 449 / 40852 | | Sender `busy_ms` | 63.2 / 81.3 | 22.4 / 32.4 | 67.1 / 85.2 | | Sender `title_present_ms` | 7.0 / 21.0 | 0.5 / 4.0 | 6.8 / 28.5 | So here the real frame rate halves with FG on, with either presentation path. That matches @⁠audunleganger's numbers above. My display has VRR **off** and theirs has it **on**, and both halve, so VRR does not seem to be the difference. `gpu_wait_ms` drops to zero at the same time, so the frame is not waiting on the GPU. Present blocks for tens of ms at p90, and the title spends more time waiting on present. Your point about the base rate fits: at ~29 fps without FG there is less slack per frame than at ~20. I could not try `VICTORY_FIDELITYFX_FRAMEGEN_SYNC=0`, because it is not in `main`. If you push it, I will run the same three cases with it. I can also redo the runs at 2560x1440 output to match yours. Attached, with paths removed: every `stats: frame` and `stats: sender` line of each run, then the `present timing` lines for 60 s in the world. - fg-on-xwayland.txt - fg-off.txt - fg-on-winewayland.txt **Correction to the issue:** the LOD comparison used a run with FG on as its baseline. The baseline without FG is 8074 median draws per frame (not 8375), so the LOD settings cut draws by 21%, not 24%. The conclusion does not change: the frame rate did not move. For context: lsfg-vk 2x on the same scene costs no real frames (29.1 fps, median 33.6), so I am using that for now. [fg-on-winewayland.txt](https://github.com/user-attachments/files/35740529/fg-on-winewayland.txt) [fg-off.txt](https://github.com/user-attachments/files/35740531/fg-off.txt) [fg-on-xwayland.txt](https://github.com/user-attachments/files/35740530/fg-on-xwayland.txt)
Author
Owner

@⁠coil111 on GitHub · 2026-12-02 17:53 UTC · original

Thanks to all of you, that settles a few things. I reran with your settings and can reproduce part of it.

same setup as before, with 4K output with FSR 4 Performance (1920x1080 render), VICTORY_UI_PLANE=3840x2160, and your settings: VICTORY_BVH_BUILDER=0 VICTORY_CARD_PULL=0 VICTORY_PAGES_SEEN=1, VICTORY_PRESENT_TIMING=1

Medians over the 5 s stats: frame blocks in the world, and over the sender / present timing lines:

no FG FG (Present(1, 0), as on main) FG with Present(0, 0)
real fps, median (p10–p90) 28.9 (24.1–32.8) 25.4 (21.9–28.4) 24.9 (18.2–26.6)
gpu_wait_ms 9–17 ~0 ~0
sender busy_ms 26.9 37.4 40.6
sender title_present_ms, median / p90 0.4 / 2.1 6.2 / 17.7 5.7 / 14.1
proxy Present blocked, median / p90 — 6.3 / 28.4 ms 6.0 / 27.6 ms

Earlier, with ray tracing on (base ~20 fps), FG cost me nothing: the title's own ~50 ms frame hid it. At a ~29 fps base it costs ~12–14% here, not half, but it's the same pattern you see: the GPU stops waiting and sender busy_ms rises to about the whole frame.

What's ruled out:

  • VRR / vsync: you're at 144 Hz with VRR and 210 Hz without, I'm at 280 Hz without, and the proxy blocks ~28–32 ms at p90 in all of them. That's not a vblank.
  • Sync interval: Present(0, 0) (a local switch I tried, so not in main) doesn't help: same blocking, same frame rate. Not worth pushing, so I've dropped it.
  • Interpolation cost: allow_async only moves a few ms of GPU work between queues, and the GPU is idle in all FG runs.

What I think it is: the proxy's Present holds the next present until the previous generated + real pair is out. We make that call on the sender thread, which also sends every submission, so the next frame's lists wait behind it. How much that costs depends on how much slack the sender has. Here it goes from 27 to ~40 ms busy, for you from 22 to 63, which fits slower single-thread CPUs losing more. That last part is a guess.

The fix I'm trying is to make the blocking Present call on a thread of its own. The sender still submits the present's copy, so GPU order stays the same, but it doesn't wait for the proxy. I'll post a branch when it builds and holds up; your runs would be the better test, since you lose much more than I do.

**@⁠coil111** on GitHub · 2026-12-02 17:53 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7353749020) Thanks to all of you, that settles a few things. I reran with your settings and can reproduce part of it. same setup as before, with 4K output with FSR 4 Performance (1920x1080 render), `VICTORY_UI_PLANE=3840x2160`, and your settings: `VICTORY_BVH_BUILDER=0 VICTORY_CARD_PULL=0 VICTORY_PAGES_SEEN=1`, `VICTORY_PRESENT_TIMING=1` Medians over the 5 s `stats: frame` blocks in the world, and over the `sender` / `present timing` lines: | | no FG | FG (`Present(1, 0)`, as on main) | FG with `Present(0, 0)` | |---|---|---|---| | real fps, median (p10–p90) | 28.9 (24.1–32.8) | 25.4 (21.9–28.4) | 24.9 (18.2–26.6) | | `gpu_wait_ms` | 9–17 | ~0 | ~0 | | sender `busy_ms` | 26.9 | 37.4 | 40.6 | | sender `title_present_ms`, median / p90 | 0.4 / 2.1 | 6.2 / 17.7 | 5.7 / 14.1 | | proxy `Present` blocked, median / p90 | — | 6.3 / 28.4 ms | 6.0 / 27.6 ms | Earlier, with ray tracing on (base ~20 fps), FG cost me nothing: the title's own ~50 ms frame hid it. At a ~29 fps base it costs ~12–14% here, not half, but it's the same pattern you see: the GPU stops waiting and sender `busy_ms` rises to about the whole frame. What's ruled out: - **VRR / vsync:** you're at 144 Hz with VRR and 210 Hz without, I'm at 280 Hz without, and the proxy blocks ~28–32 ms at p90 in all of them. That's not a vblank. - **Sync interval:** `Present(0, 0)` (a local switch I tried, so not in main) doesn't help: same blocking, same frame rate. Not worth pushing, so I've dropped it. - **Interpolation cost:** `allow_async` only moves a few ms of GPU work between queues, and the GPU is idle in all FG runs. What I think it is: the proxy's `Present` holds the next present until the previous generated + real pair is out. We make that call on the sender thread, which also sends every submission, so the next frame's lists wait behind it. How much that costs depends on how much slack the sender has. Here it goes from 27 to ~40 ms busy, for you from 22 to 63, which fits slower single-thread CPUs losing more. That last part is a guess. The fix I'm trying is to make the blocking `Present` call on a thread of its own. The sender still submits the present's copy, so GPU order stays the same, but it doesn't wait for the proxy. I'll post a branch when it builds and holds up; your runs would be the better test, since you lose much more than I do.
Author
Owner

@⁠joaowtrdev on GitHub · 2026-12-02 20:02 UTC · original

Thanks for rerunning it with my settings and for the breakdown. It is good to know VRR and the sync interval are out. When the branch with Present on its own thread is up, I'll run the same three cases (no FG, FG, and lsfg-vk for reference) and post the numbers here.

**@⁠joaowtrdev** on GitHub · 2026-12-02 20:02 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7357113711) Thanks for rerunning it with my settings and for the breakdown. It is good to know VRR and the sync interval are out. When the branch with `Present` on its own thread is up, I'll run the same three cases (no FG, FG, and lsfg-vk for reference) and post the numbers here.
Author
Owner

@⁠coil111 on GitHub · 2026-12-02 21:51 UTC · original

update:
on RADV the proxy swap chain's present queue shares the single graphics queue with ours, and vkd3d-proton staggers our submissions to let it in, which leaves the GPU idle a lot. I put up an opt-in path that skips the proxy and presents both frames ourselves in this pr: #253 .
Here it takes frame generation from −25% to −8% of the real frame rate (1440p, your settings). You lose more than I do, so I'd really like your numbers.

**@⁠coil111** on GitHub · 2026-12-02 21:51 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/159#issuecomment-7359877223) update: on RADV the proxy swap chain's present queue shares the single graphics queue with ours, and vkd3d-proton staggers our submissions to let it in, which leaves the GPU idle a lot. I put up an opt-in path that skips the proxy and presents both frames ourselves in this pr: #253 . Here it takes frame generation from −25% to −8% of the real frame rate (1440p, your settings). You lose more than I do, so I'd really like your numbers.
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/lobomfz--VIctory-xmem#159
No description provided.