d3d12: title memory windows stay off cards under 12 GB on PCs of 20 GB or more #3496
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u"d3d12-launcher-windows-small-card:Krashgamer-d3d12-launcher-windows-small-card" git switch "Krashgamer-d3d12-launcher-windows-small-card"
Open
leonida/mandy
Krashgamer
wants to merge 13 commits from
Krashgamer/mandy:d3d12-launcher-windows-small-card into main
pull from: Krashgamer/mandy:d3d12-launcher-windows-small-card
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!3496
Loading…
Reference in a new issue
No description provided.
Delete branch "Krashgamer/mandy:d3d12-launcher-windows-small-card"
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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Replaces #3035, which came over from GitHub under the name Ghost, so I can no longer push to it. Same code as #3035 (head
b49c09c7c, the commit the test reports there name). The discussion and test results so far are on #3035.(#3495 is #3031 opened again.)
Claimed in the coordination issue as: D3D12-LAUNCHER-WINDOWS-SMALL-CARD (claimed with this pull request, in #2570)
Depends on: #3495. The PC-memory headroom this needs comes from pooled command allocators. Without #3495 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 #3495.
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 #3495:
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 #3495 (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
Independent local verification of this change (I changed no code).
e109507a(Merge main), merge base0036195a. The new Python test is absent on the base:git grep -F test_nvidia_windows_cap_and_card_line_by_ram 0036195a -- tests/test_win_launchers.py-> exit 1.python -I tests/test_win_launchers.py WinLaunchersTests.test_nvidia_windows_cap_and_card_line_by_ram -v-> Ran 1 test in 11.8 s, OK. No device gate involved (the surrounding suite is 17/17 OK).card_memory()accessor inhost.rs, no test, so nothing device-gated is being counted.git diff --check 0036195a e109507a-> clean.python -I scripts/check_no_game_data.pyon host.rs, shadow.rs, scripts/play-nvidia.ps1 and tests/test_win_launchers.py -> clean.GPUs tested: none (synthetic launcher arguments and RAM/card-line inputs; no game launch). Driver: n/a. No game data, assets or extracted shaders were used or attached.
AI-assisted: yes, Hy4 flash (verification only). No approval implied; this is a local test report.
A third data point on the side of the rule this pull request leaves as it is (an 8 GB card in a 16 GB PC, where the windows stay on the card), after my two on #3035 (26127, 26253): with #3466's 8 MiB texture blocks underneath, line 60 (
LEONIDA_WINDOWS_BAR_LINE=60) kept the card under its budget in all four runs, against about 325 s of 600 over it in three of four runs at line 80, with no clear change in frame time. One line-60 run also left its last three screenshots as a blank frame, which I cannot explain yet (below).2b69e8fc,diagnostics,dlss,mimalloc), one executable for both arms; RTX 3070 8 GB, resizable BAR, 621.47, 16 GB RAM, Windows 11.scripts/game-abba.ps1(2 warm-ups, 1 discarded, 4 pairs, 600 s in the world each,-SeriesS -Dlss quality -NoFrameGen,mods/gate_driverstanding, with its screenshot times extended locally to 10, 120, 240, 360, 480 and 570 s after control) from the save of my #3466 comment, where the card is over its budget for more than half of a run. Both arms: the play script'sLEONIDA_WINDOWS_BAR_MB=3072andLEONIDA_TEXTURE_BLOCK_MB=8; A = line 80 (the default), B = line 60. Apart from the screenshot times, the only change to the runner was the gate's memory stops, raised as on #3466 (-StopOverBudgetSeconds 900 -StopPrivateMB 32000 -StopCommitLeftMB 1500).(Medians from 60 s in the world on; windows and texture blocks are the median of the census lines from 60 s after control.)
abbaon the world median frame time: +0.61 ms (B - A), standard error 0.39, 95 % [-0.64, +1.85], 3 of 4 pairs agree: no clear difference. 0 device lost and 0 errors in all eight runs.What I read from it, each tagged:
unordered buffer view not on an element of its host copy,descriptor/host.rs) fired there at about 397 s, inside the blank stretch, with offset 394, while in the other seven runs it fired between 79 and 198 s with offset 5 to 9. It comes after the first blank screenshot, so I do not read it as the cause. None of the other seven runs here, nor about 210 screenshots from my earlier runs today, show it after the first screenshot of a run (where the intro card is expected). From one run I cannot tell whether it follows the line. Screenshots are not posted, per the rules.So, with the texture blocks of #3466, line 60 looks to me like a better default than 80 for a 3072 MB window cap on an 8 GB card in a 16 GB PC, if the blank screen does not come back; I have not changed anything for this. Same caveats as 26253: I have not tried other lines or a line that falls with the budget, nor 60 on a larger card.
GPUs tested: NVIDIA GeForce RTX 3070 8 GB, driver 621.47, Windows 11, profile M. No game data, logs or screenshots attached.
AI-assisted: Claude Code (Claude Opus 5.5); figures checked from the run records by a separate read-only Claude Opus 5.5 agent before posting.
Follow-up to my comment above (26702): the blank screen I could not explain there does not follow line 60. It came back in three later runs of the same save at line 80 (the default), all on
mainf4b0404e9: two at plain defaults and one that only added a profiling timeline. In all three, from the screenshot 360 s after control on, the picture was one flat frame in the colour of the title's own intro cards, while frames kept coming: the window title read 19 fps and 4,515 draws a frame during one of them. So 4 of the 32 runs I made on that save yesterday and today show it, on two builds and with and without the line-60 setting. I have not found its cause yet; I will open an issue if I do.GPUs tested: NVIDIA GeForce RTX 3070 8 GB, driver 621.47, Windows 11. No game data, logs or screenshots attached.
AI-assisted: Claude Code (Claude Opus 5.5); checked by a separate read-only Claude Opus 5.5 agent.