GPU: the console follows the adapter's memory (12 GiB or less: series-s) #3112
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3112
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@borosf on GitHub · 2026-11-26 08:28 UTC · original
borosf:vibe/series-s-by-memory-842ca5→main· +118 −8 · 4 files · 6 commits · openSummary
victory runnow defaults--consoletoauto: the first adapter's dedicated video memory picks the console the title sees — 12 GiB or less runs series-s, anything larger (or an unanswered DXGI query) runs series-x, as before.console::mode_size): 4K on series-x, the series-s target of 2560×1440, so titles that pace by the listed mode get the machine they were told they are on.console::profile_for), unit-tested at the boundaries (no answer, 10 GiB, 12 GiB, 12 GiB + 1, 16 GiB, 24 GiB); the adapter query (profile_by_adapter) runs once at startup before the device is created, matching the adapterD3D12CreateDevice(None, …)takes.--console series-x|series-sstill chooses outright, and the console line prints the adapter's MiB when auto picked it.Verification
-D warnings,cargo test --workspace --locked).cargo clippy -p victory-gpu --all-targets --locked -- -D warningsclean;cargo test -p victory-gpu --lib --locked— 232 passed, the only two failures being the known Intel heap-cap tests (#1744) that pristine main also fails on this card. The three new tests (console::tests::the_profile_follows_the_adapter_once_it_answers,console::tests::the_mode_matches_the_console,dxgi::tests::the_listed_mode_follows_the_console) pass on hardware.--console series-x|series-soverride works.claiming: default the console profile to series-s on cards of at most 12 GB, with matching DXGI modes (#1317 H-1.1)
@fuzeofficlal on GitHub · 2026-11-26 08:51 UTC · original · requested changes
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).@Dukestar69 on GitHub · 2026-11-26 08:55 UTC · original · approved these changes
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).
@borosf on GitHub · 2026-11-26 09:06 UTC · original
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.@Marvisak on GitHub · 2026-11-26 09:19 UTC · original
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
@HLVM04 on GitHub · 2026-11-26 09:26 UTC · original
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).
@fuzeofficlal on GitHub · 2026-11-26 09:39 UTC · original · approved these changes
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.
@FluffyCyanNova on GitHub · 2026-11-26 10:11 UTC · original
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.
@borosf on GitHub · 2026-11-26 12:18 UTC · original
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.