fix(gpu/streamline, app): scene sides behind DLSS/FSR made multiples of 8 so the title draws its clouds (VICTORY_FFX_RENDER_ALIGN) #332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/332"
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 Androtim/MiniVI. Originally posted by PiloteCode on 2026-12-02T12:28:03Z.
Summary
Behind DLSS (or FSR 3 frame generation),
prepare_upscalergives the titleMode::scale()of its output, and the title truncates: MiniVI's default (--res 1440 --dlss quality) draws a 1706x960 scene, Series S at DLSS performance 960x540. At exactly those two sizes we found that the title does not draw its clouds: the compute programs of its cloud pass are never bound (its own code skips them; nothing of ours is refused in the logs). At 1280x720 (the size its own upscalers use) the clouds are there.This PR picks, for the output at hand, the largest scale at most the mode's (and no less than 85 % of it) whose scene has both sides multiples of 8, and gives that to the title: 1664x936 for 2560x1440 at quality, 952x536 for 1920x1080 at performance, 1480x832 for 1440p balanced, 840x472 for 1440p ultra performance; sizes already aligned (4K quality 2560x1440, 4K performance 1920x1080, 1080p quality 1280x720) keep the mode's own scale. Every aligned size still picks the same DLSS mode in
pick_mode(tested).VICTORY_FFX_RENDER_ALIGN=<n>(2-64) changes the alignment,=1turns it off (the mode's exact scale, as before).Our fork has shipped it since 2 Dec; there the same scale is written by its 1440p profile code.
Changes
crates/victory-gpu/src/streamline/plan.rs:Mode::scale_for(output),Mode::render_size_for(output),render_align(),sizes(),aligned_scale()(pure math, single-precision as the title computes, exact float found by stepping ULPs); testaligned_scales_give_aligned_scenes(all modes x 1440p/4K/1080p x alignments 2-16, bounds, and that each aligned 1440p size picks its own DLSS mode).apps/victory/src/native_1440p.rs:prepare_upscaler(image, mode, output)writesmode.scale_for(output)where it wrotemode.scale(); at quality the stock constant is still used when it already gives aligned sides (4K). No new addresses, hashes or bytes: only the value written changes. The env-gated image test follows.apps/victory/src/run.rs: passes the output (2560x1440 after the 1440p patch; else Series S 1920x1080, Series X the reported display mode, 3840x2160 by default) and prints the scene size actually drawn.Rig Specs Tested On (our fork, not this tree)
Run Settings & Profile
Measurements & Verification
main3230974; offline,--locked, toolchain 1.98.1-msvc):cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test(not run by us on this tree)cargo xtask policy(not run; no new addresses, hashes or byte runs)Limits
pick_modestill chooses the same mode, and that the patched image is rewritten when the scale changes (write_if_changed), but this branch was not run in the game.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T12:49:05Z.
Read-only security & triage review on
c062035e(external authorPiloteCode— awaiting manual owner approval per repository security allowlist policy; not built/executed locally and not auto-merged):apps/victory/src/{native_1440p.rs,run.rs}andcrates/victory-gpu/src/streamline/plan.rs(+159/-15); noCargo.toml,build.rs,.github/workflows/, binaries, shell/network calls, or clean-room violations.VICTORY_FFX_RENDER_ALIGN=8default,=1off) so volumetric cloud passes render properly. Needs manual owner approval to run CI + real-GPU visual PNG & plain---releaseverification.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T13:05:21Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
CI is passing, static checks are clean, and the implementation is well-scoped and sound. Because this changes the default DLSS/FSR render resolution on 1440p Quality (
1706x960->1664x936) and Series S Performance (960x540->952x536)—and the branch has not yet been run in-game on MiniVI's DLSS path—this warrants a quick real-GPU smoke test before merging.What Was Verified
crates/victory-gpu/src/streamline/plan.rs:aligned_scale,sizes,render_align,Mode::scale_for, andMode::render_size_forcleanly search downward in single-precision ULP steps for the largest<= scaleyielding both dimensions divisible byalign(default8, configurable2..=64,1to disable). Confirmed againstpick_mode/pick_mode_bythat the aligned 1440p and 1080p render sizes still map to their intendedsl::DLSSMode. Unit testaligned_scales_give_aligned_scenescovers 1080p/1440p/4K across all modes and alignments2..=16.apps/victory/src/native_1440p.rs:prepare_upscalernow takesoutput: [u32; 2]and patchesNATIVE_LOAD + 4/SCALED_LOAD + 4whenevermode != Mode::Quality || scale != mode.scale(), keeping the stockUPSCALER_SCALE(2/3) untouched when already aligned (e.g. 4K Quality). No new binary offsets, hashes, or byte patterns are introduced.apps/victory/src/run.rs:title_output(console)resolves1920x1080for Series S andVICTORY_DISPLAY_MODE(defaulting to3840x2160) for Series X whennative_1440pis off, and startup output prints the actual aligned render size.Minor Non-Blocking Notes
render_align(), settingVICTORY_FFX_RENDER_ALIGN=""(or an unparseable value) falls back to1(disabled) rather than the default8.lowest = (h as f32 * scale * 0.85) as u32truncates, so on unusual aspect ratios where the first aligned height equalslowest, the returned scale could sit slightly belowscale * 0.85(not hit for standard 16:9 outputs).Verdict
needs-gpu-test: Ready for a local real-GPU smoke test on MiniVI's DLSS/FSR path to confirm clouds render at1664x936(1440p Quality) and no Streamline/DLSS sizing regressions occur.Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T13:18:20Z.
Allowlist & Architect Deep Review (
PiloteCodeis now on the trusted allowlist; CI46881385348is GREEN):Code audit (
crates/victory-gpu/src/streamline/plan.rs,apps/victory/src/native_1440p.rs,apps/victory/src/run.rs):unsafe, mathematically exact single-precisionaligned_scale()(ULP search bounded,height >= lowest.max(align)prevents underflow, zero/invalid dimensions guarded, bothVICTORY_FFX_RENDER_ALIGN=1and=0cleanly disable).1440pQuality (1706x960->1664x936, exact 16:9, multiples of 8) and1080pPerformance (960x540->952x536) are aligned while already-aligned modes (4KQuality2560x1440,4KPerformance1920x1080,1440pPerformance1280x720,1080pQuality1280x720) stay untouched.prepare_upscaleradds no new binary addresses/hashes.Next step (
triage: needs gpu test): Because this changes the default1440pDLSS Quality render resolution to restore clouds, it needs--features diagnosticsvisual PNG before/after verification (1706x960vs1664x936) plus a plain--releaseA/B check onmain(b0842d93+).