native_1440p: size UI pool for 16:9 targets and keep taller screens 16:9 #2524
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2524"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Pietr on 2026-11-29T13:51:20Z.
[pr-fix] Fixes #2339, #2391
What it changes
Fixes the immediate
0x80000003(int3) crash at+0x247af2d(0x247AF25UI pool slack check) inSystem Init, frame 0 on non-16:9 monitors and non-1440p output sizes:UI_POOL(0x247AD4A) from the 16:9 UI target size (ui_target_size/ui_pool_bytes):2560x1440and wider outputs (3024x1440,3032x1440,3440x1440,5120x1440), the title allocates2 * 3840x2160(0x3FC0000) +2 * 2560x1440(0x1E00000) =0x5DC0000, so the pool is0x5E00000(94 MiB,0x40000unused<= 0x1FFFFF).1920x1080and1920x1200, the title allocates2 * 3840x2160(0x3FC0000) +2 * 1920x1080(0x10E0000) =0x50A0000.1920x1200(#2339), sizing for1920x1200produced0x5400000(84 MiB), leaving0x360000unused (rax = 0x360000 > 0x1FFFFFat+0x247af2d).0x5E00000(94 MiB) fixes ultrawide, but would still leave0xD60000 > 0x1FFFFFunused and crash on1920x1080and1920x1200.ui_target_size(output)gives0x5200000(82 MiB,0x160000unused<= 0x1FFFFF).w * 9 < h * 16, e.g.1920x1200,2560x1600) on 16:9 infor_monitor:(1920, 1080)on1920x1200and(2560, 1440)on2560x1600(explicitVICTORY_NATIVE_SIZEoverrides still work).How it was tested
0x80000003atvictory-image-b99f876b74d4a77f.dll+0x247af2d(rax 0x360000) right after the 84 MB0x5400000XMemVirtualAllocinSystem Init, frame 0System Initcargo test -p victory --lockedpassed: yes (79 unit tests + 1cache_paths+ 2census, including updatedthe_output_follows_the_monitor_shapeand newui_pool_size_fits_within_assert_slack_for_all_output_shapes)cargo clippy --no-deps -p victory --all-targets --locked -- -D warningspassed: yescargo xtask policy --stagedpassed: yesChecked for overlap
0x5E00000pool for every output size, which resolves ultrawide but does not cover1920x1080/1920x12000x50A0000allocations).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-29T21:41:21Z.
The crash logs from v2026.11.29.01 say the title picks its two UI targets by the output's width alone: the largest of 3840x2160, 2560x1440, 1920x1080 and 1600x900 that is no wider than the output, whatever the output's height. The rule here (16:9 inside the output, capped at 2560x1440) agrees with that on 1440-high outputs 2560 to 3839 wide, and at 1920x1200. On outputs lower than 1440 and wider than 16:9 it makes the pool too small, and main starts those today.
What the title made. v2026.11.29.01 sized the pool from the output, so what was left over (or what ran out) gives the targets. The two 3840x2160 legacy surfaces take 0x3FC0000; a 64 KiB tile is 128x128 RGBA8 pixels.
2288x960 and 1696x1064 are what a 3440x1440 and a 2560x1600 desktop at 150 % scaling give on main (the process is not DPI aware yet).
The three rules side by side. These are worked out from the table above. Only the entries marked "measured" were run.
33e9fed2, 0x5E00000 always)VICTORY_NATIVE_SIZE=1920x1080f72cec77, see #2210)2288x960 and an asked 1920x1080 got past the UI setup on v2026.11.29.01. On main they should now stop at the left-over check. Nobody has reported that yet on .02 to .04.
Picking the targets by width fits every row:
With that, the
for_monitorchange here is no longer needed for the start. Whether a 16:10 desktop gets 1920x1200 or 1920x1080 is then a picture choice. For outputs 3840 or more wide, #2210 and #2404 write the display mode to the output's size, and the title then makes targets of the output's size. If those go in, the pool there should follow them, not this rule. With the stock mode, the 3840x2160 step gives a pool that fits, but nobody has tested whether the title then plays at 5120x1440. Below 1600 wide (the 1280x720 step) is not measured.There is a reference version in Lyrnc/VIctory-NVIDIA 0c10c823 (branch
fix/startup-ui-pool), with a test that checks the pool against each measured row. It needs one fix: its doc table gives 94 MiB for the 5120x1440 row, but #2292's log shows 0x7C00000 (124 MiB). It has not been tested in game, andcargo testwas not run on it. The branch's first commit, 057248a3 by cansevenhalim0-ui, made 2560x1440 the default output again, as #2526 does. Main kept the monitor's shape, so that commit is not part of this. I can open the width rule as its own PR if you would rather keep this one as it is.AI use: Claude Code (Claude Opus 5.5) read the crash and play logs, worked out the pool sizes and wrote the commit and this comment.
🤖 Generated with Claude Code
Pull request closed