gpu: 8 GB over-budget guard, profile and page-pool prototype #2658
Closed
github-bot
wants to merge 1 commit from
github-bot/gh-2658 into main
AGit
pull from: github-bot/gh-2658
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
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
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2658
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2658"
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?
@olgundemirkan on GitHub · 2026-11-29 23:14 UTC · original
olgundemirkan:pr/8gb-memory→main· +535 −36 · 9 files · 1 commits · closed without mergingClaimed in coordination issue as: n/a — draft for review; I can split it if the page-pool prototype should be separate.
Depends on: none.
Fixes: none.
What and why
This is the 8 GB memory work from testing the D3D12 runtime on an RTX 3060 Ti
8 GB / 16 GB RAM PC. It has four parts, and only the first two are meant for
play today:
resource.rsover-budget guard.room()now refuses new host copieswhile Windows reports the card over its DXGI budget, even when a
LEONIDA_TEXTURE_BUDGET_MBis set. The 8 GB profiles set that budget, so theold order kept adding copies at 7.8 GB of a 7.25 GB budget until the driver
faulted.
scripts/play-8gb.ps1. The measured 540p profile: title upscaler, noDLSS and no frame generation, texture budget 4000 MB, staging 1024 MB, card
buffers 1024 MB, 512 MB of title-memory windows, page writes 262, heap
recheck 120.
LEONIDA_PRELOAD_DLLS(preload.rs+ loader/app call). Loadsuser-supplied DLLs before the GPU is made. Off unless set; no DLLs are in
the repository.
inplace.rs,port.rs,shadow.rs).LEONIDA_PORT_CONSTANTS=2, off by default, gathers the 64 KiB pages of apage-pool window into one view of ours and opens it as a host heap, so the
card reads the title's bytes without a PC copy. This is the part that needs
review: it is not ready — the gathered view currently fails with
MapViewOfFile3os error 487 on many windows, and only 4 MB of 4,780 MB ofwindows were placed in the test run. The usable parts are 1 and 2.
The full measurements and the failed paths are in
d3d12/docs/8gb-memory-2026-11-30.md.Tested
The remaining crash is the 8 GB VRAM + WDDM shared-memory wall, not a missing
HRESULT check. A debug-layer/full-DRED run found no failed
Create*and noseverity=3message before the device was removed.GPUs tested: NVIDIA RTX 3060 Ti 8 GB, driver 621.40, Windows 11 26H2, Ryzen 5
5600, 16 GB RAM.
AI-assisted: yes — the code changes, the measurements and this text were done
with an AI agent and checked by hand. No game data or DLLs are included.
Checklist
main(c139ba1c8) and merges cleanly.split into a separate PR if preferred.
@merzleckeier on GitHub · 2026-11-29 23:26 UTC · original
I reviewed
52cc2580con GitHub merge33ac52e6into452d1d1b6.inplace.rs:323withE0277andE0308. Main changedsectionsfrom a vector toBTreeMap<usize, (u64, bool)>. Replacing the body ofsection_byteswithviews().sections.get(§ion).map(|&(bytes, _)| bytes)let the Win64 diagnostics test build complete locally.room()allowed copies on main at and above the reported DXGI budget. The PR refused them at both points and allowed them again below the budget. This repeated in 3/3 runs with the 4000 MiB texture cap and 3/3 with the cap unset. A missing DXGI sample retained the previous decision in these cases.VirtualQueryalso showed the unsplit range still reserved after the failure.gather_regionneeds to split the placeholder and release reserved ranges and partial mappings on error. The probe covers the Win32 mapping step. MapViewOfFile3 sizing requirement · Placeholder splittingplay-8gb.ps1resolved 540p with the title upscaler and also emittedLEONIDA_FRAME_GEN=2. RTX 3060 Ti and RTX 4060 Ti without Streamline left it off in three runs each. Adding-NoFrameGento the wrapper suppressed the clean initial launch, but the generated F1 command dropped it on this base. Replaying the F1 arguments also dropped the texture budget and staging settings and restored 3072 MiB of windows in place of the profile's 512 MiB. The emitted command omits-More.Win64 probes under Wine 11.22 and launcher dry runs under PowerShell 7.4.21 with synthetic inputs. AI-assisted with OpenAI Codex.
@merzleckeier on GitHub · 2026-11-29 23:35 UTC · original
Follow-up on the F1 loss of the 8 GB profile's
-Morevalues. I prepared a shared launcher fix onmain452d1d1b6. The launcher passes the explicit overrides through the environment as serialized data and applies them with their original precedence when F1 relaunches. A fresh start reads its own arguments and saved settings. Claim · Tested branchda729f60MEASURED. The regression failed at both restart stages in all three runs on main and passed all three on the fixed branch. In local integration tree
0eebd274, which includes this PR plus #2626 and #2647, the actualplay-8gb.ps1kept all 11 overrides across F1 replay in 3/3 runs, including 4000 MiB for textures, 1024 MiB for staging and 512 MiB for windows. The Motion Blur and-NoFrameGenlauncher tests passed on that tree.PowerShell 7.4.21 on CachyOS, mocked CIM/SDK presence, dry runs only. AI-assisted with OpenAI Codex.
@merzleckeier on GitHub · 2026-11-30 00:10 UTC · original
Native Windows follow-up for the 8 GB F1 restart with the
-Morefix. Windows Actions job and logs.play-8gb.ps1 -DryRunthree times each under Windows PowerShell 5.1 and PowerShell 7.6. Each start was followed by two newpowershell.exeprocesses invoked with the launcher’s emitted restart arguments.-Moreoverrides, including the 4,000 MiB texture budget, 1,024 MiB staging limit, and 512 MiB upload window. The 0.5 render scale and title upscaler flag also survived both restarts.-More, NoFrameGen, and MotionBlur launcher tests passed on the same run.The test combined this PR with #2626, #2647, and the fix above. It exercised the restart command and environment handoff on native Windows using a synthetic executable path in DryRun mode.
@aslan2142 on GitHub · 2026-12-01 11:15 UTC · original · reviewed
Thanks for the 8 GB prototype and measurements. This PR is still a draft and currently has merge conflicts with
main; as @merzleckeier also measured,d3d12/crates/leonida-gpu/src/inplace.rs:323no longer compiles againstmain'sBTreeMap-basedsections, and the F1 restart-Morepreservation issue needs to be addressed. Please rebase ontomain, fix theinplace.rscompilation againstBTreeMap, ensure the newd3d12 (windows-latest)CI check passes, and mark ready when finalized.(AI-assisted review.)
@MoonEyes on GitHub · 2026-12-02 11:50 UTC · original · edited 2026-12-02 11:51 UTC
Closing: this pull request no longer applies to current
main(merge conflict ind3d12/crates/leonida-loader/src/lib.rs), and open pull requests that have fallen out of step withmainare being closed so the list stays workable. If you still want this change, rebase it on currentmainand reopen it (or open a new pull request); it will be looked at again.AI-assisted (Claude Code).
Pull request closed