Host device on the high-performance adapter, not adapter 0 (iGPU PCs) #555

Open
github-bot wants to merge 2 commits from github-bot/gh-555 into main AGit
Owner

@⁠regiumlepidi on GitHub · 2026-11-28 00:50 UTC · original
regiumlepidi:gpu-preference → main · +73 −5 · 3 files · 2 commits · open

D3D12CreateDevice(None) takes DXGI adapter 0, i.e. whichever adapter drives the main display. On a PC whose CPU has an integrated GPU (every Ryzen 7000/9000, most Intel desktop CPUs) that can be the integrated one. It happened to me when the monitor went to sleep during an unattended run: the device went to the Ryzen 9800X3D's Radeon (a 31.5 GB shared-memory budget, DLSS refused with "adapter not supported", under 1 fps) while the RTX 5070 Ti sat idle. Plugging the monitor into the motherboard would do the same.

Changes

  • host.rs: the device is created on the adapter that IDXGIFactory6::EnumAdapterByGpuPreference(HIGH_PERFORMANCE) ranks first, never a software adapter, and the log names it.
  • streamline.rs: Streamline's adapter query uses the same choice. It used adapter 0 on its own, so even with the device fixed, DLSS still said "adapter not supported".
  • VICTORY_GPU_PREFERENCE=0 restores the old behaviour. On a single-GPU PC both choices are the same adapter, so nothing changes there.

Verified in runs on an RTX 5070 Ti, driver 617.42, with the monitor asleep. Before: adapter 0 = AMD Radeon(TM) Graphics. After: host device on the high-performance adapter adapter="NVIDIA GeForce RTX 5070 Ti", a 15227 MB budget, Streamline loads with dlss=true, and the opening is back to 15–23 fps. cargo check -p victory-gpu and cargo xtask policy pass.

This change was made with AI assistance (Claude Code), and I tested it on my own hardware.

🤖 Generated with Claude Code

**@⁠regiumlepidi** on GitHub · 2026-11-28 00:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/555) `regiumlepidi:gpu-preference` → `main` · +73 −5 · 3 files · 2 commits · open `D3D12CreateDevice(None)` takes DXGI adapter 0, i.e. whichever adapter drives the main display. On a PC whose CPU has an integrated GPU (every Ryzen 7000/9000, most Intel desktop CPUs) that can be the integrated one. It happened to me when the monitor went to sleep during an unattended run: the device went to the Ryzen 9800X3D's Radeon (a 31.5 GB shared-memory budget, DLSS refused with "adapter not supported", under 1 fps) while the RTX 5070 Ti sat idle. Plugging the monitor into the motherboard would do the same. **Changes** - `host.rs`: the device is created on the adapter that `IDXGIFactory6::EnumAdapterByGpuPreference(HIGH_PERFORMANCE)` ranks first, never a software adapter, and the log names it. - `streamline.rs`: Streamline's adapter query uses the same choice. It used adapter 0 on its own, so even with the device fixed, DLSS still said "adapter not supported". - `VICTORY_GPU_PREFERENCE=0` restores the old behaviour. On a single-GPU PC both choices are the same adapter, so nothing changes there. **Verified** in runs on an RTX 5070 Ti, driver 617.42, with the monitor asleep. Before: adapter 0 = AMD Radeon(TM) Graphics. After: `host device on the high-performance adapter adapter="NVIDIA GeForce RTX 5070 Ti"`, a 15227 MB budget, Streamline loads with `dlss=true`, and the opening is back to 15–23 fps. `cargo check -p victory-gpu` and `cargo xtask policy` pass. This change was made with AI assistance (Claude Code), and I tested it on my own hardware. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
D3D12CreateDevice(None) takes DXGI adapter 0, the one driving the main
display. On a PC with an integrated GPU that can be the integrated one: here
a Ryzen 9800X3D's Radeon took the run once the monitor went to sleep (budget
31.5 GB of shared memory, DLSS refused as "adapter not supported", under one
frame a second) while the RTX 5070 Ti sat idle.

- host: the device goes on the adapter IDXGIFactory6::EnumAdapterByGpuPreference
  ranks first for performance (never a software one); the log names it.
- streamline: DLSS is asked for on that same adapter (it took adapter 0 on its
  own, so with the device fixed DLSS still said "adapter not supported").

VICTORY_GPU_PREFERENCE=0: adapter 0, as before. On a PC with one GPU both
choices are the same adapter.

Verified in runs on an RTX 5070 Ti with the monitor asleep: adapter 0 = AMD
Radeon(TM) Graphics; with this change the log names the RTX 5070 Ti, budget
15227 MB, Streamline loads with dlss=true, and the opening is back to 15-23
frames a second.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 00:55:33 +00:00
The translator's own Host made its device on DXGI adapter 0, like the game's
host device before 4926655d. With the monitor asleep that was a Ryzen
9800X3D's Radeon, whose compiler (amdxc64.dll) crashed the whole
`translate --pipelines` run on one valid pixel program (an access violation
in the driver; the same program builds on the RTX 5070 Ti). Same choice as
the game now: EnumAdapterByGpuPreference(HIGH_PERFORMANCE), never software;
VICTORY_GPU_PREFERENCE=0 = adapter 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠regiumlepidi on GitHub · 2026-11-28 01:33 UTC · original

Added a second commit: the translator's own Host (victory translate --pipelines and the GPU unit tests) also created its device on adapter 0. With the monitor asleep that put the pipelines on the integrated Radeon, and its compiler (amdxc64.dll) crashed the whole translate --pipelines run with an access violation on one valid pixel program (PS_BreakableGlass_AlphaPrepass, cad3ecfdcdcf2a7d). The same program builds fine on the RTX 5070 Ti. Same choice as the host device now, with the same VICTORY_GPU_PREFERENCE=0 escape hatch.

**@⁠regiumlepidi** on GitHub · 2026-11-28 01:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/555#issuecomment-7231747357) Added a second commit: the translator's own `Host` (`victory translate --pipelines` and the GPU unit tests) also created its device on adapter 0. With the monitor asleep that put the pipelines on the integrated Radeon, and its compiler (`amdxc64.dll`) crashed the whole `translate --pipelines` run with an access violation on one valid pixel program (`PS_BreakableGlass_AlphaPrepass`, cad3ecfdcdcf2a7d). The same program builds fine on the RTX 5070 Ti. Same choice as the host device now, with the same `VICTORY_GPU_PREFERENCE=0` escape hatch.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/streamline.rs
  • crates/victory-shader/src/emit/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/555/head:github-bot/gh-555'
git switch 'github-bot/gh-555'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-555'
git switch 'github-bot/gh-555'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-555'
git switch 'github-bot/gh-555'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-555'
git switch 'main'
git merge --squash 'github-bot/gh-555'
git switch 'main'
git merge --ff-only 'github-bot/gh-555'
git switch 'main'
git merge 'github-bot/gh-555'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.