VICTORY_D3D12_ADAPTER: a model number (6700, 4090) names its card instead of matching no index #300
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by compaccount1-coder on 2026-11-26T15:02:20Z.
What 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.