VICTORY_D3D12_ADAPTER: a model number (6700, 4090) names its card instead of matching no index #300
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!300
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-300"
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?
@compaccount1-coder on GitHub · 2026-11-26 15:02 UTC · original
compaccount1-coder:fix/adapter-number-names→main· +65 −16 · 1 files · 1 commits · openWhat and why
The README says
VICTORY_D3D12_ADAPTERtakes "a zero-based DXGI index or part of the adapter's name", butadapter_matchestreated any value that parses as a number as an index only. A card's model number is the obvious part of its name to type, and it never matched:VICTORY_D3D12_ADAPTER=6700on a PC with an RX 6700 XT: no adapter has index 6700, socreate_preferred_devicereturnsVICTORY_D3D12_ADAPTER=6700 matched no hardware adapterand the run ends.host()comes backNone, and every GPU test returns early as if there were no GPU. They pass without having run. That is how I found it: a failing GPU test passed with6700, in 0.01 s.The same goes for
4090,3080,5070,9070and so on.The change
A number is an index where an adapter has it, and otherwise part of a name like any other text. The choice is now a plain function,
pick_adapter, over the adapters DXGI lists, so it can be tested without a GPU.0,1, ...).Tested
an_explicit_adapter_matches_an_index_or_namewas rewritten forpick_adapter. It keeps the old cases (index, name, empty, case) and adds the software adapter by index and by name, plus model numbers on a laptop and a desktop list.6700and0pick the RX 6700 XT (the GPU tests run on it),1andradeon(tm)the integrated GPU, and4090and2(WARP) nothing.cargo clippy -p victory-shader --all-targets --locked -- -D warningsis clean. Only this file changes.AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
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.