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) #4330
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4330"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-30T18:57:11Z.
VICTORY_NATIVE_WIDE=1renders correctly: the title's window, UI targets and upscaler output follow the monitor's shape.Since
cbb4fe61the output is 2560x1440 on every monitor, andVICTORY_NATIVE_WIDE=1opts 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). At0x2475C50it 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.+0x56a2afd.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.rsdisplay_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.preparepasses the output explicitly (prepare_for) to the settings cave, the pool and the temporal scale. TheVICTORY_NATIVE_WIDEcomment now says what broke wide outputs.apps/victory/src/run.rs: when the image lists a non-stock mode, the same mode is reported throughVICTORY_DISPLAY_MODE(as #2210 does).VICTORY_NATIVE_OUTPUT=WxHnames the output for the host.crates/victory-gpu/src/draw.rs:native_frontend_viewportlooked 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. OnlyVICTORY_NATIVE_WIDE=1on a non-16:9 monitor, or a non-16:9VICTORY_NATIVE_SIZE, takes the new path.for_monitoris unchanged too. An explicitVICTORY_NATIVE_SIZEof another shape also gets a consistent display size now (for example 2560x1080), but those shapes have not been run.How it was tested
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 everyfor_monitorshape 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 warningsit fails exactly as on main84bd61e2:rangedin shadow.rs andmbin copystat.rs are never used, host.rs has a manualis_multiple_of, and xmem.rs has a match that could beunwrap_or_default.cargo xtask policyreports one hit, also on main: a 560-character hex run incrates/victory-shader/src/native.rs(698ab79e). This PR adds none.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.84bd61e2: window2560x1440, display mode reported3840x2160, host output2560x1440, upscalermax_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.display mode 3440x1440 listed for the title, window3440x1440, display mode reported3440x1440, host output3440x1440, upscalermax_render=[2293, 960] max_output=[3440, 1440], DLSSrender=[2293, 960] output=[3440, 1440](its optimal for Quality). Every capture is a whole, clean 21:9 picture with the character drawn normally.VICTORY_NATIVE_SIZE=5120x1440: no stop at+0x56a2afd, in the world at 71 s. The window, the display mode reported and the host output are5120x1440, the upscaler ismax_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.VICTORY_NATIVE_SIZE;for_monitorstill gives such monitors 2560x1440): window, display mode, host output and upscaler all2560x1080(max_render=[1706, 720]), a clean picture. Before, the host stayed at 2560x1440 there (#2210's report).VICTORY_NATIVE_WIDE=1on our 16:9 monitor): the stock path, as on main. The mode reported is3840x2160, there is no listed-mode line, everything is2560x1440(max_render=[1706, 960]), and the picture is clean.e1251c3with this PR,VICTORY_NATIVE_WIDE=1 VICTORY_NATIVE_SIZE=3440x1440, DLSS off): the display mode reported to the title goes from3840x2160to3440x1440. With DLSS off the whole 3440x1440 scene then reaches the title's out-of-memory break (see Known limits). WithVICTORY_RT_HEAP_MB=8000 VICTORY_SCENE_POOL_MB=1600, or with #2400's automatic budgets, it runs with a 21:9 picture.Known limits
VICTORY_RT_HEAP_MB/VICTORY_SCENE_POOL_MB, or #2400's automatic budgets, cover it.VICTORY_NATIVE_SIZEalone does not give a wide output on main: the image is patched, but the mode reported stays3840x2160, so the picture is 16:9 stretched (found by Kassadd). This PR is what closes that.play --res 1440keeps the output 16:9, which hides the problem.Checked for overlap
native_1440p.cbb4fe61). This PR is the part that makes the wide output itself work.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
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-30T19:03:31Z.
In-game results added to the description. On a 2560x1440 monitor, windowed, with
VICTORY_NATIVE_WIDE=1andVICTORY_NATIVE_SIZE(RTX 5080, Series X, DLSS Quality):84bd61e2keeps 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.+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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Kassadd on 2026-11-30T19:40:46Z.
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 X1.0.2.1,a 3440x1440 monitor beside a 1080p one. Built
mainate1251c3with this PR on top; itapplied 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:
display mode reported to the titlemain,NATIVE_SIZE=3440x14403840x21600x80000003at+0x2219650main+ this PR, same3440x1440main,NATIVE_SIZE=2560x14403840x2160So 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 theretail image's budgets are sized for — and stops in its out-of-memory break, exactly as
apps/victory/src/heap_budget.rsdescribes for a 3840x2160 scene ("2.25 times the pixels anddoes not fit: the break is reached from
+0x4fac3c0, which found no room for 2 MB or 32 MB").Two things that may be useful:
…/victory/data/7952987A/crashes.log, asunhandled exception 0x80000003 at …+0x2219650 (breakpoint cc 4c 89 f1 …), withrdi,rdxandr11all0x2b0800— 2.69 MB it could not have. Worth knowing before reading arun's log as "it just ended".
VICTORY_RT_HEAP_MB=8000andVICTORY_SCENE_POOL_MB=1600on top of your PR itruns: the log reads
display mode 3440x1440, the F2 panel readsOUTPUT 3440x1440, andthe 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_SIZEalone does not reach a wide output onmain— the image ispatched (
native-3440x1440-sdr) but the display mode reported stays3840x2160, so thepicture is still 16:9 stretched. Your PR is what closes that. As a side effect
playwith--res 1440(the documented Linux configuration) also hides the problem by keeping the output16:9, which is why it is easy to miss.
What I did not test: 32:9,
VICTORY_NATIVE_SIZEshapes other than 16:9 and 21:9, DLSSupscaling 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 offon this machine), and thestretched HUD, which your description already accounts for as a follow-up.
Logs and the exact invocation on request.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Kassadd on 2026-11-30T20:10:39Z.
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 X1.0.2.1,3440x1440@360 monitor beside a 1080p one.
mainate1251c3.This PR does what it says. With
VICTORY_NATIVE_WIDE=1the display mode reported to thetitle goes from
3840x2160(whatmainsays withVICTORY_NATIVE_SIZE=3440x1440, imagepatched and all) to
3440x1440. That is the seam at 74.4 % gone at the root, and it isthe 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, thetitle 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:
2.69 MB it could not have.
heap_budget.rsalready describes this for the 4K case ("twoof 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:9andno memory switches at all, it prints:
and then runs:
display mode 3440x1440, F2OUTPUT 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=1600by 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:
--aspectselectorGeneral 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-modewrite and
ui_pool_sizefor the same outputs. Whoever moves second will have to rework thatfunction 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 Ihave 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 offon this machine).Logs and the exact invocation on request.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-12-01T03:54:46Z.
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.logpointer will save the next tester a run too. I'll add your note to the description:VICTORY_NATIVE_SIZEalone 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
--aspectselector. 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.rsboth PRs add the same functions with the same signatures:settings_cave_bytes(output)ui_pool_size(output)display_mode(output)here,mode_for(output)in #2400)prepare_for(image, render_1080p, output)(prepare_for_outputin #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. Itsheap_budget.rs,play.rs, menu and README changes don't touch anything this PR changes. Inrun.rsboth setVICTORY_DISPLAY_MODEfrom the output in the same place, so a few lines need merging there, and #2400'snative_scenefor the budgets stays as it is.Either order works for me:
native_1440p.rsrework on this side, keeping its budgets and selector as they are.AI use: Claude Code (Claude Opus 5.5) compared the two branches and wrote this.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.