d3d12: title memory windows stay off cards under 12 GB on PCs of 20 GB or more #3035

Open
Krashgamer wants to merge 10 commits from upstream-pr/3035 into main
Krashgamer commented 2026-12-02 03:34:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T03:34:58Z.


Claimed in the coordination issue as: D3D12-LAUNCHER-WINDOWS-SMALL-CARD (claimed with this pull request, in #2570)

Depends on: #3031. The PC-memory headroom this needs comes from pooled command allocators. Without #3031 a 32 GB PC with this change would be back near the 2026-11-27 case that brought the windows to PCs under 48 GB. Merge after #3031.

What and why

play-nvidia.ps1 puts up to 3 GB of title memory windows in the card's CPU-mapped memory (LEONIDA_WINDOWS_BAR_MB=3072) on every PC with under 48 GB of RAM. Cards under 6 GB are the only exception. The windows are there for the PC's memory.

On an RTX 3080 10 GB with 32 GB of RAM, the windows take about 2 GB of the card in the world's first seconds, before most textures arrive. The process's 32 MB write-combined regions (the mapped card memory) go from 27 to 90 there and stay. The device census has 732 card buffers the CPU maps, 2,054 MB. Textures then find the card at its line.

Game gate, Series X, 2560x1440, 300 s in the world from the same save, with #3031:

Runs Textures alive at the end Made again after being let go Passes turned down for room
windows on the card (as now) 7 1,313-1,441 MB 27,607-30,566 609-1,008
LEONIDA_WINDOWS_BAR_MB=0 2 2,608-2,755 MB 12,793-13,212 40-89
Frames a second, median p5 Private bytes at most
windows on the card 23.5-25.2 14.0-14.7 25.4-25.8 GB
LEONIDA_WINDOWS_BAR_MB=0 23.8, 23.9 13.7, 14.2 26.8, 26.9 GB

So on a 10 GB card the windows cost the textures half their room. The frame rate stays within the spread, at its low end, and the PC's memory takes 1.1 GB more.

The change:

  • The launcher sets a line, the runtime decides. With its own cap, play-nvidia.ps1 also sets LEONIDA_WINDOWS_BAR_CARD_MIN_MB: 11,776 on PCs reported at 19 GiB or more, 6,144 below that. The runtime compares it with the own memory (DedicatedVideoMemory) of the adapter it took, and puts no windows on a card under the line. It says so once in the log.
  • Why not in the launcher. The launcher cannot know which card the runtime takes: -Adapter can be part of several card names, #N is the runtime's order, and Windows' default card is not always the largest. The first versions of this pull request guessed, and the reviews found cards each guess missed (ecox982745, merzleckeier). The launcher's card probe is back to what main has.
  • The line. Drivers and Windows report a little under the nominal size: a 12 GB card about 12,280 MiB, a PC sold as 20 GB about 19.6 GiB.
  • Unchanged. Under 19 GiB the PC's memory runs out first, so the windows stay on cards of 6 GB or more. Cards of 12 GB and more keep them. PCs of 48 GB and more, a PC whose cards are all under 6 GB, an unknown RAM size, and a typed -WindowsBarMB behave as before. A card whose size the runtime cannot read keeps the cap.
  • Docs. The -WindowsBarMB help, d3d12/README.md, docs/switches.md and a d3d12/docs/findings.md section.

For an 8 GB card on a 16 GB PC (RTX 3070, Series X, 1080), OtavMacedo measured the two settings this rule chooses between (comment): with the windows on the card, which the rule keeps there, the frame was 1.9 ms (4.4 %) faster in four pairs, at the price of a card over its budget for most of the run; without them 1 of 6 runs lost the device, with shared memory near Windows' limit. That was main with #3258 and the prologue save, not this head.

Not measured: 12 GB cards, and 8 GB cards on 32 GB PCs. The rule assumes 8 GB cards lack card memory more.

Tested

The tables above are from an earlier head, where the launcher left the cap out. The check run below is the runtime rule itself.

Check run of the rule. Game gate, this head (4995a799c) with #3031 (8df1bfce7) merged on main 8877be372, Series X, 2560x1440, -HardwareRT, 300 s in the world, RTX 3080 10 GB, 32 GB RAM: PASS.

  • The launcher set the cap and the line, and the runtime logged that the windows stay in the PC's memory: the card's 10,051 MB are under the line of 11,776.

  • No windows in card memory (0 MB), 2,567 in the PC's memory since the start.

  • Card at most 8,919 MB of a 9,155 MB budget, 0 s over budget. Private bytes at most 27.7 GB.

  • A memory walk ran every 30 s, so its frame rate is no comparison.

  • tests/test_win_launchers.py, test_nvidia_windows_cap_and_card_line_by_ram: fakes the PC's RAM and the card's memory as reported, runs the launcher with -DryRun, and checks the cap, the line and the one message for 13 pairs of sizes (among them both sides of 19 GiB and of 48 GiB, and a typed cap). All pass on Windows.

  • Rust unit test mapped_windows_tests::a_card_under_the_line_gets_no_windows: a card under the line, at it, over it, of unknown size, and no line set. Without the rule (mapped_cap returning the cap always) it fails.

  • Docs tests (test_docs_*.py), d3d12_switches.py --check and check_no_game_data.py: passed.

The change was reviewed by an independent reviewer agent before this pull request and again after the move to the runtime. Found and fixed in the second review:

  • the 6 GB rule also guessed the card (it has its own line now)
  • the RAM threshold missed PCs sold as 20 GB
  • unclear wording in the docs, and no tests at the boundaries

GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.1088 (610.88), resizable BAR, Windows 11 Pro 26200; Intel i7-10700K, 32 GB RAM

AI-assisted: yes, Claude Code (Claude Opus 5.5)

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:5599304884 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T03:34:58Z. --- Claimed in the coordination issue as: D3D12-LAUNCHER-WINDOWS-SMALL-CARD (claimed with this pull request, in #2570) Depends on: #3031. The PC-memory headroom this needs comes from pooled command allocators. Without #3031 a 32 GB PC with this change would be back near the 2026-11-27 case that brought the windows to PCs under 48 GB. Merge after #3031. ### What and why `play-nvidia.ps1` puts up to 3 GB of title memory windows in the card's CPU-mapped memory (`LEONIDA_WINDOWS_BAR_MB=3072`) on every PC with under 48 GB of RAM. Cards under 6 GB are the only exception. The windows are there for the PC's memory. On an RTX 3080 10 GB with 32 GB of RAM, the windows take about 2 GB of the card in the world's first seconds, before most textures arrive. The process's 32 MB write-combined regions (the mapped card memory) go from 27 to 90 there and stay. The device census has 732 card buffers the CPU maps, 2,054 MB. Textures then find the card at its line. Game gate, Series X, 2560x1440, 300 s in the world from the same save, with #3031: | | Runs | Textures alive at the end | Made again after being let go | Passes turned down for room | |---|---|---|---|---| | windows on the card (as now) | 7 | 1,313-1,441 MB | 27,607-30,566 | 609-1,008 | | `LEONIDA_WINDOWS_BAR_MB=0` | 2 | 2,608-2,755 MB | 12,793-13,212 | 40-89 | | | Frames a second, median | p5 | Private bytes at most | |---|---|---|---| | windows on the card | 23.5-25.2 | 14.0-14.7 | 25.4-25.8 GB | | `LEONIDA_WINDOWS_BAR_MB=0` | 23.8, 23.9 | 13.7, 14.2 | 26.8, 26.9 GB | So on a 10 GB card the windows cost the textures half their room. The frame rate stays within the spread, at its low end, and the PC's memory takes 1.1 GB more. The change: - **The launcher sets a line, the runtime decides.** With its own cap, `play-nvidia.ps1` also sets `LEONIDA_WINDOWS_BAR_CARD_MIN_MB`: 11,776 on PCs reported at 19 GiB or more, 6,144 below that. The runtime compares it with the own memory (`DedicatedVideoMemory`) of the adapter it took, and puts no windows on a card under the line. It says so once in the log. - **Why not in the launcher.** The launcher cannot know which card the runtime takes: `-Adapter` can be part of several card names, `#N` is the runtime's order, and Windows' default card is not always the largest. The first versions of this pull request guessed, and the reviews found cards each guess missed (ecox982745, merzleckeier). The launcher's card probe is back to what `main` has. - **The line.** Drivers and Windows report a little under the nominal size: a 12 GB card about 12,280 MiB, a PC sold as 20 GB about 19.6 GiB. - **Unchanged.** Under 19 GiB the PC's memory runs out first, so the windows stay on cards of 6 GB or more. Cards of 12 GB and more keep them. PCs of 48 GB and more, a PC whose cards are all under 6 GB, an unknown RAM size, and a typed `-WindowsBarMB` behave as before. A card whose size the runtime cannot read keeps the cap. - **Docs.** The `-WindowsBarMB` help, `d3d12/README.md`, `docs/switches.md` and a `d3d12/docs/findings.md` section. For an 8 GB card on a 16 GB PC (RTX 3070, Series X, 1080), OtavMacedo measured the two settings this rule chooses between ([comment](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7372146599)): with the windows on the card, which the rule keeps there, the frame was 1.9 ms (4.4 %) faster in four pairs, at the price of a card over its budget for most of the run; without them 1 of 6 runs lost the device, with shared memory near Windows' limit. That was main with #3258 and the prologue save, not this head. Not measured: 12 GB cards, and 8 GB cards on 32 GB PCs. The rule assumes 8 GB cards lack card memory more. ### Tested The tables above are from an earlier head, where the launcher left the cap out. The check run below is the runtime rule itself. **Check run of the rule.** Game gate, this head (`4995a799c`) with #3031 (`8df1bfce7`) merged on `main` `8877be372`, Series X, 2560x1440, `-HardwareRT`, 300 s in the world, RTX 3080 10 GB, 32 GB RAM: PASS. - The launcher set the cap and the line, and the runtime logged that the windows stay in the PC's memory: the card's 10,051 MB are under the line of 11,776. - No windows in card memory (0 MB), 2,567 in the PC's memory since the start. - Card at most 8,919 MB of a 9,155 MB budget, 0 s over budget. Private bytes at most 27.7 GB. - A memory walk ran every 30 s, so its frame rate is no comparison. - `tests/test_win_launchers.py`, `test_nvidia_windows_cap_and_card_line_by_ram`: fakes the PC's RAM and the card's memory as reported, runs the launcher with `-DryRun`, and checks the cap, the line and the one message for 13 pairs of sizes (among them both sides of 19 GiB and of 48 GiB, and a typed cap). All pass on Windows. - Rust unit test `mapped_windows_tests::a_card_under_the_line_gets_no_windows`: a card under the line, at it, over it, of unknown size, and no line set. Without the rule (`mapped_cap` returning the cap always) it fails. - Docs tests (`test_docs_*.py`), `d3d12_switches.py --check` and `check_no_game_data.py`: passed. The change was reviewed by an independent reviewer agent before this pull request and again after the move to the runtime. Found and fixed in the second review: - the 6 GB rule also guessed the card (it has its own line now) - the RAM threshold missed PCs sold as 20 GB - unclear wording in the docs, and no tests at the boundaries GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.1088 (610.88), resizable BAR, Windows 11 Pro 26200; Intel i7-10700K, 32 GB RAM AI-assisted: yes, Claude Code (Claude Opus 5.5) ### 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. - [x] 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)
ecox982745 commented 2026-12-02 03:37:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-02T03:37:08Z.


Independent Windows dry-run check at base 8422def75 and head d2e2188f0. I mocked 32 GB RAM and an 8 GB selected adapter (-Adapter 5060), then added a separate 16 GB registry entry. Windows PowerShell 5.1 and PowerShell 7 both gave the same result.

Registry entries Base PR
Selected 8 GB only 3072 MiB unset
Selected 8 GB + other 16 GB 3072 MiB 3072 MiB
Same two entries, explicit -WindowsBarMB 0 0 MiB 0 MiB

LEONIDA_ADAPTER=5060 was passed in all cases. The existing probe takes the largest registry entry, so the new rule protects the 8 GB card in the single-adapter case and can still leave the cap on when the same card is selected on a mixed-adapter PC. This is a scope limitation of the existing probe. It may be worth documenting the manual override for that case.

AI-assisted validation. Synthetic registry and CIM inputs, no game files or GPU activity.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7334066300 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7334066300). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-12-02T03:37:08Z. --- Independent Windows dry-run check at base `8422def75` and head `d2e2188f0`. I mocked 32 GB RAM and an 8 GB selected adapter (`-Adapter 5060`), then added a separate 16 GB registry entry. Windows PowerShell 5.1 and PowerShell 7 both gave the same result. | Registry entries | Base | PR | | --- | --- | --- | | Selected 8 GB only | 3072 MiB | unset | | Selected 8 GB + other 16 GB | 3072 MiB | 3072 MiB | | Same two entries, explicit `-WindowsBarMB 0` | 0 MiB | 0 MiB | `LEONIDA_ADAPTER=5060` was passed in all cases. The existing probe takes the largest registry entry, so the new rule protects the 8 GB card in the single-adapter case and can still leave the cap on when the same card is selected on a mixed-adapter PC. This is a scope limitation of the existing probe. It may be worth documenting the manual override for that case. AI-assisted validation. Synthetic registry and CIM inputs, no game files or GPU activity.
Krashgamer commented 2026-12-02 03:55:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T03:55:55Z.


Thanks, @ecox982745 - fixed in b0cf557e2 rather than documented: with -Adapter the probe now takes the memory of the card(s) whose name it is part of (any case, as the runtime picks), else the largest as before. That also corrects the under-6 GB rule on such PCs. The test got two-card cases (8 GB 5060 beside a 16 GB card: picked 8 GB -> no cap; picked rtx 4080 -> 3072; none picked or a name matching none -> the largest, 3072). The picked-8 GB case fails with the previous head's script and passes now; all 6 launcher tests pass.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7334383957 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7334383957). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T03:55:55Z. --- Thanks, @ecox982745 - fixed in b0cf557e2 rather than documented: with `-Adapter` the probe now takes the memory of the card(s) whose name it is part of (any case, as the runtime picks), else the largest as before. That also corrects the under-6 GB rule on such PCs. The test got two-card cases (8 GB `5060` beside a 16 GB card: picked 8 GB -> no cap; picked `rtx 4080` -> 3072; none picked or a name matching none -> the largest, 3072). The picked-8 GB case fails with the previous head's script and passes now; all 6 launcher tests pass.
imShangLi commented 2026-12-02 05:57:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T05:57:48Z.


VERIFY-3035 — Linux, Fedora 45, no GPU device, no game files, no title

Verdict: PASS. The launcher change, its documentation and its new test are mutually consistent: I traced the -Adapter-aware VRAM pick and the new under-12-GB rule through the code, the test cases and the docs, and found the logic self-consistent with no defect. The measured numbers are the author's and I could not reproduce them (no GPU, no Windows, no game files); the new PowerShell test could not be run here (no pwsh).

Head d4da3449, base the current main (0ae5a266), merge base 8422def7, 4 files, +151/−5: d3d12/README.md (+4/−1), d3d12/docs/findings.md (+29), d3d12/scripts/play-nvidia.ps1 (+25/−4), tests/test_win_launchers.py (+93).

Note: the task brief listed three files for this pull request; the head actually changes four, the fourth being tests/test_win_launchers.py (+93), which carries the new regression test.

1. What it changes

  • d3d12/scripts/play-nvidia.ps1: (a) the card-memory probe is now -Adapter-aware — with -Adapter naming a card (any case, plain text, not #N), it takes the largest memory of the cards whose DriverDesc contains the name; otherwise, or if the name matches none, the largest adapter's (lines 367-386). (b) A new rule: $textureShort = $vram -gt 0 -and $vram -lt 11.5GB -and $ram -ge 20GB; when true (and not a small card, PC under 48 GB) the launcher no longer sets LEONIDA_WINDOWS_BAR_MB=3072 and instead prints that the title memory windows stay in the PC's memory (lines 531-547). The -WindowsBarMB help and the README are updated to match.
  • d3d12/README.md (lines 558-565): the explanation of the 3072 MiB cap now says "unless the card has under 6 GB, or under 12 GB on a PC with 20 GB or more (there the card's memory is what the textures lack: on an RTX 3080 10 GB with 32 GB, twice the textures stayed alive without the windows, docs/findings.md), and leaves it off otherwise."
  • d3d12/docs/findings.md (lines 1807-1834): a new measured section "Title memory windows in the card's memory on a 10 GB card (2026-12-02)" with the run conditions and two result tables.
  • tests/test_win_launchers.py: a new test_nvidia_windows_in_card_memory_by_ram_and_card that fakes the CIM/registry queries and checks the cap decision for 15 RAM/VRAM/-Adapter/typed-cap cases.

2. The claims it makes, and which ones I checked

  • "with -Adapter, the largest of the cards whose name it is part of, else the largest adapter's" — checked by reading lines 371-386: $want = $Adapter.Trim() unless it starts with #; $named takes the largest HardwareInformation.qwMemorySize whose DriverDesc contains $want (IndexOf(..., OrdinalIgnoreCase)); if ($named -gt 0) { $vram = $named }. Matches the comment. True.
  • "as the runtime picks them, any case" — checked against host.rs chosen_adapter(): name substring, case-insensitive. Consistent. True.
  • "Plain text, as the runtime's: no wildcards" — checked: IndexOf is substring matching, not a pattern; the runtime uses contains. True (the test's "[x" case confirms no pattern/error).
  • "#N, the runtime's N-th card, has no place here: the driver keys are not in its order, so it gets the largest" — checked: the registry class keys are not in DXGI order, so an index cannot be mapped; $want='' for #N and the largest is used. A documented limitation, acknowledged in the comment and covered by the test ("#1" → "3072"). True.
  • "on a 10 GB card (RTX 3080) with 32 GB, twice the textures stayed alive without the windows" — checked against the findings tables: A (windows on the card) 1,313-1,441 MB alive vs B (windows in the PC's memory) 2,608-2,755 MB, i.e. ~2×. True.
  • The rule "under 12 GB on a PC with 20 GB or more" — checked against the code $vram -lt 11.5GB -and $ram -ge 20GB. Consistent with the comment "(Cards and PCs report a little under what they are sold as, hence 11.5 GB and 20 GB)". The README says "under 12 GB" in nominal terms; the code uses 11.5 GB reported. (See section 4.)
  • The test's 15 cases — checked each against the code. Examples: 16 GB PC + 10 GB card → textureShort false (ram < 20GB) → cap 3072; 32 GB PC + 10 GB card → textureShort true → no cap; 32 GB + 12 GB-as-reported (12,284 MiB > 11.5 GB) → cap 3072; 4 GB card → $smallCard → no cap and no message; 48 GB+ → no cap; typed -WindowsBarMB 3072 → wins. Two-card runs: -Adapter 5060 picks the 8 GB card's 8,188 MiB → no cap; -Adapter 'rtx 4080' picks the 16 GB card's 16,376 MiB → cap 3072; no/9999/[x/#1 → the largest (16,376) → cap 3072. Every expectation matches. Consistent.
  • "the launcher keeps the windows in the PC's memory on cards of under 12 GB when the PC has 20 GB or more; under 20 GB the PC's memory runs out first, and they stay on the card" — checked against the code: under 20 GB RAM textureShort is false, so the cap is set (windows on the card). Matches the prose and the 16 GB test case. True.

3. What the tests do here

  • python3 -I tests/test_win_launchers.py: 6 tests, OK (5 skipped). The new test_nvidia_windows_in_card_memory_by_ram_and_card is @unittest.skipUnless(POWERSHELL, ...) and is skipped — there is no pwsh/powershell.exe on this machine, so the PowerShell path (including the fake Get-CimInstance/Get-ChildItem/Get-ItemProperty) is not exercised. test_static_quoting_and_no_pause_guards passes; the new test and four pre-existing ones skip for the same reason.
  • python3 -I -m unittest discover -s tests -p "test_docs_*.py": 57 tests, OK (42 s) — includes the repository's link checks, so the new [docs/findings.md](docs/findings.md) reference resolves.
  • python3 -I scripts/check_no_game_data.py d3d12/README.md d3d12/docs/findings.md d3d12/scripts/play-nvidia.ps1 tests/test_win_launchers.py: clean.
  • python3 -I scripts/red_green.py 3035 --work-dir ...: no red — the red side (base + the test change) and the green side both pass the one runnable test in test_win_launchers.py; the new test is skipped here (no PowerShell), so it cannot show a red→green transition on this machine. Not a defect of the change.

4. Anything wrong in the change (with the file and line)

No defect. Three minor observations, all acknowledged by the author in comments or by design:

  • README "under 12 GB" vs the code's 11.5GB (d3d12/README.md ~line 560, d3d12/scripts/play-nvidia.ps1 line 539): the README speaks in nominal ("under 12 GB"), the code in reported ($vram -lt 11.5GB). The play-nvidia.ps1 comment explains "(Cards and PCs report a little under what they are sold as, hence 11.5 GB and 20 GB)". A card reporting between 11.5 and 12 GB (e.g. a nominal 12 GB card reporting 11.8 GB) would keep the cap under the code but "under 12 GB" under the README. Cosmetic/precision only; the prose is consistent with the author's stated intent.
  • -Adapter '#N' uses the largest card's memory (play-nvidia.ps1 lines 373-374, 380-381): a card picked by DXGI index cannot be matched to a registry key (they are not in the same order), so the VRAM used is the largest card's. If the index-named card is the smaller one, the textureShort decision could be off. Documented in the comment and covered by the test; a known limitation, not a regression.
  • The 20 GB boundary (play-nvidia.ps1 line 539): $ram -ge 20GB is the exact 20·2³⁰ byte threshold; a nominal-20 GB PC that reports slightly under would not meet it and would keep the cap. The comment's "hence ... 20 GB" shows this is intended as a reported-value cutoff, but the README's "20 GB or more" is looser.

5. What I did not check

  • The measurements in d3d12/docs/findings.md (RTX 3080 10 GB, driver 32.0.16.1088, i7-10700K, 32 GB, Series X, 300 s, A/B runs; the textures/made again/turned down/fps/private-bytes tables) — the author's own GPU measurements; not reproducible here (no NVIDIA GPU, no Windows, no game files). I checked only their internal consistency (A vs B ≈ 2× textures; B fps within A's spread, p5 a little under; private bytes ≈ 1.1 GB more; "29 GB without #3031" ≈ 27.7 + 1.1).
  • PowerShell was not run (no Windows, no pwsh): the launcher logic and the new test were verified by reading, and the test's 15 cases were checked against the code by hand.
  • PR #3031 (shared command allocators) — referenced in the findings and the comment as what the run rests on; I did not fetch or inspect it.
  • The ecox982745 reference in the play-nvidia.ps1 comment (line 370) — a comment on #3035; I could not read GitHub comments and did not try.
  • Whether a real card's DriverDesc matches what the runtime sees as the DXGI name — the launcher matches the registry DriverDesc, the runtime matches the DXGI description; I could not confirm they agree on real hardware.
  • 12 GB cards and 8 GB cards on 32 GB PCs — the findings explicitly mark these "not measured"; I did not measure them either.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7336477943 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7336477943). Originally posted by [imShangLi](https://github.com/imShangLi) on 2026-12-02T05:57:48Z. --- ## VERIFY-3035 — Linux, Fedora 45, no GPU device, no game files, no title **Verdict: PASS.** The launcher change, its documentation and its new test are mutually consistent: I traced the `-Adapter`-aware VRAM pick and the new under-12-GB rule through the code, the test cases and the docs, and found the logic self-consistent with no defect. The measured numbers are the author's and I could not reproduce them (no GPU, no Windows, no game files); the new PowerShell test could not be run here (no `pwsh`). Head `d4da3449`, base the current `main` (`0ae5a266`), merge base `8422def7`, 4 files, +151/−5: `d3d12/README.md` (+4/−1), `d3d12/docs/findings.md` (+29), `d3d12/scripts/play-nvidia.ps1` (+25/−4), `tests/test_win_launchers.py` (+93). > Note: the task brief listed three files for this pull request; the head actually changes four, the fourth being `tests/test_win_launchers.py` (+93), which carries the new regression test. ### 1. What it changes - **`d3d12/scripts/play-nvidia.ps1`**: (a) the card-memory probe is now `-Adapter`-aware — with `-Adapter` naming a card (any case, plain text, not `#N`), it takes the largest memory of the cards whose `DriverDesc` contains the name; otherwise, or if the name matches none, the largest adapter's (lines 367-386). (b) A new rule: `$textureShort = $vram -gt 0 -and $vram -lt 11.5GB -and $ram -ge 20GB`; when true (and not a small card, PC under 48 GB) the launcher no longer sets `LEONIDA_WINDOWS_BAR_MB=3072` and instead prints that the title memory windows stay in the PC's memory (lines 531-547). The `-WindowsBarMB` help and the README are updated to match. - **`d3d12/README.md`** (lines 558-565): the explanation of the 3072 MiB cap now says "unless the card has under 6 GB, or under 12 GB on a PC with 20 GB or more (there the card's memory is what the textures lack: on an RTX 3080 10 GB with 32 GB, twice the textures stayed alive without the windows, [docs/findings.md](docs/findings.md)), and leaves it off otherwise." - **`d3d12/docs/findings.md`** (lines 1807-1834): a new measured section "Title memory windows in the card's memory on a 10 GB card (2026-12-02)" with the run conditions and two result tables. - **`tests/test_win_launchers.py`**: a new `test_nvidia_windows_in_card_memory_by_ram_and_card` that fakes the CIM/registry queries and checks the cap decision for 15 RAM/VRAM/`-Adapter`/typed-cap cases. ### 2. The claims it makes, and which ones I checked - **"with `-Adapter`, the largest of the cards whose name it is part of, else the largest adapter's"** — checked by reading lines 371-386: `$want = $Adapter.Trim()` unless it starts with `#`; `$named` takes the largest `HardwareInformation.qwMemorySize` whose `DriverDesc` contains `$want` (`IndexOf(..., OrdinalIgnoreCase)`); `if ($named -gt 0) { $vram = $named }`. Matches the comment. True. - **"as the runtime picks them, any case"** — checked against `host.rs` `chosen_adapter()`: name substring, case-insensitive. Consistent. True. - **"Plain text, as the runtime's: no wildcards"** — checked: `IndexOf` is substring matching, not a pattern; the runtime uses `contains`. True (the test's `"[x"` case confirms no pattern/error). - **"`#N`, the runtime's N-th card, has no place here: the driver keys are not in its order, so it gets the largest"** — checked: the registry class keys are not in DXGI order, so an index cannot be mapped; `$want=''` for `#N` and the largest is used. A documented limitation, acknowledged in the comment and covered by the test (`"#1"` → `"3072"`). True. - **"on a 10 GB card (RTX 3080) with 32 GB, twice the textures stayed alive without the windows"** — checked against the findings tables: A (windows on the card) 1,313-1,441 MB alive vs B (windows in the PC's memory) 2,608-2,755 MB, i.e. ~2×. True. - **The rule "under 12 GB on a PC with 20 GB or more"** — checked against the code `$vram -lt 11.5GB -and $ram -ge 20GB`. Consistent with the comment "(Cards and PCs report a little under what they are sold as, hence 11.5 GB and 20 GB)". The README says "under 12 GB" in nominal terms; the code uses 11.5 GB reported. (See section 4.) - **The test's 15 cases** — checked each against the code. Examples: 16 GB PC + 10 GB card → `textureShort` false (`ram < 20GB`) → cap 3072; 32 GB PC + 10 GB card → `textureShort` true → no cap; 32 GB + 12 GB-as-reported (12,284 MiB > 11.5 GB) → cap 3072; 4 GB card → `$smallCard` → no cap and no message; 48 GB+ → no cap; typed `-WindowsBarMB 3072` → wins. Two-card runs: `-Adapter 5060` picks the 8 GB card's 8,188 MiB → no cap; `-Adapter 'rtx 4080'` picks the 16 GB card's 16,376 MiB → cap 3072; no/`9999`/`[x`/`#1` → the largest (16,376) → cap 3072. Every expectation matches. Consistent. - **"the launcher keeps the windows in the PC's memory on cards of under 12 GB when the PC has 20 GB or more; under 20 GB the PC's memory runs out first, and they stay on the card"** — checked against the code: under 20 GB RAM `textureShort` is false, so the cap is set (windows on the card). Matches the prose and the 16 GB test case. True. ### 3. What the tests do here - `python3 -I tests/test_win_launchers.py`: **6 tests, OK (5 skipped)**. The new `test_nvidia_windows_in_card_memory_by_ram_and_card` is `@unittest.skipUnless(POWERSHELL, ...)` and is **skipped** — there is no `pwsh`/`powershell.exe` on this machine, so the PowerShell path (including the fake `Get-CimInstance`/`Get-ChildItem`/`Get-ItemProperty`) is not exercised. `test_static_quoting_and_no_pause_guards` passes; the new test and four pre-existing ones skip for the same reason. - `python3 -I -m unittest discover -s tests -p "test_docs_*.py"`: **57 tests, OK** (42 s) — includes the repository's link checks, so the new `[docs/findings.md](docs/findings.md)` reference resolves. - `python3 -I scripts/check_no_game_data.py d3d12/README.md d3d12/docs/findings.md d3d12/scripts/play-nvidia.ps1 tests/test_win_launchers.py`: clean. - `python3 -I scripts/red_green.py 3035 --work-dir ...`: **`no red`** — the red side (base + the test change) and the green side both pass the one runnable test in `test_win_launchers.py`; the new test is skipped here (no PowerShell), so it cannot show a red→green transition on this machine. Not a defect of the change. ### 4. Anything wrong in the change (with the file and line) No defect. Three minor observations, all acknowledged by the author in comments or by design: - **README "under 12 GB" vs the code's `11.5GB`** (`d3d12/README.md` ~line 560, `d3d12/scripts/play-nvidia.ps1` line 539): the README speaks in nominal ("under 12 GB"), the code in reported (`$vram -lt 11.5GB`). The `play-nvidia.ps1` comment explains "(Cards and PCs report a little under what they are sold as, hence 11.5 GB and 20 GB)". A card reporting between 11.5 and 12 GB (e.g. a nominal 12 GB card reporting 11.8 GB) would keep the cap under the code but "under 12 GB" under the README. Cosmetic/precision only; the prose is consistent with the author's stated intent. - **`-Adapter '#N'` uses the largest card's memory** (`play-nvidia.ps1` lines 373-374, 380-381): a card picked by DXGI index cannot be matched to a registry key (they are not in the same order), so the VRAM used is the largest card's. If the index-named card is the smaller one, the `textureShort` decision could be off. Documented in the comment and covered by the test; a known limitation, not a regression. - **The 20 GB boundary** (`play-nvidia.ps1` line 539): `$ram -ge 20GB` is the exact 20·2³⁰ byte threshold; a nominal-20 GB PC that reports slightly under would not meet it and would keep the cap. The comment's "hence ... 20 GB" shows this is intended as a reported-value cutoff, but the README's "20 GB or more" is looser. ### 5. What I did not check - **The measurements in `d3d12/docs/findings.md`** (RTX 3080 10 GB, driver 32.0.16.1088, i7-10700K, 32 GB, Series X, 300 s, A/B runs; the textures/`made again`/`turned down`/fps/private-bytes tables) — the author's own GPU measurements; not reproducible here (no NVIDIA GPU, no Windows, no game files). I checked only their internal consistency (A vs B ≈ 2× textures; B fps within A's spread, p5 a little under; private bytes ≈ 1.1 GB more; "29 GB without #3031" ≈ 27.7 + 1.1). - **PowerShell was not run** (no Windows, no `pwsh`): the launcher logic and the new test were verified by reading, and the test's 15 cases were checked against the code by hand. - **PR #3031** (shared command allocators) — referenced in the findings and the comment as what the run rests on; I did not fetch or inspect it. - **The `ecox982745` reference** in the `play-nvidia.ps1` comment (line 370) — a comment on #3035; I could not read GitHub comments and did not try. - **Whether a real card's `DriverDesc` matches what the runtime sees as the DXGI name** — the launcher matches the registry `DriverDesc`, the runtime matches the DXGI description; I could not confirm they agree on real hardware. - **12 GB cards and 8 GB cards on 32 GB PCs** — the findings explicitly mark these "not measured"; I did not measure them either.
MoonEyes commented 2026-12-02 12:39:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:39: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:7345665144 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7345665144). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:39: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).
MoonEyes commented 2026-12-02 18:14:15 +00:00 (Migrated from github.com)

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


Read on the current head; the PowerShell tests could not run here (Linux, no pwsh). The logic is right. The default change rests on one PC, and the in-game gate is still open.

head      3b8a11cee (rebased 09:33 UTC; the Linux PASS of 05:57 was on an earlier head)
base      origin/main 45dc41f95, merge base a917c54d6, merges cleanly (git merge-tree)
CI        6 check runs on the head, all green
Command (on the merge) Result
python -I tests/test_win_launchers.py OK, but the cases that run play-nvidia.ps1 skip off Windows, so this proves nothing about the change
python -I scripts/check_no_game_data.py on the 4 files exit 0

Read in the diff (d3d12/scripts/play-nvidia.ps1)

  • The -Adapter match is now IndexOf(..., OrdinalIgnoreCase), plain text as the runtime matches it. The old -like "*$Adapter*" treated [x as a pattern and threw inside the try, which silently left $vram at its value so far. #N falls back to the largest card. The two new test rows ("[x", "#1") cover both cases.
  • $textureShort = $vram -gt 0 -and $vram -lt 11.5GB -and $ram -ge 20GB keeps the windows off every card under 12 GB on a PC with 20 GB or more. The elseif message is printed only when the windows would otherwise have been put on the card. Unknown VRAM (0) keeps the old behaviour.

Points for the author (not defects)

  • The evidence is one PC (RTX 3080 10 GB, 32 GB), two runs without the windows against seven with. Frame rates were 23.8-23.9 against 23.5-25.2, so no frame-rate gain was shown. The gain is texture residency (2.6-2.8 GB alive against 1.3-1.4 GB, far fewer textures made again). The rule now covers every 6-12 GB card on such PCs, including the very common 8 GB cards, where the texture budget is even tighter. Worth saying so in the comment.
  • The comment above (2026-11-27) says the windows went to the card because a 32 GB PC paged at 28 GB of commit. This change brings 1.1 GB of private bytes back to the PC (26.8-26.9 GB at most). On a 24 GB PC (inside "20 GB or more") that could bring the paging back. Either raise the RAM threshold or measure one PC between 20 and 32 GB.

Verdict: ready for the script logic. Merge after the render-path run that was asked for on this PR, ideally on an 8 GB card with 24-32 GB of RAM.

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


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354187113 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7354187113). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:14:15Z. --- **Read on the current head; the PowerShell tests could not run here (Linux, no `pwsh`). The logic is right. The default change rests on one PC, and the in-game gate is still open.** ``` head 3b8a11cee (rebased 09:33 UTC; the Linux PASS of 05:57 was on an earlier head) base origin/main 45dc41f95, merge base a917c54d6, merges cleanly (git merge-tree) CI 6 check runs on the head, all green ``` | Command (on the merge) | Result | |---|---| | `python -I tests/test_win_launchers.py` | OK, but the cases that run `play-nvidia.ps1` skip off Windows, so this proves nothing about the change | | `python -I scripts/check_no_game_data.py` on the 4 files | exit 0 | **Read in the diff (`d3d12/scripts/play-nvidia.ps1`)** - The `-Adapter` match is now `IndexOf(..., OrdinalIgnoreCase)`, plain text as the runtime matches it. The old `-like "*$Adapter*"` treated `[x` as a pattern and threw inside the `try`, which silently left `$vram` at its value so far. `#N` falls back to the largest card. The two new test rows (`"[x"`, `"#1"`) cover both cases. - `$textureShort = $vram -gt 0 -and $vram -lt 11.5GB -and $ram -ge 20GB` keeps the windows off every card under 12 GB on a PC with 20 GB or more. The `elseif` message is printed only when the windows would otherwise have been put on the card. Unknown VRAM (`0`) keeps the old behaviour. **Points for the author (not defects)** - The evidence is one PC (RTX 3080 10 GB, 32 GB), two runs without the windows against seven with. Frame rates were 23.8-23.9 against 23.5-25.2, so no frame-rate gain was shown. The gain is texture residency (2.6-2.8 GB alive against 1.3-1.4 GB, far fewer textures made again). The rule now covers every 6-12 GB card on such PCs, including the very common 8 GB cards, where the texture budget is even tighter. Worth saying so in the comment. - The comment above (2026-11-27) says the windows went to the card because a 32 GB PC paged at 28 GB of commit. This change brings 1.1 GB of private bytes back to the PC (26.8-26.9 GB at most). On a 24 GB PC (inside "20 GB or more") that could bring the paging back. Either raise the RAM threshold or measure one PC between 20 and 32 GB. **Verdict: ready** for the script logic. Merge after the render-path run that was asked for on this PR, ideally on an 8 GB card with 24-32 GB of RAM. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
Krashgamer commented 2026-12-02 18:48:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T18:48:19Z.


Thanks @MoonEyes. In-game runs on current main 5b1fff821, RTX 3080 10 GB, 32 GB RAM, Series X, game gate 300 s in the world, same save, alternating, two runs each. +#3031+#3035 is the new head of #3031 (8df1bfce7) with this branch merged; this change only moves the windows, so on this PC it runs with no windows on the card. Private bytes at most:

main + #3031 + #3031 + #3035
ray tracing off: private 27,574 / 27,569 MB 26,187 / 25,965 MB 27,065 / 27,340 MB
ray tracing off: card in use, max 8,685 / 8,907 MB 8,770 / 8,605 MB 8,384 / 8,379 MB
ray tracing off: fps median 24.5 / 24.1 24.7 / 24.2 23.8 / 23.5
-HardwareRT: card over its budget 190 of 300 s 193 of 300 s 0 s (both runs)
-HardwareRT: card in use, max 9,873 MB 9,794 MB 8,778 / 8,840 MB
-HardwareRT: private / fps median 27,926 MB / 21.1 26,967 MB / 21.3 27,554 / 27,728 MB / 21.4 / 21.3

No device losses or crashes in any of them. (A first -HardwareRT round with the gate's over-budget stop on was stopped at ~175 s for main and +#3031, not for +#3031+#3035.)

On your two points:

  • RAM. This change brings back about 1.1 GB of private bytes, as you say. On top of #3031 the total stays below today's main (27.1-27.3 against 27.6 GB, and 27.6-27.7 against 27.9 GB with -HardwareRT). That is why the pull request says "merge after #3031". I cannot measure a 24 GB PC here. A 24 GB PC already commits beyond its memory on main (27.6 GB private), so the windows were not what kept it out of paging. I would leave the line at 20 GB unless someone with 24 GB measures otherwise.
  • 8 GB cards. Not tested here. The comment in the script now names the 6-12 GB range explicitly; with less card memory the texture budget is tighter, so the card memory freed matters more, not less. A run on an 8 GB card would be welcome.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7355179584 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7355179584). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T18:48:19Z. --- Thanks @MoonEyes. In-game runs on current `main` `5b1fff821`, RTX 3080 10 GB, 32 GB RAM, Series X, game gate 300 s in the world, same save, alternating, two runs each. `+#3031+#3035` is the new head of #3031 (`8df1bfce7`) with this branch merged; this change only moves the windows, so on this PC it runs with no windows on the card. Private bytes at most: | | main | + #3031 | + #3031 + #3035 | |---|---|---|---| | ray tracing off: private | 27,574 / 27,569 MB | 26,187 / 25,965 MB | 27,065 / 27,340 MB | | ray tracing off: card in use, max | 8,685 / 8,907 MB | 8,770 / 8,605 MB | 8,384 / 8,379 MB | | ray tracing off: fps median | 24.5 / 24.1 | 24.7 / 24.2 | 23.8 / 23.5 | | `-HardwareRT`: card over its budget | 190 of 300 s | 193 of 300 s | **0 s** (both runs) | | `-HardwareRT`: card in use, max | 9,873 MB | 9,794 MB | 8,778 / 8,840 MB | | `-HardwareRT`: private / fps median | 27,926 MB / 21.1 | 26,967 MB / 21.3 | 27,554 / 27,728 MB / 21.4 / 21.3 | No device losses or crashes in any of them. (A first `-HardwareRT` round with the gate's over-budget stop on was stopped at ~175 s for main and `+#3031`, not for `+#3031+#3035`.) On your two points: - **RAM.** This change brings back about 1.1 GB of private bytes, as you say. On top of #3031 the total stays below today's main (27.1-27.3 against 27.6 GB, and 27.6-27.7 against 27.9 GB with `-HardwareRT`). That is why the pull request says "merge after #3031". I cannot measure a 24 GB PC here. A 24 GB PC already commits beyond its memory on main (27.6 GB private), so the windows were not what kept it out of paging. I would leave the line at 20 GB unless someone with 24 GB measures otherwise. - **8 GB cards.** Not tested here. The comment in the script now names the 6-12 GB range explicitly; with less card memory the texture budget is tighter, so the card memory freed matters more, not less. A run on an 8 GB card would be welcome. AI-assisted (Claude Code, Claude Opus 5.5).
ecox982745 commented 2026-12-02 19:05:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-02T19:05:03Z.


Windows CPU-only check on the latest head b7b3c56ce with main b41763227. The merge touches only one conflict, in d3d12/docs/findings.md: keep both the new table-constant-buffer section from main and this PR’s title-memory-window section. The launcher and tests auto-merge. The merged launcher’s RAM/VRAM matrix, including the named dual-GPU case, passed in Windows PowerShell 5.1 and PowerShell 7. No GPU or title run in this check. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7355596690 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7355596690). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-12-02T19:05:03Z. --- Windows CPU-only check on the latest head `b7b3c56ce` with main `b41763227`. The merge touches only one conflict, in `d3d12/docs/findings.md`: keep both the new table-constant-buffer section from main and this PR’s title-memory-window section. The launcher and tests auto-merge. The merged launcher’s RAM/VRAM matrix, including the named dual-GPU case, passed in Windows PowerShell 5.1 and PowerShell 7. No GPU or title run in this check. AI-assisted.
Krashgamer commented 2026-12-02 19:26:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T19:26:23Z.


Thanks @ecox982745. Rebased on main b41763227 (5f0042151): the findings.md conflict keeps both sections, main's table-constant-buffer section first. tests/test_win_launchers.py, the docs tests and check_no_game_data.py pass on Windows.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7356175436 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7356175436). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T19:26:23Z. --- Thanks @ecox982745. Rebased on `main` `b41763227` (`5f0042151`): the `findings.md` conflict keeps both sections, main's table-constant-buffer section first. `tests/test_win_launchers.py`, the docs tests and `check_no_game_data.py` pass on Windows. AI-assisted (Claude Code, Claude Opus 5.5).
merzleckeier commented 2026-12-02 20:47:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:47:36Z.

Review: COMMENTED


Independent check on 5f004215: a local merge with main 8d82a34a, #3031 8df1bfce, #3210 917cb9e3 and #3220 0beb7d26 was clean. The launcher suite on Linux PowerShell passed all six runnable tests, including the 15 cases in this PR; five Windows-only tests skipped. One additional case exposed an adapter-selection mismatch. In the existing 8 GiB + 16 GiB fixture with 32 GiB RAM, -Adapter nvidia matches both names and the launcher emits LEONIDA_WINDOWS_BAR_MB=3072 because it uses the largest match (play-nvidia.ps1:391–402). The runtime returns the first matching hardware adapter in DXGI order (host.rs:1615–1636), so if the 8 GiB device comes first the cap applies to the card the new rule intends to protect. Please use the same selection where feasible, or make the ambiguous-match fallback explicit and add that case. No GPU or game run. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6158723137 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#pullrequestreview-6158723137). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-02T20:47:36Z. **Review:** COMMENTED --- Independent check on `5f004215`: a local merge with `main` `8d82a34a`, #3031 `8df1bfce`, #3210 `917cb9e3` and #3220 `0beb7d26` was clean. The launcher suite on Linux PowerShell passed all six runnable tests, including the 15 cases in this PR; five Windows-only tests skipped. One additional case exposed an adapter-selection mismatch. In the existing 8 GiB + 16 GiB fixture with 32 GiB RAM, `-Adapter nvidia` matches both names and the launcher emits `LEONIDA_WINDOWS_BAR_MB=3072` because it uses the largest match (`play-nvidia.ps1:391–402`). The runtime returns the first matching hardware adapter in DXGI order (`host.rs:1615–1636`), so if the 8 GiB device comes first the cap applies to the card the new rule intends to protect. Please use the same selection where feasible, or make the ambiguous-match fallback explicit and add that case. No GPU or game run. AI-assisted.
Krashgamer commented 2026-12-02 20:56:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T20:56:02Z.


Superseded by 4995a799c: the runtime now judges the card it took; the "smallest card" rule below is gone.

Thanks @merzleckeier, a real gap. Fixed in c0bc6f70d: when -Adapter is part of several card names, the launcher now takes the smallest of them.

The driver keys it reads do not say which card comes first in DXGI order, which is what the runtime picks. The smallest is the card the rule must not miss: a 16 GB card treated as the 8 GB one only keeps the windows off a card that could hold them, while the reverse puts them on the small card.

New case (32 GB, 8 GB + 16 GB, -Adapter nvidia) -> no windows: it fails on the previous head (the cap was 3072) and passes now. tests/test_win_launchers.py passes on Windows.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7358547010 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7358547010). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T20:56:02Z. --- **Superseded by `4995a799c`: the runtime now judges the card it took; the "smallest card" rule below is gone.** Thanks @merzleckeier, a real gap. Fixed in `c0bc6f70d`: when `-Adapter` is part of several card names, the launcher now takes the smallest of them. The driver keys it reads do not say which card comes first in DXGI order, which is what the runtime picks. The smallest is the card the rule must not miss: a 16 GB card treated as the 8 GB one only keeps the windows off a card that could hold them, while the reverse puts them on the small card. New case `(32 GB, 8 GB + 16 GB, -Adapter nvidia) -> no windows`: it fails on the previous head (the cap was `3072`) and passes now. `tests/test_win_launchers.py` passes on Windows. AI-assisted (Claude Code, Claude Opus 5.5).
merzleckeier commented 2026-12-02 20:59:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:59:00Z.

Review: COMMENTED


Rechecked c0bc6f70 against main 8a9235d0 (which now includes #3210), with #3031 and #3220 in the local test merge. The new ambiguous -Adapter nvidia case passes, and the original distinct-name cases still pass. The launcher suite on Linux PowerShell ran 11 tests (6 passed, 5 Windows-only skips). The conservative minimum among matching cards addresses my prior finding. Synthetic fixtures only. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6158904630 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#pullrequestreview-6158904630). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-02T20:59:00Z. **Review:** COMMENTED --- Rechecked `c0bc6f70` against `main` `8a9235d0` (which now includes #3210), with #3031 and #3220 in the local test merge. The new ambiguous `-Adapter nvidia` case passes, and the original distinct-name cases still pass. The launcher suite on Linux PowerShell ran 11 tests (6 passed, 5 Windows-only skips). The conservative minimum among matching cards addresses my prior finding. Synthetic fixtures only. AI-assisted.
MoonEyes commented 2026-12-02 22:01:20 +00:00 (Migrated from github.com)

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


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:7360112509 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7360112509). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T22:01:20Z. --- 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).
Krashgamer commented 2026-12-02 22:05:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T22:05:06Z.


@merzleckeier your check made me look at the rule again: even the smallest matching card is a guess, because the launcher cannot know which card the runtime takes. So 4995a799c replaces the approach of c0bc6f70d.

  • Launcher: with its own cap it also sets a line, LEONIDA_WINDOWS_BAR_CARD_MIN_MB (11,776 on PCs of 19 GiB or more, 6,144 below that). Its card probe is back to what main has.
  • Runtime: compares the line with the own memory of the adapter it actually took, and puts no windows on a card under it. So -Adapter nvidia with an 8 GB and a 16 GB card follows the card that is used.
  • Tests: a Rust unit test of the rule (fails without it) and the launcher cases for the cap and the line. A game gate run with -HardwareRT passed: the runtime logged the line, 0 MB of windows on the card, 0 s over budget.

Nothing has to be merged by hand for #3002 any more (closed). The pull request text is rewritten for this head. It still merges after #3031.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7360201585 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7360201585). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T22:05:06Z. --- @merzleckeier your check made me look at the rule again: even the smallest matching card is a guess, because the launcher cannot know which card the runtime takes. So `4995a799c` replaces the approach of `c0bc6f70d`. - **Launcher:** with its own cap it also sets a line, `LEONIDA_WINDOWS_BAR_CARD_MIN_MB` (11,776 on PCs of 19 GiB or more, 6,144 below that). Its card probe is back to what `main` has. - **Runtime:** compares the line with the own memory of the adapter it actually took, and puts no windows on a card under it. So `-Adapter nvidia` with an 8 GB and a 16 GB card follows the card that is used. - **Tests:** a Rust unit test of the rule (fails without it) and the launcher cases for the cap and the line. A game gate run with `-HardwareRT` passed: the runtime logged the line, 0 MB of windows on the card, 0 s over budget. Nothing has to be merged by hand for #3002 any more (closed). The pull request text is rewritten for this head. It still merges after #3031. AI-assisted (Claude Code, Claude Opus 5.5).
Krashgamer commented 2026-12-02 22:25:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T22:25:56Z.


@MoonEyes run report of the current head. It depends on #3031, so the run has #3031 merged too.

  • Head / base: 4995a799c and #3031 8df1bfce7, merged on main 8877be372 (local merge dc289a22b, clean tree, built diagnostics,mimalloc). main has moved to f3865cae8 since; in d3d12/crates and d3d12/scripts only leonida-lua and leonida-pe changed.
  • PC: RTX 3080 10 GB, driver 32.0.16.1088 (610.88), resizable BAR, Windows 11 Pro 26200, i7-10700K, 32 GB RAM. Series X, 2560x1440, -HardwareRT.
  • Run: game-gate.ps1, 301 s in the world, PASS. 0 device lost, 0 crashes, 0 s over the card's budget (at most 8,919 of 9,155 MB).
  • Frame rate: median 20.8, p5 11.1. A diagnostic memory walk ran every 30 s in it, so this is a little low.

For comparison, without that walk, from an earlier head of this pull request (3b8a11cee, the same rule judged in the launcher) with an earlier head of #3031 (9903ba336), and main 5b1fff821 alone, -HardwareRT, 300 s:

Runs fps median Card at most Over the card's budget
main 1 21.1 9,873 MB 190 s
#3031 + this 2 21.4, 21.3 8,778, 8,840 MB 0 s

A second main run was stopped by the gate's own memory limit at 172 s in the world (65 s over the card's budget). Without ray tracing, same commits, two runs each: main 24.5 and 24.1 fps, #3031 + this 23.8 and 23.5.

The failing d3d12 (windows-latest) check is main's: leonida-lua tests do not build there (tests.rs:1089); #3237 fixes it.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7360683852 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7360683852). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T22:25:56Z. --- @MoonEyes run report of the current head. It depends on #3031, so the run has #3031 merged too. - **Head / base:** `4995a799c` and #3031 `8df1bfce7`, merged on `main` `8877be372` (local merge `dc289a22b`, clean tree, built `diagnostics,mimalloc`). `main` has moved to `f3865cae8` since; in `d3d12/crates` and `d3d12/scripts` only `leonida-lua` and `leonida-pe` changed. - **PC:** RTX 3080 10 GB, driver 32.0.16.1088 (610.88), resizable BAR, Windows 11 Pro 26200, i7-10700K, 32 GB RAM. Series X, 2560x1440, `-HardwareRT`. - **Run:** `game-gate.ps1`, 301 s in the world, PASS. 0 device lost, 0 crashes, 0 s over the card's budget (at most 8,919 of 9,155 MB). - **Frame rate:** median 20.8, p5 11.1. A diagnostic memory walk ran every 30 s in it, so this is a little low. For comparison, without that walk, from an earlier head of this pull request (`3b8a11cee`, the same rule judged in the launcher) with an earlier head of #3031 (`9903ba336`), and `main` `5b1fff821` alone, `-HardwareRT`, 300 s: | | Runs | fps median | Card at most | Over the card's budget | |---|---|---|---|---| | `main` | 1 | 21.1 | 9,873 MB | 190 s | | #3031 + this | 2 | 21.4, 21.3 | 8,778, 8,840 MB | 0 s | A second `main` run was stopped by the gate's own memory limit at 172 s in the world (65 s over the card's budget). Without ray tracing, same commits, two runs each: `main` 24.5 and 24.1 fps, #3031 + this 23.8 and 23.5. The failing `d3d12 (windows-latest)` check is `main`'s: `leonida-lua` tests do not build there (`tests.rs:1089`); #3237 fixes it. AI-assisted (Claude Code, Claude Opus 5.5).
fiestorra commented 2026-12-02 22:32:32 +00:00 (Migrated from github.com)

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


VERIFY-3035 — Windows nativo: las suites pasan y el control muerde la línea de memoria de la tarjeta

Head (this PR)
Merge base b41763227 = current main
Merged onto main — merge-tree clean, git merge --no-ff clean

Ran

cargo test -p leonida-gpu --lib shadow     67 passed; 0 failed; 2 ignored
  shadow::mapped_windows_tests::a_card_under_the_line_gets_no_windows ... ok
python -I tests/test_win_launchers.py      Ran 7 tests — OK
  (including test_nvidia_windows_cap_and_card_line_by_ram)

Negative control (synthetic): I inverted the comparison in mapped_cap (card > line instead of card < line), rebuilt and ran:

FAILED: a_card_under_the_line_gets_no_windows
assertion `left == right` failed: a 10 GB card

The test bites.

What the change is: Host::card_memory() reports the adapter's own memory, and window_mapped_most now judges it — when the card has less of its own memory than LEONIDA_WINDOWS_BAR_CARD_MIN_MB (6 GiB, or 11.5 GiB on PCs with 20 GB of RAM or more), the title's memory windows stay in the PC's memory instead of being mapped into the card's. The reason is in the docs and the README: "on an RTX 3080 10 GB with 32 GB, twice the textures stayed alive without the windows" — on a card that small it is the card's memory the textures lack, not the PC's. A card whose memory is not known keeps the cap, as before, which is the right default for a new heuristic.

Why judging it in the runtime is the right place: the launcher cannot know which adapter the runtime took (that is #3049's question, on this same main), and the comment says so.

What I could not test

  • The case itself on this machine: the card here has 24 GB, so the line never fires; the test drives mapped_cap with a 10 GB card.
  • The texture survival the change is measured on: a run with a 10 GB card, which I do not have.
  • The Windows-side default: LEONIDA_WINDOWS_BAR_MB unset means no windows at all, so the whole path is off unless someone sets it — and the two new tests set it synthetically.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7360833541 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7360833541). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T22:32:32Z. --- ## VERIFY-3035 — Windows nativo: las suites pasan y el control muerde la línea de memoria de la tarjeta | | | |---|---| | Head | `(this PR)` | | Merge base | `b41763227` = current `main` | | Merged onto | `main` — `merge-tree` clean, `git merge --no-ff` clean | **Ran** ``` cargo test -p leonida-gpu --lib shadow 67 passed; 0 failed; 2 ignored shadow::mapped_windows_tests::a_card_under_the_line_gets_no_windows ... ok python -I tests/test_win_launchers.py Ran 7 tests — OK (including test_nvidia_windows_cap_and_card_line_by_ram) ``` **Negative control (synthetic)**: I inverted the comparison in `mapped_cap` (`card > line` instead of `card < line`), rebuilt and ran: ``` FAILED: a_card_under_the_line_gets_no_windows assertion `left == right` failed: a 10 GB card ``` **The test bites.** **What the change is**: `Host::card_memory()` reports the adapter's own memory, and `window_mapped_most` now judges it — **when the card has less of its own memory than `LEONIDA_WINDOWS_BAR_CARD_MIN_MB` (6 GiB, or 11.5 GiB on PCs with 20 GB of RAM or more), the title's memory windows stay in the PC's memory instead of being mapped into the card's.** The reason is in the docs and the README: *"on an RTX 3080 10 GB with 32 GB, twice the textures stayed alive without the windows"* — on a card that small it is the card's memory the textures lack, not the PC's. **A card whose memory is not known keeps the cap, as before**, which is the right default for a new heuristic. **Why judging it in the runtime is the right place**: the launcher cannot know which adapter the runtime took (that is #3049's question, on this same `main`), and the comment says so. ## What I could not test - **The case itself on this machine**: the card here has 24 GB, so the line never fires; the test drives `mapped_cap` with a 10 GB card. - **The texture survival the change is measured on**: a run with a 10 GB card, which I do not have. - **The Windows-side default**: `LEONIDA_WINDOWS_BAR_MB` unset means no windows at all, so the whole path is off unless someone sets it — and the two new tests set it synthetically. Written with an AI assistant.
MoonEyes commented 2026-12-03 00:51:32 +00:00 (Migrated from github.com)

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


RUN (in game, batch of two pull requests), each head merged with git merge --no-ff onto main d5b30be1c, in one build: #3035 ed7048a14, #3248 f4b082e96. 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 17.3, mean 16.8
Rendered fps, last 120 s median 17.1
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. #3248 was also run in a batch on its earlier head efd21d867; this run covers its current head. #3035 acts on cards under 12 GB in PCs of 20 GB or more, which this PC is (8 GB card, 32 GB of RAM); its memory effect was not measured here, only that nothing fell over.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7363674167 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7363674167). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T00:51:32Z. --- RUN (in game, batch of two pull requests), each head merged with `git merge --no-ff` onto main `d5b30be1c`, in one build: #3035 `ed7048a14`, #3248 `f4b082e96`. 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 17.3, mean 16.8 | | Rendered fps, last 120 s | median 17.1 | | 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. #3248 was also run in a batch on its earlier head `efd21d867`; this run covers its current head. #3035 acts on cards under 12 GB in PCs of 20 GB or more, which this PC is (8 GB card, 32 GB of RAM); its memory effect was not measured here, only that nothing fell over. AI-assisted (Claude Code).
Krashgamer commented 2026-12-03 00:57:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T00:57:18Z.


@MoonEyes thanks for the run of ed7048a14. The head is now 72df6a9f9: only main (1a163523d) merged in, because #3230 added a test at the same place in tests/test_win_launchers.py. Both tests are kept; this pull request's own runtime and launcher changes are as in ed7048a14. The launcher tests (12), the docs tests and the switches check pass on Windows. It still merges after #3031.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7363782790 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7363782790). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-03T00:57:18Z. --- @MoonEyes thanks for the run of `ed7048a14`. The head is now `72df6a9f9`: only `main` (`1a163523d`) merged in, because #3230 added a test at the same place in `tests/test_win_launchers.py`. Both tests are kept; this pull request's own runtime and launcher changes are as in `ed7048a14`. The launcher tests (12), the docs tests and the switches check pass on Windows. It still merges after #3031. AI-assisted (Claude Code, Claude Opus 5.5).
merzleckeier commented 2026-12-03 01:42:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T01:42:27Z.


Integration check on 72df6a9f9 merged onto main d15e048a. The current VRAM reader is the same block as main's. In a disposable copy I used the reader and tests from the existing patch in #2600, keeping this PR's surrounding comments and memory-budget policy. All eleven registry cases passed, as did the seven runnable tests in test_win_launchers.py (five Windows-only skips under Linux PowerShell 7.4.21). This included the title-memory cap and card-threshold test. Results are launcher-side dry runs.

One merge-order detail with #3270. Together the branches have 684 runtime switch rows and say 683 in the catalog header, despite a clean textual merge. Regenerating on the combined tree gives 684, and then --check and all 21 switch tests pass. The same issue was seen with #3128. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7364643179 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7364643179). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T01:42:27Z. --- Integration check on `72df6a9f9` merged onto main `d15e048a`. The current VRAM reader is the same block as main's. In a disposable copy I used the reader and tests from the existing patch in #2600, keeping this PR's surrounding comments and memory-budget policy. All eleven registry cases passed, as did the seven runnable tests in `test_win_launchers.py` (five Windows-only skips under Linux PowerShell 7.4.21). This included the title-memory cap and card-threshold test. Results are launcher-side dry runs. One merge-order detail with #3270. Together the branches have 684 runtime switch rows and say 683 in the catalog header, despite a clean textual merge. Regenerating on the combined tree gives 684, and then `--check` and all 21 switch tests pass. The same issue was seen with #3128. AI-assisted with OpenAI Codex.
ecox982745 commented 2026-12-03 04:10:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-03T04:10:09Z.


I checked ebbf9f8e merged onto 516c9eaa on native Windows, now that #3279 is in main. I reran the eleven registry cases from #2600 and also asserted LEONIDA_WINDOWS_BAR_CARD_MIN_MB using a synthetic 32 GiB PC. All eleven passed in Windows PowerShell 5.1 and PowerShell 7.

A binary 4 GiB value, including after an unreadable key or an enumeration error, leaves both the launcher window cap and the runtime card minimum unset. A valid larger reading in either order preserves the 3,072 MiB cap and sets the 11,776 MiB minimum for the runtime to apply to the selected card. This covers launcher dry runs only. No game files or GPU workload. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367339856 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7367339856). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-12-03T04:10:09Z. --- I checked ebbf9f8e merged onto 516c9eaa on native Windows, now that #3279 is in main. I reran the eleven registry cases from #2600 and also asserted LEONIDA_WINDOWS_BAR_CARD_MIN_MB using a synthetic 32 GiB PC. All eleven passed in Windows PowerShell 5.1 and PowerShell 7. A binary 4 GiB value, including after an unreadable key or an enumeration error, leaves both the launcher window cap and the runtime card minimum unset. A valid larger reading in either order preserves the 3,072 MiB cap and sets the 11,776 MiB minimum for the runtime to apply to the selected card. This covers launcher dry runs only. No game files or GPU workload. AI-assisted with OpenAI Codex.
OtavMacedo commented 2026-12-03 08:20:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OtavMacedo on 2026-12-03T08:20:52Z.


Profile-M data point for the "Unchanged" rule here: an 8 GB card on a 16 GB PC keeps the windows. The PR says that size was not measured. This is an in-game ABBA of LEONIDA_WINDOWS_BAR_MB=3072 (arm A, what the launcher sets on this PC) against 0 (arm B).

The build is main 516c9eaab + #3258, not this PR's head. It measures the two settings the rule chooses between, not the runtime rule itself. Numbers recomputed from summary.json/memory.csv by a separate agent before posting.

RUN abba-windows-bar | 2026-12-03 07:58-09:15 UTC | OtavMacedo | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        516c9eaab + #3258 (0c3f53ae3) | shaders: play script defaults
MACHINE:     NVIDIA GeForce RTX 3070 8 GB, desktop, resizable BAR (no "no GPU upload heap" line) | 621.24 | Windows 11 | 16 GB RAM, 24 GB fixed page file
RECIPE:      scripts/game-abba.ps1 (#3305) + game gate, Series X, -Resolution 1080 (LEONIDA_RENDER_SCALE=0.75), -NoFrameGen, 2560x1440 out, standing (gate_driver idle), 300 s in the world, 4 pairs
             + DEVIATIONS: arm A LEONIDA_WINDOWS_BAR_MB=3072, arm B LEONIDA_WINDOWS_BAR_MB=0 | gate -StopPrivateMB 27000 -StopOverBudgetSeconds 0 | prologue save
OS/DRIVER:   Developer Mode on; defaults otherwise
TARGET:      world median frame time, device loss, card/shared memory | PREDICTED: B no fps difference, private +1 GB, risk of a device loss in B (launcher comment, 16 GB PC + RTX 3060)
MEASURED:    see below | 12 gate runs, about 300 s each in the world
END:         time limit in 11 runs; device lost (0x887A0005, preceded by 0x8007000E "host command list did not close") in 1 run of arm B, 44 s into the world
CACHES:      warm (pipeline cache of earlier runs on this data folder); 2 warm-ups + 1 discarded run first
INSTRUMENTS: none beyond the gate's memory sampling
VERDICT:     device-loss risk held; "no fps difference" missed (B slower); private +1 GB missed (same in both arms)

Frame rate (MEASURED, 4 ABBA pairs):

  • World median frame time: A 43.09 ms, B 44.99 ms.
  • Pair effect B−A: +1.90 ms (+4.4 %), standard error 0.39 ms, 95 % [+0.66, +3.14]. All 4 pairs agree: B slower.
  • The four pairs are +1.25, +1.79, +1.53 and +3.02 ms. The largest comes from one slow B run (21.56 fps).
  • Fps median: A 23.06–23.37, B 21.56–22.51.

Device loss (MEASURED):

  • Arm A: 0 of 6 runs. Arm B: 1 of 6 (warm-ups included).
  • In the lost run, shared GPU memory peaked at 7,351 MB, near Windows' half-of-RAM limit for a card (about 8.1 GB here). The card's own memory was at 6,038 of 7,154 MB.
  • This looks like the 2026-11-27 case in play-nvidia.ps1's comment (16 GB PC, RTX 3060, 0x8007000E then a driver fault). ASSUMED: same mechanism; not traced further.

Memory, measured runs that count (4 a side, MEASURED):

Arm A, windows on the card Arm B, LEONIDA_WINDOWS_BAR_MB=0
Card memory over budget 229.8–287.5 s of about 300 0 s in all four
Shared GPU memory at most 4,884–6,297 MB 6,255–7,451 MB
Private bytes at most 23,462–24,944 MB 23,520–24,994 MB
Least memory left to commit 906–2,388 MB 832–2,330 MB

What this does and does not show:

  • Supports keeping the windows on 8 GB cards under 19 GiB (this PR's rule):
    • with them, the card runs over budget most of the time, but nothing is lost and the frame is 4 % faster;
    • without them, the title's memory moves to shared memory near Windows' limit, and 1 run in 6 lost the device.
  • Unlike the 3080 / 32 GB numbers above, private bytes did not grow without the windows. On 16 GB the commit limit is the tighter line in both arms (as little as 0.8–0.9 GB left).
  • Not measured: this PR's head, Series S, walking, and an open-world save. The save is in the prologue, and its absolute numbers are not comparable with other saves; the A/B difference is the result. 8 GB on 32 GB is still unmeasured.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372146599 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7372146599). Originally posted by [OtavMacedo](https://github.com/OtavMacedo) on 2026-12-03T08:20:52Z. --- Profile-M data point for the "Unchanged" rule here: an 8 GB card on a 16 GB PC keeps the windows. The PR says that size was not measured. This is an in-game ABBA of `LEONIDA_WINDOWS_BAR_MB=3072` (arm A, what the launcher sets on this PC) against `0` (arm B). The build is main `516c9eaab` + #3258, not this PR's head. It measures the two settings the rule chooses between, not the runtime rule itself. Numbers recomputed from `summary.json`/`memory.csv` by a separate agent before posting. ``` RUN abba-windows-bar | 2026-12-03 07:58-09:15 UTC | OtavMacedo | AI-assisted: Claude Code (Claude Opus 5.5) BASE: 516c9eaab + #3258 (0c3f53ae3) | shaders: play script defaults MACHINE: NVIDIA GeForce RTX 3070 8 GB, desktop, resizable BAR (no "no GPU upload heap" line) | 621.24 | Windows 11 | 16 GB RAM, 24 GB fixed page file RECIPE: scripts/game-abba.ps1 (#3305) + game gate, Series X, -Resolution 1080 (LEONIDA_RENDER_SCALE=0.75), -NoFrameGen, 2560x1440 out, standing (gate_driver idle), 300 s in the world, 4 pairs + DEVIATIONS: arm A LEONIDA_WINDOWS_BAR_MB=3072, arm B LEONIDA_WINDOWS_BAR_MB=0 | gate -StopPrivateMB 27000 -StopOverBudgetSeconds 0 | prologue save OS/DRIVER: Developer Mode on; defaults otherwise TARGET: world median frame time, device loss, card/shared memory | PREDICTED: B no fps difference, private +1 GB, risk of a device loss in B (launcher comment, 16 GB PC + RTX 3060) MEASURED: see below | 12 gate runs, about 300 s each in the world END: time limit in 11 runs; device lost (0x887A0005, preceded by 0x8007000E "host command list did not close") in 1 run of arm B, 44 s into the world CACHES: warm (pipeline cache of earlier runs on this data folder); 2 warm-ups + 1 discarded run first INSTRUMENTS: none beyond the gate's memory sampling VERDICT: device-loss risk held; "no fps difference" missed (B slower); private +1 GB missed (same in both arms) ``` **Frame rate (MEASURED, 4 ABBA pairs):** - World median frame time: A 43.09 ms, B 44.99 ms. - Pair effect B−A: +1.90 ms (+4.4 %), standard error 0.39 ms, 95 % [+0.66, +3.14]. All 4 pairs agree: B slower. - The four pairs are +1.25, +1.79, +1.53 and +3.02 ms. The largest comes from one slow B run (21.56 fps). - Fps median: A 23.06–23.37, B 21.56–22.51. **Device loss (MEASURED):** - Arm A: 0 of 6 runs. Arm B: 1 of 6 (warm-ups included). - In the lost run, shared GPU memory peaked at 7,351 MB, near Windows' half-of-RAM limit for a card (about 8.1 GB here). The card's own memory was at 6,038 of 7,154 MB. - This looks like the 2026-11-27 case in `play-nvidia.ps1`'s comment (16 GB PC, RTX 3060, 0x8007000E then a driver fault). ASSUMED: same mechanism; not traced further. **Memory, measured runs that count (4 a side, MEASURED):** | | Arm A, windows on the card | Arm B, `LEONIDA_WINDOWS_BAR_MB=0` | |---|---|---| | Card memory over budget | 229.8–287.5 s of about 300 | 0 s in all four | | Shared GPU memory at most | 4,884–6,297 MB | 6,255–7,451 MB | | Private bytes at most | 23,462–24,944 MB | 23,520–24,994 MB | | Least memory left to commit | 906–2,388 MB | 832–2,330 MB | **What this does and does not show:** - **Supports** keeping the windows on 8 GB cards under 19 GiB (this PR's rule): - with them, the card runs over budget most of the time, but nothing is lost and the frame is 4 % faster; - without them, the title's memory moves to shared memory near Windows' limit, and 1 run in 6 lost the device. - **Unlike the 3080 / 32 GB numbers above,** private bytes did not grow without the windows. On 16 GB the commit limit is the tighter line in both arms (as little as 0.8–0.9 GB left). - **Not measured:** this PR's head, Series S, walking, and an open-world save. The save is in the prologue, and its absolute numbers are not comparable with other saves; the A/B difference is the result. 8 GB on 32 GB is still unmeasured.
Krashgamer commented 2026-12-03 08:25:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T08:25:00Z.


@OtavMacedo thank you, that is the size I could not measure. I added it to the text of this pull request, with its limits (main with #3258, the prologue save, not this head).

It fits what the rule assumes for PCs under 19 GiB: the windows stay on the card, and without them shared memory comes near Windows' limit. The card being over its budget for most of those runs is the price, and I say so in the text. 8 GB cards on 32 GB PCs are still not measured.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372236064 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7372236064). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-03T08:25:00Z. --- @OtavMacedo thank you, that is the size I could not measure. I added it to the text of this pull request, with its limits (`main` with #3258, the prologue save, not this head). It fits what the rule assumes for PCs under 19 GiB: the windows stay on the card, and without them shared memory comes near Windows' limit. The card being over its budget for most of those runs is the price, and I say so in the text. 8 GB cards on 32 GB PCs are still not measured. AI-assisted (Claude Code, Claude Opus 5.5).
OtavMacedo commented 2026-12-03 10:02:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OtavMacedo on 2026-12-03T10:02:46Z.


Check run of this head on profile M, the size the rule keeps as before.

RUN v3035-1 | 2026-12-03 09:55-10:02 UTC | OtavMacedo | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        bb299e794 = main d9b618f10 + #3031 (4e59d46e8) + this head (ebbf9f8e9) + #3258, merged with --no-ff | build diagnostics,dlss,mimalloc
MACHINE:     NVIDIA GeForce RTX 3070 8 GB, desktop, resizable BAR | 621.24 | Windows 11 | 16 GB RAM, 24 GB fixed page file
RECIPE:      game gate, Series X, -Resolution 1080, -NoFrameGen, standing (gate_driver idle), 300 s in the world | gate -StopPrivateMB 27000 -StopOverBudgetSeconds 0 | prologue save
OS/DRIVER:   Developer Mode on
TARGET:      the launcher's cap and line, and the runtime's choice | PREDICTED: cap 3072, line 6144 (PC under 19 GiB), windows kept (8 GB card over the line), no withholding message
MEASURED:    PASS, 304 s in the world, median 20.63 fps (p5 16.41)
END:         time limit, clean exit
CACHES:      warm (a copy of the earlier runs' pipeline cache, in its own data folder)
INSTRUMENTS: none beyond the gate's memory sampling
VERDICT:     prediction held
  • The launcher set LEONIDA_WINDOWS_BAR_MB=3072 and LEONIDA_WINDOWS_BAR_CARD_MIN_MB=6144 (settings line). MEASURED.
  • The runtime wrote no "...and its memory is the textures'" line: 0 lines. That line is written only when the cap changes (READ IN CODE: shadow.rs window_mapped_most, mapped_cap), so it kept the windows.
  • The memory matches windows on the card, like arm A of the ABBA above (https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7372146599):
    • card memory over budget for 273.2 s (7,551 of 7,175 MB at most);
    • shared GPU memory at most 5,721 MB, in arm A's range (4,884–6,297 MB) and under arm B's (6,255–7,451 MB);
    • private bytes at most 23,963 MB;
    • least left to commit 1,850 MB.
  • No device loss, no 0x8007000E, no "no GPU upload heap" line. Numbers recomputed by a separate agent.

One run, n=1. Its 20.63 fps is not compared with the ABBA's runs, which were a different build (no #3031); same-arm runs on this PC already span 21.0–23.7 fps.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7374653952 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7374653952). Originally posted by [OtavMacedo](https://github.com/OtavMacedo) on 2026-12-03T10:02:46Z. --- Check run of this head on profile M, the size the rule keeps as before. ``` RUN v3035-1 | 2026-12-03 09:55-10:02 UTC | OtavMacedo | AI-assisted: Claude Code (Claude Opus 5.5) BASE: bb299e794 = main d9b618f10 + #3031 (4e59d46e8) + this head (ebbf9f8e9) + #3258, merged with --no-ff | build diagnostics,dlss,mimalloc MACHINE: NVIDIA GeForce RTX 3070 8 GB, desktop, resizable BAR | 621.24 | Windows 11 | 16 GB RAM, 24 GB fixed page file RECIPE: game gate, Series X, -Resolution 1080, -NoFrameGen, standing (gate_driver idle), 300 s in the world | gate -StopPrivateMB 27000 -StopOverBudgetSeconds 0 | prologue save OS/DRIVER: Developer Mode on TARGET: the launcher's cap and line, and the runtime's choice | PREDICTED: cap 3072, line 6144 (PC under 19 GiB), windows kept (8 GB card over the line), no withholding message MEASURED: PASS, 304 s in the world, median 20.63 fps (p5 16.41) END: time limit, clean exit CACHES: warm (a copy of the earlier runs' pipeline cache, in its own data folder) INSTRUMENTS: none beyond the gate's memory sampling VERDICT: prediction held ``` - **The launcher** set `LEONIDA_WINDOWS_BAR_MB=3072` and `LEONIDA_WINDOWS_BAR_CARD_MIN_MB=6144` (settings line). MEASURED. - **The runtime** wrote no "...and its memory is the textures'" line: 0 lines. That line is written only when the cap changes (READ IN CODE: `shadow.rs` `window_mapped_most`, `mapped_cap`), so it kept the windows. - **The memory matches windows on the card,** like arm A of the ABBA above (https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7372146599): - card memory over budget for 273.2 s (7,551 of 7,175 MB at most); - shared GPU memory at most 5,721 MB, in arm A's range (4,884–6,297 MB) and under arm B's (6,255–7,451 MB); - private bytes at most 23,963 MB; - least left to commit 1,850 MB. - No device loss, no 0x8007000E, no "no GPU upload heap" line. Numbers recomputed by a separate agent. One run, n=1. Its 20.63 fps is not compared with the ABBA's runs, which were a different build (no #3031); same-arm runs on this PC already span 21.0–23.7 fps.
Krashgamer commented 2026-12-03 10:26:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T10:26:41Z.


@OtavMacedo thank you for running this head on the 8 GB card with 16 GB of RAM. It confirms that the rule leaves the windows as they were there, which I could only test with a PC of 32 GB.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7375241708 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7375241708). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-03T10:26:41Z. --- @OtavMacedo thank you for running this head on the 8 GB card with 16 GB of RAM. It confirms that the rule leaves the windows as they were there, which I could only test with a PC of 32 GB. AI-assisted (Claude Code, Claude Opus 5.5).
enlight3d commented 2026-12-03 11:18:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-03T11:18:59Z.


Large-card side of the line this pull request draws, next to OtavMacedo's RTX 3070 8 GB result above: an A B B A on an RTX 3090 24 GB (64 GB of RAM, NVIDIA 621.40) in Series X with DLSS, since that is how such a card is likely played. Earlier on the same PC: Series S 540 -2.4 ms and Series X 1440 held -7.86 ms.

The same commit as before, built with DLSS (--features diagnostics,dlss,mimalloc); -Dlss quality -NoFrameGen with 2560x1440 out, so DLSS renders 1706x960 (checked on its creation line in every run, no fallback, the world lit in a picture at 300 s). Sender on, standing at the same save, 600 s runs each in its own copy of one warmed-up data folder; from 150 s. A: LEONIDA_WINDOWS_BAR_MB=0 (the launcher's value on this PC), B: 8192.

A1 B1 B2 A2 B - A (2 pairs)
median present interval 37.32 31.78 30.37 37.38 ms -6.27 ± 0.74 ms (26.5 → 32.8 fps)
p99 69.8 56.3 54.6 68.4 ms -13.68 ± 0.18 ms
card memory at most (whole card) 15.1 19.2 19.1 14.6 GB about +4.3 GB
  • The card stays the limit in both arms (97-99 % busy); its time a frame falls by 6.5 and 8.4 ms.
  • With 8192, all of about 1,800 windows go to the card's memory (at most about 5.1 GB alive, then about 3.6 GB), none left out, none turned down; without it they all stay in the PC's memory.
  • No crash, no device removed.

So on this card the windows are worth about 6 ms a frame with DLSS quality and about 8 ms at 1440 held. The p90 moved less in pair 2 (-0.9 against -5.9 in pair 1), so the gain at the median is the steadier figure.

AI-assisted: Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7376522404 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7376522404). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-12-03T11:18:59Z. --- Large-card side of the line this pull request draws, next to OtavMacedo's RTX 3070 8 GB result above: an A B B A on an RTX 3090 24 GB (64 GB of RAM, NVIDIA 621.40) in Series X with DLSS, since that is how such a card is likely played. Earlier on the same PC: Series S 540 [-2.4 ms](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7367830955) and Series X 1440 held [-7.86 ms](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7374367877). The same commit as before, built with DLSS (`--features diagnostics,dlss,mimalloc`); `-Dlss quality -NoFrameGen` with 2560x1440 out, so DLSS renders 1706x960 (checked on its creation line in every run, no fallback, the world lit in a picture at 300 s). Sender on, standing at the same save, 600 s runs each in its own copy of one warmed-up data folder; from 150 s. A: `LEONIDA_WINDOWS_BAR_MB=0` (the launcher's value on this PC), B: 8192. | | A1 | B1 | B2 | A2 | B - A (2 pairs) | |---|---|---|---|---|---| | median present interval | 37.32 | 31.78 | 30.37 | 37.38 ms | -6.27 ± 0.74 ms (26.5 → 32.8 fps) | | p99 | 69.8 | 56.3 | 54.6 | 68.4 ms | -13.68 ± 0.18 ms | | card memory at most (whole card) | 15.1 | 19.2 | 19.1 | 14.6 GB | about +4.3 GB | - The card stays the limit in both arms (97-99 % busy); its time a frame falls by 6.5 and 8.4 ms. - With 8192, all of about 1,800 windows go to the card's memory (at most about 5.1 GB alive, then about 3.6 GB), none left out, none turned down; without it they all stay in the PC's memory. - No crash, no device removed. So on this card the windows are worth about 6 ms a frame with DLSS quality and about 8 ms at 1440 held. The p90 moved less in pair 2 (-0.9 against -5.9 in pair 1), so the gain at the median is the steadier figure. AI-assisted: Claude Code (Claude Opus 5.5)
Krashgamer commented 2026-12-03 11:23:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T11:23:11Z.


@enlight3d thank you, the DLSS runs are a useful addition on the large side. This pull request changes which PCs get windows on the card (in the launcher and in the runtime), and a 24 GB card is above its line, so it is not touched here.

Main is merged in (the conflict was in switches.md only); head is now a71e0815f.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7376626917 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3035#issuecomment-7376626917). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-03T11:23:11Z. --- @enlight3d thank you, the DLSS runs are a useful addition on the large side. This pull request changes which PCs get windows on the card (in the launcher and in the runtime), and a 24 GB card is above its line, so it is not touched here. Main is merged in (the conflict was in `switches.md` only); head is now `a71e0815f`. AI-assisted (Claude Code, Claude Opus 5.5).
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/3035:upstream-pr/3035'
git switch 'upstream-pr/3035'

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