VICTORY_NATIVE_WIDE=1 renders correctly: the title's window, UI targets and upscaler output follow the monitor (21:9 seam/ghosting, 32:9 start stop) #4331

Open
github-bot wants to merge 4 commits from github-bot/gh-4330 into main AGit
Owner

@⁠Lyrnc on GitHub · 2026-11-30 18:57 UTC · original
Lyrnc:fix/ultrawide-output → main · +262 −59 · 3 files · 4 commits · open

VICTORY_NATIVE_WIDE=1 renders correctly: the title's window, UI targets and upscaler output follow the monitor's shape.

Since cbb4fe61 the output is 2560x1440 on every monitor, and VICTORY_NATIVE_WIDE=1 opts into the monitor's shape (3440x1440 on 21:9, 5120x1440 on 32:9). With that switch the picture is still broken past 2560 columns: the seam at 74.4%, the ghosted or black-blocked characters, and stale blocks (#4015, #4044, #4058, #3735, #3707, #3246, #3878, #3394). On 32:9 it stops at start at +0x56a2afd (#3453, #3462, #3571; the case #2210 fixes). This PR finds why and fixes it, so the opt-in draws a whole picture of the monitor's shape. The default stays 2560x1440. At 3440x1440 the fix is now checked in a game run on a 2560x1440 monitor (below). So is 5120x1440 (32:9). A real wide monitor in full screen and the HUD are still to check, so the PR does not close those issues, and whether the monitor's shape should be the default again is the maintainer's call.

Why the title stays 2560 wide

The title does not take its display size from the output setting directly. It takes it from its own list of five display modes (made at 0x5A38910): four 16:9 sizes (1280x720 to 2560x1440) and the SDR mode (SDR_MODE, stock 3840x2160). At 0x2475C50 it picks the listed mode of the output's size, or else, among the modes of the monitor's shape (all five are 16:9), the one nearest by |width difference| + |height difference|. That mode sizes the window (so the host's swap chain and output), the two UI targets and the output the upscaler context is made for.

  • 3440x1440: 2560x1440 is 880 away, 3840x2160 is 1120, so 2560x1440.
  • 5120x1440: 3840x2160 (2000 against 2560). The UI targets are 3840x2160, the pool is sized for 2560x1440 ones, and the allocator stops at +0x56a2afd.
  • 2560x1080: 2560x1440. This is the "OUTPUT 2560X1440" reported on #2210.

The output setting itself (3440x1440, from the settings cave) reaches the title later, when its settings are applied (0x22434A0). That sets the display size to 3440x1440, but the title sends its notice of a new display size (0xD8C3A0) only when the height changes as well. At 3440x1440 the height is the same, so nothing made for 2560x1440 is made again. The scene follows 3440x1440 (2293x960 at DLSS Quality), while the window, the UI targets and the upscaler stay at 2560x1440 (max_render=[1706, 960] max_output=[2560, 1440] in #3246's log). That is the seam at 2560/3440 = 74.4%.

What this changes

apps/victory/src/native_1440p.rs

  • display_mode(output): an output the title does not list (anything other than those five sizes, so every non-16:9 output) is written into the SDR mode entry, keeping the stock refresh rate. The title then finds the output in its list, and its window, UI targets and upscaler are made at the output's size from the start. A 16:9 output (2560x1440, the default) keeps the stock entry. Only the mode list builder reads that entry: every RIP-relative reference into the table was checked, and there are no absolute pointers to it.
  • ui_pool_size(output): two legacy surfaces plus two output-sized UI targets, rounded up to 2 MiB. For 2560x1440 this is 0x5E00000 (94 MiB), the same as now; 3440x1440 gets 106 MiB and 5120x1440 gets 124 MiB. With less than 2 MiB left over, the title's leftover assert (0x247AF2D) holds.
  • prepare passes the output explicitly (prepare_for) to the settings cave, the pool and the temporal scale. The VICTORY_NATIVE_WIDE comment now says what broke wide outputs.

apps/victory/src/run.rs: when the image lists a non-stock mode, the same mode is reported through VICTORY_DISPLAY_MODE (as #2210 does). VICTORY_NATIVE_OUTPUT=WxH names the output for the host.

crates/victory-gpu/src/draw.rs: native_frontend_viewport looked for a viewport of exactly 2560x1440. It now uses the native output's size, so the frontend's legacy-canvas draw is fixed up at 3440x1440 too. With output-sized targets the viewport there is 3440x1440, and without this change the fix-up would no longer apply.

The default path (2560x1440) is unchanged: stock SDR mode, the same pool, the same cave, the same viewport check, and no VICTORY_DISPLAY_MODE. Only VICTORY_NATIVE_WIDE=1 on a non-16:9 monitor, or a non-16:9 VICTORY_NATIVE_SIZE, takes the new path. for_monitor is unchanged too. An explicit VICTORY_NATIVE_SIZE of another shape also gets a consistent display size now (for example 2560x1080), but those shapes have not been run.

How it was tested

  • Static: the mode list, the closest-match function and the settings apply were read in the retail executable (1.0.2.1). The rule above reproduces all three reported cases: 3440x1440 gives 2560x1440, 5120x1440 gives 3840x2160, and 2560x1080 gives 2560x1440.
  • cargo test -p victory --bin victory native_1440p: 8 passed (Windows 11, RTX 5080). This includes a model of the title's pick, which shows the reported sizes with the stock list and the output's size with the patched list, for every for_monitor shape and several asked sizes. It also covers the pool sizes and leftover bounds, the retail-image patch test (VICTORY_DISPLAY_PROFILE_TEST_IMAGE, run with a local dump) for 2560x1440, 3440x1440 and 5120x1440, and a check that the five listed sizes are the image's.
  • cargo test -p victory-gpu --lib the_frontend_viewport_follows_the_native_output: passed.
  • cargo clippy -p victory -p victory-gpu --all-targets (with and without --all-features): no warnings in the three files this changes. With -D warnings it fails exactly as on main 84bd61e2: ranged in shadow.rs and mb in copystat.rs are never used, host.rs has a manual is_multiple_of, and xmem.rs has a match that could be unwrap_or_default. cargo xtask policy reports one hit, also on main: a 560-character hex run in crates/victory-shader/src/native.rs (698ab79e). This PR adds none.
  • In game at 3440x1440: fixed. RTX 5080, Windows 11, our 2560x1440 monitor, windowed (fitted to the screen). Series X, 1440, DLSS Quality, no frame generation, VICTORY_NATIVE_WIDE=1 VICTORY_NATIVE_SIZE=3440x1440, standing on the first balcony scene of a save, captures at 20, 40, 60, 90 and 120 s in the world. We have no ultrawide monitor, so a real 21:9 monitor (full screen) still needs a check.
    • main 84bd61e2: window 2560x1440, display mode reported 3840x2160, host output 2560x1440, upscaler max_render=[1706, 960] max_output=[2560, 1440] for a 2293x960 scene. Every capture shows the fault: stale and wrong blocks over the house and the deck, the character see-through.
    • this PR: display mode 3440x1440 listed for the title, window 3440x1440, display mode reported 3440x1440, host output 3440x1440, upscaler max_render=[2293, 960] max_output=[3440, 1440], DLSS render=[2293, 960] output=[3440, 1440] (its optimal for Quality). Every capture is a whole, clean 21:9 picture with the character drawn normally.
    • Frame rate the same (about 22 fps standing on this PC, both). Both starts were clean.
  • In game at 5120x1440 (32:9): starts and draws a clean picture. Same setup with VICTORY_NATIVE_SIZE=5120x1440: no stop at +0x56a2afd, in the world at 71 s. The window, the display mode reported and the host output are 5120x1440, the upscaler is max_render=[3413, 960] max_output=[5120, 1440], and DLSS renders [3413, 960] to [5120, 1440]. The captures are a whole 32:9 picture. We did not run main at 5120x1440 ourselves; the stop there is the one #3453, #3462, #3571 and #2210 report.
  • In game at 2560x1080 (asked with VICTORY_NATIVE_SIZE; for_monitor still gives such monitors 2560x1440): window, display mode, host output and upscaler all 2560x1080 (max_render=[1706, 720]), a clean picture. Before, the host stayed at 2560x1440 there (#2210's report).
  • 16:9 control (2560x1440, VICTORY_NATIVE_WIDE=1 on our 16:9 monitor): the stock path, as on main. The mode reported is 3840x2160, there is no listed-mode line, everything is 2560x1440 (max_render=[1706, 960]), and the picture is clean.
  • On a real 3440x1440 monitor (Kassadd's run in the comments: RTX 4080 SUPER, Linux with Proton, main e1251c3 with this PR, VICTORY_NATIVE_WIDE=1 VICTORY_NATIVE_SIZE=3440x1440, DLSS off): the display mode reported to the title goes from 3840x2160 to 3440x1440. With DLSS off the whole 3440x1440 scene then reaches the title's out-of-memory break (see Known limits). With VICTORY_RT_HEAP_MB=8000 VICTORY_SCENE_POOL_MB=1600, or with #2400's automatic budgets, it runs with a 21:9 picture.
  • Not seen yet: the HUD (the scene we stood in shows none), and a real wide monitor on Windows.

Known limits

  • The HUD is stretched to the output's width. The UI is still laid out on the 3840x2160 legacy stage and scaled onto the output-sized UI targets, which is 1.34 times wider at 21:9 (#2210's reporter saw the same at 32:9). Keeping it in a 16:9 band, or shaping the stage, is what #3027, #3350 and #2689 work on; that would be a follow-up on top of this.
  • DLSS off (or DLAA) at 3440x1440 draws a 3440x1440 scene, 1.34 times the pixels of the title's render-target budgets. That start-up stop (the comment on #3742) is not addressed here. VICTORY_RT_HEAP_MB / VICTORY_SCENE_POOL_MB, or #2400's automatic budgets, cover it.
  • VICTORY_NATIVE_SIZE alone does not give a wide output on main: the image is patched, but the mode reported stays 3840x2160, so the picture is 16:9 stretched (found by Kassadd). This PR is what closes that. play --res 1440 keeps the output 16:9, which hides the problem.
  • If the title asked for a refresh rate the list does not have, the exact match would fail and the 16:9 shape filter would pick 2560x1440 again. The listed modes are 60 Hz and we have not seen the title ask for anything else, but this has not been checked in a run.

Checked for overlap

  • Searched open PRs for "ultrawide", "21:9", "aspect", "3440", "5120" and native_1440p.
  • #3742 makes 2560x1440 the output on every monitor, as main now does (cbb4fe61). This PR is the part that makes the wide output itself work.
  • #2210 writes the SDR mode for outputs wider than 3840 (5120x1440). This PR does the same for every non-listed output, so it covers #2210's case.
  • #2400 writes the mode for 3440x1440 and 3840x1080 under an aspect selector, with automatic budgets. Its mode and pool part is this PR's, limited to those sizes (for example, 3456x1440 from a 3840x1600 monitor or 3408x1440 from 5120x2160 would still mismatch there). Its selector and budgets could go on top of this.
  • #2689 also shapes the mode and the UI stage, as part of an options rework (conflicting).
  • #3027, #3350: HUD and UI placement on wide outputs (see Known limits).

AI use: this PR was made with an AI agent (Claude Code): the reading of the executable, the code, the tests, the bench runs and this text.

🤖 Generated with Claude Code

**@⁠Lyrnc** on GitHub · 2026-11-30 18:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4330) `Lyrnc:fix/ultrawide-output` → `main` · +262 −59 · 3 files · 4 commits · open **`VICTORY_NATIVE_WIDE=1` renders correctly: the title's window, UI targets and upscaler output follow the monitor's shape.** Since cbb4fe61 the output is 2560x1440 on every monitor, and `VICTORY_NATIVE_WIDE=1` opts into the monitor's shape (3440x1440 on 21:9, 5120x1440 on 32:9). With that switch the picture is still broken past 2560 columns: the seam at 74.4%, the ghosted or black-blocked characters, and stale blocks (#4015, #4044, #4058, #3735, #3707, #3246, #3878, #3394). On 32:9 it stops at start at `+0x56a2afd` (#3453, #3462, #3571; the case #2210 fixes). This PR finds why and fixes it, so the opt-in draws a whole picture of the monitor's shape. The default stays 2560x1440. At 3440x1440 the fix is now checked in a game run on a 2560x1440 monitor (below). So is 5120x1440 (32:9). A real wide monitor in full screen and the HUD are still to check, so the PR does not close those issues, and whether the monitor's shape should be the default again is the maintainer's call. ## Why the title stays 2560 wide The title does not take its display size from the output setting directly. It takes it from its own list of five display modes (made at `0x5A38910`): four 16:9 sizes (1280x720 to 2560x1440) and the SDR mode (`SDR_MODE`, stock 3840x2160). At `0x2475C50` it picks the listed mode of the output's size, or else, among the modes of the monitor's shape (all five are 16:9), the one nearest by `|width difference| + |height difference|`. That mode sizes the window (so the host's swap chain and output), the two UI targets and the output the upscaler context is made for. - 3440x1440: 2560x1440 is 880 away, 3840x2160 is 1120, so 2560x1440. - 5120x1440: 3840x2160 (2000 against 2560). The UI targets are 3840x2160, the pool is sized for 2560x1440 ones, and the allocator stops at `+0x56a2afd`. - 2560x1080: 2560x1440. This is the "OUTPUT 2560X1440" reported on #2210. The output setting itself (3440x1440, from the settings cave) reaches the title later, when its settings are applied (`0x22434A0`). That sets the display size to 3440x1440, but the title sends its notice of a new display size (`0xD8C3A0`) only when the height changes as well. At 3440x1440 the height is the same, so nothing made for 2560x1440 is made again. The scene follows 3440x1440 (2293x960 at DLSS Quality), while the window, the UI targets and the upscaler stay at 2560x1440 (`max_render=[1706, 960] max_output=[2560, 1440]` in #3246's log). That is the seam at 2560/3440 = 74.4%. ## What this changes `apps/victory/src/native_1440p.rs` - `display_mode(output)`: an output the title does not list (anything other than those five sizes, so every non-16:9 output) is written into the SDR mode entry, keeping the stock refresh rate. The title then finds the output in its list, and its window, UI targets and upscaler are made at the output's size from the start. A 16:9 output (2560x1440, the default) keeps the stock entry. Only the mode list builder reads that entry: every RIP-relative reference into the table was checked, and there are no absolute pointers to it. - `ui_pool_size(output)`: two legacy surfaces plus two output-sized UI targets, rounded up to 2 MiB. For 2560x1440 this is 0x5E00000 (94 MiB), the same as now; 3440x1440 gets 106 MiB and 5120x1440 gets 124 MiB. With less than 2 MiB left over, the title's leftover assert (`0x247AF2D`) holds. - `prepare` passes the output explicitly (`prepare_for`) to the settings cave, the pool and the temporal scale. The `VICTORY_NATIVE_WIDE` comment now says what broke wide outputs. `apps/victory/src/run.rs`: when the image lists a non-stock mode, the same mode is reported through `VICTORY_DISPLAY_MODE` (as #2210 does). `VICTORY_NATIVE_OUTPUT=WxH` names the output for the host. `crates/victory-gpu/src/draw.rs`: `native_frontend_viewport` looked for a viewport of exactly 2560x1440. It now uses the native output's size, so the frontend's legacy-canvas draw is fixed up at 3440x1440 too. With output-sized targets the viewport there is 3440x1440, and without this change the fix-up would no longer apply. **The default path (2560x1440) is unchanged:** stock SDR mode, the same pool, the same cave, the same viewport check, and no `VICTORY_DISPLAY_MODE`. Only `VICTORY_NATIVE_WIDE=1` on a non-16:9 monitor, or a non-16:9 `VICTORY_NATIVE_SIZE`, takes the new path. `for_monitor` is unchanged too. An explicit `VICTORY_NATIVE_SIZE` of another shape also gets a consistent display size now (for example 2560x1080), but those shapes have not been run. ## How it was tested - Static: the mode list, the closest-match function and the settings apply were read in the retail executable (1.0.2.1). The rule above reproduces all three reported cases: 3440x1440 gives 2560x1440, 5120x1440 gives 3840x2160, and 2560x1080 gives 2560x1440. - `cargo test -p victory --bin victory native_1440p`: 8 passed (Windows 11, RTX 5080). This includes a model of the title's pick, which shows the reported sizes with the stock list and the output's size with the patched list, for every `for_monitor` shape and several asked sizes. It also covers the pool sizes and leftover bounds, the retail-image patch test (`VICTORY_DISPLAY_PROFILE_TEST_IMAGE`, run with a local dump) for 2560x1440, 3440x1440 and 5120x1440, and a check that the five listed sizes are the image's. - `cargo test -p victory-gpu --lib the_frontend_viewport_follows_the_native_output`: passed. - `cargo clippy -p victory -p victory-gpu --all-targets` (with and without `--all-features`): no warnings in the three files this changes. With `-D warnings` it fails exactly as on main 84bd61e2: `ranged` in shadow.rs and `mb` in copystat.rs are never used, host.rs has a manual `is_multiple_of`, and xmem.rs has a match that could be `unwrap_or_default`. `cargo xtask policy` reports one hit, also on main: a 560-character hex run in `crates/victory-shader/src/native.rs` (698ab79e). This PR adds none. - **In game at 3440x1440: fixed.** RTX 5080, Windows 11, our 2560x1440 monitor, windowed (fitted to the screen). Series X, 1440, DLSS Quality, no frame generation, `VICTORY_NATIVE_WIDE=1 VICTORY_NATIVE_SIZE=3440x1440`, standing on the first balcony scene of a save, captures at 20, 40, 60, 90 and 120 s in the world. We have no ultrawide monitor, so a real 21:9 monitor (full screen) still needs a check. - main 84bd61e2: window `2560x1440`, display mode reported `3840x2160`, host output `2560x1440`, upscaler `max_render=[1706, 960] max_output=[2560, 1440]` for a 2293x960 scene. Every capture shows the fault: stale and wrong blocks over the house and the deck, the character see-through. - this PR: `display mode 3440x1440 listed for the title`, window `3440x1440`, display mode reported `3440x1440`, host output `3440x1440`, upscaler `max_render=[2293, 960] max_output=[3440, 1440]`, DLSS `render=[2293, 960] output=[3440, 1440]` (its optimal for Quality). Every capture is a whole, clean 21:9 picture with the character drawn normally. - Frame rate the same (about 22 fps standing on this PC, both). Both starts were clean. - **In game at 5120x1440 (32:9): starts and draws a clean picture.** Same setup with `VICTORY_NATIVE_SIZE=5120x1440`: no stop at `+0x56a2afd`, in the world at 71 s. The window, the display mode reported and the host output are `5120x1440`, the upscaler is `max_render=[3413, 960] max_output=[5120, 1440]`, and DLSS renders `[3413, 960]` to `[5120, 1440]`. The captures are a whole 32:9 picture. We did not run main at 5120x1440 ourselves; the stop there is the one #3453, #3462, #3571 and #2210 report. - **In game at 2560x1080 (asked with `VICTORY_NATIVE_SIZE`; `for_monitor` still gives such monitors 2560x1440):** window, display mode, host output and upscaler all `2560x1080` (`max_render=[1706, 720]`), a clean picture. Before, the host stayed at 2560x1440 there (#2210's report). - **16:9 control (2560x1440, `VICTORY_NATIVE_WIDE=1` on our 16:9 monitor):** the stock path, as on main. The mode reported is `3840x2160`, there is no listed-mode line, everything is `2560x1440` (`max_render=[1706, 960]`), and the picture is clean. - **On a real 3440x1440 monitor** (Kassadd's run in the comments: RTX 4080 SUPER, Linux with Proton, main e1251c3 with this PR, `VICTORY_NATIVE_WIDE=1 VICTORY_NATIVE_SIZE=3440x1440`, DLSS off): the display mode reported to the title goes from `3840x2160` to `3440x1440`. With DLSS off the whole 3440x1440 scene then reaches the title's out-of-memory break (see Known limits). With `VICTORY_RT_HEAP_MB=8000 VICTORY_SCENE_POOL_MB=1600`, or with #2400's automatic budgets, it runs with a 21:9 picture. - Not seen yet: the HUD (the scene we stood in shows none), and a real wide monitor on Windows. ## Known limits - **The HUD is stretched to the output's width.** The UI is still laid out on the 3840x2160 legacy stage and scaled onto the output-sized UI targets, which is 1.34 times wider at 21:9 (#2210's reporter saw the same at 32:9). Keeping it in a 16:9 band, or shaping the stage, is what #3027, #3350 and #2689 work on; that would be a follow-up on top of this. - DLSS off (or DLAA) at 3440x1440 draws a 3440x1440 scene, 1.34 times the pixels of the title's render-target budgets. That start-up stop (the comment on #3742) is not addressed here. `VICTORY_RT_HEAP_MB` / `VICTORY_SCENE_POOL_MB`, or #2400's automatic budgets, cover it. - `VICTORY_NATIVE_SIZE` alone does not give a wide output on main: the image is patched, but the mode reported stays `3840x2160`, so the picture is 16:9 stretched (found by Kassadd). This PR is what closes that. `play --res 1440` keeps the output 16:9, which hides the problem. - If the title asked for a refresh rate the list does not have, the exact match would fail and the 16:9 shape filter would pick 2560x1440 again. The listed modes are 60 Hz and we have not seen the title ask for anything else, but this has not been checked in a run. ## Checked for overlap - [x] Searched open PRs for "ultrawide", "21:9", "aspect", "3440", "5120" and `native_1440p`. - #3742 makes 2560x1440 the output on every monitor, as main now does (cbb4fe61). This PR is the part that makes the wide output itself work. - #2210 writes the SDR mode for outputs wider than 3840 (5120x1440). This PR does the same for every non-listed output, so it covers #2210's case. - #2400 writes the mode for 3440x1440 and 3840x1080 under an aspect selector, with automatic budgets. Its mode and pool part is this PR's, limited to those sizes (for example, 3456x1440 from a 3840x1600 monitor or 3408x1440 from 5120x2160 would still mismatch there). Its selector and budgets could go on top of this. - #2689 also shapes the mode and the UI stage, as part of an options rework (conflicting). - #3027, #3350: HUD and UI placement on wide outputs (see Known limits). AI use: this PR was made with an AI agent (Claude Code): the reading of the executable, the code, the tests, the bench runs and this text. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The title takes its display size (window, host output, its two UI targets,
the output its upscaler is made for) from the mode of its own list nearest
to the output setting. The list is four 16:9 sizes and the SDR mode
(3840x2160), so a 3440x1440 output got 2560x1440 (and 5120x1440 got
3840x2160). The output setting reaches the title later, without a new
display size notice when the height is the same, so the scene followed
3440x1440 while everything made at start stayed 2560x1440: blocks of stale
picture, see-through characters, an edge at 2560/3440 of the width (#3246,
#3735). At 5120x1440 the 3840x2160 UI targets did not fit the pool
(+0x56a2afd at start).

An output the title does not list is now written into the SDR mode entry
(and reported through VICTORY_DISPLAY_MODE), the UI pool holds two
output-sized targets, and the host's frontend viewport fix-up looks for the
output's size (VICTORY_NATIVE_OUTPUT) instead of 2560x1440. 16:9 is
unchanged (stock mode, 94 MiB pool, same cave).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:58:09 +00:00
Author
Owner

@⁠Lyrnc on GitHub · 2026-11-30 19:03 UTC · original

In-game results added to the description. On a 2560x1440 monitor, windowed, with VICTORY_NATIVE_WIDE=1 and VICTORY_NATIVE_SIZE (RTX 5080, Series X, DLSS Quality):

  • 3440x1440: main 84bd61e2 keeps the window, host output and upscaler at 2560x1440 (max_output=[2560, 1440] for a 2293x960 scene), and every capture shows the stale blocks and the see-through character. With this PR the window, display mode, host output and upscaler are all 3440x1440 (max_render=[2293, 960] max_output=[3440, 1440]), and every capture is a clean 21:9 picture. Same frame rate.
  • 5120x1440: starts (no +0x56a2afd), everything at 5120x1440 (max_render=[3413, 960]), clean 32:9 picture.

Still open: the HUD (the scene we stood in shows none), a real wide monitor in full screen, and 2560x1080 plus a 16:9 control (queued).

AI use: Claude Code ran and read these bench runs.

**@⁠Lyrnc** on GitHub · 2026-11-30 19:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4330#issuecomment-7288778276) In-game results added to the description. On a 2560x1440 monitor, windowed, with `VICTORY_NATIVE_WIDE=1` and `VICTORY_NATIVE_SIZE` (RTX 5080, Series X, DLSS Quality): - **3440x1440:** main 84bd61e2 keeps the window, host output and upscaler at 2560x1440 (`max_output=[2560, 1440]` for a 2293x960 scene), and every capture shows the stale blocks and the see-through character. With this PR the window, display mode, host output and upscaler are all 3440x1440 (`max_render=[2293, 960] max_output=[3440, 1440]`), and every capture is a clean 21:9 picture. Same frame rate. - **5120x1440:** starts (no `+0x56a2afd`), everything at 5120x1440 (`max_render=[3413, 960]`), clean 32:9 picture. Still open: the HUD (the scene we stood in shows none), a real wide monitor in full screen, and 2560x1080 plus a 16:9 control (queued). AI use: Claude Code ran and read these bench runs.
Author
Owner

@⁠Kassadd on GitHub · 2026-11-30 19:40 UTC · original

Ran it on a real 3440x1440 monitor, and the display-mode fix works — the title now reports
3440x1440 instead of 3840x2160. Thank you for that; it was the piece we could not see from
here.

Environment: RTX 4080 SUPER 16 GiB, i9-14900K, 62 GiB, CachyOS, Hyprland/Wayland,
NVIDIA 620.73.04, Proton Experimental …-w0be231-d1011dd-v71cae0, Series X 1.0.2.1,
a 3440x1440 monitor beside a 1080p one. Built main at e1251c3 with this PR on top; it
applied with no conflict. Two switches only: VICTORY_NATIVE_WIDE=1,
VICTORY_NATIVE_SIZE=3440x1440, --dlss off --no-framegen-ready, no --res.

What it changed in the log, same configuration, three trees:

tree display mode reported to the title outcome
main, NATIVE_SIZE=3440x1440 3840x2160 crash, 0x80000003 at +0x2219650
main + this PR, same 3440x1440 still that crash, but the mode is right
main, NATIVE_SIZE=2560x1440 3840x2160 runs

So the mode list, ui_pool_size(output) and the settings cave do what the description says:
the title is told the monitor's size instead of the nearest 16:9 one. That part is confirmed
on hardware you do not have.

The crash that remains is not this PR's, and your own "Known limits" names it. With no
--res, the title draws a 3440x1440 scene — 2.39x the pixels of the 2560x1440 scene the
retail image's budgets are sized for — and stops in its out-of-memory break, exactly as
apps/victory/src/heap_budget.rs describes for a 3840x2160 scene ("2.25 times the pixels and
does not fit: the break is reached from +0x4fac3c0, which found no room for 2 MB or 32 MB").

Two things that may be useful:

  • The crash leaves nothing in the play log. It goes to
    …/victory/data/7952987A/crashes.log, as
    unhandled exception 0x80000003 at …+0x2219650 (breakpoint cc 4c 89 f1 …), with rdi,
    rdx and r11 all 0x2b0800 — 2.69 MB it could not have. Worth knowing before reading a
    run's log as "it just ended".
  • With VICTORY_RT_HEAP_MB=8000 and VICTORY_SCENE_POOL_MB=1600 on top of your PR it
    runs
    : the log reads display mode 3440x1440, the F2 panel reads OUTPUT 3440x1440, and
    the picture is the monitor's shape rather than a 16:9 one stretched across it. 12.7 fps,
    frame 78.7 ms, VRAM 10.3 of 12.5 GB, 5,746 draws. Those numbers are this card with the frame
    bounded by the layer's copies; they are not a claim about the PR's cost.

One observation that may be worth a line in the description, since it cost me a run to
find: VICTORY_NATIVE_SIZE alone does not reach a wide output on main — the image is
patched (native-3440x1440-sdr) but the display mode reported stays 3840x2160, so the
picture is still 16:9 stretched. Your PR is what closes that. As a side effect play with
--res 1440 (the documented Linux configuration) also hides the problem by keeping the output
16:9, which is why it is easy to miss.

What I did not test: 32:9, VICTORY_NATIVE_SIZE shapes other than 16:9 and 21:9, DLSS
upscaling at 3440x1440 (DLSS itself runs under Wine here — Streamline 2.14.16, NGX 310.9.16,
1.00 upscalings a frame — but it was not faster than --dlss off on this machine), and the
stretched HUD, which your description already accounts for as a follow-up.

Logs and the exact invocation on request.

**@⁠Kassadd** on GitHub · 2026-11-30 19:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4330#issuecomment-7289770855) **Ran it on a real 3440x1440 monitor, and the display-mode fix works — the title now reports 3440x1440 instead of 3840x2160. Thank you for that; it was the piece we could not see from here.** **Environment:** RTX 4080 SUPER 16 GiB, i9-14900K, 62 GiB, CachyOS, Hyprland/Wayland, NVIDIA 620.73.04, Proton Experimental `…-w0be231-d1011dd-v71cae0`, Series X `1.0.2.1`, a 3440x1440 monitor beside a 1080p one. Built `main` at `e1251c3` with this PR on top; it applied with no conflict. Two switches only: `VICTORY_NATIVE_WIDE=1`, `VICTORY_NATIVE_SIZE=3440x1440`, `--dlss off --no-framegen-ready`, no `--res`. **What it changed in the log**, same configuration, three trees: | tree | `display mode reported to the title` | outcome | |---|---|---| | `main`, `NATIVE_SIZE=3440x1440` | `3840x2160` | crash, `0x80000003` at `+0x2219650` | | **`main` + this PR**, same | **`3440x1440`** | still that crash, but the mode is right | | `main`, `NATIVE_SIZE=2560x1440` | `3840x2160` | runs | So the mode list, `ui_pool_size(output)` and the settings cave do what the description says: the title is told the monitor's size instead of the nearest 16:9 one. That part is confirmed on hardware you do not have. **The crash that remains is not this PR's, and your own "Known limits" names it.** With no `--res`, the title draws a 3440x1440 scene — 2.39x the pixels of the 2560x1440 scene the retail image's budgets are sized for — and stops in its out-of-memory break, exactly as `apps/victory/src/heap_budget.rs` describes for a 3840x2160 scene ("2.25 times the pixels and does not fit: the break is reached from `+0x4fac3c0`, which found no room for 2 MB or 32 MB"). Two things that may be useful: - **The crash leaves nothing in the play log.** It goes to `…/victory/data/7952987A/crashes.log`, as `unhandled exception 0x80000003 at …+0x2219650 (breakpoint cc 4c 89 f1 …)`, with `rdi`, `rdx` and `r11` all `0x2b0800` — 2.69 MB it could not have. Worth knowing before reading a run's log as "it just ended". - **With `VICTORY_RT_HEAP_MB=8000` and `VICTORY_SCENE_POOL_MB=1600` on top of your PR it runs**: the log reads `display mode 3440x1440`, the F2 panel reads `OUTPUT 3440x1440`, and the picture is the monitor's shape rather than a 16:9 one stretched across it. 12.7 fps, frame 78.7 ms, VRAM 10.3 of 12.5 GB, 5,746 draws. Those numbers are this card with the frame bounded by the layer's copies; they are not a claim about the PR's cost. **One observation that may be worth a line in the description**, since it cost me a run to find: `VICTORY_NATIVE_SIZE` alone does not reach a wide output on `main` — the image is patched (`native-3440x1440-sdr`) but the display mode reported stays `3840x2160`, so the picture is still 16:9 stretched. Your PR is what closes that. As a side effect `play` with `--res 1440` (the documented Linux configuration) also hides the problem by keeping the output 16:9, which is why it is easy to miss. **What I did not test:** 32:9, `VICTORY_NATIVE_SIZE` shapes other than 16:9 and 21:9, DLSS upscaling at 3440x1440 (DLSS itself runs under Wine here — Streamline 2.14.16, NGX 310.9.16, 1.00 upscalings a frame — but it was not faster than `--dlss off` on this machine), and the stretched HUD, which your description already accounts for as a follow-up. Logs and the exact invocation on request.
Author
Owner

@⁠Kassadd on GitHub · 2026-11-30 20:10 UTC · original

Tested both this and #2400 on a real 3440x1440 monitor, and I think your "could go on top of
this" is the right call — with one addition: #2400 is the half that makes a wide output
usable, and this is the half that makes it general.

Environment: RTX 4080 SUPER 16 GiB, i9-14900K, 62 GiB, CachyOS, Hyprland/Wayland,
NVIDIA 620.73.04, Proton Experimental …-w0be231-d1011dd-v71cae0, Series X 1.0.2.1,
3440x1440@360 monitor beside a 1080p one. main at e1251c3.

This PR does what it says. With VICTORY_NATIVE_WIDE=1 the display mode reported to the
title goes from 3840x2160 (what main says with VICTORY_NATIVE_SIZE=3440x1440, image
patched and all) to 3440x1440. That is the seam at 74.4 % gone at the root, and it is
the one thing here I could see change from a real monitor.

What it does not do on its own: the run still dies. At 3440x1440 with no --res, the
title draws a 3440x1440 scene — 2.39x the pixels of the 2560x1440 scene the retail image's
budgets are sized for — and stops in its out-of-memory break:

unhandled exception 0x80000003 at …+0x2219650 (breakpoint cc 4c 89 f1 …)
rdi 0x2b0800  rdx 0x2b0800  r11 0x2b0800

2.69 MB it could not have. heap_budget.rs already describes this for the 4K case ("two
of its memory budgets are sized for the console's 2560x1440 scene… 2.25 times the pixels and
does not fit").

#2400 is where that part lives. Same monitor, same main, --res 1440 --aspect 21:9 and
no memory switches at all, it prints:

memory         automatic budgets for the 3440x1440 scene
memory         render-target heap 7200 MB (stock 2199 MB)
memory         scene pool 1600 MB (stock 710 MB)

and then runs: display mode 3440x1440, F2 OUTPUT 3440x1440, VRAM 13.5/13.6 GB, 13.5 fps,
frame 74.0 ms, world open. That 1600 MB is the same figure I had found sufficient by setting
VICTORY_SCENE_POOL_MB=1600 by hand, so its derivation is right on this hardware.

So the split I would argue for is the one you already suggest, read a little wider:

this PR #2400
a wide output draws a whole picture any shape 3440x1440, 3840x1080
the title's memory budgets follow the output ✗ ✓
--aspect selector ✗ ✓
32:9 ✓ (tested at 5120x1440) via #2210

General shape belongs here. The thing that makes 21:9 run belongs in #2400. Either order
works for the picture; only #2400 makes the scene fit.

One practical note, since you mention taking #2400 on top: merging both as they stand
conflicts hard — 7 hunks, 164 lines, in native_1440p.rs, because both define the SDR-mode
write and ui_pool_size for the same outputs. Whoever moves second will have to rework that
function rather than pick a side. Worth coordinating on which comes first before either lands.

What I could not test: 32:9 and 2560x1080 (no such monitor here), the other non-16:9 shapes
your display_mode() now covers — which is exactly the case for the generality above, so I
have no number for it — and DLSS, which does not run under Wine at all (frame generation does
not; upscaling does, but was not faster than --dlss off on this machine).

Logs and the exact invocation on request.

**@⁠Kassadd** on GitHub · 2026-11-30 20:10 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4330#issuecomment-7290522994) **Tested both this and #2400 on a real 3440x1440 monitor, and I think your "could go on top of this" is the right call — with one addition: #2400 is the half that makes a wide output *usable*, and this is the half that makes it *general*.** **Environment:** RTX 4080 SUPER 16 GiB, i9-14900K, 62 GiB, CachyOS, Hyprland/Wayland, NVIDIA 620.73.04, Proton Experimental `…-w0be231-d1011dd-v71cae0`, Series X `1.0.2.1`, 3440x1440@360 monitor beside a 1080p one. `main` at `e1251c3`. **This PR does what it says.** With `VICTORY_NATIVE_WIDE=1` the display mode reported to the title goes from `3840x2160` (what `main` says with `VICTORY_NATIVE_SIZE=3440x1440`, image patched and all) to **`3440x1440`**. That is the seam at 74.4 % gone at the root, and it is the one thing here I could see change from a real monitor. **What it does not do on its own: the run still dies.** At 3440x1440 with no `--res`, the title draws a 3440x1440 scene — 2.39x the pixels of the 2560x1440 scene the retail image's budgets are sized for — and stops in its out-of-memory break: ```text unhandled exception 0x80000003 at …+0x2219650 (breakpoint cc 4c 89 f1 …) rdi 0x2b0800 rdx 0x2b0800 r11 0x2b0800 ``` 2.69 MB it could not have. **`heap_budget.rs` already describes this** for the 4K case ("two of its memory budgets are sized for the console's 2560x1440 scene… 2.25 times the pixels and does not fit"). **#2400 is where that part lives.** Same monitor, same `main`, `--res 1440 --aspect 21:9` and **no memory switches at all**, it prints: ```text memory automatic budgets for the 3440x1440 scene memory render-target heap 7200 MB (stock 2199 MB) memory scene pool 1600 MB (stock 710 MB) ``` and then runs: `display mode 3440x1440`, F2 `OUTPUT 3440x1440`, `VRAM 13.5/13.6 GB`, 13.5 fps, frame 74.0 ms, world open. That 1600 MB is the same figure I had found sufficient by setting `VICTORY_SCENE_POOL_MB=1600` by hand, so its derivation is right on this hardware. **So the split I would argue for** is the one you already suggest, read a little wider: | | this PR | #2400 | |---|---|---| | a wide output draws a whole picture | **any** shape | 3440x1440, 3840x1080 | | the title's memory budgets follow the output | ✗ | **✓** | | `--aspect` selector | ✗ | ✓ | | 32:9 | ✓ (tested at 5120x1440) | via #2210 | General shape belongs here. The thing that makes 21:9 *run* belongs in #2400. Either order works for the picture; only #2400 makes the scene fit. **One practical note, since you mention taking #2400 on top:** merging both as they stand conflicts hard — **7 hunks, 164 lines, in `native_1440p.rs`**, because both define the SDR-mode write and `ui_pool_size` for the same outputs. Whoever moves second will have to rework that function rather than pick a side. Worth coordinating on which comes first before either lands. **What I could not test:** 32:9 and 2560x1080 (no such monitor here), the other non-16:9 shapes your `display_mode()` now covers — which is exactly the case for the generality above, so I have no number for it — and DLSS, which does not run under Wine at all (frame generation does not; upscaling does, but was not faster than `--dlss off` on this machine). Logs and the exact invocation on request.
Author
Owner

@⁠Lyrnc on GitHub · 2026-12-01 03:54 UTC · original

Thank you @⁠Kassadd, for the run on a real 3440x1440 monitor and for testing #2400 beside it. The display mode the title is told (3440x1440 instead of 3840x2160) is exactly what we couldn't check here. The crashes.log pointer will save the next tester a run too. I'll add your note to the description: VICTORY_NATIVE_SIZE alone doesn't give a wide output on main.

I agree with the split. This PR makes the picture follow any output shape. #2400 sizes the title's memory budgets for the bigger scene (your 7200 MB render-target heap and 1600 MB scene pool, which match what you found by hand) and adds the --aspect selector. Without those budgets a full-size 21:9 scene reaches the title's out-of-memory break, as you showed.

How #2400 can go on top. In native_1440p.rs both PRs add the same functions with the same signatures:

  • settings_cave_bytes(output)
  • ui_pool_size(output)
  • the display mode for an output (display_mode(output) here, mode_for(output) in #2400)
  • prepare_for(image, render_1080p, output) (prepare_for_output in #2400)

That's where your 7 hunks come from. On top of this PR, #2400's part of that file comes down to its aspect detection (output(aspect), from_modes, detect), which calls this PR's functions for the mode, the UI pool and the settings cave. Its heap_budget.rs, play.rs, menu and README changes don't touch anything this PR changes. In run.rs both set VICTORY_DISPLAY_MODE from the output in the same place, so a few lines need merging there, and #2400's native_scene for the budgets stays as it is.

Either order works for me:

  • If #2400 lands first, I'll rebase this PR onto it and do the native_1440p.rs rework on this side, keeping its budgets and selector as they are.
  • If this one lands first, I can push #2400 rebased onto it to my fork for @⁠invismann to take or leave, so #2400's commits keep their authors. I won't fold #2400's code into this PR.

AI use: Claude Code (Claude Opus 5.5) compared the two branches and wrote this.

**@⁠Lyrnc** on GitHub · 2026-12-01 03:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4330#issuecomment-7300188672) Thank you @⁠Kassadd, for the run on a real 3440x1440 monitor and for testing #2400 beside it. The display mode the title is told (3440x1440 instead of 3840x2160) is exactly what we couldn't check here. The `crashes.log` pointer will save the next tester a run too. I'll add your note to the description: `VICTORY_NATIVE_SIZE` alone doesn't give a wide output on main. I agree with the split. This PR makes the picture follow any output shape. #2400 sizes the title's memory budgets for the bigger scene (your 7200 MB render-target heap and 1600 MB scene pool, which match what you found by hand) and adds the `--aspect` selector. Without those budgets a full-size 21:9 scene reaches the title's out-of-memory break, as you showed. **How #2400 can go on top.** In `native_1440p.rs` both PRs add the same functions with the same signatures: - `settings_cave_bytes(output)` - `ui_pool_size(output)` - the display mode for an output (`display_mode(output)` here, `mode_for(output)` in #2400) - `prepare_for(image, render_1080p, output)` (`prepare_for_output` in #2400) That's where your 7 hunks come from. On top of this PR, #2400's part of that file comes down to its aspect detection (`output(aspect)`, `from_modes`, `detect`), which calls this PR's functions for the mode, the UI pool and the settings cave. Its `heap_budget.rs`, `play.rs`, menu and README changes don't touch anything this PR changes. In `run.rs` both set `VICTORY_DISPLAY_MODE` from the output in the same place, so a few lines need merging there, and #2400's `native_scene` for the budgets stays as it is. Either order works for me: - If #2400 lands first, I'll rebase this PR onto it and do the `native_1440p.rs` rework on this side, keeping its budgets and selector as they are. - If this one lands first, I can push #2400 rebased onto it to my fork for @⁠invismann to take or leave, so #2400's commits keep their authors. I won't fold #2400's code into this PR. AI use: Claude Code (Claude Opus 5.5) compared the two branches and wrote this.
github-bot force-pushed github-bot/gh-4330 from e827ce8e06 to cf7283754e 2026-12-01 05:29:23 +00:00 Compare
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/4331/head:github-bot/gh-4330'
git switch 'github-bot/gh-4330'

Merge

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