fix(dlssfg): pace generated frames from when the first one is made (FSR / DLSS / MVFG judder) #186
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!186
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-186"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@OliWoly on GitHub · 2026-12-05 20:53 UTC · original
OliWoly:pr/fg-pace-made→main· +49 −0 · 2 files · 1 commits · merged 2026-12-05 21:04 UTCProblem
With frame generation on (seen with FSR FG 2x at a 30 fps base), the counter shows a steady 60 but motion looks choppy.
At the title's present,
dlssfg::presentrecords the generation, presents the first generated picture at once, and queues the title's own picture (and any further generated ones) atnow + step * k. But the first generated picture is presented while the card is still making it: it only reaches the screen a generation's GPU time afternow. The title's own picture is ready long before its slot and goes out on time. So on screen the gaps alternate:step − generation time(e.g. ~13 ms)step + generation time(e.g. ~20 ms)An external limiter such as MangoHud's cannot even this out, because the unevenness is in when the pacer presents each picture.
Change
Presentingkeeps ananchor: our fence value behind the first generated picture's list, and the title's present time. Before showing anything else, the pacer thread waits until the fence passes that value (polling every 0.5 ms through the existing condvar), then moves every waiting picture's due time by the time that took. Each picture then follows the one before by a whole step, measured from when the generated one is actually made.catch_upbehaves as before).catch_upandbefore_resizeclear the anchor.LARP_FG_PACE_MADE=0restores the old timing (documented indocs/environment-variables.md).Tested
Linux, RX 7900 XTX, RADV, Proton (GE-Proton10-34) with vkd3d-proton, KDE Wayland, 165 Hz with VRR. Series X, FSR quality,
LARP_FRAME_RATE=30, FSR frame generation 2x. Driving in the city: visible judder before, smooth after. Not tested on Windows or with DLSS FG / MVFG. Built withcargo xwin build --release -p larp.🤖 Generated with Claude Code