d3d12: DLSS is told the motion vectors carry the jitter only where the title's upscale context says so (D3D12-DLSS-MV-JITTER-FOLLOWS-TITLE) #3171

Closed
lucaspiro wants to merge 2 commits from upstream-pr/3171 into main
lucaspiro commented 2026-12-02 16:17:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lucaspiro on 2026-12-02T16:17:27Z.


Claimed in the coordination issue as: D3D12-DLSS-MV-JITTER-FOLLOWS-TITLE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7334632023)

Supersedes #3037, closed for a merge conflict in d3d12/docs/switches.md (main moved on); this is the same change rebased on current main (23a68ae), with that page's conflict resolved to this change's rows only. #3037 was verified independently by @lixonik on another RTX 5070 (driver 621.40): offline checks and in game, Series S with DLSS Quality, flags=0x29 and mv_jittered=false by default, LEONIDA_DLSS_MV_JITTERED=1 honoured, world entered without errors (https://github.com/ProjectLeonida/mandy/pull/3037#issuecomment-7337639707).

What and why

On the Series S profile with DLSS, every moving thing shook every frame: the characters of the pause menu's "Jason and Lucía" page, a car standing in the world, anything animated. Still things did not, and the picture stood still on the Series X profile with the title's own upscaler.

The title makes its FidelityFX upscale context with flags 0x29: high dynamic range, depth inverted and auto exposure, without FFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION (1<<2). Its motion vectors do not carry the camera's jitter. dlss.rs nevertheless made every DLSS feature with NVSDK_NGX_DLSS_Feature_Flags_MVJittered, so DLSS took a jitter out of vectors that never had it and moved every moving thing by it, a different way each frame.

The jitter itself is right: an upscale probe (LEONIDA_UPSCALE_PROBE=1) shows the title's sequence within half a pixel, as it queries it, and LEONIDA_DLSS_JITTER_SIGN=-1 changed nothing.

This change:

  • ffx.rs: create keeps the title's context flags (before the DLL sees the description, so the stand-in sizes path keeps them too), and each upscale says whether its vectors carry the jitter (vectors_jittered). With no context seen it stays as before: they do.
  • list.rs: the bit travels in Upscale (word 10, bit 2, beside reset and dlss, so it survives LEONIDA_THIN's words). The DLSS creation flags are built by a pure dlss_feature_flags, next to dlss_mode, so its test runs without the dlss feature.
  • dlss.rs: uses them; LEONIDA_DLSS_MV_JITTERED=0|1 overrides, like LEONIDA_DLSS_HDR and LEONIDA_DLSS_DEPTH_INVERTED; the DLSS: feature made line now says mv_jittered.
  • findings.md: the new finding, and a correction: the probe's flags 0x0 quoted as "no jitter cancellation" are the dispatch's flags; jitter cancellation is a context flag.
  • switches.md: regenerated for the new name (only its rows).

Not covered: DLSS frame generation still tags the vectors as jittered (fg.rs:959, motionVectorsJittered = eTrue). Same question, a second consumer; not changed here and not measured, posted as a finding: (same comment as the claim).

Tested

  • In game (Series S, DLSS Quality, 1280x720 → 1920x1080, frame generation 2x): with the flag off (DLSS: feature made ... mv_jittered=false) the shaking was gone on the pause menu's characters and in the world; with it on (main) it was back. The same runs log upscale context render=[1280, 720] upscale=[1920, 1080] flags=0x29. That was measured on a local build with the flag as a switch; this branch makes the same decision from the title's flags.
  • Red/green: the new tests (ffx.rs the_vectors_jitter_follows_the_titles_context, the strengthened a_creation_description_at_an_odd_address_is_read_and_written; list.rs dlss_is_told_of_jittered_vectors_only_where_they_are, an_upscale_keeps_its_numbers_through_its_words) fail with the old decision put back (always jittered) and pass with this change. On main they do not build (new field and functions).
  • cargo test --workspace --exclude xtask --locked -- --skip depth_bounds_pipeline_loads_and_filters_draws (CI's command): on #3037's base every suite that finished passed. On this rebase: cargo test -p leonida-hle --lib --locked 249 passed, cargo test -p leonida-gpu --lib --locked -- --skip depth_bounds_pipeline_loads_and_filters_draws 696 passed. cargo build --locked --profile diag -p leonida --features diagnostics,dlss,mimalloc builds.
  • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md and tests/test_d3d12_switches.py pass; python -I scripts/check_no_game_data.py on the changed files passes.

GPUs tested: NVIDIA GeForce RTX 5070, driver 617.14, Windows 11 Pro 26200.

AI-assisted: yes. Diagnosis and change with Claude Code (Claude Sonnet 5.5 and Claude Opus 5.5); independent read-only review by a separate Claude Opus 5.5 agent, whose findings (move the flags' test out of the dlss feature, test the create path with 0x29, cite the source, correct findings.md) are addressed here.

Checklist

  • Based on current main (23a68ae) and merges cleanly.
  • One topic; the frame generation tag is a separate finding.
  • No game data, keys or decryption (check_no_game_data.py on the changed files).
  • A new translator rule is in the contract table of docs/design.md (n/a: no translator change).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5610411025 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171). Originally posted by [lucaspiro](https://github.com/lucaspiro) on 2026-12-02T16:17:27Z. --- Claimed in the coordination issue as: D3D12-DLSS-MV-JITTER-FOLLOWS-TITLE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7334632023) Supersedes #3037, closed for a merge conflict in `d3d12/docs/switches.md` (main moved on); this is the same change rebased on current `main` (23a68ae), with that page's conflict resolved to this change's rows only. #3037 was verified independently by @lixonik on another RTX 5070 (driver 621.40): offline checks and in game, Series S with DLSS Quality, `flags=0x29` and `mv_jittered=false` by default, `LEONIDA_DLSS_MV_JITTERED=1` honoured, world entered without errors (https://github.com/ProjectLeonida/mandy/pull/3037#issuecomment-7337639707). ### What and why On the Series S profile with DLSS, every moving thing shook every frame: the characters of the pause menu's "Jason and Lucía" page, a car standing in the world, anything animated. Still things did not, and the picture stood still on the Series X profile with the title's own upscaler. The title makes its FidelityFX upscale context with flags `0x29`: high dynamic range, depth inverted and auto exposure, **without** `FFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION` (1<<2). Its motion vectors do not carry the camera's jitter. `dlss.rs` nevertheless made every DLSS feature with `NVSDK_NGX_DLSS_Feature_Flags_MVJittered`, so DLSS took a jitter out of vectors that never had it and moved every moving thing by it, a different way each frame. The jitter itself is right: an upscale probe (`LEONIDA_UPSCALE_PROBE=1`) shows the title's sequence within half a pixel, as it queries it, and `LEONIDA_DLSS_JITTER_SIGN=-1` changed nothing. This change: - `ffx.rs`: `create` keeps the title's context flags (before the DLL sees the description, so the stand-in sizes path keeps them too), and each upscale says whether its vectors carry the jitter (`vectors_jittered`). With no context seen it stays as before: they do. - `list.rs`: the bit travels in `Upscale` (word 10, bit 2, beside `reset` and `dlss`, so it survives `LEONIDA_THIN`'s words). The DLSS creation flags are built by a pure `dlss_feature_flags`, next to `dlss_mode`, so its test runs without the `dlss` feature. - `dlss.rs`: uses them; `LEONIDA_DLSS_MV_JITTERED=0|1` overrides, like `LEONIDA_DLSS_HDR` and `LEONIDA_DLSS_DEPTH_INVERTED`; the `DLSS: feature made` line now says `mv_jittered`. - `findings.md`: the new finding, and a correction: the probe's `flags 0x0` quoted as "no jitter cancellation" are the dispatch's flags; jitter cancellation is a context flag. - `switches.md`: regenerated for the new name (only its rows). Not covered: DLSS frame generation still tags the vectors as jittered (`fg.rs:959`, `motionVectorsJittered = eTrue`). Same question, a second consumer; not changed here and not measured, posted as a `finding:` (same comment as the claim). ### Tested - **In game** (Series S, DLSS Quality, 1280x720 → 1920x1080, frame generation 2x): with the flag off (`DLSS: feature made ... mv_jittered=false`) the shaking was gone on the pause menu's characters and in the world; with it on (main) it was back. The same runs log `upscale context render=[1280, 720] upscale=[1920, 1080] flags=0x29`. That was measured on a local build with the flag as a switch; this branch makes the same decision from the title's flags. - **Red/green:** the new tests (`ffx.rs` `the_vectors_jitter_follows_the_titles_context`, the strengthened `a_creation_description_at_an_odd_address_is_read_and_written`; `list.rs` `dlss_is_told_of_jittered_vectors_only_where_they_are`, `an_upscale_keeps_its_numbers_through_its_words`) fail with the old decision put back (always jittered) and pass with this change. On `main` they do not build (new field and functions). - `cargo test --workspace --exclude xtask --locked -- --skip depth_bounds_pipeline_loads_and_filters_draws` (CI's command): on #3037's base every suite that finished passed. On this rebase: `cargo test -p leonida-hle --lib --locked` 249 passed, `cargo test -p leonida-gpu --lib --locked -- --skip depth_bounds_pipeline_loads_and_filters_draws` 696 passed. `cargo build --locked --profile diag -p leonida --features diagnostics,dlss,mimalloc` builds. - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` and `tests/test_d3d12_switches.py` pass; `python -I scripts/check_no_game_data.py` on the changed files passes. GPUs tested: NVIDIA GeForce RTX 5070, driver 617.14, Windows 11 Pro 26200. AI-assisted: yes. Diagnosis and change with Claude Code (Claude Sonnet 5.5 and Claude Opus 5.5); independent read-only review by a separate Claude Opus 5.5 agent, whose findings (move the flags' test out of the `dlss` feature, test the create path with `0x29`, cite the source, correct `findings.md`) are addressed here. ### Checklist - [x] Based on current `main` (23a68ae) and merges cleanly. - [x] One topic; the frame generation tag is a separate finding. - [x] No game data, keys or decryption (`check_no_game_data.py` on the changed files). - [ ] A new translator rule is in the contract table of `docs/design.md` (n/a: no translator change). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fiestorra commented 2026-12-02 16:28:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T16:28:28Z.


Verified here: it applies cleanly on the current main and its two tests pass.

merge base 3c106eb2f (current origin/main), head 75cf57ac3
git apply on main   (6 files)

cargo test -p leonida-gpu --lib -- --test-threads=1 dlss     exit 0
  list::tests::dlss_is_told_of_jittered_vectors_only_where_they_are ... ok
  list::tests::the_dlss_mode_follows_the_sizes ... ok
  test result: ok. 2 passed; 0 failed

The first test's name is the change: DLSS is told the vectors carry the jitter only where they do - the "only where" is the part that matters, because telling it everywhere is the easy mistake and the one that shows up as a wrong upscale rather than a crash. It has a test that passes.

And the rebase is worth saying: the merge base is the current origin/main, not an old one, so this is the superseding PR for #3037 in the shape it needs to be for a merge.

What it does not cover: how DLSS looks with it. The test checks what we tell the SDK, not what the SDK does with it - that needs a frame, and this machine cannot run the title.

One thing for the body: it says it "supersedes #3037, closed for a merge conflict in d3d12/docs/switches.md". That file is not in this PR's file list, so either the switch entry went away with the rebase or it is unchanged - worth a line so the reader does not look for it.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351997746 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7351997746). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T16:28:28Z. --- **Verified here: it applies cleanly on the current `main` and its two tests pass.** ``` merge base 3c106eb2f (current origin/main), head 75cf57ac3 git apply on main (6 files) cargo test -p leonida-gpu --lib -- --test-threads=1 dlss exit 0 list::tests::dlss_is_told_of_jittered_vectors_only_where_they_are ... ok list::tests::the_dlss_mode_follows_the_sizes ... ok test result: ok. 2 passed; 0 failed ``` **The first test's name is the change**: **DLSS is told the vectors carry the jitter only where they do** - **the "only where" is the part that matters, because telling it everywhere is the easy mistake and the one that shows up as a wrong upscale rather than a crash.** **It has a test that passes.** **And the rebase is worth saying**: the merge base is **the current `origin/main`**, not an old one, **so this is the superseding PR for #3037 in the shape it needs to be for a merge.** **What it does not cover**: **how DLSS looks with it.** The test checks what we tell the SDK, **not what the SDK does with it** - that needs a frame, and this machine cannot run the title. **One thing for the body**: it says it "supersedes #3037, closed for a merge conflict in `d3d12/docs/switches.md`". **That file is not in this PR's file list**, **so either the switch entry went away with the rebase or it is unchanged** - worth a line so the reader does not look for it. **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
lucaspiro commented 2026-12-02 16:40:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lucaspiro on 2026-12-02T16:40:57Z.


Thanks for checking! d3d12/docs/switches.md is in this PR (+5 −4): the new LEONIDA_DLSS_MV_JITTERED row, the DLSS rows whose quoted comment changed, and the page's count line; the conflict on #3037 was only in that file, resolved to this change's rows. For how it looks in game: verified on Series S with DLSS Quality here and by @lixonik on #3037 (link in the description). Also, VIctory-NVIDIA already did the same (streamline/plan.rs: motion_vectors_jittered from the title's FFX_MOTION_VECTORS_JITTER_CANCELLATION).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7352309813 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7352309813). Originally posted by [lucaspiro](https://github.com/lucaspiro) on 2026-12-02T16:40:57Z. --- Thanks for checking! `d3d12/docs/switches.md` is in this PR (+5 −4): the new `LEONIDA_DLSS_MV_JITTERED` row, the DLSS rows whose quoted comment changed, and the page's count line; the conflict on #3037 was only in that file, resolved to this change's rows. For how it looks in game: verified on Series S with DLSS Quality here and by @lixonik on #3037 (link in the description). Also, VIctory-NVIDIA already did the same (`streamline/plan.rs`: `motion_vectors_jittered` from the title's `FFX_MOTION_VECTORS_JITTER_CANCELLATION`).
MoonEyes commented 2026-12-02 18:13:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:13:44Z.


Read against current main; not built here (leonida-gpu and leonida-hle are Windows-only). One small defect: the moved DLSS flag constants took dlss_mode's doc comment.

head      75cf57ac3 (unchanged since the verification of 16:28 UTC)
base      origin/main 45dc41f95, merge base 23a68aec3, merges cleanly (git merge-tree)
CI        no check runs on this head yet (mergeable_state blocked)

What I checked in the diff

  • The FFX flag bits match ffx_upscale.h: 0x29 = high dynamic range (bit 0) + depth inverted (bit 3) + auto exposure (bit 5), and FFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION is bit 2, so vectors_jittered(0x29) == false is right. With no context seen, NO_CONTEXT keeps the old behaviour (jittered), which is a safe default.
  • Upscale::to_words/from_words add the flag as bit 2 of word 10, next to reset and dlss. The round-trip test covers both values. No hot-path cost beyond one relaxed atomic load per dispatch.
  • LEONIDA_DLSS_MV_JITTERED is read per record() call through env_flag, the same as the other DLSS switches.

Defect

  1. d3d12/crates/leonida-gpu/src/list.rs:1086-1091 (head): the five DLSS_FLAG_* constants and dlss_feature_flags were inserted between dlss_mode's doc comment ("DLSS's quality mode (PerfQualityValue ...") and fn dlss_mode (now line 1124). Rustdoc attaches that comment to DLSS_FLAG_HDR, and dlss_mode loses its documentation. Move the block above the comment.

Notes (not blocking)

  • Bit 1 of the FFX flags (FFX_UPSCALE_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS) is the same kind of statement about the vectors as bit 2. dlss_feature_flags always sets DLSS_FLAG_MV_LOW_RES; following that bit too would make the mapping complete. Series S (0x29) does not set it, so nothing changes today.
  • CONTEXT_FLAGS is a process-wide static that the create test writes (0x29) and reads back. If another test ever calls create with other flags, the two will race under the parallel test runner.
  • This changes what DLSS is told by default on every NVIDIA run, so it is a render-path change: an in-game run on this head (the gate other render-path PRs got today) belongs before merge.

Verdict: defects (minor). Fix the misplaced doc comment. Otherwise the change looks right and is the root cause of the smearing it describes.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354168119 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7354168119). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:13:44Z. --- **Read against current `main`; not built here (`leonida-gpu` and `leonida-hle` are Windows-only). One small defect: the moved DLSS flag constants took `dlss_mode`'s doc comment.** ``` head 75cf57ac3 (unchanged since the verification of 16:28 UTC) base origin/main 45dc41f95, merge base 23a68aec3, merges cleanly (git merge-tree) CI no check runs on this head yet (mergeable_state blocked) ``` **What I checked in the diff** - The FFX flag bits match `ffx_upscale.h`: `0x29` = high dynamic range (bit 0) + depth inverted (bit 3) + auto exposure (bit 5), and `FFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION` is bit 2, so `vectors_jittered(0x29) == false` is right. With no context seen, `NO_CONTEXT` keeps the old behaviour (jittered), which is a safe default. - `Upscale::to_words`/`from_words` add the flag as bit 2 of word 10, next to `reset` and `dlss`. The round-trip test covers both values. No hot-path cost beyond one relaxed atomic load per dispatch. - `LEONIDA_DLSS_MV_JITTERED` is read per `record()` call through `env_flag`, the same as the other DLSS switches. **Defect** 1. `d3d12/crates/leonida-gpu/src/list.rs:1086-1091` (head): the five `DLSS_FLAG_*` constants and `dlss_feature_flags` were inserted between `dlss_mode`'s doc comment ("DLSS's quality mode (`PerfQualityValue` ...") and `fn dlss_mode` (now line 1124). Rustdoc attaches that comment to `DLSS_FLAG_HDR`, and `dlss_mode` loses its documentation. Move the block above the comment. **Notes (not blocking)** - Bit 1 of the FFX flags (`FFX_UPSCALE_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS`) is the same kind of statement about the vectors as bit 2. `dlss_feature_flags` always sets `DLSS_FLAG_MV_LOW_RES`; following that bit too would make the mapping complete. Series S (`0x29`) does not set it, so nothing changes today. - `CONTEXT_FLAGS` is a process-wide static that the `create` test writes (`0x29`) and reads back. If another test ever calls `create` with other flags, the two will race under the parallel test runner. - This changes what DLSS is told by default on every NVIDIA run, so it is a render-path change: an in-game run on this head (the gate other render-path PRs got today) belongs before merge. **Verdict: defects (minor).** Fix the misplaced doc comment. Otherwise the change looks right and is the root cause of the smearing it describes. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
lixonik commented 2026-12-02 19:15:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T19:15:39Z.


RUN (in game) -- unit tests + 300 s render-path gate run for PR #3171:

  • PR head SHA: 75cf57ac3
  • Merged onto main SHA: f1a559851 (git merge --no-ff, clean merge)
  • Clean-room & switch-table checks:
    • python -I scripts/check_no_game_data.py PASS
    • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md PASS
  • Unit tests (Windows 10 x64, Rust 1.98.1):
    • cargo test -p leonida-gpu --features "diagnostics,dlss" --lib --locked list:: -- 13 passed, 0 failed
    • cargo test -p leonida-hle --lib --locked ffx:: -- 6 passed, 0 failed
  • Build: diag profile (diagnostics,dlss,mimalloc), Series S profile, DLSS on (directly exercises the modified ffx -> list -> dlss path), Frame Gen off, same restored save snapshot
  • GPU / Driver / OS: NVIDIA GeForce RTX 5070 (12 GB), driver 595.79, Windows 10 x64
  • Observed DLSS feature log:
    • upscale context render=[1280, 720] upscale=[1920, 1080] flags=0x29
    • DLSS: feature made input=(1280, 720) output=(1920, 1080) hdr=true depth_inverted=true auto_exposure=true mv_jittered=false quality=2 colour_format=10 (confirms mv_jittered=false followed the title's 0x29 flags as intended)
Run Time in world World samples Device lost / crashes / errors Median rendered FPS (ms) Slowest / fastest tenth (fps) Median draws
PR #3171 (75cf57ac3 on f1a559851) 315 s (432.3 s total) 63 0 / 0 / 0 26.5 fps (37.8 ms) 20.7 / 27.7 4,412
main alone (f1a559851) 303.2 s (480.0 s total) 62 0 / 0 / 0 27.2 fps (36.8 ms) 21.8 / 28.7 4,385

Loaded cleanly into the world with DLSS active (mv_jittered=false), stayed up past 300 s in-world with 0 device lost / 0 crashes / 0 ERROR lines, and closed cleanly. Rendered FPS matches main within single-run variance.

Verdict: PASS (note: @MoonEyes's doc-comment nit on dlss_mode remains open for the author to address if desired).

AI-assisted: yes (Antigravity).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7355877755 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7355877755). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-02T19:15:39Z. --- RUN (in game) -- unit tests + 300 s render-path gate run for PR #3171: - **PR head SHA:** `75cf57ac3` - **Merged onto `main` SHA:** `f1a559851` (`git merge --no-ff`, clean merge) - **Clean-room & switch-table checks:** - `python -I scripts/check_no_game_data.py` PASS - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` PASS - **Unit tests (Windows 10 x64, Rust 1.98.1):** - `cargo test -p leonida-gpu --features "diagnostics,dlss" --lib --locked list::` -- **13 passed, 0 failed** - `cargo test -p leonida-hle --lib --locked ffx::` -- **6 passed, 0 failed** - **Build:** `diag` profile (`diagnostics,dlss,mimalloc`), Series S profile, **DLSS on** (directly exercises the modified `ffx` -> `list` -> `dlss` path), Frame Gen off, same restored save snapshot - **GPU / Driver / OS:** NVIDIA GeForce RTX 5070 (12 GB), driver 595.79, Windows 10 x64 - **Observed DLSS feature log:** - `upscale context render=[1280, 720] upscale=[1920, 1080] flags=0x29` - `DLSS: feature made input=(1280, 720) output=(1920, 1080) hdr=true depth_inverted=true auto_exposure=true mv_jittered=false quality=2 colour_format=10` (confirms `mv_jittered=false` followed the title's `0x29` flags as intended) | Run | Time in world | World samples | Device lost / crashes / errors | Median rendered FPS (ms) | Slowest / fastest tenth (fps) | Median draws | | --- | ---: | ---: | --- | ---: | ---: | ---: | | **PR #3171 (`75cf57ac3` on `f1a559851`)** | 315 s (432.3 s total) | 63 | **0 / 0 / 0** | **26.5 fps** (37.8 ms) | 20.7 / 27.7 | 4,412 | | **`main` alone (`f1a559851`)** | 303.2 s (480.0 s total) | 62 | **0 / 0 / 0** | **27.2 fps** (36.8 ms) | 21.8 / 28.7 | 4,385 | Loaded cleanly into the world with DLSS active (`mv_jittered=false`), stayed up past 300 s in-world with 0 device lost / 0 crashes / 0 `ERROR` lines, and closed cleanly. Rendered FPS matches `main` within single-run variance. Verdict: **PASS** (note: @MoonEyes's doc-comment nit on `dlss_mode` remains open for the author to address if desired). AI-assisted: yes (Antigravity).
lucaspiro commented 2026-12-02 19:24:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lucaspiro on 2026-12-02T19:24:04Z.


@MoonEyes thanks for the review. Fixed in 364ca8e: the DLSS_FLAG_* constants and dlss_feature_flags now sit above dlss_mode's doc comment, so it documents dlss_mode again (moved lines only; cargo test -p leonida-gpu --lib list:: 13 passed).

On the notes:

  • Display-resolution vectors (bit 1): agreed it is the same kind of statement; left as is here since the Series S title does not set it and nothing changes today. Happy to follow it in a separate PR.
  • CONTEXT_FLAGS in tests: only a_creation_description_at_an_odd_address_is_read_and_written calls create, and it holds the REALS lock like the other tests that set the title's entry points, so a future test that calls create takes the same lock.
  • In-game run on this head: @lixonik's 300 s gate run above (RTX 5070, Series S, DLSS on): mv_jittered=false from flags=0x29, 0 device lost / crashes / errors, 26.5 fps against 27.2 on main, within run-to-run variance.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7356112685 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7356112685). Originally posted by [lucaspiro](https://github.com/lucaspiro) on 2026-12-02T19:24:04Z. --- @MoonEyes thanks for the review. Fixed in 364ca8e: the `DLSS_FLAG_*` constants and `dlss_feature_flags` now sit above `dlss_mode`'s doc comment, so it documents `dlss_mode` again (moved lines only; `cargo test -p leonida-gpu --lib list::` 13 passed). On the notes: - Display-resolution vectors (bit 1): agreed it is the same kind of statement; left as is here since the Series S title does not set it and nothing changes today. Happy to follow it in a separate PR. - `CONTEXT_FLAGS` in tests: only `a_creation_description_at_an_odd_address_is_read_and_written` calls `create`, and it holds the `REALS` lock like the other tests that set the title's entry points, so a future test that calls `create` takes the same lock. - In-game run on this head: @lixonik's 300 s gate run above (RTX 5070, Series S, DLSS on): `mv_jittered=false` from `flags=0x29`, 0 device lost / crashes / errors, 26.5 fps against 27.2 on `main`, within run-to-run variance.
Kal0s-design commented 2026-12-02 20:35:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T20:35:29Z.


Ran natively on Windows 11, head 364ca8eea merged into current main (b41763227, clean merge).

The thread already covers the in-game run, the FFX bit values and the doc comment. Below is what it doesn't have yet.

Suite on the merge vs main (measured, cargo test -p leonida-gpu -p leonida-hle --lib --locked -- --test-threads=4 --skip depth_bounds_pipeline_loads_and_filters_draws)

main merge
leonida-gpu lib 702 passed, 0 failed 703 passed, 0 failed
leonida-hle lib 248 passed, 0 failed 249 passed, 0 failed

The extra test in each crate is one of the two new ones. Clippy --all-targets gives no warnings with default features. With diagnostics,dlss main and the merge both have the same 10 warnings, and none of them is in dlss.rs, list.rs or ffx.rs. I don't have the DLSS SDK, so for that run LEONIDA_DLSS_SDK pointed at an empty folder. That is enough for record() to compile, but the lib tests can't link with that feature here. d3d12_switches.py --check passes on the merge (main moved since the thread's check) and so does tests/test_d3d12_switches.py (20 tests). With LEONIDA_DLSS_MV_JITTERED unset the flag follows the title's context, and 0 or 1 forces it.

Red with the old decision (measured). I put "always jittered" back in vectors_jittered and dlss_feature_flags and ran the four tests the body names. Three of them fail. an_upscale_keeps_its_numbers_through_its_words stays green, which makes sense because it checks the bit's trip through the words and not the decision. The body says all four go red, so that's only a wording thing.

What decides the flag. I wrote a throwaway table test and didn't push it. It ran 2,304 combinations of the bit, reset, dlss, render size, jitter, hdr, depth inverted, auto exposure and the override through the words and dlss_feature_flags. It also ran vectors_jittered over every flags value from 0 to 0xFFFF plus NO_CONTEXT, and a sequence of create calls.

input effect how I know
bit 2 of the title's context flags the only thing from the title that decides it measured
no context seen yet jittered, as on main measured
LEONIDA_DLSS_MV_JITTERED overrides both ways read in record(), logic in the table
reset, render size, jitter values not inputs to the decision read
the same three the bit survives the words beside them and leaves the other DLSS flags alone measured
first frame, jitter change mid-run not inputs read, not tested
stretch or the title's own FFX they don't read the bit read

Re-creating the context always leaves the last context's flags in place, with shipped sizes, stand-in sizes or bad sizes. 0x29, then 0x2D, then 0x29 flips the answer each time (measured). A non-upscale context doesn't touch them. A context the title's DLL refuses still leaves its flags behind (measured). That's harmless today, but it's one value for the whole process with no destroy hook, so two live contexts would share the last one's flags (read). The DLSS feature key includes the flags, so a flip re-makes the feature instead of reusing the old one (read).

Two small things, both read. findings.md says "the title makes it without: 0x29" at the end of the Series X item, but 0x29 was only logged on Series S. The Series X path with LEONIDA_FSR_UPSCALER=1 goes through the same hook, but I didn't find its context flags anywhere. Also, the odd-address create test leaves CONTEXT_FLAGS at 0x29 and doesn't put it back the way it does REAL_CREATE.

75cf57ac3..364ca8eea only moves the same 4 lines in list.rs, so the in-game run on 75cf57ac3 still holds for this head.

Conflicts (measured with git merge-tree against the 15 open PRs touching dlss.rs, list.rs, ffx.rs or fg.rs. I didn't check docs-only PRs.)

PR result
#3111 list.rs. Its word 11 (fov) against this PR's bit 2 of word 10, plus the round-trip length assert. The two changes don't depend on each other, so keep both
#2643, #2834, #2958, #3031 switches.md count line only
#3039 switches.md, already conflicts with main
the other 9 clean

Not checked: DLSS itself (no NGX DLSS runtime or SDK here), a game run, the Series X context flags, frame generation's motionVectorsJittered, the full workspace suite.

GPUs tested: n/a (the PR's tests are CPU-only. The suite's existing device tests ran on the default adapter, which I didn't probe.)

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7357986319 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7357986319). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T20:35:29Z. --- Ran natively on Windows 11, head `364ca8eea` merged into current `main` (`b41763227`, clean merge). The thread already covers the in-game run, the FFX bit values and the doc comment. Below is what it doesn't have yet. **Suite on the merge vs main** (measured, `cargo test -p leonida-gpu -p leonida-hle --lib --locked -- --test-threads=4 --skip depth_bounds_pipeline_loads_and_filters_draws`) | | main | merge | |---|---:|---:| | leonida-gpu lib | 702 passed, 0 failed | 703 passed, 0 failed | | leonida-hle lib | 248 passed, 0 failed | 249 passed, 0 failed | The extra test in each crate is one of the two new ones. Clippy `--all-targets` gives no warnings with default features. With `diagnostics,dlss` main and the merge both have the same 10 warnings, and none of them is in `dlss.rs`, `list.rs` or `ffx.rs`. I don't have the DLSS SDK, so for that run `LEONIDA_DLSS_SDK` pointed at an empty folder. That is enough for `record()` to compile, but the lib tests can't link with that feature here. `d3d12_switches.py --check` passes on the merge (main moved since the thread's check) and so does `tests/test_d3d12_switches.py` (20 tests). With `LEONIDA_DLSS_MV_JITTERED` unset the flag follows the title's context, and `0` or `1` forces it. **Red with the old decision** (measured). I put "always jittered" back in `vectors_jittered` and `dlss_feature_flags` and ran the four tests the body names. Three of them fail. `an_upscale_keeps_its_numbers_through_its_words` stays green, which makes sense because it checks the bit's trip through the words and not the decision. The body says all four go red, so that's only a wording thing. **What decides the flag.** I wrote a throwaway table test and didn't push it. It ran 2,304 combinations of the bit, reset, dlss, render size, jitter, hdr, depth inverted, auto exposure and the override through the words and `dlss_feature_flags`. It also ran `vectors_jittered` over every flags value from 0 to 0xFFFF plus `NO_CONTEXT`, and a sequence of `create` calls. | input | effect | how I know | |---|---|---| | bit 2 of the title's context flags | the only thing from the title that decides it | measured | | no context seen yet | jittered, as on main | measured | | `LEONIDA_DLSS_MV_JITTERED` | overrides both ways | read in `record()`, logic in the table | | reset, render size, jitter values | not inputs to the decision | read | | the same three | the bit survives the words beside them and leaves the other DLSS flags alone | measured | | first frame, jitter change mid-run | not inputs | read, not tested | | stretch or the title's own FFX | they don't read the bit | read | Re-creating the context always leaves the last context's flags in place, with shipped sizes, stand-in sizes or bad sizes. 0x29, then 0x2D, then 0x29 flips the answer each time (measured). A non-upscale context doesn't touch them. A context the title's DLL refuses still leaves its flags behind (measured). That's harmless today, but it's one value for the whole process with no destroy hook, so two live contexts would share the last one's flags (read). The DLSS feature key includes the flags, so a flip re-makes the feature instead of reusing the old one (read). Two small things, both read. `findings.md` says "the title makes it without: 0x29" at the end of the Series X item, but 0x29 was only logged on Series S. The Series X path with `LEONIDA_FSR_UPSCALER=1` goes through the same hook, but I didn't find its context flags anywhere. Also, the odd-address create test leaves `CONTEXT_FLAGS` at 0x29 and doesn't put it back the way it does `REAL_CREATE`. `75cf57ac3..364ca8eea` only moves the same 4 lines in `list.rs`, so the in-game run on `75cf57ac3` still holds for this head. **Conflicts** (measured with `git merge-tree` against the 15 open PRs touching `dlss.rs`, `list.rs`, `ffx.rs` or `fg.rs`. I didn't check docs-only PRs.) | PR | result | |---|---| | #3111 | `list.rs`. Its word 11 (fov) against this PR's bit 2 of word 10, plus the round-trip length assert. The two changes don't depend on each other, so keep both | | #2643, #2834, #2958, #3031 | `switches.md` count line only | | #3039 | `switches.md`, already conflicts with main | | the other 9 | clean | Not checked: DLSS itself (no NGX DLSS runtime or SDK here), a game run, the Series X context flags, frame generation's `motionVectorsJittered`, the full workspace suite. GPUs tested: n/a (the PR's tests are CPU-only. The suite's existing device tests ran on the default adapter, which I didn't probe.) AI-assisted: yes (Claude Code).
fiestorra commented 2026-12-03 00:01:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T00:01:54Z.


VERIFY-3171 — Windows nativo: la suite pasa, y el cambio es colocación de documentación

Own commit 364ca8eea — list.rs, +4/−4, all /// lines moving relative to the attributes

Ran at the head

cargo test -p leonida-gpu --lib list     42 passed; 0 failed; 8 ignored

red not constructible: nothing changes in behaviour — the words are the same, only the order of the doc comment and the #[...] flags changes.

And that order is the whole point, so it is not cosmetic: an attribute between a doc comment and its item detaches the documentation — the comment ends up documenting the attribute (or nothing at all) instead of the dlss_mode function, and cargo doc silently renders a function with no description. The diff is four lines and the bug it prevents is invisible in every test, which is why nobody would have caught it by running anything.

The words themselves are worth keeping: PerfQualityValue's numbering (0 performance, 1 balanced, 2 quality, 3 ultra performance), the ratios (2/3, 0.58, 1/2, 1/3), and the actual line numbers — 2160 from 1440 is quality, from 1296 or 1253 balanced, from 1080 performance, from 720 ultra performance — are the kind of fact that only exists here.

What I could not test

  • The rendered documentation: cargo doc would show whether the comment attaches; I checked the placement in the source, which is the mechanism.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7362714386 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7362714386). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T00:01:54Z. --- ## VERIFY-3171 — Windows nativo: la suite pasa, y el cambio es **colocación de documentación** | | | |---|---| | Own commit | `364ca8eea` — `list.rs`, +4/−4, **all `///` lines moving relative to the attributes** | **Ran at the head** ``` cargo test -p leonida-gpu --lib list 42 passed; 0 failed; 8 ignored ``` **`red not constructible`**: **nothing changes in behaviour** — the words are the same, **only the order of the doc comment and the `#[...]` flags changes.** **And that order is the whole point, so it is not cosmetic**: **an attribute between a doc comment and its item detaches the documentation** — the comment ends up documenting the attribute (or nothing at all) instead of the `dlss_mode` function, **and `cargo doc` silently renders a function with no description.** **The diff is four lines and the bug it prevents is invisible in every test**, which is why nobody would have caught it by running anything. **The words themselves are worth keeping**: **`PerfQualityValue`'s numbering (`0 performance, 1 balanced, 2 quality, 3 ultra performance`), the ratios (`2/3, 0.58, 1/2, 1/3`), and the actual line numbers** — 2160 from 1440 is quality, from 1296 or 1253 balanced, from 1080 performance, from 720 ultra performance — **are the kind of fact that only exists here.** ## What I could not test - **The rendered documentation**: `cargo doc` would show whether the comment attaches; I checked the placement in the source, which is the mechanism. Written with an AI assistant.
MoonEyes commented 2026-12-03 07:01:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T07:01:28Z.


This pull request has a merge conflict with current main (d9b618f10), so it can't be run in game or merged as it is. Could you merge the latest main into it (or rebase onto it) and resolve the conflict? Once the head is updated, the in-game gate run can be done on the new head.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370504780 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7370504780). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T07:01:28Z. --- This pull request has a merge conflict with current `main` (`d9b618f10`), so it can't be run in game or merged as it is. Could you merge the latest `main` into it (or rebase onto it) and resolve the conflict? Once the head is updated, the in-game gate run can be done on the new head. AI-assisted (Claude Code).
fiestorra commented 2026-12-03 09:29:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T09:29:48Z.


Tres más, estas de dos commits cada una, rebasadas contra d9b618f10 y empujadas

El resolvedor funcionó igual, porque el conflicto de cada commit es la misma línea del recuento (el while resuelve y sigue hasta que el rebase termina, en vez de asumir un solo bloque):

#3144  3adefc60d   5 files, +278/−2    → 685/645   1 .rs    gpu 715/1
#3171  09dbec1c5   5 files, +118/−24   → 685/645   3 .rs    gpu 716/1
#3248  a48d691f0   4 files,  +79/−1    → 685/645   3 .rs    gpu 716/1

Las tres: 0 marcadores, pytest tests/test_d3d12_switches.py 20 passed, y cargo test -p leonida-gpu --lib con el fallo de la iGPU de siempre.

Y el desglose de tests, que es lo que separa estas tres de #3009 y #3126:

PR líneas .rs tests nuevos en leonida-gpu
#3144 1 0 (715 = main)
#3171 3 1 (716)
#3248 3 1 (716)

O sea que de las cinco rebasadas hoy, tres no añaden tests (#3009, #3126, #3144) y dos sí (#3171, #3248) — y todas tocan código de runtime. Quien fusione tiene ahora el dato delante en vez de descubrirlo después.

Ramas pr-3144-rebased, pr-3171-rebased y pr-3248-rebased en el fork.

Lo que esto ya permite decir: de los 22 conflictos, seis están resueltos y empujados (#3009, #3126, #3140, #3144, #3171, #3248) más los cuatro de antes (#3233, #3253, #3269, #3289) más #3225 y #3308 — doce en total, y todos con el mismo patrón: una línea del recuento que se recalcula contando el fichero.

Lo que no he resuelto: los que chocan en un .rs (#2567, #2856, #3115, #3197) y los de varios commits con código (#2580, #3124, #3130, #3209, #3214) — esos no son una línea y no los toco sin leer el cambio.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373752029 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7373752029). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T09:29:48Z. --- ## Tres más, estas de dos commits cada una, rebasadas contra `d9b618f10` y empujadas **El resolvedor funcionó igual, porque el conflicto de cada commit es la misma línea del recuento** (**el `while` resuelve y sigue hasta que el rebase termina, en vez de asumir un solo bloque**): ``` #3144 3adefc60d 5 files, +278/−2 → 685/645 1 .rs gpu 715/1 #3171 09dbec1c5 5 files, +118/−24 → 685/645 3 .rs gpu 716/1 #3248 a48d691f0 4 files, +79/−1 → 685/645 3 .rs gpu 716/1 ``` **Las tres: 0 marcadores, `pytest tests/test_d3d12_switches.py` 20 passed, y `cargo test -p leonida-gpu --lib` con el fallo de la iGPU de siempre.** **Y el desglose de tests, que es lo que separa estas tres de `#3009` y `#3126`**: | PR | líneas .rs | tests nuevos en `leonida-gpu` | |---|---|---| | **`#3144`** | 1 | **0** (715 = main) | | **`#3171`** | 3 | **1** (716) | | **`#3248`** | 3 | **1** (716) | **O sea que de las cinco rebasadas hoy, tres no añaden tests** (`#3009`, `#3126`, `#3144`) **y dos sí** (`#3171`, `#3248`) — **y todas tocan código de runtime.** **Quien fusione tiene ahora el dato delante en vez de descubrirlo después.** **Ramas `pr-3144-rebased`, `pr-3171-rebased` y `pr-3248-rebased` en el fork.** **Lo que esto ya permite decir**: **de los 22 conflictos, seis están resueltos y empujados** (`#3009`, `#3126`, `#3140`, `#3144`, `#3171`, `#3248`) **más los cuatro de antes** (`#3233`, `#3253`, `#3269`, `#3289`) **más `#3225` y `#3308`** — **doce en total, y todos con el mismo patrón: una línea del recuento que se recalcula contando el fichero.** **Lo que no he resuelto**: **los que chocan en un `.rs`** (`#2567`, `#2856`, `#3115`, `#3197`) **y los de varios commits con código** (`#2580`, `#3124`, `#3130`, `#3209`, `#3214`) — **esos no son una línea y no los toco sin leer el cambio.**
MoonEyes commented 2026-12-03 18:03:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T18:03:00Z.


Thanks for the work on this. This pull request has a merge conflict with the current main and has had no new commit, comment or review for more than 5 hours, so I am closing it to keep the list of open pull requests manageable. This is not a judgement of the change. Whenever you like, merge the latest main into your branch, resolve the conflict, and reopen it (or open a new pull request that links this one). Please re-run the relevant tests on the new head; a reviewer will look at it when time allows, with no guarantee of timing or outcome.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7387515099 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3171#issuecomment-7387515099). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T18:03:00Z. --- Thanks for the work on this. This pull request has a merge conflict with the current `main` and has had no new commit, comment or review for more than 5 hours, so I am closing it to keep the list of open pull requests manageable. This is not a judgement of the change. Whenever you like, merge the latest `main` into your branch, resolve the conflict, and reopen it (or open a new pull request that links this one). Please re-run the relevant tests on the new head; a reviewer will look at it when time allows, with no guarantee of timing or outcome. --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
ProjectLeonida/mandy!3171
No description provided.