GPU: make the device on the high-performance adapter, not the default #27
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27"
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 Zettrox/ztrx. Originally posted by iNaxxs on 2026-11-25T03:54:12Z.
The problem
create()incrates/victory-gpu/src/host.rsmakes the host device withNonemeans the system's default adapter. On a laptop with switchablegraphics DXGI reports the integrated GPU first, so the device is made on
that one. On this machine (Ryzen 5 8645HS, Radeon 760M + RTX 4050 Laptop
GPU, Windows 11) DXGI reports:
(adapter 0 is the integrated Radeon 760M, which DXGI names "AMD Radeon(TM) Graphics".)
Every submission went to the Radeon, whose wave width is not the one the
translator is tuned for (
set_host_max_waveright below takes whatever thedevice reports). Nothing in the log said which card had been taken, and none
of the
VICTORY_*switches picks one.The change
discrete_adapter()asks DXGI for the high-performance adapter(
IDXGIFactory6::EnumAdapterByGpuPreference), refuses a software one, andreturns
Nonewhen DXGI is too old to be asked or has nothing to offer.create()then falls back to the oldNonebehaviour, so a desktop withone card is unaffected.
(
host adapter), with its vendor and dedicated memory.adapters_on_this_machine(ignored, on demand) reports what the machinehas and which card was taken.
the_high_performance_adapter_is_never_softwareruns everywhere andreturns early when DXGI has nothing to prefer.
The
VICTORY_D3D12_WARPpath is untouched.Checks on this machine
cargo build --release -p victorycargo clippy --all-targets -- -D warningscargo xtask policycargo testadapters_on_this_machineafter the changeBefore the change the same suite passed with 496 tests, every GPU test among
them running on the Radeon.
cargo fmt --checkfails onmainwithout this change, on 56 files acrossevery crate, mostly lines over 100 columns that rustfmt wants to wrap. This
change adds one such line, in
adapter_name, in the style of the code aroundit. Happy to split it, or to leave formatting to a decision of yours.
Not covered
No game files here, so this is the platform side only: the device is made on
the right card and the suite passes. Whether the frame rate or the known
shadow and exposure problems change on an RTX 4050 is untested.
🤖 Generated with Claude Code
https://claude.ai/code/session_013pnbLtdoTFoEWJQyG7rozM
Imported from Zettrox/ztrx. Originally posted by futurepro62 on 2026-11-25T06:38:29Z.
Full-suite run on Windows, since this PR has no test report yet. Tested exact head
a4da48b(on its base90b529f).Tested
rust-toolchain.toml), DXC + dxil.dll 1.9.2602.17, debug.cargo test --workspace --locked: 497 passed, 0 failed, 8 ignored (main90b529fon this machine: 496 passed, 0 failed, 7 ignored).cargo clippy --workspace --all-targets --locked -- -D warnings(the CI lint step): passed.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(the CI lint step): passed.the_high_performance_adapter_is_never_software.#[ignore]testadapters_on_this_machine, run on its own with--ignored --nocapture(this machine has a discrete NVIDIA card and an AMD iGPU), passed:Not tested
AI use
upstream-sync referenced this pull request2026-11-25 08:09:09 +00:00
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.