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

Open
regiumlepidi wants to merge 2 commits from upstream-pr/555 into main
regiumlepidi commented 2026-11-28 00:50:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by regiumlepidi on 2026-11-28T00:50:05Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535090248 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/555). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-28T00:50:05Z. --- `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)
regiumlepidi commented 2026-11-28 01:33:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by regiumlepidi on 2026-11-28T01:33:11Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7231747357 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/555#issuecomment-7231747357). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-28T01:33:11Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/555:upstream-pr/555'
git switch 'upstream-pr/555'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/555'
git switch 'upstream-pr/555'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/555'
git switch 'upstream-pr/555'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/555'
git switch 'main'
git merge --squash 'upstream-pr/555'
git switch 'main'
git merge --ff-only 'upstream-pr/555'
git switch 'main'
git merge 'upstream-pr/555'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!555
No description provided.