1440p output: UI pool sized for 2560x1440 targets at every output size (start crash on non-16:9 monitors) #2409

Open
github-bot wants to merge 2 commits from github-bot/gh-2409 into main AGit
Owner

@⁠Ahadfahim on GitHub · 2026-11-29 12:49 UTC · original
Ahadfahim:fix/ultrawide-ui-pool → main · +19 −7 · 1 files · 2 commits · open

Fixes the start crash on non-16:9 monitors: 0x80000003 at victory-image-…+0x247af2d in System Init, frame 0 (#2260, #2339, #2391).

Cause

Since the output follows the monitor's shape (8e81b84c / #1808), the UI pool in the title's UI setup (UI_POOL, 0x247AD4A) was sized for UI targets of the output size. The title's setup then asserts that no more than 0x1FFFFF of the pool is left over (0x247AF25), and it uses the same amount of the pool whatever the output size:

Output UI pool before Used by the title Left over Result
2560x1440 94 MiB (0x5E00000) 93.75 MiB 0.25 MiB starts
3440x1440 106 MiB 93.75 MiB 12.25 MiB (rax = 0xC40000, as in #2260) int3
3024x1440 (#2391) 100 MiB 93.75 MiB 6.25 MiB int3

This also explains #2391's finding that rounding the width to 16 px didn't help.

Fix

The UI pool is now the 2560x1440 one (0x5E00000) for every output size (ui_pool_bytes). Nothing else changes: the output still follows the monitor, and VICTORY_NATIVE_SIZE still sets it.

Testing

Tested on a 3440x1440 main monitor with an RTX 5080 (16 GB), retail 1.0.2.1 and 829188e9, without VICTORY_NATIVE_SIZE:

  • Before: the crash on every start (also with a fresh cache).
  • After: the title's UI pool allocation is 94 MB (it was 106 MB). It starts and reaches gameplay with no exception.
  • Tests:
    • New the_ui_pool_is_the_same_for_every_output_size passes.
    • patches_the_retail_image_for_1440p passes with the retail image (VICTORY_DISPLAY_PROFILE_TEST_IMAGE). It needs VICTORY_NATIVE_SIZE=2560x1440 on a non-16:9 machine, since it expects the 16:9 size. Without that it fails the same way on main.

Not fixed here, seen in the same test: at 3440x1440, the right part of the picture (about the last quarter) was not drawn in my first two minutes, on a cold shader cache. It showed dark and stale with ghosting. VICTORY_NATIVE_SIZE=2560x1440 gives a correct picture. So the monitor-shaped output may need more work beyond this start crash. Making 2560x1440 the default again until it does, as #2391 suggests, may be worth considering.

🤖 Generated with Claude Code

**@⁠Ahadfahim** on GitHub · 2026-11-29 12:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2409) `Ahadfahim:fix/ultrawide-ui-pool` → `main` · +19 −7 · 1 files · 2 commits · open Fixes the start crash on non-16:9 monitors: `0x80000003` at `victory-image-…+0x247af2d` in System Init, frame 0 (#2260, #2339, #2391). ## Cause Since the output follows the monitor's shape (8e81b84c / #1808), the UI pool in the title's UI setup (`UI_POOL`, `0x247AD4A`) was sized for UI targets of the output size. The title's setup then asserts that no more than `0x1FFFFF` of the pool is left over (`0x247AF25`), and it uses the same amount of the pool whatever the output size: | Output | UI pool before | Used by the title | Left over | Result | |---|---|---|---|---| | 2560x1440 | 94 MiB (`0x5E00000`) | 93.75 MiB | 0.25 MiB | starts | | 3440x1440 | 106 MiB | 93.75 MiB | 12.25 MiB (`rax` = `0xC40000`, as in #2260) | `int3` | | 3024x1440 (#2391) | 100 MiB | 93.75 MiB | 6.25 MiB | `int3` | This also explains #2391's finding that rounding the width to 16 px didn't help. ## Fix The UI pool is now the 2560x1440 one (`0x5E00000`) for every output size (`ui_pool_bytes`). Nothing else changes: the output still follows the monitor, and `VICTORY_NATIVE_SIZE` still sets it. ## Testing Tested on a 3440x1440 main monitor with an RTX 5080 (16 GB), retail 1.0.2.1 and `829188e9`, without `VICTORY_NATIVE_SIZE`: - **Before:** the crash on every start (also with a fresh cache). - **After:** the title's UI pool allocation is 94 MB (it was 106 MB). It starts and reaches gameplay with no exception. - **Tests:** - New `the_ui_pool_is_the_same_for_every_output_size` passes. - `patches_the_retail_image_for_1440p` passes with the retail image (`VICTORY_DISPLAY_PROFILE_TEST_IMAGE`). It needs `VICTORY_NATIVE_SIZE=2560x1440` on a non-16:9 machine, since it expects the 16:9 size. Without that it fails the same way on `main`. **Not fixed here, seen in the same test:** at 3440x1440, the right part of the picture (about the last quarter) was not drawn in my first two minutes, on a cold shader cache. It showed dark and stale with ghosting. `VICTORY_NATIVE_SIZE=2560x1440` gives a correct picture. So the monitor-shaped output may need more work beyond this start crash. Making 2560x1440 the default again until it does, as #2391 suggests, may be worth considering. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Since the output follows the monitor's shape (8e81b84c / #1808), the UI pool
was sized for UI targets of the output size: 106 MiB at 3440x1440, 100 MiB
at 3024x1440. The title's UI setup took the same 93.75 MiB of it as at
2560x1440 and asserts that no more than 0x1FFFFF is left over (0x247AF25):
12.25 MiB (rax 0xC40000) or 6.25 MiB were, and the title stopped itself in
System Init with 0x80000003 at +0x247af2d (#2260, #2339, #2391).

The pool is now the 2560x1440 one (0x5E00000) for every output size.

Tested on a 3440x1440 monitor, RTX 5080, retail 1.0.2.1, without
VICTORY_NATIVE_SIZE: before, the crash every start; after, the title's
XMem pool is 94 MB, it starts and reaches gameplay. The image test
(VICTORY_DISPLAY_PROFILE_TEST_IMAGE, with VICTORY_NATIVE_SIZE=2560x1440 since
it expects a 16:9 size) and the new pool test pass.

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:24 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-29 13:06 UTC · original · approved these changes

Tested locally merged onto main (829188e9).

  • Merge: Clean merge in apps/victory/src/native_1440p.rs.
  • Tests: cargo test -p victory --bin victory native_1440p passed (6 passed; 0 failed, including the new the_ui_pool_is_the_same_for_every_output_size test) with 0 new warnings.

Clean fix preventing non-16:9 monitor UI pool under-sizing crashes. LGTM.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-29 13:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2409#pullrequestreview-6103001949) · **approved these changes** Tested locally merged onto `main` (`829188e9`). - **Merge**: Clean merge in `apps/victory/src/native_1440p.rs`. - **Tests**: `cargo test -p victory --bin victory native_1440p` passed (`6 passed; 0 failed`, including the new `the_ui_pool_is_the_same_for_every_output_size` test) with 0 new warnings. Clean fix preventing non-16:9 monitor UI pool under-sizing crashes. LGTM. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠BonifacioJose on GitHub · 2026-11-29 13:16 UTC · original

Tested on a Widescreen monitor 3440x1440 and the .exe boots succesfully now

**@⁠BonifacioJose** on GitHub · 2026-11-29 13:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2409#issuecomment-7256412377) Tested on a Widescreen monitor 3440x1440 and the .exe boots succesfully now
main already sizes the UI pool for 2560x1440 UI targets at every output
size (33e9fed2, #2055). Keep main's code and comment; this branch now only
adds ui_pool_bytes() and a test pinning it to 0x5E00000, and moves the
retail-image doc comment back onto the test it describes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2409/head:github-bot/gh-2409'
git switch 'github-bot/gh-2409'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2409'
git switch 'github-bot/gh-2409'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2409'
git switch 'github-bot/gh-2409'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2409'
git switch 'main'
git merge --squash 'github-bot/gh-2409'
git switch 'main'
git merge --ff-only 'github-bot/gh-2409'
git switch 'main'
git merge 'github-bot/gh-2409'
git push origin 'main'
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!2409
No description provided.