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

Open
Ahadfahim wants to merge 2 commits from upstream-pr/2409 into main
Ahadfahim commented 2026-11-29 12:49:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Ahadfahim on 2026-11-29T12:49:08Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5550862129 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2409). Originally posted by [Ahadfahim](https://github.com/Ahadfahim) on 2026-11-29T12:49:08Z. --- 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)
Dukestar69 commented 2026-11-29 13:06:58 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-29T13:06:58Z.

Review: APPROVED


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).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6103001949 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2409#pullrequestreview-6103001949). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-29T13:06:58Z. **Review:** APPROVED --- 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).
BonifacioJose commented 2026-11-29 13:16:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by BonifacioJose on 2026-11-29T13:16:09Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256412377 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2409#issuecomment-7256412377). Originally posted by [BonifacioJose](https://github.com/BonifacioJose) on 2026-11-29T13:16:09Z. --- Tested on a Widescreen monitor 3440x1440 and the .exe boots succesfully now
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2409:upstream-pr/2409'
git switch 'upstream-pr/2409'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2409'
git switch 'upstream-pr/2409'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2409'
git switch 'upstream-pr/2409'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2409'
git switch 'main'
git merge --squash 'upstream-pr/2409'
git switch 'main'
git merge --ff-only 'upstream-pr/2409'
git switch 'main'
git merge 'upstream-pr/2409'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!2409
No description provided.