Share GPU selection between runtime and shader validation #7
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!7
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-7"
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?
@gomeaw on GitHub · 2026-11-25 23:08 UTC · original
gomeaw:fix/prefer-d3d12-adapter→main· +175 −33 · 5 files · 1 commits · merged 2026-11-26 08:17 UTCSummary
A hybrid laptop can give D3D12's default adapter to the Intel GPU even when the NVIDIA GPU can run the title. This adapts the high-performance preference and override from fxceless/victory-fork#261.
VICTORY_D3D12_ADAPTERcan pick a hardware adapter by DXGI index or name. The runtime logs the actual adapter, PCI IDs and VRAM.translate --pipelinesuses the selected adapter's wave size and AMD RDNA setting for translation, unless the caller gives explicit translation overrides. That keeps the check from asking a 32-lane card to compile the default wave64 output for programs for which a Wave32 lowering is available.Verification
Windows x64 built the application and passed the selector test. The CLI rejected an unknown explicit adapter and reported Microsoft Basic Render Driver when the WARP override was set. The asset policy passed. Windows validation
The original PR reports adapter selection and title boot on an Intel/NVIDIA hybrid laptop. A physical hybrid GPU check on this port is pending.
AI-assisted with Codex.
@Marcosmarb on GitHub · 2026-11-25 23:53 UTC · original
Tested this port on a physical hybrid-graphics laptop.
Machine: Windows 11 Home (26200), AMD Ryzen 7 6800HS, 16 GB RAM, Rust 1.98.1 (MSVC). DXGI lists:
DXGI_GPU_PREFERENCE_HIGH_PERFORMANCEputs the NVIDIA first.Branch:
0a4253f(this PR).victory translate --pipelines <empty folder>, with each value ofVICTORY_D3D12_ADAPTER:VICTORY_D3D12_ADAPTERpipeline adapter: NVIDIA GeForce RTX 3050 Laptop GPU01AMD Radeon(TM) GraphicsradeonAMD Radeon(TM) GraphicsNVIDIAbasicError: VICTORY_D3D12_ADAPTER=basic matched no hardware adapter(the software adapter is refused, as intended)nopeError: VICTORY_D3D12_ADAPTER=nope matched no hardware adapterTests on this branch:
an_explicit_adapter_matches_an_index_or_nameok;victory-gpulib326 passed, 0 failed, 34 ignored;victorybin10 passed.Caveat: on this laptop the NVIDIA is already DXGI adapter 0, so the case this PR is mainly for (Windows handing the default device to the integrated GPU) does not occur here by default. I did not reproduce it by forcing a power-saving GPU preference for the executable. Also not tested: anything in-game.
Side note for the integrated Radeon: it reports no mesh shader support, so preferring the discrete card (or failing clearly) matters on machines like this one.
Tested with the help of Claude Code.
@avatarmanz on GitHub · 2026-11-26 07:56 UTC · original
Merged into main in the next push (tests pass); thanks.
github-bot referenced this pull request2026-11-26 15:20:42 +00:00