GPU: VICTORY_ADAPTER picks the host adapter by name #79
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!79
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/79/head"
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?
@dutch2005 on GitHub · 2026-11-25 13:34 UTC · original
feat/adapter-override→main· +163 −1 · 2 files · 1 commits · closed without mergingWhy
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