32:9 at 1080 lines: a 3840-wide output takes the display mode with it too #2404

Closed
github-bot wants to merge 3 commits from github-bot/gh-2404 into main AGit
Owner

@⁠Creaa on GitHub · 2026-11-29 12:45 UTC · original
Creaa:fix-3840x1080 → main · +100 −12 · 2 files · 3 commits · closed without merging

Stacked on #2210 (which is stacked on #2060); only the top commit belongs here.

On a 32:9 1080p monitor (3840x1080, as in #2260) the output follows the monitor's shape at 3840x1080. That is not wider than the stock 3840x2160 mode, so mode_for keeps the stock mode and the UI pool is sized for 2560x1440 targets. The title still crashes at start with the allocator's int3 at +0x56a2afd, the same crash #2210 fixes for 5120x1440. With this change, an output as wide as the stock mode (>= 3840) also gets its own mode, and the pool is sized for two targets of that size.

What is in it

  • apps/victory/src/native_1440p.rs: mode_for takes widths >= LEGACY_UI_WIDTH. Its comment now names 3840x1080, and ui_pool_size_matches_legacy_and_default_targets checks 3840x1080 and 2560x1080.

Tested (RTX 4070 12 GB, driver 617.14, i7-13700F, 32 GB, Windows 11 26300; main monitor 5120x1440; release build; scripts\play-foxhound.ps1 -FrameGen, Series X; each run: start + 45 s; sizes set with VICTORY_NATIVE_SIZE)

output #2210 97773007 this PR
3840x1080 crash 0x80000003 at +0x56a2afd starts
3840x2160 not run starts
5120x1440 starts starts
3440x1440 / 2560x1080 / 2560x1600 start 3440x1440 and 2560x1080 start; 2560x1600 not rerun
2560x1440 starts starts
  • I ran this PR at 3840x1080 on my 32:9 monitor and looked at it: the scene had the 32:9 shape, but the UI text is stretched sideways, as reported on #2210 for 5120x1440. This PR only stops the start crash; the UI stays as #2210 leaves it.
  • cargo test -p victory --bin victory native_1440p: 6 passed. With > restored the new assertion fails (1 failed).
  • cargo clippy -p victory --bin victory -- -D warnings: nothing in this file.

Not tested

  • A real 3840x1080 monitor (I forced the size on a 5120x1440 one). The UI was only looked at briefly, not in every menu, and no long play session was run. 3840x2160 on #2210 without this change was not run.
  • Other GPUs.

AI use

  • Claude Code (Claude Opus 5.5) found the case, wrote the change and the test, ran the runs and drafted this; I reviewed it.

🤖 Generated with Claude Code

**@⁠Creaa** on GitHub · 2026-11-29 12:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2404) `Creaa:fix-3840x1080` → `main` · +100 −12 · 2 files · 3 commits · closed without merging Stacked on #2210 (which is stacked on #2060); only the top commit belongs here. On a 32:9 1080p monitor (3840x1080, as in #2260) the output follows the monitor's shape at 3840x1080. That is not wider than the stock 3840x2160 mode, so `mode_for` keeps the stock mode and the UI pool is sized for 2560x1440 targets. The title still crashes at start with the allocator's `int3` at `+0x56a2afd`, the same crash #2210 fixes for 5120x1440. With this change, an output as wide as the stock mode (`>=` 3840) also gets its own mode, and the pool is sized for two targets of that size. **What is in it** - `apps/victory/src/native_1440p.rs`: `mode_for` takes widths `>= LEGACY_UI_WIDTH`. Its comment now names 3840x1080, and `ui_pool_size_matches_legacy_and_default_targets` checks 3840x1080 and 2560x1080. **Tested** (RTX 4070 12 GB, driver 617.14, i7-13700F, 32 GB, Windows 11 26300; main monitor 5120x1440; release build; `scripts\play-foxhound.ps1 -FrameGen`, Series X; each run: start + 45 s; sizes set with `VICTORY_NATIVE_SIZE`) | output | #2210 `97773007` | this PR | |---|---|---| | 3840x1080 | crash `0x80000003` at `+0x56a2afd` | starts | | 3840x2160 | not run | starts | | 5120x1440 | starts | starts | | 3440x1440 / 2560x1080 / 2560x1600 | start | 3440x1440 and 2560x1080 start; 2560x1600 not rerun | | 2560x1440 | starts | starts | - I ran this PR at 3840x1080 on my 32:9 monitor and looked at it: the scene had the 32:9 shape, but the UI text is stretched sideways, as reported on #2210 for 5120x1440. This PR only stops the start crash; the UI stays as #2210 leaves it. - `cargo test -p victory --bin victory native_1440p`: 6 passed. With `>` restored the new assertion fails (1 failed). - `cargo clippy -p victory --bin victory -- -D warnings`: nothing in this file. **Not tested** - A real 3840x1080 monitor (I forced the size on a 5120x1440 one). The UI was only looked at briefly, not in every menu, and no long play session was run. 3840x2160 on #2210 without this change was not run. - Other GPUs. **AI use** - Claude Code (Claude Opus 5.5) found the case, wrote the change and the test, ran the runs and drafted this; I reviewed it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fixes #2055.

With SDR_MODE kept at stock 3840x2160 (0c0d4662), the UI setup at 0x247AD10
always allocates 0x5DC0000 bytes (2x 3840x2160 legacy surfaces + 2x 2560x1440
UI targets) and asserts at 0x247AF25 that <= 0x1FFFFF bytes remain unused.
Scaling UI_POOL from width() x height() (#1808) left 0xC40000 unused on 21:9
(3440x1440 -> 0x6A00000, hitting int3 at 0x247AF2D) and under-allocated on
narrower shapes like 16:10 (2304x1440 -> 0x5C00000 < 0x5DC0000).

Keep UI_POOL sized from LEGACY_UI_WIDTH x LEGACY_UI_HEIGHT and DEFAULT
(2560x1440) via ui_pool_size() (0x5E00000) and add a unit test covering the
bound and both aspect-ratio regressions.
Ported from our 32:9 build (ba35d230, which ran in play at 5120x1440 on an
RTX 5080, Series X): with the SDR mode left stock, a 5120x1440 output is not
taken, the UI setup makes its two targets at 3840x2160 and the title's
allocator asserts (int3 at 0x56A2AFD). Where the output is wider or higher
than 3840x2160 (mode_for), the image's SDR mode is written to the output's
size and the runner reports the same mode (VICTORY_DISPLAY_MODE, read by
dxgi::display_size). The UI pool then holds two targets of the output's
size, as that build sized it; every output the stock mode holds keeps
#2060's fixed 0x5E00000.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a 3840x1080 monitor (#2260) the output follows its shape at 3840x1080.
That fits in the stock 3840x2160 mode, so mode_for left the mode stock and
the UI pool was sized for 2560x1440 targets; the title's allocator then
asserted at start (int3 at 0x56A2AFD), as 5120x1440 did before #2210.
An output as wide as the stock mode now takes its own mode as well, and the
pool holds two targets of its size.

Measured on an RTX 4070 with VICTORY_NATIVE_SIZE: 3840x1080 crashed at
+0x56a2afd on #2210 and starts with this; 3840x2160, 5120x1440, 2560x1440,
3440x1440 and 2560x1080 start with it too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 12:49:21 +00:00
Author
Owner

@⁠Kitrae on GitHub · 2026-11-29 19:04 UTC · original

Confirmed on a native 3840×1080 (32:9) monitor. I ported #2210 and this PR onto main (f889bb07), preserving the original commit authors. The branch applying cleanly to main is at ff46b3d9.

System: RTX 4090 (596.21), i9-14900KF, Windows 11 build 26200. Release build, fresh profiles, DLSS Quality, frame generation off, Series X with automatic monitor sizing for the native tests.

  • Official v2026.11.29.02 reproduced 0x80000003 at +0x56a2afd during System Init, frame 0, on two starts. Baseline details
  • The patched build reported a 3840×1080 display mode to the title and composited its first frame at 3840×1080 after about 3 seconds on both starts. It kept rendering until I ended each run.
  • The 2560×1440 Series X and 1920×1080 Series S startup controls both reached frame presentation. Six native_1440p tests passed, including the tests with a locally supplied retail image.

This was a startup test. I did not measure gameplay performance or inspect UI layout.

**@⁠Kitrae** on GitHub · 2026-11-29 19:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2404#issuecomment-7260989305) Confirmed on a native **3840×1080 (32:9)** monitor. I ported #2210 and this PR onto `main` (`f889bb07`), preserving the original commit authors. The [branch applying cleanly to main](https://github.com/Kitrae/VIctory-NVIDIA/tree/fix/ultrawide-startup) is at `ff46b3d9`. System: RTX 4090 (596.21), i9-14900KF, Windows 11 build 26200. Release build, fresh profiles, DLSS Quality, frame generation off, Series X with automatic monitor sizing for the native tests. - Official v2026.11.29.02 reproduced `0x80000003` at `+0x56a2afd` during System Init, frame 0, on two starts. [Baseline details](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/issues/2474) - The patched build reported a 3840×1080 display mode to the title and composited its first frame at 3840×1080 after about 3 seconds on both starts. It kept rendering until I ended each run. - The 2560×1440 Series X and 1920×1080 Series S startup controls both reached frame presentation. Six `native_1440p` tests passed, including the tests with a locally supplied retail image. This was a startup test. I did not measure gameplay performance or inspect UI layout.
github-bot closed this pull request 2026-11-30 03:37:15 +00:00
Author
Owner

@⁠Creaa on GitHub · 2026-11-30 03:35 UTC · original

Closing: main's 0ba02ea2 gives monitors below 1440 lines (3840x1080 included) a 2560x1440 output, which starts, so the case this PR fixed no longer happens on a real 3840x1080 monitor. Only a forced VICTORY_NATIVE_SIZE=3840x1080 still stops at +0x56a2afd.

**@⁠Creaa** on GitHub · 2026-11-30 03:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2404#issuecomment-7268020500) Closing: main's `0ba02ea2` gives monitors below 1440 lines (3840x1080 included) a 2560x1440 output, which starts, so the case this PR fixed no longer happens on a real 3840x1080 monitor. Only a forced `VICTORY_NATIVE_SIZE=3840x1080` still stops at `+0x56a2afd`.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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/trustno1-coder--VIctory-NVIDIA!2404
No description provided.