Direct frame generation: generated and real frames go out back to back, about 40% never reach the screen #632

Open
opened 2026-12-05 21:20:01 +00:00 by github-bot · 0 comments
Owner

@⁠danfq on GitHub · 2026-12-05 21:15 UTC · original

Summary. With VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1, the generated frame and the real frame often go out a few milliseconds apart, followed by a long gap. About 40% of presents are replaced before the screen shows them, so the screen changes at 16 to 23 fps from 12 to 19 real fps. On the same save, DIRECT=0 (AMD's proxy) looked much steadier, and the smearing and ghosting on fast camera turns and while driving were practically gone.

Setup. Ryzen 5 5600G, RX 7600 XT 16 GB (RDNA 3), 32 GB RAM, CachyOS (kernel 7.3.7), mesa-git 27.0.0 devel (7866a3d), proton-cachyos 11.0-20261015-slr. xmem b581f7e, Series X profile, 1920x1080 output, VICTORY_FSR_4K=quality (FSR 4.1.2, 1280x720), VICTORY_FIDELITYFX_FRAMEGEN=1 (built-in 3.1.6 generator), ray tracing on, VICTORY_WARM=1.

How it was measured. VICTORY_PRESENT_TIMING=1, 60 s windows, each run idle for 2 minutes and then driving for 2 minutes. Times between presents come from interval_us in the present timing lines, and what the screen showed from displayed and display_interval_qpc (the swap chain's statistics).

Direct path, one 60 s window (idle, about 5000 draws):

ms since the previous present p10 p50 p90 p99
before a real present 4.2 34.5 70.2 97.6
before a gen present 4.2 16.4 52.1 101.0

A stretch of consecutive presents (kind, ms since the previous present):

real 9, gen 35, real 35, gen 62, real 2, gen 24, real 38, gen 47, real 14, gen 24,
real 39, gen 22, real 78, gen 5, real 23, gen 22, real 103, gen 2, real 4, gen 16

In that window the screen changed 1192 times for 1996 presents: 635 changes covered one present, 308 covered two and 249 covered three.

Over the whole run (6 in-world windows):

Per window Range
Real fps 12.2 to 19.5
Presents per second (generated and real) 24 to 39
Screen changes per second 16 to 23
Presents replaced before they were shown 33% to 42%

Proxy path (DIRECT=0) on the same save. The swap chain statistics can't time the proxy's own generated presents (each logged present moves the count by exactly 2), so there is no on-screen number to compare. Real frames: 12.5 fps in a heavier stretch (about 5800 draws against 4800), and 19 frames per minute over twice the median, against 42 with the direct path. By eye: much steadier, with the smearing and ghosting practically gone, at a lower real frame rate.

Where it may come from. DIRECT_SYNC_INTERVAL is 0 in crates/victory-gpu/src/host.rs ("Pacing comes from the present's place in the stream"), and the real frame is presented within the next frame's submissions. When those submissions land shortly after the generated frame's present, both go out back to back, the compositor shows only the later one and the generated frame is lost. Nothing spaces the two by half a frame interval.

Caveats.

  • The screen numbers come from the swap chain statistics vkd3d-proton reports, so they are approximate. The CPU-side present times show the same clumping on their own.
  • The two paths were compared on different stretches of play from the same save, not on the same frames.
  • Measured only on RDNA 3 with the 3.1.6 generator, at 12 to 20 real fps.

ML frame generation (VICTORY_FIDELITYFX_FRAMEGEN=4) always uses the direct path, so its pacing matters there too.

**@⁠danfq** on GitHub · 2026-12-05 21:15 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/632) **Summary.** With `VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1`, the generated frame and the real frame often go out a few milliseconds apart, followed by a long gap. About 40% of presents are replaced before the screen shows them, so the screen changes at 16 to 23 fps from 12 to 19 real fps. On the same save, `DIRECT=0` (AMD's proxy) looked much steadier, and the smearing and ghosting on fast camera turns and while driving were practically gone. **Setup.** Ryzen 5 5600G, RX 7600 XT 16 GB (RDNA 3), 32 GB RAM, CachyOS (kernel 7.3.7), mesa-git 27.0.0 devel (`7866a3d`), proton-cachyos 11.0-20261015-slr. xmem `b581f7e`, Series X profile, 1920x1080 output, `VICTORY_FSR_4K=quality` (FSR 4.1.2, 1280x720), `VICTORY_FIDELITYFX_FRAMEGEN=1` (built-in 3.1.6 generator), ray tracing on, `VICTORY_WARM=1`. **How it was measured.** `VICTORY_PRESENT_TIMING=1`, 60 s windows, each run idle for 2 minutes and then driving for 2 minutes. Times between presents come from `interval_us` in the `present timing` lines, and what the screen showed from `displayed` and `display_interval_qpc` (the swap chain's statistics). **Direct path, one 60 s window (idle, about 5000 draws):** | ms since the previous present | p10 | p50 | p90 | p99 | |---|---|---|---|---| | before a `real` present | 4.2 | 34.5 | 70.2 | 97.6 | | before a `gen` present | 4.2 | 16.4 | 52.1 | 101.0 | A stretch of consecutive presents (kind, ms since the previous present): ``` real 9, gen 35, real 35, gen 62, real 2, gen 24, real 38, gen 47, real 14, gen 24, real 39, gen 22, real 78, gen 5, real 23, gen 22, real 103, gen 2, real 4, gen 16 ``` In that window the screen changed 1192 times for 1996 presents: 635 changes covered one present, 308 covered two and 249 covered three. Over the whole run (6 in-world windows): | Per window | Range | |---|---| | Real fps | 12.2 to 19.5 | | Presents per second (generated and real) | 24 to 39 | | Screen changes per second | 16 to 23 | | Presents replaced before they were shown | 33% to 42% | **Proxy path (`DIRECT=0`) on the same save.** The swap chain statistics can't time the proxy's own generated presents (each logged present moves the count by exactly 2), so there is no on-screen number to compare. Real frames: 12.5 fps in a heavier stretch (about 5800 draws against 4800), and 19 frames per minute over twice the median, against 42 with the direct path. By eye: much steadier, with the smearing and ghosting practically gone, at a lower real frame rate. **Where it may come from.** `DIRECT_SYNC_INTERVAL` is 0 in `crates/victory-gpu/src/host.rs` ("Pacing comes from the present's place in the stream"), and the real frame is presented within the next frame's submissions. When those submissions land shortly after the generated frame's present, both go out back to back, the compositor shows only the later one and the generated frame is lost. Nothing spaces the two by half a frame interval. **Caveats.** - The screen numbers come from the swap chain statistics vkd3d-proton reports, so they are approximate. The CPU-side present times show the same clumping on their own. - The two paths were compared on different stretches of play from the same save, not on the same frames. - Measured only on RDNA 3 with the 3.1.6 generator, at 12 to 20 real fps. ML frame generation (`VICTORY_FIDELITYFX_FRAMEGEN=4`) always uses the direct path, so its pacing matters there too.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 21:20:02 +00:00
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#632
No description provided.