Skip to content

GPU: VICTORY_MODE overrides the reported console display mode - #1701

Open
Calvix2k wants to merge 1 commit into
Marvisak:mainfrom
Calvix2k:codex/gpu-output-mode-override
Open

Calvix2k wants to merge 1 commit into
Marvisak:mainfrom
Calvix2k:codex/gpu-output-mode-override

Conversation

@Calvix2k

Copy link
Copy Markdown
Contributor

Implements the VICTORY_MODE local patch @pfhandler posted under #1677.

Summary

The DXGI output mode list reported one fixed 3840x2160 mode, so a host smaller than the console still carried the 4K render targets and their VRAM cost (about 3.5 GB with the Series S profile and 1080p in the report).

  • VICTORY_MODE=<width>x<height> sets the reported mode; 1920x1080 is documented.
  • Both dimensions must be 1..=16384 (D3D12's texture limit); anything unparseable or out of range falls back to the console's 3840x2160, so the variable cannot make the mode list invalid.
  • README environment table updated.

Test

output_mode_override_parses_or_falls_back covers 1920x1080, whitespace, X as separator, the 4K value, zero, above-limit, and non-size strings.

Validation

  • cargo test -p victory-gpu --locked -- --test-threads=1 — passed (51 tests, 1 ignored).
  • cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings — passed.
  • cargo xtask policy — passed (154 files).
  • rustfmt --edition 2024 --check on the changed file — passed.

Tested by the reporter on GE-Proton 11-14 / vkd3d-proton 3.2.0 with an RTX 4060 Ti, where it kept the title's targets at 1080p.

@Calvix2k

Copy link
Copy Markdown
Contributor Author

Rebased onto 70564ae; the only conflict was the README environment table (upstream added two pipeline-log rows). Both sets of rows are kept. output_mode_override_parses_or_falls_back passes, clippy -D warnings and cargo xtask policy (174 files) are clean.

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review only: apps/Windows-only — nothing compiles on macOS; source review of the diff.

VICTORY_MODE overrides the reported console display mode (dxgi.rs + README). Debug/env override for mode reporting — check it cannot leak into release paths accidentally.

nazmi added a commit to nazmi/VIctory that referenced this pull request Nov 24, 2026
Review workers over ~45 more PRs against the merged upstream tree.

Integrated: Marvisak#1394 (antisymmetric XUserCompare), Marvisak#1390 (A8_UNORM is not in
the R8 typeless family), Marvisak#1499 (deep 3D mips stay out of the thick tail,
plus a regression test the PR lacked), Marvisak#1366 (mesh stage I/O does not parse
VS inputs), Marvisak#1594 (the title's exit status reaches the shell), Marvisak#1299 (docs:
validator prerequisite), Marvisak#1515 (dialog commands before init), Marvisak#1424 (empty
submissions skip the lock), Marvisak#1144 (shader differential skips are reported),
Marvisak#1129 (64 MB pipeline-worker stacks), Marvisak#1564/Marvisak#1565/Marvisak#1566 (MakeResident,
Evict and SetStablePowerState succeed as the console's do), Marvisak#1250 (a zero
element count reads to the end of the buffer), Marvisak#1628 (texture-creation
failure logs its states).

Re-applied after the upstream merge dropped them: f32_to_half NaN and
ties-to-even (Marvisak#843), unique-temp library writes (Marvisak#1660),
VICTORY_PIPELINE_WORKERS (Marvisak#1728), VICTORY_MODE (Marvisak#1701).

Removed: the orphaned depth-bounds test file, whose implementation
(9a6d9e6) the merge dropped and which no module compiled.

Refused: Marvisak#1099 (writing 0 for an unpaired p1 interpolation computes wrong
values; two reviewers upstream and one here reached the same conclusion).
Duplicates: Marvisak#1217, Marvisak#529, Marvisak#531, Marvisak#590, Marvisak#1102, Marvisak#398, Marvisak#1150, Marvisak#1220.

Gate at efda2c5: fmt 0 differing, both Clippy gates 0 errors, policy 219
files, workspace 674 passed / 0 failed with the 10 documented pre-existing
GPU skips.
@Calvix2k
Calvix2k force-pushed the codex/gpu-output-mode-override branch from 2e33598 to c985ce1 Compare November 25, 2026 00:44
The DXGI output mode list was fixed at the console's 3840x2160, so hosts
smaller than that carried the 4K render targets and their VRAM cost. Read
VICTORY_MODE=<width>x<height> instead (both dimensions 1..=16384); an
unparseable or out-of-range value keeps the 4K default.

From the local patches @pfhandler posted under Marvisak#1677 while running through
vkd3d-proton on an 8 GB card.

Validation:
- cargo test -p victory-gpu --locked -- --test-threads=1
- cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings
- cargo xtask policy
- rustfmt --edition 2024 --check on the changed file
@Calvix2k
Calvix2k force-pushed the codex/gpu-output-mode-override branch 2 times, most recently from b380544 to fb27a56 Compare November 25, 2026 02:17

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Merge candidate, unchanged. The head is still fb27a56, and it merges cleanly into current main. main still reports a fixed 3840x2160 mode in crates/victory-gpu/src/dxgi.rs, and nothing on main reads VICTORY_MODE. The opt-in override is range-checked (1..=16384) by parse_mode and covered by output_mode_override_parses_or_falls_back. The earlier optional suggestion stands: log a warning when the value is invalid, as VICTORY_WINDOW_MAX does.

On the replies: the five failures in StExpeditus's NVIDIA report are the descriptor-heap and hardware tests that also fail on main, so nothing changes.

CI: passing (check).


Generated by Claude Code

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
@StExpeditus

Copy link
Copy Markdown

Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at fb27a56. cargo test --workspace --locked --no-fail-fast -> 697 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.

@Calvix2k

Copy link
Copy Markdown
Contributor Author

Thanks — the same five NVIDIA heap-cap failures as on main, and nothing from this PR. Noted on the record.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
@fuzeofficlal

Copy link
Copy Markdown
Contributor

Code review and RTX 5090 + WARP verification at head fb27a56d0c09 merged cleanly onto main (63bcca43c6a0):

  • Code review (crates/victory-gpu/src/dxgi.rs:232-286):
    • parse_mode/mode_size accept VICTORY_MODE=<width>x<height> (case-insensitive x/X, trimmed), clamp both dimensions to 1..=16384, and fall back cleanly to (3840, 2160) on empty, malformed, out-of-range, or non-UTF-8 values. Verified no other hardcoded 3840/2160 remains in victory-gpu/src; refresh rate (60/1), format, scanline order, and swapchain sizing/HDR are untouched.
    • Note: mode_size() is active in both default and diagnostics builds (no #[cfg(feature = "diagnostics")] gate), while README.md:215 lists VICTORY_MODE under ## Debugging (purely a minor doc-placement note).
  • Verified (Windows 11, NVIDIA RTX 5090 + WARP, VICTORY_D3D12_DEBUG=1, Rust 1.98.1):
    • cargo xtask policy: 191 files ok; cargo clippy --locked -p victory-gpu --tests -- -D warnings (default + --features diagnostics): 0 warnings
    • dxgi::: 3/3 passed on default RTX 5090, --features diagnostics RTX 5090, and --features diagnostics WARP.

LGTM.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants