d3d12: fix oversized HUD and menus at native 1440p #3124
Closed
github-bot
wants to merge 3 commits from
github-bot/gh-3124 into main
AGit
pull from: github-bot/gh-3124
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!3124
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3124"
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?
@Rulemore on GitHub · 2026-12-02 12:35 UTC · original
Rulemore:fix/native1440-ui-v2→main· +293 −36 · 2 files · 3 commits · closed without mergingClaimed in the coordination issue as D3D12-NATIVE1440-LEGACY-UI.
Replaces #3014, which was closed after
hooks.rsdiverged frommain. Related output-planner work in #2889 and #2958 may need conflict resolution when combined. This patch can land independently.What and why
On Series X at native 2560×1440, the game lays out 4K-authored HUD and menu elements on a 1440p stage, making them about 1.5 times too large. Restore the legacy 3840×2160 UI layout from DexNom/VIctory via VIctory-NVIDIA, while keeping render and output resolution at 2560×1440 for the native profile. The settings copy enables legacy UI and sets the layout and output sizes. The 94 MiB UI pool holds two 4K layout surfaces and two 1440p targets.
The loader checks the original settings-copy site and trampoline padding and stages all page permissions before writing the patch group. The port retains the current Series S budget handling, the optional FSR maximum-scale behavior, and the separate mode-table path for other output sizes.
docs/ultrawide.mddescribes the two paths.Tested
mainand passes with this change.cargo test --locked -p leonida-loader --libpassed all 96 tests on Windows, including verification against the supported 1.0.2.1 image and tests of the Series S budgets and FSR levers.git diff --checkpassed.GPUs tested in #3014: NVIDIA GeForce RTX 4070 SUPER, driver 617.14, Windows 11 build 26200. No GPU run on this revision.
AI-assisted: OpenAI Codex (GPT-6.2 Sol) for the update and GPT-6.2 Sol in a separate read-only review. Both review findings were addressed and rechecked.
Checklist
main(f45165e15).@Kal0s-design on GitHub · 2026-12-02 12:55 UTC · original
Ran natively on Windows 11, head
64600ef0cmerged into currentmain(23a51c494, newer than thef45165e15base in the description; the merge was clean), debug build with overflow checks on.d3d12/)cargo test --locked -p leonida-loader --lib(debug)cargo test --locked -p leonida-loader --lib --releasecargo clippy --locked -p leonida-loader --libcargo clippy --locked -p leonida-loader --lib --testsI had no game image here, so
the_resolution_places_are_in_the_retail_executableprintedSKIP: LEONIDA_GAME_DIR is not setand counts as a pass. The settings-copy hash, the 590xccbytes at0x55ff285and the reservation bytes are therefore checked only by your run against the 1.0.2.1 image.What I added: the new
apply_alltests mockVirtualProtect, so I ran the realapply_allon pages fromVirtualAlloc, withVirtualQuerybefore and after (throwaway tests, not committed).main(23a51c494)Both writes land and the function returns 2. The cause is that staging calls
VirtualProtecton the first member, which turns page 1 RWX. The crossing member is staged next, and theoldit gets back is the protection of its first page, now RWX. In the reverse restore that member puts pages 1 and 2 back to RWX, and the first member then puts only page 1 back to RX. Onmaineach patch restores right after its own write, so the same layout ends RX on all three pages. The failure path (a laterwritablefailing) restores the same way, so it has the same issue.None of the groups in the tree today has a member that crosses a page. The native group is
0x247ad4a+5,0x55ff285+59 and0x1d70b98+11, and the experimental output and Series S groups don't cross either. So this is latent. The comment above the restore loop says reverse order handles shared pages, though, and that holds only for members inside one page. Staging per page would close it: collect the distinct pages of the group,VirtualProtecteach page once, remember each page's own old value, and restore those.Other checks:
vmovdqu [rsi+0x638], ymm0,mov byte [rsi+0x638], 1,mov rax, 0x00000870_00000f00stored at+0x63c,mov rax, 0x000005a0_00000a00stored at+0x654,vzeroupper, thenjmp. That's 57 bytes plus two0xccof padding. The jump into the cave from0x1d70b98lands on0x55ff285, and the jump back at0x55ff2b9lands on0x1d70ba3, the end of the 11-byte site. The three members don't overlap.scanout_pool_bytes(3840, 2160) + scanout_pool_bytes(2560, 1440)(64 + 30 MiB) and is 2 MiB aligned. The test could compute it that way instead of hard-coding94 << 20.Not checked: the game; the bytes against the retail image (no image here); whether
raxis free at0x1d70ba3, since the cave overwrites it with no save/restore; and the 8-byte store at+0x654, which ends 4 bytes past the 32 bytes the originalvmovdquwrites (+0x638..+0x658). Both need the disassembly around the site.GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).
@lixonik on GitHub · 2026-12-02 14:59 UTC · original
Verified PR #3124 (
64600ef0c) merged cleanly ontomain(acc350745) on Windows 10 x64 (Rust 1.98.1):python -I scripts/check_no_game_data.pyPASS.cargo test -p leonida-loader --lib --locked-- 96 passed, 0 failed (includinghooks::tests::native_1440_keeps_the_legacy_ui_stageandhooks::tests::native_ui_trampoline_sets_layout_and_output_and_returns_after_the_copy).Verdict: PASS (CPU/unit tests only; no game launch).
AI-assisted: yes (Antigravity).
@MoonEyes on GitHub · 2026-12-02 18:18 UTC · original
Verification of #3124 (third party, code review on Linux; not built: Windows-only
leonida-loader)64600ef0c8403ec1f4816d7edf12da28bd309a3e(2 files:leonida-loader/src/hooks.rs+273/-36,docs/ultrawide.md).f45165e15.git merge-tree --write-tree origin/main pr/3124againstmain45dc41f95is clean(104 commits behind).
python -I scripts/check_no_game_data.pyon both files: exit 0. The patch carries a BLAKE3 hash of the 11original bytes at
SETTINGS_COPY, plus the re-emitted 8-bytevmovdquandvzeroupperin the cave. That isthe same "expected bytes" convention the other hook groups in
hooks.rsalready use. No game data beyond that.git merge-tree pr/3124 pr/2889conflicts inhooks.rs. Both changeoutput_patches. The bodynotes this.
Review
(1.5x too large). The fix keeps the mode row and Settings viewport stock. A trampoline at every settings copy
(
native_1440_patches,hooks.rs:181-224) sets the legacy-UI flag, a 3840x2160 UI size and a 2560x1440output, and the scanout pool grows to 94 MiB for both surface pairs. This is a root-cause fix for the UI scale.
vmovdqu [rsi+0x638], ymm0= 8, plusvzeroupper= 3). The cavereplays both, so nothing of the original is lost. The
jmpback is computed fromcode.len()before the0xccfill. The cave is checked as 59 bytes of
0xccbefore it is written. I found no defects here.native_1440p.rs(GPL-3.0-or-later), and therepository is GPL-3.0-or-later. That is compatible. Pin the source commit, as
runtime/shims/xg_xs_THIRD_PARTY.mddoes for VIctory, so the provenance can be checked.
apply_allbecomes an all-or-nothing transaction for every hook group(
apply_all_with: overlap check, stagedVirtualProtect, re-validation, rollback). It is well built andtestable through injected closures, but it changes how render-scale, FSR and max-step groups apply. CONTRIBUTING
asks for one topic per pull request. Either split it out or say in the body why the native profile needs it.
hooks.rs:591replaces thewarn!"experimental, the title's largest output mode ischanged" with an
info!for all sizes. Sizes other than 2560x1440 are still experimental (the doc commentsays so), so keep the warning for them.
native_1440_keeps_the_legacy_ui_stageand the transaction tests ran natively for Kal0s-design(96 passed) and lixonik.
Process
Verdict: defects (minor). Restore the experimental warning for non-1440 sizes, pin the VIctory source commit,
and split out or justify the
apply_alltransaction change. Coordinate thehooks.rsmerge with #2889.AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@EdenBendheim on GitHub · 2026-12-02 21:01 UTC · original
RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch) — PASS covering exact head
64600ef0c8403ec1f4816d7edf12da28bd309a3e(merged cleanly ontomainb41763227; note PR currently shows a merge conflict against newermain).git merge --no-ffontomainb41763227(diagnostics,dlss,mimalloc,exe_sha16 = c47eeb717f761d9d; changed-file clean-room scan exit0; workspace test targets compiled).14PRs):#3200d1a91afd1,#319880a627bb1,#319193b47ac9d,#3189c182fc392,#3176ae0075d9a,#3168337388052,#31641065952da,#3146ebc0253ff,#312464600ef0c,#3069311d33a40,#30318df1bfce7,#3029e49404808,#3054ff53fd8b9,#3010d645712a3.610.88, Series X profile, native2560x1440,-NoFrameGen,scripts/game-gate.ps1(301.3 sin world) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (GATE CONTROL moved=2.51 m,max_from_ctrl=5,053.9 m).c47eeb717f761d9d)mainb41763227baseline (cf499737bf684f6a)clean,0reasons,0warnings)clean,0reasons,0warnings)301.3 s(4,504frames)305.6 s0/0/00/0/020.10 FPS/69.76 ms19.13 FPS/74.01 msVerdict: PASS for the 300 s native 1440p stability gate on
64600ef0c(visual HUD sizing was not separately inspected in screenshots; once rebased onto currentmain, the new head will need a fresh run).(AI-assisted verification:
gemini-4-neon+gpt-6.2-astra.)@fiestorra on GitHub · 2026-12-02 23:21 UTC · original
VERIFY-3124 — Windows nativo: la suite del
loaderpasa, y el guardián que queda es el que se queda64600ef0c—leonida-loader/src/hooks.rs(−13),docs/ultrawide.md(2 lines)Ran
What the change is: it removes
native_1440_patch_guards_match_the_supported_image— a test that only ran withLEONIDA_GAME_DIRset to the user's own image and returned silently when it was not — and clarifies one line ofdocs/ultrawide.md("the old mode-row implementation ofLEONIDA_OUTPUT_1440").The thing I checked before nodding at a deletion: the guard does not disappear, it is deduplicated.
hooks.rs:1001keeps the env-gated retail check, and it printsSKIP: LEONIDA_GAME_DIR is not setinstead of returning quietly — which is the difference between a test that did not run and a test that looks like it passed. That is the same distinction half of my reviews tonight have been about.So:
red not constructible— nothing here adds behaviour, and the check that remains is the same one, run through the profile it names. What a deletion like this costs is the thing to state plainly: the removed copy never ran in CI either (noLEONIDA_GAME_DIRthere), so nothing that was being verified stopped being verified. What it did run on was an author's machine, twice, for the same answer.What I could not test
LEONIDA_GAME_DIRis not set here, so the kept test printed its SKIP line — the only machine that can run it is one with the Xbox package.Written with an AI assistant.
@fiestorra on GitHub · 2026-12-03 01:34 UTC · original
Correction: this is not a small dedupe — it is three commits and 293 added lines, and my earlier review read only the top one
When I verified this pull request I read the commit
git log --first-parentshowed me (64600ef0c, "keep one retail guard test") and ran the loader's suite — 96 tests, green. The branch is three commits:So the file that conflicts with
mainishooks.rs, and the conflict is not in the test I read — it is in theVirtualProtect/copy_nonoverlappingloop that makes a batch of patches writable or none of them, which is what the third commit reworks.git rebase origin/mainstops there, and I am not resolving it: it is 293 lines of someone else's hooking code that I have not read, and a resolution I invented would be the least verified thing I could put in this queue.What this corrects in my record: my verification covered the top commit and the loader's test suite, and I presented it as "the change" — for a three-commit branch that is the same mistake I flagged in
#3128an hour ago. The suite being green is still true (96 tests on the branch's head), but it is green for all three commits, not the one I described.What the whole branch is for, from the messages: the native 1440p output with the legacy UI layout draws an oversized HUD (
hooks.rs,docs/ultrawide.md), and the top commit tidies the retail guard test that proves it and clarifies the doc's historical probe. That is a real bug with a real fix, and it deserves a review of the 293 lines — which is what it has not had from me.A note for the queue: of the seven pull requests that conflict after
#3247, four are stacks (#3124here,#3128,#3253which I rebased, and#3115), and in three of them the conflict is in a commit that a reviewer would not reach by looking at the top.Depends on:in the description is the only thing that makes that visible from the outside, and none of the four says it.Written with an AI assistant.
@MoonEyes on GitHub · 2026-12-03 07:01 UTC · original
This pull request has a merge conflict with current
main(d9b618f10), so it can't be run in game or merged as it is. Could you merge the latestmaininto it (or rebase onto it) and resolve the conflict? Once the head is updated, the in-game gate run can be done on the new head.AI-assisted (Claude Code).
@MoonEyes on GitHub · 2026-12-03 18:02 UTC · original
Thanks for the work on this. This pull request has a merge conflict with the current
mainand has had no new commit, comment or review for more than 5 hours, so I am closing it to keep the list of open pull requests manageable. This is not a judgement of the change. Whenever you like, merge the latestmaininto your branch, resolve the conflict, and reopen it (or open a new pull request that links this one). Please re-run the relevant tests on the new head; a reviewer will look at it when time allows, with no guarantee of timing or outcome.Generated by Claude Code
Pull request closed