native_1440p: a 32:9 output (5120x1440) takes the display mode with it (on top of #2060) #2210

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

@⁠kanade333 on GitHub · 2026-11-29 10:35 UTC · original
kanade333:32-9-display-mode → main · +90 −12 · 2 files · 2 commits · open

On a 32:9 monitor the output follows the monitor's shape since #1808 (5120x1440), but the image's SDR mode stays the stock 3840x2160. The title does not take an output wider than that mode. Its UI setup then makes its two UI targets at 3840x2160, four surfaces of 0x1FE0000, and the title's allocator asserts (int3 at 0x56A2AFD) during System Init. #2060 fixes 21:9 and 16:10, whose outputs fit in the stock mode. A 5120-wide output does not fit in it.

This builds on #2060 (its commit is the first of the two here; merge #2060 first):

  • mode_for(output): where the output is wider or higher than 3840x2160, the image's SDR mode is written to the output's size, as Kemerd/VIctory-NVIDIA-RT 685f4c08 does for wide sizes. The runner reports the same mode to the title through VICTORY_DISPLAY_MODE, which dxgi::display_size already reads.
  • ui_pool_size(output): for such an output the UI pool holds two targets of the output's size. Every output that fits in the stock mode (16:9, 21:9, 16:10) keeps #2060's fixed 0x5E00000. The test checks both cases.

Tested on an RTX 5080 16 GB (driver 621.40), a Ryzen 9 9950X with 32 GB and Windows 11 26200, with my own dump of 1.0.2.1 on a 5120x1440 monitor. Profile: Series X, DLSS ultra performance, frame generation 2X, no ray tracing.

  • Without this commit (main 829188e + #2060): the display mode reported is 3840x2160, and the title stops 6 s after the start with unhandled exception 0x80000003 at victory-image+0x56a2afd, the allocator's assert under the UI setup.
  • With it: starts and plays at 5120x1440, in five sessions of about 6 minutes each, with no crash and no TDR.
  • cargo test --release -p victory native_1440p: 6 passed. The tests that need the retail image return early without VICTORY_DISPLAY_PROFILE_TEST_IMAGE.

On a 16:9, 21:9 or 16:10 monitor nothing changes: mode_for returns None, the mode stays stock and the pool keeps #2060's size.

The UI is still laid out at the 16:9 legacy size and stretched across the 32:9 picture. Keeping it in a 16:9 band in the middle would be a separate change.

🤖 Generated with Claude Code

**@⁠kanade333** on GitHub · 2026-11-29 10:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2210) `kanade333:32-9-display-mode` → `main` · +90 −12 · 2 files · 2 commits · open On a 32:9 monitor the output follows the monitor's shape since #1808 (5120x1440), but the image's SDR mode stays the stock 3840x2160. The title does not take an output wider than that mode. Its UI setup then makes its two UI targets at 3840x2160, four surfaces of 0x1FE0000, and the title's allocator asserts (`int3` at `0x56A2AFD`) during System Init. #2060 fixes 21:9 and 16:10, whose outputs fit in the stock mode. A 5120-wide output does not fit in it. This builds on #2060 (its commit is the first of the two here; merge #2060 first): - `mode_for(output)`: where the output is wider or higher than 3840x2160, the image's SDR mode is written to the output's size, as Kemerd/VIctory-NVIDIA-RT 685f4c08 does for wide sizes. The runner reports the same mode to the title through `VICTORY_DISPLAY_MODE`, which `dxgi::display_size` already reads. - `ui_pool_size(output)`: for such an output the UI pool holds two targets of the output's size. Every output that fits in the stock mode (16:9, 21:9, 16:10) keeps #2060's fixed `0x5E00000`. The test checks both cases. Tested on an RTX 5080 16 GB (driver 621.40), a Ryzen 9 9950X with 32 GB and Windows 11 26200, with my own dump of 1.0.2.1 on a 5120x1440 monitor. Profile: Series X, DLSS ultra performance, frame generation 2X, no ray tracing. - Without this commit (main `829188e` + #2060): the display mode reported is 3840x2160, and the title stops 6 s after the start with `unhandled exception 0x80000003 at victory-image+0x56a2afd`, the allocator's assert under the UI setup. - With it: starts and plays at 5120x1440, in five sessions of about 6 minutes each, with no crash and no TDR. - `cargo test --release -p victory native_1440p`: 6 passed. The tests that need the retail image return early without `VICTORY_DISPLAY_PROFILE_TEST_IMAGE`. On a 16:9, 21:9 or 16:10 monitor nothing changes: `mode_for` returns `None`, the mode stays stock and the pool keeps #2060's size. The UI is still laid out at the 16:9 legacy size and stretched across the 32:9 picture. Keeping it in a 16:9 band in the middle would be a separate change. 🤖 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]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 10:39:08 +00:00
Author
Owner

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

I can confirm this fix on a 5120x1440 monitor. The interface is stretched, but the game is the right proportions.

image
**@⁠ALERTua** on GitHub · 2026-11-29 11:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2210#issuecomment-7254862989) I can confirm this fix on a 5120x1440 monitor. The interface is stretched, but the game is the right proportions. <img width="5116" height="1439" alt="image" src="https://github.com/user-attachments/assets/6108225c-aa04-451b-89df-767025f95ee1" />
Author
Owner

@⁠ALERTua on GitHub · 2026-11-29 11:08 UTC · original

fixes #2055

**@⁠ALERTua** on GitHub · 2026-11-29 11:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2210#issuecomment-7254911090) fixes #2055
Author
Owner

@⁠RomanFama592 on GitHub · 2026-11-29 12:53 UTC · original

Tested on a 2560x1080 (21:9) primary monitor: RTX 4060 Ti 8 GB, Ryzen 9 5900X, 64 GB, Windows 11 26300, Series X, 1080p to 1440p, DLSS balanced.

  • main (829188e9): stops at start every time, 0x80000003 at +0x56a2afd. In this case the title never asks for its 6236 MB TileHeap, takes an 88 MB block instead, and create_committed's 15 MB XMemAlloc runs past it.
  • main + VICTORY_NATIVE_SIZE=2560x1440: starts and reaches the world.
  • This PR, no override: starts and reaches the world (15 fps), but the picture is wrong. The image is patched for 2560x1080 (native-2560x1080 cache) while the F3 panel shows OUTPUT 2560X1440, and the bottom quarter and a band on the left are filled with garbage. So on a monitor lower than 1440, the host side seems to keep a 2560x1440 output while the title draws 2560x1080.
**@⁠RomanFama592** on GitHub · 2026-11-29 12:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2210#issuecomment-7256135354) Tested on a **2560x1080 (21:9) primary monitor**: RTX 4060 Ti 8 GB, Ryzen 9 5900X, 64 GB, Windows 11 26300, Series X, 1080p to 1440p, DLSS balanced. - `main` (829188e9): stops at start every time, `0x80000003` at `+0x56a2afd`. In this case the title never asks for its 6236 MB TileHeap, takes an 88 MB block instead, and `create_committed`'s 15 MB `XMemAlloc` runs past it. - `main` + `VICTORY_NATIVE_SIZE=2560x1440`: starts and reaches the world. - This PR, no override: starts and reaches the world (15 fps), but the picture is wrong. The image is patched for 2560x1080 (`native-2560x1080` cache) while the F3 panel shows `OUTPUT 2560X1440`, and the bottom quarter and a band on the left are filled with garbage. So on a monitor lower than 1440, the host side seems to keep a 2560x1440 output while the title draws 2560x1080.
Author
Owner

@⁠kanade333 on GitHub · 2026-11-29 13:23 UTC · original

Thanks for testing on 2560x1080. This PR only changes outputs that are wider or higher than 3840x2160 (mode_for returns None below that). At 2560x1080 it runs exactly as #2060 alone. The wrong picture looks like the artifacts reported on #2060 at 2752x1152: since #1808 the title draws at the monitor's shape, and on a monitor lower than 1440 the host side keeps a 2560x1440 output, as your F3 panel shows. VICTORY_NATIVE_SIZE=2560x1440 avoids it for now. A fix for monitors lower than 1440 would be a separate change.

**@⁠kanade333** on GitHub · 2026-11-29 13:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2210#issuecomment-7256507775) Thanks for testing on 2560x1080. This PR only changes outputs that are wider or higher than 3840x2160 (`mode_for` returns `None` below that). At 2560x1080 it runs exactly as #2060 alone. The wrong picture looks like the artifacts reported on #2060 at 2752x1152: since #1808 the title draws at the monitor's shape, and on a monitor lower than 1440 the host side keeps a 2560x1440 output, as your F3 panel shows. `VICTORY_NATIVE_SIZE=2560x1440` avoids it for now. A fix for monitors lower than 1440 would be a separate change.
Author
Owner

@⁠ALERTua on GitHub · 2026-11-29 20:43 UTC · original

main at f72cec77 still stops at start on 5120x1440: the same assert at +0x56a2afd, called from the UI pool setup (+0x247aeb6). The layer reports 3840x2160 to the title, and 33e9fed2 sizes the pool for 2560x1440 targets. So 33e9fed2 alone does not fix 32:9, and this PR is still needed.

The PR now conflicts with main in one place: the pool_size line in native_1440p.rs. The PR side (ui_pool_size((width(), height()))) already covers what 33e9fed2 does for outputs that fit in 3840x2160.

**@⁠ALERTua** on GitHub · 2026-11-29 20:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2210#issuecomment-7262309451) `main` at f72cec77 still stops at start on 5120x1440: the same assert at `+0x56a2afd`, called from the UI pool setup (`+0x247aeb6`). The layer reports 3840x2160 to the title, and 33e9fed2 sizes the pool for 2560x1440 targets. So 33e9fed2 alone does not fix 32:9, and this PR is still needed. The PR now conflicts with `main` in one place: the `pool_size` line in `native_1440p.rs`. The PR side (`ui_pool_size((width(), height()))`) already covers what 33e9fed2 does for outputs that fit in 3840x2160.
This pull request has changes conflicting with the target branch.
  • apps/victory/src/native_1440p.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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