d3d12: LEONIDA_TITLE_MEMORY_SCALE tells the title it has more of its console's memory (D3D12-TITLE-MEMORY-SCALE) #2851

Open
x2Tweek wants to merge 7 commits from upstream-pr/2851 into main
x2Tweek commented 2026-12-01 09:15:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by x2Tweek on 2026-12-01T09:15:42Z.


Claimed in the coordination issue as: D3D12-TITLE-MEMORY-SCALE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306421400)

What and why

At 3840x2160 output with -RayTracing and DLSS on Series X (with #2756 for a lit world through FidelityFX), the game runs at 0.1 to 0.2 fps. It is not the card or our submissions:

  • the frame line reads ~80 ms of our work for a 5,500-6,200 ms frame, and LEONIDA_GPU_TIMING=1 gives 63-78 ms on the card;
  • the card's clock line: about 2 % busy;
  • the frame account line: the process ran ~0.8 s user + 5.6 s kernel a frame;
  • the mapping line: ~2,900 changes of mapping a frame (the runtime's changes of mapping per frame), 3.9 s a frame holding title memory still. xmem's page-mapping counter shows the title mapping ~1.35 pages per call.

The same run at 2560x1440 output reads 0.9 changes a frame and 17 fps, and at 3840x2160 without DLSS 0.7 changes and 7-10 fps. The title seems to size its own pools from the limit it reads at the start (XMemGetWorkingSetStatistics, the adapter's description), and at 4K with ray tracing they no longer hold a frame, so it maps pages in and out one at a time.

This adds LEONIDA_TITLE_MEMORY_SCALE=<x> (1 unless set, clamped to 1-2.5): Console::title_memory returns the console's figures times that, in whole 2 MiB pages. Every reader of the figure (the working-set limit, XMemTransferMemory's cap, the adapter's description) sees the same value. Default behaviour is unchanged. The doc comment warns to keep it within what the PC has (at 2.5 a Series X title is told 34 GB and 25 GB of video memory).

Different from RS-WORKING-SET-STATS (the "used" figure the title gets); this is the limit.

Tested

On Windows 11 Pro 26300, from current main:

  • cargo test -p leonida-gpu --lib --locked console::: the two new tests pass (parse and bounds of the scale; scaling keeps whole pages and 1 leaves the figures as they are).
  • cargo test -p leonida-hle --lib --locked xmem: 24 passed (including transfers_shrink_the_title_budget).
  • tools/d3d12_switches.py --out then the new row only in d3d12/docs/switches.md.
  • In game, prison save, Series X, 3840x2160, DLSS quality (render 2560x1440), -RayTracing: scale 1: 0.1-0.2 fps, ~2,900 changes of mapping a frame; scale 2: 10.5 fps median, 2.0 changes a frame, picture correct (screenshot checked).
  • Same output without ray tracing, scale 1 against 2 by turns (ABBA, 2 min each in the cell): 41.2 / 41.3 against 41.5 / 41.2 fps: no change.

GPUs tested: NVIDIA GeForce RTX 5090 32 GB (resizable BAR), i9-14900KS, 64 GB DDR5, Windows 11 Pro 10.0.26300.

AI-assisted: yes. Claude Opus 5.5 wrote and measured it; a separate Claude Opus reviewer agent reviewed it before this pull request (its should-fix points are in: the old shortcut comment that said the title sizes nothing from this figure is reworded, and the host-memory warning added).

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5582652945 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851). Originally posted by [x2Tweek](https://github.com/x2Tweek) on 2026-12-01T09:15:42Z. --- Claimed in the coordination issue as: D3D12-TITLE-MEMORY-SCALE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306421400) ### What and why At 3840x2160 output with `-RayTracing` and DLSS on Series X (with #2756 for a lit world through FidelityFX), the game runs at 0.1 to 0.2 fps. It is not the card or our submissions: - the frame line reads ~80 ms of our work for a 5,500-6,200 ms frame, and `LEONIDA_GPU_TIMING=1` gives 63-78 ms on the card; - the card's clock line: about 2 % busy; - the frame account line: the process ran ~0.8 s user + **5.6 s kernel** a frame; - the mapping line: **~2,900 changes of mapping a frame** (`the runtime's changes of mapping per frame`), 3.9 s a frame holding title memory still. `xmem`'s page-mapping counter shows the title mapping ~1.35 pages per call. The same run at 2560x1440 output reads 0.9 changes a frame and 17 fps, and at 3840x2160 without DLSS 0.7 changes and 7-10 fps. The title seems to size its own pools from the limit it reads at the start (`XMemGetWorkingSetStatistics`, the adapter's description), and at 4K with ray tracing they no longer hold a frame, so it maps pages in and out one at a time. This adds `LEONIDA_TITLE_MEMORY_SCALE=<x>` (1 unless set, clamped to 1-2.5): `Console::title_memory` returns the console's figures times that, in whole 2 MiB pages. Every reader of the figure (the working-set limit, `XMemTransferMemory`'s cap, the adapter's description) sees the same value. Default behaviour is unchanged. The doc comment warns to keep it within what the PC has (at 2.5 a Series X title is told 34 GB and 25 GB of video memory). Different from RS-WORKING-SET-STATS (the "used" figure the title gets); this is the limit. ### Tested On Windows 11 Pro 26300, from current `main`: - `cargo test -p leonida-gpu --lib --locked console::`: the two new tests pass (parse and bounds of the scale; scaling keeps whole pages and 1 leaves the figures as they are). - `cargo test -p leonida-hle --lib --locked xmem`: 24 passed (including `transfers_shrink_the_title_budget`). - `tools/d3d12_switches.py --out` then the new row only in `d3d12/docs/switches.md`. - In game, prison save, Series X, 3840x2160, DLSS quality (render 2560x1440), `-RayTracing`: scale 1: 0.1-0.2 fps, ~2,900 changes of mapping a frame; scale 2: **10.5 fps median**, 2.0 changes a frame, picture correct (screenshot checked). - Same output without ray tracing, scale 1 against 2 by turns (ABBA, 2 min each in the cell): 41.2 / 41.3 against 41.5 / 41.2 fps: no change. GPUs tested: NVIDIA GeForce RTX 5090 32 GB (resizable BAR), i9-14900KS, 64 GB DDR5, Windows 11 Pro 10.0.26300. AI-assisted: yes. Claude Opus 5.5 wrote and measured it; a separate Claude Opus reviewer agent reviewed it before this pull request (its should-fix points are in: the old `shortcut` comment that said the title sizes nothing from this figure is reworded, and the host-memory warning added). ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fiestorra commented 2026-12-01 09:23:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T09:23:45Z.


Verified on Windows: the crate is green with it, and it adds two tests - measured against main's own file.

main 3bf2844a5, cherry-picked (one commit, merge-base 76746d35b), cargo 1.98.1:

cargo test -p leonida-gpu --lib
  with this pull request:          ok. 601 passed; 0 failed; 55 ignored
  with console.rs from main:       ok. 599 passed; 0 failed; 55 ignored

So the two tests are tied to the change and nothing else in the crate moved. That is an existence control, not a mutation one - I did not remove the switch to watch a specific test fail, because the tests that come with it are the ones that would.

What matters for a new switch, and what this establishes: LEONIDA_TITLE_MEMORY_SCALE is reachable and its two cases pass. What it does not establish is that a title given a different memory scale behaves - that needs the game, and this machine does not have the build for it.

One thing worth adding to the pull request, since docs/switches.md now has its row: what happens when the title asks for more than the card has. The document's other switches say when they refuse; if this one saturates or refuses, the row should say so, and if it cannot happen because the value is clamped before it reaches the title, that is worth a sentence too.

AI-assisted: yes - DeepSeek v4.1 (flash), both arms on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7306638643 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7306638643). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T09:23:45Z. --- **Verified on Windows: the crate is green with it, and it adds two tests - measured against `main`'s own file.** **`main` `3bf2844a5`, cherry-picked (one commit, `merge-base` `76746d35b`), `cargo 1.98.1`:** ``` cargo test -p leonida-gpu --lib with this pull request: ok. 601 passed; 0 failed; 55 ignored with console.rs from main: ok. 599 passed; 0 failed; 55 ignored ``` **So the two tests are tied to the change and nothing else in the crate moved.** **That is an existence control, not a mutation one** - **I did not remove the switch to watch a specific test fail, because the tests that come with it are the ones that would.** **What matters for a new switch, and what this establishes**: **`LEONIDA_TITLE_MEMORY_SCALE` is reachable and its two cases pass.** **What it does not establish is that a title given a different memory scale behaves - that needs the game, and this machine does not have the build for it.** **One thing worth adding to the pull request, since `docs/switches.md` now has its row**: **what happens when the title asks for more than the card has.** **The document's other switches say when they refuse; if this one saturates or refuses, the row should say so, and if it cannot happen because the value is clamped before it reaches the title, that is worth a sentence too.** **AI-assisted:** yes - DeepSeek v4.1 (flash), both arms on the machine above. Written with an AI assistant.
x2Tweek commented 2026-12-01 10:45:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by x2Tweek on 2026-12-01T10:45:02Z.


Thanks for checking it. Added in 5 lines of title_memory's doc comment: nothing refuses or saturates on account of the switch. The value is clamped to 1-2.5 before the title is told. The figure is only what the title is told: the runtime checks neither the PC's memory nor the card's against it. What the title then commits beyond what the PC has fails as any commit over Windows' limit does. The switches.md row is unchanged, since it shows the first sentences only.

On "a title given a different memory scale behaves": that part was measured in game (in the description). At 3840x2160 with ray tracing and DLSS, scale 2 takes the changes of mapping from ~2,900 to 2 a frame and the frame rate from 0.1 to 10.5 fps, with the picture correct. Without ray tracing, 1 against 2 by turns is 41.2 against 41.4 fps.

AI-assisted: yes, Claude Opus 5.5.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7308659391 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7308659391). Originally posted by [x2Tweek](https://github.com/x2Tweek) on 2026-12-01T10:45:02Z. --- Thanks for checking it. Added in 5 lines of `title_memory`'s doc comment: nothing refuses or saturates on account of the switch. The value is clamped to 1-2.5 before the title is told. The figure is only what the title is told: the runtime checks neither the PC's memory nor the card's against it. What the title then commits beyond what the PC has fails as any commit over Windows' limit does. The `switches.md` row is unchanged, since it shows the first sentences only. On "a title given a different memory scale behaves": that part was measured in game (in the description). At 3840x2160 with ray tracing and DLSS, scale 2 takes the changes of mapping from ~2,900 to 2 a frame and the frame rate from 0.1 to 10.5 fps, with the picture correct. Without ray tracing, 1 against 2 by turns is 41.2 against 41.4 fps. AI-assisted: yes, Claude Opus 5.5.
KelboLive commented 2026-12-01 17:55:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T17:55:39Z.

Review: COMMENTED


Verified: scaled (console.rs:73-77) multiplies in f64, floors to 2 MiB pages, and all four constants are already page multiples — so scale 1 is a structural no-op, not just a tested one, and the 2.5 clamp caps at 25 GiB with no overflow path (f64 is exact at 2^34, saturating cast far above). title_memory() is the only source of the figure (dxgi.rs:154, xmem.rs:2316, :2358), nothing else hardcodes 10/3.5 GiB, and nothing reserves against it, so "advisory only" is accurate. Tests pass here (2 + 24) on this branch and on today's main, and both mutations are caught: clamp(1.0, 3.5) fails with left: 3.5, right: 2.5, and dropping the page floor fails with left: 838860, right: 0.

One thing before merge: merge-tree conflicts on d3d12/docs/switches.md. Main is at 673 names; 633 and this PR hand-bumps 664 → 665; the branch's own page is already three rows stale (this tree generates 668/627). Please drop the header edit and regenerate with --out at merge time (post-merge it is 674 names; 634). Note tools/d3d12_switches.py --check compares rows only, so a wrong count line sails straight through — which is exactly how the hand-bump got stale.

Optional, not a blocker: the clamp is absolute, so a 12 GB card can be told 25 GiB of video memory. Capping against QueryVideoMemoryInfo's budget would remove the "keep it within what the PC has" caveat and make the switch safe to leave on.

Not verifiable here: the headline in-game measurement (2,900 → 2 page-mapping changes/frame, 0.1–0.2 → 10.5 fps) and the no-RT null result — that needs the title and game data. The switch is reachable; only its effect is unmeasured on this machine. No file overlap with #2900 (different lever, semantically complementary).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6136918765 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#pullrequestreview-6136918765). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T17:55:39Z. **Review:** COMMENTED --- Verified: `scaled` (`console.rs:73-77`) multiplies in f64, floors to 2 MiB pages, and all four constants are already page multiples — so scale 1 is a *structural* no-op, not just a tested one, and the 2.5 clamp caps at 25 GiB with no overflow path (`f64` is exact at 2^34, saturating cast far above). `title_memory()` is the only source of the figure (`dxgi.rs:154`, `xmem.rs:2316`, `:2358`), nothing else hardcodes 10/3.5 GiB, and nothing reserves against it, so "advisory only" is accurate. Tests pass here (2 + 24) on this branch and on today's main, and both mutations are caught: `clamp(1.0, 3.5)` fails with `left: 3.5, right: 2.5`, and dropping the page floor fails with `left: 838860, right: 0`. One thing before merge: **`merge-tree` conflicts on `d3d12/docs/switches.md`**. Main is at `673 names; 633` and this PR hand-bumps `664 → 665`; the branch's own page is already three rows stale (this tree generates `668/627`). Please drop the header edit and regenerate with `--out` at merge time (post-merge it is `674 names; 634`). Note `tools/d3d12_switches.py --check` compares rows only, so a wrong count line sails straight through — which is exactly how the hand-bump got stale. Optional, not a blocker: the clamp is absolute, so a 12 GB card can be told 25 GiB of video memory. Capping against `QueryVideoMemoryInfo`'s budget would remove the "keep it within what the PC has" caveat and make the switch safe to leave on. Not verifiable here: the headline in-game measurement (2,900 → 2 page-mapping changes/frame, 0.1–0.2 → 10.5 fps) and the no-RT null result — that needs the title and game data. The switch is reachable; only its effect is unmeasured on this machine. No file overlap with #2900 (different lever, semantically complementary).
andrew-ai commented 2026-12-02 00:32:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-02T00:32:30Z.


Verified b4e0a76f6 on Windows x64. I compiled the unmodified console.rs in a small Rust harness and launched one process per LEONIDA_TITLE_MEMORY_SCALE value so the once-only read ran each time. For both Series X and Series S, current().title_memory() matched an independent whole-2-MiB-page calculation for unset, empty, malformed, NaN, positive and negative infinity, 0.125, whitespace-padded 1.375, 2, 2.5, and 3. All 22 profile results matched, including the zero GPU-optimal range on Series S. Scope was the console getter only. Game performance and downstream adapter reporting remain unverified by this check. Codex-assisted review.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7330678586 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7330678586). Originally posted by [andrew-ai](https://github.com/andrew-ai) on 2026-12-02T00:32:30Z. --- Verified b4e0a76f6 on Windows x64. I compiled the unmodified console.rs in a small Rust harness and launched one process per LEONIDA_TITLE_MEMORY_SCALE value so the once-only read ran each time. For both Series X and Series S, current().title_memory() matched an independent whole-2-MiB-page calculation for unset, empty, malformed, NaN, positive and negative infinity, 0.125, whitespace-padded 1.375, 2, 2.5, and 3. All 22 profile results matched, including the zero GPU-optimal range on Series S. Scope was the console getter only. Game performance and downstream adapter reporting remain unverified by this check. Codex-assisted review.
MoonEyes commented 2026-12-02 12:29:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:29:12Z.


This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345411670 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7345411670). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:29:12Z. --- This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
Kal0s-design commented 2026-12-02 14:24:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T14:24:54Z.


Ran natively on Windows 11, head cf8f7be78 merged into current main (2fc7383b9, no conflicts now; the switches.md conflict mentioned above is gone), toolchain 1.98.1, --locked. The parsing and the getter are already covered above. This run checks what the title is actually told downstream, one process per value, using throwaway ignored tests (not committed) that call adapter_description (dxgi.rs), XMemGetWorkingSetStatistics and XMemTransferMemory.

What the title is told (bytes, Series X / Series S)

LEONIDA_TITLE_MEMORY_SCALE Adapter dedicated video Adapter shared system XMem title limit XMem GPU-optimal limit
unset, 1, 0, -1 10737418240 / 0 3758096384 / 8153726976 14495514624 / 8153726976 10737418240 / 0
1.3 13958643712 / 0 4884267008 / 10599006208 18842910720 / 10599006208 13958643712 / 0
2 21474836480 / 0 7516192768 / 16307453952 28991029248 / 16307453952 21474836480 / 0
2.5, 1e308 26843545600 / 0 9395240960 / 20384317440 36238786560 / 20384317440 26843545600 / 0

For every value and both consoles:

  • The adapter's two figures equal title_memory().
  • The XMem limit equals their sum.
  • Every figure is a whole number of 2 MiB pages.
  • XMemTransferMemory takes exactly the scaled standard range and refuses 2 MiB more, which leaves the limit at the GPU-optimal figure.

So the three places that report the figure agree at every scale, and the transfer cap follows the scale. On Series S the GPU-optimal range stays 0 at any scale, so only the standard range grows.

Suites on the merge

leonida-gpu --lib leonida-hle --lib
scale unset 697 passed / 0 failed / 59 ignored 248 / 0 / 3
LEONIDA_TITLE_MEMORY_SCALE=2.5 for the whole run 697 / 0 / 59 248 / 0 / 3

Clippy (--all-targets, both crates) reports nothing in console.rs. Its one warning (host.rs:7633) is outside this diff.

One small thing for merge time: on the merged tree tools/d3d12_switches.py --check passes. But its count line still says 681 names; 641, while --out now gives 682 names; 642. As noted above, --check does not compare that line, so regenerating the page with --out at merge time fixes it.

Not checked: the in-game effect (no game run here), and whether anything beyond these three figures in the title reads the memory size.

GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7348504115 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7348504115). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T14:24:54Z. --- Ran natively on Windows 11, head `cf8f7be78` merged into current `main` (`2fc7383b9`, no conflicts now; the `switches.md` conflict mentioned above is gone), toolchain 1.98.1, `--locked`. The parsing and the getter are already covered above. This run checks what the title is actually told downstream, one process per value, using throwaway ignored tests (not committed) that call `adapter_description` (`dxgi.rs`), `XMemGetWorkingSetStatistics` and `XMemTransferMemory`. **What the title is told** (bytes, Series X / Series S) | `LEONIDA_TITLE_MEMORY_SCALE` | Adapter dedicated video | Adapter shared system | XMem title limit | XMem GPU-optimal limit | |---|---|---|---|---| | unset, `1`, `0`, `-1` | 10737418240 / 0 | 3758096384 / 8153726976 | 14495514624 / 8153726976 | 10737418240 / 0 | | `1.3` | 13958643712 / 0 | 4884267008 / 10599006208 | 18842910720 / 10599006208 | 13958643712 / 0 | | `2` | 21474836480 / 0 | 7516192768 / 16307453952 | 28991029248 / 16307453952 | 21474836480 / 0 | | `2.5`, `1e308` | 26843545600 / 0 | 9395240960 / 20384317440 | 36238786560 / 20384317440 | 26843545600 / 0 | For every value and both consoles: - The adapter's two figures equal `title_memory()`. - The XMem limit equals their sum. - Every figure is a whole number of 2 MiB pages. - `XMemTransferMemory` takes exactly the scaled standard range and refuses 2 MiB more, which leaves the limit at the GPU-optimal figure. So the three places that report the figure agree at every scale, and the transfer cap follows the scale. On Series S the GPU-optimal range stays 0 at any scale, so only the standard range grows. **Suites on the merge** | | `leonida-gpu --lib` | `leonida-hle --lib` | |---|---|---| | scale unset | 697 passed / 0 failed / 59 ignored | 248 / 0 / 3 | | `LEONIDA_TITLE_MEMORY_SCALE=2.5` for the whole run | 697 / 0 / 59 | 248 / 0 / 3 | Clippy (`--all-targets`, both crates) reports nothing in `console.rs`. Its one warning (`host.rs:7633`) is outside this diff. One small thing for merge time: on the merged tree `tools/d3d12_switches.py --check` passes. But its count line still says `681 names; 641`, while `--out` now gives `682 names; 642`. As noted above, `--check` does not compare that line, so regenerating the page with `--out` at merge time fixes it. Not checked: the in-game effect (no game run here), and whether anything beyond these three figures in the title reads the memory size. GPUs tested: n/a (CPU-only tests). AI-assisted: yes (Claude Code).
MoonEyes commented 2026-12-02 16:10:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T16:10:20Z.


RUN (in game, batch of five render-path pull requests), each head merged with git merge --no-ff onto main 3c106eb2f, in one build: #2993 ddc10507d, #2889 bc390c26f, #2851 cf8f7be78, #2980 12c14a999, #2994 fccce4485. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 17.2, mean 17.3
Rendered fps, last 120 s median 17.3

For reference, the same machine and route rendered 13.3 to 16.7 fps today on main with single pull requests or other batches. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; free system memory median 2.5 GB; arrival in the world was driven by keys and not checked on pictures.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351548775 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7351548775). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T16:10:20Z. --- RUN (in game, batch of five render-path pull requests), each head merged with `git merge --no-ff` onto main `3c106eb2f`, in one build: #2993 `ddc10507d`, #2889 `bc390c26f`, #2851 `cf8f7be78`, #2980 `12c14a999`, #2994 `fccce4485`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 17.2, mean 17.3 | | Rendered fps, last 120 s | median 17.3 | For reference, the same machine and route rendered 13.3 to 16.7 fps today on main with single pull requests or other batches. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; free system memory median 2.5 GB; arrival in the world was driven by keys and not checked on pictures. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:12:49 +00:00 (Migrated from github.com)

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


Checked #2851: the switches registry passes merged onto current main (Linux); the Rust was reviewed, not built (Windows-only). Opt-in, off by default, in-game PASS at this head.

Head cf8f7be785
Merged onto main 45dc41f95c (clean merge tree 9144c4fd59; merge base 9b4d718992, 125 commits behind)
Windows evidence fiestorra, andrew-ai (b4e0a76f6), Kal0s-design (this head merged onto 2fc7383b9), MoonEyes in-game PASS (2 December 16:10)

Ran (Linux, on an export of the merge tree with its own git init)

python -I tools/d3d12_switches.py --check d3d12/docs/switches.md   exit 0
python -I tests/test_d3d12_switches.py                              Ran 20 tests  OK

Review of d3d12/crates/leonida-gpu/src/console.rs

  • LEONIDA_TITLE_MEMORY_SCALE is read once (OnceLock), parsed with NaN, infinity and non-numbers to 1, and clamped to 1 to 2.5. Both ranges are scaled and rounded down to whole 2 MiB pages. Unset gives exactly the old figures (tested for both consoles). The three callers (xmem.rs x3, dxgi.rs) only read the pair, so dropping const from title_memory costs nothing.
  • The doc comment says what the switch does not do (no check against the PC's or the card's memory) and gives the measurement behind it (2,900 mapping changes a frame and 0.1 to 0.2 fps at 4K with ray tracing, against 2.0 and 10.5 fps at scale 2). That is the cause the description names: the title sizes its pools from the limit it reads.
  • Not a root-cause fix for the mapping storm. It is an opt-in switch that changes the input the title sizes from, which is fine as a switch. A default stays the console's figure, which is correct.

Verdict: ready.

AI-assisted: Claude Opus 5.5 (Claude Code), verification only.

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


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354135336 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7354135336). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:12:49Z. --- **Checked #2851: the switches registry passes merged onto current `main` (Linux); the Rust was reviewed, not built (Windows-only). Opt-in, off by default, in-game PASS at this head.** | | | |---|---| | Head | `cf8f7be785` | | Merged onto | `main` `45dc41f95c` (clean merge tree `9144c4fd59`; merge base `9b4d718992`, 125 commits behind) | | Windows evidence | fiestorra, andrew-ai (`b4e0a76f6`), Kal0s-design (this head merged onto `2fc7383b9`), MoonEyes in-game PASS (2 December 16:10) | **Ran (Linux, on an export of the merge tree with its own `git init`)** ``` python -I tools/d3d12_switches.py --check d3d12/docs/switches.md exit 0 python -I tests/test_d3d12_switches.py Ran 20 tests OK ``` **Review of `d3d12/crates/leonida-gpu/src/console.rs`** - `LEONIDA_TITLE_MEMORY_SCALE` is read once (`OnceLock`), parsed with NaN, infinity and non-numbers to 1, and clamped to 1 to 2.5. Both ranges are scaled and rounded down to whole 2 MiB pages. Unset gives exactly the old figures (tested for both consoles). The three callers (`xmem.rs` x3, `dxgi.rs`) only read the pair, so dropping `const` from `title_memory` costs nothing. - The doc comment says what the switch does not do (no check against the PC's or the card's memory) and gives the measurement behind it (2,900 mapping changes a frame and 0.1 to 0.2 fps at 4K with ray tracing, against 2.0 and 10.5 fps at scale 2). That is the cause the description names: the title sizes its pools from the limit it reads. - Not a root-cause fix for the mapping storm. It is an opt-in switch that changes the input the title sizes from, which is fine as a switch. A default stays the console's figure, which is correct. **Verdict: ready.** AI-assisted: Claude Opus 5.5 (Claude Code), verification only. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
MoonEyes commented 2026-12-03 00:02:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T00:02:20Z.


RUN (in game, batch of nine pull requests), each head merged with git merge --no-ff onto main 81efe4566, in one build: #3136 74bd1bcd4, #3156 53c3100ce, #3206 d024194b3, #3248 efd21d867, #3256 e7aad1d4c, #3262 3643c2879, #2851 b83b0b375, #3125 89bf1d328, #2642 164506d01. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, -PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 15.6, mean 15.6
Rendered fps, last 120 s median 14.3
Time under 5 fps in the world 3 %

For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; arrival in the world was driven by keys and not checked on pictures; -PrecompileUsed was used, so the default start (every known pipeline precompiled) was not exercised. The precompile before the world took 619 s, against 157 s for the previous batch; the shader-side changes in this batch (#3156, #3262) probably left the pipeline cache cold (not checked). Switches that are off by default (for example #2851's LEONIDA_TITLE_MEMORY_SCALE, #3136's timeline attribution) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7362723178 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7362723178). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T00:02:20Z. --- RUN (in game, batch of nine pull requests), each head merged with `git merge --no-ff` onto main `81efe4566`, in one build: #3136 `74bd1bcd4`, #3156 `53c3100ce`, #3206 `d024194b3`, #3248 `efd21d867`, #3256 `e7aad1d4c`, #3262 `3643c2879`, #2851 `b83b0b375`, #3125 `89bf1d328`, #2642 `164506d01`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, `-PrecompileUsed`, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 15.6, mean 15.6 | | Rendered fps, last 120 s | median 14.3 | | Time under 5 fps in the world | 3 % | For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; arrival in the world was driven by keys and not checked on pictures; `-PrecompileUsed` was used, so the default start (every known pipeline precompiled) was not exercised. The precompile before the world took 619 s, against 157 s for the previous batch; the shader-side changes in this batch (#3156, #3262) probably left the pipeline cache cold (not checked). Switches that are off by default (for example #2851's `LEONIDA_TITLE_MEMORY_SCALE`, #3136's timeline attribution) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only. AI-assisted (Claude Code).
MoonEyes commented 2026-12-03 06:47:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T06:47:46Z.


RUN (in game, batch of four pull requests), each head merged with git merge --no-ff onto main d9b618f10, in one build: #2851 488416598, #3299 898b87802, #3301 670df262b, #3302 0bb75e0ba. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, -PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 16.6, mean 16.8
Rendered fps, last 120 s median 16.6
Time under 5 fps in the world 0 %

For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; arrival in the world was driven by keys and not checked on pictures; -PrecompileUsed was used, so the default start (every known pipeline precompiled) was not exercised. #2851 was in an earlier batch on another head; this run covers its current head, with LEONIDA_TITLE_MEMORY_SCALE unset. #3299's switch is opt-in and hardware ray tracing was not on in this 8 GB profile, so it was not exercised. #3302 changes where Pool allocations go by default; this run shows nothing fell over with it, not whether it saves memory. #3301 only reports failures; none was provoked. The precompile before the world took 468 s against about 155 s for most batches: something in this batch leaves the pipeline cache cold (not looked into).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370241287 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2851#issuecomment-7370241287). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T06:47:46Z. --- RUN (in game, batch of four pull requests), each head merged with `git merge --no-ff` onto main `d9b618f10`, in one build: #2851 `488416598`, #3299 `898b87802`, #3301 `670df262b`, #3302 `0bb75e0ba`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, `-PrecompileUsed`, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 16.6, mean 16.8 | | Rendered fps, last 120 s | median 16.6 | | Time under 5 fps in the world | 0 % | For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; arrival in the world was driven by keys and not checked on pictures; `-PrecompileUsed` was used, so the default start (every known pipeline precompiled) was not exercised. #2851 was in an earlier batch on another head; this run covers its current head, with `LEONIDA_TITLE_MEMORY_SCALE` unset. #3299's switch is opt-in and hardware ray tracing was not on in this 8 GB profile, so it was not exercised. #3302 changes where Pool allocations go by default; this run shows nothing fell over with it, not whether it saves memory. #3301 only reports failures; none was provoked. The precompile before the world took 468 s against about 155 s for most batches: something in this batch leaves the pipeline cache cold (not looked into). AI-assisted (Claude Code).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2851:upstream-pr/2851'
git switch 'upstream-pr/2851'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2851'
git switch 'upstream-pr/2851'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2851'
git switch 'upstream-pr/2851'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2851'
git switch 'main'
git merge --squash 'upstream-pr/2851'
git switch 'main'
git merge --ff-only 'upstream-pr/2851'
git switch 'main'
git merge 'upstream-pr/2851'
git push origin 'main'
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!2851
No description provided.