GPU: VICTORY_ADAPTER picks the host adapter by name #79
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/79"
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 Belobug/VIctory-Belobug-AMD. Originally posted by dutch2005 on 2026-11-25T13:34:43Z.
Why
On a laptop with switchable graphics, DXGI's ranking does not always put the discrete GPU first, and the title's own DXGI view can end up on the integrated one. The host device currently always takes the adapter Windows ranks fastest (
IDXGIGpuPreference::HighPerformance), with no way to say otherwise. Upstream carriesVICTORY_ADAPTERfor the same reason (Marvisak/VIctory#2367); this is written against this tree's device creation.What
VICTORY_ADAPTER=<part of a name>picks the first hardware adapter whose description contains the text, ignoring case (for exampleVICTORY_ADAPTER=radeon).Testing
cargo test -p victory-gpu --lib adapter -- --test-threads=1— 7 passed, 0 failed: env trimming, hardware flag, case-insensitive match, first matching hardware adapter, unknown name, a real adapter found by its own name, WARP rejection.adapters.is_empty()error guard (with no adapters the following index lookup returnsErreither way); it is documented indocs/mutation-testing.mdrather than suppressed.Notes
This only selects the host D3D12 adapter; it does not change the title's own DXGI adapter reporting. The environment guard, hardware filter, name match and selection are pure helpers; the DXGI enumeration is exercised by the real-adapter test.
Pull request closed