d3d12: honor FidelityFX mv_jittered flag in DLSS and Frame Generation #3378
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
3 participants
Due date
No due date set.
Reference
leonida/mandy!3378
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3378"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as: D3D12-DLSS-MV-JITTERED (https://github.com/ProjectLeonida/mandy/issues/3312#issuecomment-7387426972)
What and why
dlss::recordhardcodedFLAG_MV_JITTEREDinDLSS.Feature.Create.Flagsandfg::constantshardcodedmotionVectorsJittered = sl::Boolean::eTrue, ignoring whether the title actually created its FidelityFX upscaler withFFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION(bit 2,0x04).When the title supplies unjittered motion vectors (bit 2 unset in the FidelityFX creation flags), telling NGX DLSS and Streamline Frame Generation that the motion vectors are jittered causes them to subtract camera jitter a second time, producing a persistent high-frequency micro-shake on stationary scenes.
This PR propagates the FidelityFX jitter-cancellation flag end-to-end:
d3d12/crates/leonida-hle/src/modules/ffx.rs: reads bit 2 (FLAG_MV_JITTER_CANCELLATION) from the FidelityFX upscale creation flags (including aftersizes_to_stand_inre-read) and passesmv_jitteredtoleonida_gpu::list::upscale.d3d12/crates/leonida-gpu/src/list.rs: packsmv_jitteredinto bit 2 ofUpscalewire wordw[10]for thin-list replay and passes it todlss::Inputs.d3d12/crates/leonida-gpu/src/dlss.rs: extractsfeature_flags()to setFLAG_MV_JITTEREDonly whenmv_jitteredis true (withLEONIDA_DLSS_MV_JITTERED=0|1override), logsmv_jitteredon feature creation, and forwards the effective flag tofg::tag.d3d12/crates/leonida-gpu/src/fg.rs: storesmv_jitteredinLatestand setssl::Constants::motionVectorsJitteredaccordingly (eTrue/eFalse).d3d12/docs/switches.md: regenerated viapython -I tools/d3d12_switches.py --out d3d12/docs/switches.mdto catalogLEONIDA_DLSS_MV_JITTERED.Tested
python -I scripts/check_no_game_data.pyon all 5 changed files: exit 0.python -I tests/test_d3d12_switches.py: 21/21 OK.cargo check -p leonida-gpu --locked(withoutdlss/diagnostics): pass.cargo test -p leonida-hle --locked -- ffx::: 6 passed, 0 failed (includes newcreation_flags_record_whether_motion_vectors_are_jittered).cargo test -p leonida-gpu --features "dlss diagnostics" --lib --locked -- dlss::tests::feature_flags_honor_mv_jittered fg:: an_upscale_keeps: 23 passed, 0 failed (includes newdlss::tests::feature_flags_honor_mv_jitteredandfg::defer_enable_tests::constants_follow_mv_jittered, which fails onmainwheremotionVectorsJitteredwas hardcodedeTrue).mv_jittered=false).PASS).GPUs tested: NVIDIA GeForce RTX 5060 Laptop GPU (8 GB), driver 621.40, Windows 11 (26200).
AI-assisted: yes (Gemini Neon — coding agent + separate read-only reviewer agent).
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (N/A — D3D12 runtime only)Gate runs on an RTX 3090 (NVIDIA 621.40, Windows 11 Pro build 26300), executable of this pull request's head
d72ecd346(diag profile,diagnostics,dlss,mimalloc, msvc target), Series X output 2560x1440, DLSS quality, 300 s standing at the save.mainreference:6ced7a6c5built the same way, four runs tonight.DLSS, no frame generation
mv_jittered=false;LEONIDA_DLSS_MV_JITTEREDwas not set.main(means of the two pairs of reference runs, the nearest under the same PC load). No loss.DLSS with frame generation 2x (
-FrameGen 2; DLSS-G on this 30-series card through the MFG Unlocker)mv_jittered=false, and the jitter the title sends is zero there.The picture: not checked by eye on this head (it needs someone at the screen). On 2026-12-03, on the same card, a local build that only told DLSS the vectors carry no jitter (the value this change derives from the title's flags) removed the whole-image wobble for the owner's eye, against the wobble with the flag set; hair still ghosts a little in motion in both.
Verdict: PASS.
GPUs tested: NVIDIA GeForce RTX 3090, driver 621.40.
AI-assisted: runs and report by Claude Code (Claude Opus 5.5).
Merging. Head
7698611e5(d72ecd346+ main4d9e4d05dmerged in; its treedd9b638a2is the exact tree the CI below checked), main4d9e4d05d→22182e2f6.Local CI run by the merger on
d72ecd346merged into main4d9e4d05d(normal mode, Rust scope leonida / leonida-gpu / leonida-hle): PASS, no failure.In game: enlight3d's RTX 3090 runs on
d72ecd346(DLSS quality: 33.1 fps vs main 33.0-33.4,mv_jittered=false, 0 device lost / crash / ERROR; FG 2x: DLSS-G active the whole run, 0/0/0). The shake itself was confirmed gone by eye with the same flag forced locally (Thib, RTX 3090). In the beta branch since 2026-12-04.Approved by OreoFR (maintainer). AI-assisted (Claude Code).