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
pull from: upstream-pr/3035
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3035"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.ps1puts 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:
LEONIDA_WINDOWS_BAR_MB=0LEONIDA_WINDOWS_BAR_MB=0So 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:
play-nvidia.ps1also setsLEONIDA_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.-Adaptercan be part of several card names,#Nis 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 whatmainhas.-WindowsBarMBbehave as before. A card whose size the runtime cannot read keeps the cap.-WindowsBarMBhelp,d3d12/README.md,docs/switches.mdand ad3d12/docs/findings.mdsection.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 onmain8877be372, 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_capreturning the cap always) it fails.Docs tests (
test_docs_*.py),d3d12_switches.py --checkandcheck_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:
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
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-02T03:37:08Z.
Independent Windows dry-run check at base
8422def75and headd2e2188f0. 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.-WindowsBarMB 0LEONIDA_ADAPTER=5060was 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.
Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T03:55:55Z.
Thanks, @ecox982745 - fixed in
b0cf557e2rather than documented: with-Adapterthe 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 GB5060beside a 16 GB card: picked 8 GB -> no cap; pickedrtx 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.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 (nopwsh).Head
d4da3449, base the currentmain(0ae5a266), merge base8422def7, 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).1. What it changes
d3d12/scripts/play-nvidia.ps1: (a) the card-memory probe is now-Adapter-aware — with-Adapternaming a card (any case, plain text, not#N), it takes the largest memory of the cards whoseDriverDesccontains 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 setsLEONIDA_WINDOWS_BAR_MB=3072and instead prints that the title memory windows stay in the PC's memory (lines 531-547). The-WindowsBarMBhelp 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 newtest_nvidia_windows_in_card_memory_by_ram_and_cardthat 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
-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#;$namedtakes the largestHardwareInformation.qwMemorySizewhoseDriverDesccontains$want(IndexOf(..., OrdinalIgnoreCase));if ($named -gt 0) { $vram = $named }. Matches the comment. True.host.rschosen_adapter(): name substring, case-insensitive. Consistent. True.IndexOfis substring matching, not a pattern; the runtime usescontains. 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#Nand the largest is used. A documented limitation, acknowledged in the comment and covered by the test ("#1"→"3072"). True.$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.)textureShortfalse (ram < 20GB) → cap 3072; 32 GB PC + 10 GB card →textureShorttrue → 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 5060picks 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.textureShortis 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 newtest_nvidia_windows_in_card_memory_by_ram_and_cardis@unittest.skipUnless(POWERSHELL, ...)and is skipped — there is nopwsh/powershell.exeon this machine, so the PowerShell path (including the fakeGet-CimInstance/Get-ChildItem/Get-ItemProperty) is not exercised.test_static_quoting_and_no_pause_guardspasses; 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 intest_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:
11.5GB(d3d12/README.md~line 560,d3d12/scripts/play-nvidia.ps1line 539): the README speaks in nominal ("under 12 GB"), the code in reported ($vram -lt 11.5GB). Theplay-nvidia.ps1comment 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.ps1lines 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, thetextureShortdecision could be off. Documented in the comment and covered by the test; a known limitation, not a regression.play-nvidia.ps1line 539):$ram -ge 20GBis 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
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).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.ecox982745reference in theplay-nvidia.ps1comment (line 370) — a comment on #3035; I could not read GitHub comments and did not try.DriverDescmatches what the runtime sees as the DXGI name — the launcher matches the registryDriverDesc, the runtime matches the DXGI description; I could not confirm they agree on real hardware.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:mainSHA it was merged onto;mainalone 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).
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.python -I tests/test_win_launchers.pyplay-nvidia.ps1skip off Windows, so this proves nothing about the changepython -I scripts/check_no_game_data.pyon the 4 filesRead in the diff (
d3d12/scripts/play-nvidia.ps1)-Adaptermatch is nowIndexOf(..., OrdinalIgnoreCase), plain text as the runtime matches it. The old-like "*$Adapter*"treated[xas a pattern and threw inside thetry, which silently left$vramat its value so far.#Nfalls 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 20GBkeeps the windows off every card under 12 GB on a PC with 20 GB or more. Theelseifmessage 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)
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
Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T18:48:19Z.
Thanks @MoonEyes. In-game runs on current
main5b1fff821, RTX 3080 10 GB, 32 GB RAM, Series X, game gate 300 s in the world, same save, alternating, two runs each.+#3031+#3035is 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:-HardwareRT: card over its budget-HardwareRT: card in use, max-HardwareRT: private / fps medianNo device losses or crashes in any of them. (A first
-HardwareRTround 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:
-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.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-02T19:05:03Z.
Windows CPU-only check on the latest head
b7b3c56cewith mainb41763227. The merge touches only one conflict, ind3d12/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.Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T19:26:23Z.
Thanks @ecox982745. Rebased on
mainb41763227(5f0042151): thefindings.mdconflict keeps both sections, main's table-constant-buffer section first.tests/test_win_launchers.py, the docs tests andcheck_no_game_data.pypass on Windows.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:47:36Z.
Review: COMMENTED
Independent check on
5f004215: a local merge withmain8d82a34a, #30318df1bfce, #3210917cb9e3and #32200beb7d26was 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 nvidiamatches both names and the launcher emitsLEONIDA_WINDOWS_BAR_MB=3072because 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.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-Adapteris 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 was3072) and passes now.tests/test_win_launchers.pypasses on Windows.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:59:00Z.
Review: COMMENTED
Rechecked
c0bc6f70againstmain8a9235d0(which now includes #3210), with #3031 and #3220 in the local test merge. The new ambiguous-Adapter nvidiacase 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.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:mainSHA it was merged onto;mainalone 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).
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
4995a799creplaces the approach ofc0bc6f70d.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 whatmainhas.-Adapter nvidiawith an 8 GB and a 16 GB card follows the card that is used.-HardwareRTpassed: 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).
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.
4995a799cand #30318df1bfce7, merged onmain8877be372(local mergedc289a22b, clean tree, builtdiagnostics,mimalloc).mainhas moved tof3865cae8since; ind3d12/cratesandd3d12/scriptsonlyleonida-luaandleonida-pechanged.-HardwareRT.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).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), andmain5b1fff821alone,-HardwareRT, 300 s:mainA second
mainrun 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:main24.5 and 24.1 fps, #3031 + this 23.8 and 23.5.The failing
d3d12 (windows-latest)check ismain's:leonida-luatests do not build there (tests.rs:1089); #3237 fixes it.AI-assisted (Claude Code, Claude Opus 5.5).
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
(this PR)b41763227= currentmainmain—merge-treeclean,git merge --no-ffcleanRan
Negative control (synthetic): I inverted the comparison in
mapped_cap(card > lineinstead ofcard < line), rebuilt and ran:The test bites.
What the change is:
Host::card_memory()reports the adapter's own memory, andwindow_mapped_mostnow judges it — when the card has less of its own memory thanLEONIDA_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
mapped_capwith a 10 GB card.LEONIDA_WINDOWS_BAR_MBunset 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.
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-ffonto maind5b30be1c, in one build: #3035ed7048a14, #3248f4b082e96. 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.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;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. #3248 was also run in a batch on its earlier headefd21d867; 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).
Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T00:57:18Z.
@MoonEyes thanks for the run of
ed7048a14. The head is now72df6a9f9: onlymain(1a163523d) merged in, because #3230 added a test at the same place intests/test_win_launchers.py. Both tests are kept; this pull request's own runtime and launcher changes are as ined7048a14. 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).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T01:42:27Z.
Integration check on
72df6a9f9merged onto maind15e048a. 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 intest_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
--checkand all 21 switch tests pass. The same issue was seen with #3128. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-03T04:10:09Z.
I checked
ebbf9f8emerged onto516c9eaaon 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.
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) against0(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 fromsummary.json/memory.csvby a separate agent before posting.Frame rate (MEASURED, 4 ABBA pairs):
Device loss (MEASURED):
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):
LEONIDA_WINDOWS_BAR_MB=0What this does and does not show:
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 (
mainwith #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).
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.
LEONIDA_WINDOWS_BAR_MB=3072andLEONIDA_WINDOWS_BAR_CARD_MIN_MB=6144(settings line). MEASURED.shadow.rswindow_mapped_most,mapped_cap), so it kept the windows.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.
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).
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 -NoFrameGenwith 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.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)
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.mdonly); head is nowa71e0815f.AI-assisted (Claude Code, Claude Opus 5.5).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.