GPU: the console follows the adapter's memory (12 GiB or less: series-s) #3110
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3112"
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 Marvisak/VIctory. Originally posted by borosf on 2026-11-26T08:28:00Z.
--console auto(the new default) picks the Series S profile when the high-performance adapter's dedicated video memory is 12 GiB or less, and Series X otherwise or when the query gives no answer. An explicit--console series-x|series-sstill overrides it, and the run prints which profile was chosen and why.Why: the Series X profile sizes a title's memory at 13.5 GiB (10 of them GPU-optimal) and paces 4K targets, which a 12 GiB-or-less card does not hold. The Series S mode was worth about half the frame on a 10 GB RTX 3080 (2,699 → 1,898 ms; #1317, H-1.1).
What is in this diff
victory_gpu::console::profile_for(Option<usize>)— the threshold rule (12 GiB or less: Series S; no answer: Series X, as before).victory_gpu::console::profile_by_adapter()— asks DXGI for the HIGH_PERFORMANCE adapter'sDedicatedVideoMemory.--console auto|series-x|series-sflag on the run command, defaulting toauto, and the line the run prints.the_profile_follows_the_adapter_once_it_answers, pinning the boundary (None / 0 / 10 / 12 / 12 GiB + 1 / 16 / 24 GiB).What I took out of this description after review
An earlier version of this body claimed
console::mode_sizeand two further tests (the_listed_mode_follows_the_console,the_mode_matches_the_console). They are not in this diff and never were —dxgi.rsstill hardcodes 3840×2160 for every console, so a Series S title is still paced at 4K. That is the remaining half of the idea and it needs its own PR; this one is only the profile choice. Sorry for the misleading summary.Risks a maintainer should weigh before taking it
profile_by_adapter()enumerates withD3D12CreateDevice's preference while the device is made withD3D12CreateDevice(None, …)(host.rs:193), so on a hybrid machine the two can disagree — #3073 is the open PR about that mismatch.profile_for(Some(0))is Series S, so an iGPU or a shared-memory adapter with 0 dedicated bytes chooses the smaller budget by design.Synthetic tests only, no game files. If the maintainer would rather this be opt-in rather than the default, that is a one-line change to the flag's default and I will make it.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T08:51:56Z.
Review: CHANGES_REQUESTED
Verified locally on Windows 11:
cargo clippy -p victory-gpu -p victory --all-targets -- -D warnings(default and--all-features): cleanvictory-gpuconsole::+dxgi::(5/5),victorytests (18/18), andcargo xtask policy(191 files ok) all passed.victory_hle::consolere-exportsvictory_gpu::console(sodxgi::modessees the selected profile) and no stray hardcoded3840/2160remains indxgi.rs.Two small issues to fix before merging:
1. Misleading startup output when DXGI returns
None(apps/victory/src/run.rs:84-92)When
dedicatedisNone,profile_for(None)choosesSeriesX, so this printsconsole Xbox Series X (auto: 0 MiB of dedicated video memory)— which contradicts the<= 12 GiB => series-srule and looks like a bug. Please branch ondedicated(e.g.,(auto: {} MiB of dedicated video memory)forSome(bytes)vs(auto: adapter memory unavailable)forNone).2. Hardcoding
EnumAdapters1(0)misclassifies hybrid / multi-GPU systems (crates/victory-gpu/src/console.rs:132-144)On hybrid laptops and dual-GPU desktops where an integrated GPU is wired to the primary display as adapter 0 (
DedicatedVideoMemory= 128-512 MiB) and a 16-32 GiB discrete GPU is adapter 1,EnumAdapters1(0)silently forces--console autotoseries-s— which also causes it to disagree with#3073(high-performance adapter selection) rather than composing with it. QueryingIDXGIFactory6::EnumAdapterByGpuPreference(0, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE)(skippingDXGI_ADAPTER_FLAG_SOFTWARE) with fallback toEnumAdapters1(0)avoids misclassifying hybrid systems (and can share the same helper once#3073lands).Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T08:55:23Z.
Review: APPROVED
Verified on RTX 5090 against
origin/main(63bcca4):cargo test -p victory-gpu --lib console:: -- --test-threads=1: passed.cargo test -p victory-gpu --lib host::tests -- --test-threads=1 --skip dynamic_slots_are_held_until_released: 30/30 passed.cargo test -p victory-hle --lib modules::xsystem:: -- --test-threads=1: 4/4 passed.cargo clippy -p victory-gpu -p victory-hle -p victory --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly defaults the console profile to
series-swhen the host adapter has <= 12 GiB memory while keeping explicit overrides intact.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T09:39:23Z.
Review: APPROVED
Re-reviewed at
261527bc. Both issues from the previous review are cleanly resolved:apps/victory/src/run.rs:121-125now prints(auto: adapter memory unavailable)whendedicatedisNoneinstead of0 MiB.crates/victory-gpu/src/console.rs:51-92queriesIDXGIFactory6::EnumAdapterByGpuPreference(0, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE)first, skipsDXGI_ADAPTER_FLAG_SOFTWARE, and falls back toEnumAdapters1(0).Verified locally on Windows 11 in a dual-GPU setup (NVIDIA GeForce RTX 5090 32 GiB + AMD Radeon iGPU):
victory_gpu::console::profile_by_adapter()returns(Console::SeriesX, Some(33750515712))(32187 MiB), correctly selecting the discrete RTX 5090 rather than the AMD iGPU.cargo clippy --workspace --all-targets -- -D warnings: cleancargo clippy --workspace --all-targets --all-features -- -D warnings: cleancargo xtask policy:191 files okvictory-gpu:console::2/2 passed,dxgi::3/3 passedvictory: 14/14 unit tests + 4/4 integration tests passedLGTM.
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-26T09:06:27Z.
Both fixed in
dd1d3bb. The auto line now prints adapter memory unavailable when DXGI gives no answer (no answer names series-x, as the rule says), and the memory query takes the high-performance adapter via IDXGIFactory6::EnumAdapterByGpuPreference(0, HIGH_PERFORMANCE), skipping the software adapter, with a fallback to EnumAdapters1(0) — the same selection #3073 makes, so hybrid machines profile their discrete card and the two compose. The selection helper can be shared into #3073 when it lands.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T09:19:53Z.
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. This adds
console::profile_for/profile_by_adapter(crates/victory-gpu/src/console.rs), makes--console autothe default (apps/victory/src/main.rs), and makesdxgi.rs::modesfollow the console (2560x1440 on series-s). The explicit--consolechoices still work. What blocks it:title_memory, thexsystemconsole mode). That is for the maintainer to decide.mode_sizechange.dxgi::tests::the_listed_mode_follows_the_consolecomparesmodesagainstmode_size(current()), so it only restates the implementation.autopicks.CI:
checkpassing.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by HLVM04 on 2026-11-26T09:26:28Z.
Data for the default decision. This is from the fork (fxceless/victory-fork at
9376fd6with its PR #798, which keeps the title's own upscaler), not from upstream main. RTX 5070 Ti 16 GB, Windows 11, first gameplay scene, one run each:So on that tree a 16 GB card also ran faster as Series S, and the 12 GiB rule would keep that card on series-x.
One thing to check before series-s becomes the default: on Series S the title presents 2 planes. Plane 0 is the 1920x1080 world. Plane 1 is a 3840x2160 RGBA8 layer that holds the menus, the intro video and the HUD's control hints. On Series X the title blends that layer into one plane itself. A host that shows only plane 0 gives a black intro video and missing menus on series-s (#1854).
Imported from Marvisak/VIctory. Originally posted by FluffyCyanNova on 2026-11-26T10:11:07Z.
Data point for #3112: Series S on an RTX 3060 12 GB + 4-core i3 (1280x720 internal, 2.6 fps average, ~3.0 settled, CPU-bound)
This supports the rule: a 12 GiB card should not run the series-x profile by default.
Machine: RTX 3060 12 GB (32-lane waves), Core i3-12100F (4 cores), 32 GB RAM, game on an HDD, Windows 11.
--console series-s.Setup: fork
9376fd60+ our port stack + fork #798 (the title keeps its own upscaler, not FSR),VICTORY_RELAY=2,VICTORY_CARD_ROOM_FOR_BUFFERS=1, 17 min in the world after the opening.Results (b43run1):
Comparison on the same machine, series-x profile on the same line: the same scene ran at about 1.3-1.8 fps with a larger target and a much higher GPU time (GPU 127-159 ms in the fast runs, and up to ~1.9 s in a slow combination of ports described in a fork issue). We do not claim a clean A/B for the profile alone: the series-s run is one change on top of the series-x run (b40run1 at 755 ms/frame, 1.33 fps).
So for this class of card the series-s profile is both what fits in memory and the faster one.
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-26T12:18:53Z.
The three actionable items from the triage are fixed at the new head
5345e2f(CI green):dxgi::modesis back to the single fixed 4K mode — the diff against main fordxgi.rsis empty now. A real Series S lists the mode of the display it is connected to, so the fixed 1440p had no citable basis, and per HLVM04's note the two present planes also mean the listed mode is not what paces the title anyway.the_listed_mode_follows_the_consoleis removed with it. The remaining console test (the_profile_follows_the_adapter_once_it_answers) checks the ≤ 12 GiB boundary rule directly, independent of the query.On the default itself, that is the maintainer's call; the data we have says a card that size both fits and runs better under series-s: a 12 GB RTX 3060 (i3-12100F, 17 min in the world) ran 389 ms/frame median as series-s — CPU-bound (GPU 85 ms), vs about 755 ms/frame as series-x on the same line — and on an RTX 5070 Ti 16 GB the series-s profile was also the faster one (169 ms vs 257 ms median). HLVM04's second-half note is well taken: a host that shows only plane 0 gives a black intro and missing menus on series-s (#1854), which is worth resolving before auto-on defaults everywhere.
Thanks @fuzeofficlal and @Dukestar69 for the re-reviews and the dual-GPU verifications — the selection helper here (
EnumAdapterByGpuPreference+ software skip +EnumAdapters1(0)fallback) is ready to be shared into #3073 when it lands.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.