tools: select the translator checks' adapter by device UUID #222

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

@⁠JeffreyBytes on GitHub · 2026-11-26 11:03 UTC · original
JeffreyBytes:fix/translator-check-adapter-name → main · +51 −10 · 2 files · 2 commits · draft

Summary

Fixes #219.

Testers wanted. I have one machine, and this problem depends on the hardware and driver. Before this is marked ready I need runs on other setups: machines with more than one GPU above all, then NVIDIA, Intel, and RADV on other Mesa versions. See "How to test" below.

select_adapter() in tools/check_translator_gpu.py pins the translator GPU checks to one adapter by setting DXVK_FILTER_DEVICE_NAME and VKD3D_FILTER_DEVICE_NAME to the name vulkaninfo --summary prints on the host. A Proton guest can see the same device under a different name, so the filter matches nothing, DXVK logs Skipping: Device filter, and every case in "Shader translator on the GPU" fails with device failed: 0x80004005.

The first version of this PR removed RADV's trailing tag from the name. Testing by @⁠DrArroway showed that is not enough: on that host AMD Radeon RX 6900 XT (RADV NAVI21) is Radeon RX 6800/6800 XT / 6900 XT in the guest. The guest's name can't be derived from the host's.

This now filters by device UUID. vulkaninfo --summary prints deviceUUID, and DXVK accepts DXVK_FILTER_DEVICE_UUID. No name filter is set when a UUID is available; vkd3d-proton only has a name filter, and the guests create their device on DXVK's default adapter, which is then the only one DXVK exposes. Without a UUID in the summary it falls back to the name as before.

Still to confirm on a machine with two GPUs: that each --adapter runs on the device asked for.

How to test

On this branch:

python tuxbox.py check

or only the affected stage, which takes about ten minutes:

python tools/check_translator_gpu.py --provider build/d3d12-smoke/d3d12_xs.dll --proton … --prefix … --compiler-dir … --dxc … --work build/translator-test --adapter VENDOR:DEVICE

Please report the GPU, driver version and Proton build, whether the stage passed, and these two lines, which show whether your host and guest names differ:

vulkaninfo --summary | grep deviceName
grep -h "Found device" build/translator-test/*/gpu.log | sort -u

A run where the stage already passed on main is just as useful, to show nothing regressed.

Verified on Lanes

  • python tuxbox.py check passed on this branch — passed in full on the first version; on the current commit only the affected stage has been rerun (30 of 30)
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below

This changes a check tool only. tests/test_translator_checks.py covers the UUID filter with two AMD devices and the fallback to the name.

GPU, driver and backend: AMD Radeon RX 6700 XT (1002:73df), Mesa RADV 26.3.1, Linux 7.3.6, Proton backend with GE-Proton11-14, single GPU.

  • This changes code both vendors run, and the check passed on an AMD and an NVIDIA card. NVIDIA still needs to run it, and so do other AMD setups.
  passed   Build the shader compiler (0s)
  passed   Python tests (4s)
  passed   Shader compiler tests (1s)
  passed   DXBC tests (0s)
  passed   XG layout tests (1s)
  passed   D3D12 Windows typecheck (0s)
  passed   Build (22s)
  passed   Lanes and fixtures on the GPU (152s)
  passed   D3D12 regression controls (324s)
  passed   Shader translator on the GPU (631s)

All checks passed.

"Shader translator on the GPU", run on its own on this card:

main (773278a):  0 of 30 pass   (every guest: device failed: 0x80004005)
this branch:    30 of 30 pass   (adapter 1002:73df: AMD Radeon RX 6700 XT (RADV NAVI22))

Checks

python -m unittest tests.test_translator_checks passes. No evidence JSON changes.

**@⁠JeffreyBytes** on GitHub · 2026-11-26 11:03 UTC · [original](https://github.com/brcly/TuxBox/pull/222) `JeffreyBytes:fix/translator-check-adapter-name` → `main` · +51 −10 · 2 files · 2 commits · draft ## Summary Fixes #219. **Testers wanted.** I have one machine, and this problem depends on the hardware and driver. Before this is marked ready I need runs on other setups: machines with more than one GPU above all, then NVIDIA, Intel, and RADV on other Mesa versions. See "How to test" below. `select_adapter()` in `tools/check_translator_gpu.py` pins the translator GPU checks to one adapter by setting `DXVK_FILTER_DEVICE_NAME` and `VKD3D_FILTER_DEVICE_NAME` to the name `vulkaninfo --summary` prints on the host. A Proton guest can see the same device under a different name, so the filter matches nothing, DXVK logs `Skipping: Device filter`, and every case in "Shader translator on the GPU" fails with `device failed: 0x80004005`. The first version of this PR removed RADV's trailing tag from the name. Testing by @⁠DrArroway showed that is not enough: on that host `AMD Radeon RX 6900 XT (RADV NAVI21)` is `Radeon RX 6800/6800 XT / 6900 XT` in the guest. The guest's name can't be derived from the host's. This now filters by device UUID. `vulkaninfo --summary` prints `deviceUUID`, and DXVK accepts `DXVK_FILTER_DEVICE_UUID`. No name filter is set when a UUID is available; vkd3d-proton only has a name filter, and the guests create their device on DXVK's default adapter, which is then the only one DXVK exposes. Without a UUID in the summary it falls back to the name as before. **Still to confirm on a machine with two GPUs:** that each `--adapter` runs on the device asked for. ## How to test On this branch: ```sh python tuxbox.py check ``` or only the affected stage, which takes about ten minutes: ```sh python tools/check_translator_gpu.py --provider build/d3d12-smoke/d3d12_xs.dll --proton … --prefix … --compiler-dir … --dxc … --work build/translator-test --adapter VENDOR:DEVICE ``` Please report the GPU, driver version and Proton build, whether the stage passed, and these two lines, which show whether your host and guest names differ: ```sh vulkaninfo --summary | grep deviceName grep -h "Found device" build/translator-test/*/gpu.log | sort -u ``` A run where the stage already passed on `main` is just as useful, to show nothing regressed. ## Verified on Lanes - [ ] `python tuxbox.py check` passed on this branch — **passed in full on the first version; on the current commit only the affected stage has been rerun (30 of 30)** - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below This changes a check tool only. `tests/test_translator_checks.py` covers the UUID filter with two AMD devices and the fallback to the name. GPU, driver and backend: AMD Radeon RX 6700 XT (`1002:73df`), Mesa RADV 26.3.1, Linux 7.3.6, Proton backend with GE-Proton11-14, single GPU. - [ ] This changes code both vendors run, and the check passed on an AMD and an NVIDIA card. **NVIDIA still needs to run it, and so do other AMD setups.** ```text passed Build the shader compiler (0s) passed Python tests (4s) passed Shader compiler tests (1s) passed DXBC tests (0s) passed XG layout tests (1s) passed D3D12 Windows typecheck (0s) passed Build (22s) passed Lanes and fixtures on the GPU (152s) passed D3D12 regression controls (324s) passed Shader translator on the GPU (631s) All checks passed. ``` "Shader translator on the GPU", run on its own on this card: ```text main (773278a): 0 of 30 pass (every guest: device failed: 0x80004005) this branch: 30 of 30 pass (adapter 1002:73df: AMD Radeon RX 6700 XT (RADV NAVI22)) ``` ## Checks `python -m unittest tests.test_translator_checks` passes. No evidence JSON changes.
select_adapter() filtered by the name vulkaninfo prints on the host. RADV
appends a tag there, as in "AMD Radeon RX 6700 XT (RADV NAVI22)", and a
Proton guest can see the same device as "AMD Radeon RX 6700 XT". The
filter then matched nothing, DXVK found no adapter, and every translator
GPU check failed with "device failed: 0x80004005".

Both filters match substrings, so filter by the name without a trailing
"(...)". The full name is still what the run prints.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:23:33 +00:00
Author
Owner

@⁠DrArroway on GitHub · 2026-11-26 11:51 UTC · original

Tested #222 (84b9d9c) on a dual-GPU AMD RADV host (radv 26.3.1, GE-Proton11-14, Windows DXC v1.9.2609, Linux DXC 1.9.2609):

  • python -m unittest tests.test_translator_checks: 5/5 OK
  • --adapter 1002:73bf (RX 6900 XT): still fails 0 of 30 (Skipping: Device filter -> device failed: 0x80004005)
  • --adapter 1002:164e --only alu (Ryzen 9 7900X iGPU): still fails (Skipping: Device filter -> device failed: 0x80004005)

Requested adapter names on this host:

vulkaninfo --summary | grep deviceName

deviceName         = AMD Radeon RX 6900 XT (RADV NAVI21)
deviceName         = AMD Ryzen 9 7900X 12-Core Processor (RADV RAPHAEL_MENDOCINO)

grep -h "Found device" .../gpu.log | sort -u

info:  Found device: AMD Radeon(TM) Graphics (radv 26.3.1)
info:  Found device: Radeon RX 6800/6800 XT / 6900 XT (radv 26.3.1)

Stripping the trailing (...) gives "AMD Radeon RX 6900 XT" and "AMD Ryzen 9 7900X 12-Core Processor", neither of which is a substring of DXVK's guest device names above, so DXVK_FILTER_DEVICE_NAME skips both adapters.

**@⁠DrArroway** on GitHub · 2026-11-26 11:51 UTC · [original](https://github.com/brcly/TuxBox/pull/222#issuecomment-7191264047) Tested `#222` (`84b9d9c`) on a dual-GPU AMD RADV host (`radv 26.3.1`, `GE-Proton11-14`, Windows DXC `v1.9.2609`, Linux DXC `1.9.2609`): - `python -m unittest tests.test_translator_checks`: `5/5 OK` - `--adapter 1002:73bf` (RX 6900 XT): still fails `0 of 30` (`Skipping: Device filter` -> `device failed: 0x80004005`) - `--adapter 1002:164e --only alu` (Ryzen 9 7900X iGPU): still fails (`Skipping: Device filter` -> `device failed: 0x80004005`) Requested adapter names on this host: `vulkaninfo --summary | grep deviceName` ```text deviceName = AMD Radeon RX 6900 XT (RADV NAVI21) deviceName = AMD Ryzen 9 7900X 12-Core Processor (RADV RAPHAEL_MENDOCINO) ``` `grep -h "Found device" .../gpu.log | sort -u` ```text info: Found device: AMD Radeon(TM) Graphics (radv 26.3.1) info: Found device: Radeon RX 6800/6800 XT / 6900 XT (radv 26.3.1) ``` Stripping the trailing `(...)` gives `"AMD Radeon RX 6900 XT"` and `"AMD Ryzen 9 7900X 12-Core Processor"`, neither of which is a substring of DXVK's guest device names above, so `DXVK_FILTER_DEVICE_NAME` skips both adapters.
Author
Owner

@⁠ReverendOzmund on GitHub · 2026-11-26 11:53 UTC · original

Small edge case: with the tag removed, the substring filter gets looser. "AMD Radeon RX 7900 XT" now also matches "AMD Radeon RX 7900 XTX" (the tagged names didn't match each other), so a host with both cards could pick either. Probably rare enough to ignore, but an exact match against the guest's adapter name would avoid it. NVIDIA names have no tag, so nothing changes there.

**@⁠ReverendOzmund** on GitHub · 2026-11-26 11:53 UTC · [original](https://github.com/brcly/TuxBox/pull/222#issuecomment-7191307737) Small edge case: with the tag removed, the substring filter gets looser. "AMD Radeon RX 7900 XT" now also matches "AMD Radeon RX 7900 XTX" (the tagged names didn't match each other), so a host with both cards could pick either. Probably rare enough to ignore, but an exact match against the guest's adapter name would avoid it. NVIDIA names have no tag, so nothing changes there.
github-bot changed title from tools: filter the translator checks' adapter by its name without the driver tag to tools: select the translator checks' adapter by device UUID 2026-11-26 12:35:31 +00:00
Filtering by name cannot work in general. A Proton guest can see a device
under a name that has nothing in common with what vulkaninfo prints on
the host: "AMD Radeon RX 6900 XT (RADV NAVI21)" was
"Radeon RX 6800/6800 XT / 6900 XT" in the guest, so the name without the
driver tag still matched nothing there. A substring of the name can also
match two cards, such as a 7900 XT and a 7900 XTX.

vulkaninfo --summary prints each device's UUID and DXVK accepts
DXVK_FILTER_DEVICE_UUID, so filter by that and set no name filter. The
guests create their device on DXVK's default adapter, which is then the
only one DXVK exposes. Without a UUID in the summary, fall back to the
name as before.
Author
Owner

@⁠JeffreyBytes on GitHub · 2026-11-26 12:32 UTC · original

Thanks both, that settles it: the guest's name can't be derived from the host's, so no name filter will work. Radeon RX 6800/6800 XT / 6900 XT and AMD Radeon(TM) Graphics share nothing useful with what vulkaninfo prints, and it only worked on my card because the two names happen to overlap.

I've pushed a different approach: filter by the device UUID instead of the name.

  • vulkaninfo --summary prints deviceUUID for each device, and DXVK accepts DXVK_FILTER_DEVICE_UUID (32 hex digits, compared in dxvk_device_filter.cpp). The UUID does not depend on how the guest names the device, and it also tells apart two cards of the same model and the 7900 XT / 7900 XTX case @⁠ReverendOzmund raised.
  • The name filters are no longer set when a UUID is available. vkd3d-proton only has a name filter, so it gets none; the guests create their device on DXVK's default adapter, which is now the only one DXVK exposes.
  • If the summary has no UUID, it falls back to the name as before.

On the RX 6700 XT: the stage passes 30 of 30 with the right UUID, and with a wrong UUID every guest logs Skipping: UUID filter, so the filter is doing the selecting.

@⁠DrArroway, could you run it again on the dual-GPU host, once per adapter? That is the case I can't test: whether vkd3d-proton follows DXVK's adapter when two devices are present. The Found device / Skipping lines from gpu.log for each run would show it.

**@⁠JeffreyBytes** on GitHub · 2026-11-26 12:32 UTC · [original](https://github.com/brcly/TuxBox/pull/222#issuecomment-7192138035) Thanks both, that settles it: the guest's name can't be derived from the host's, so no name filter will work. `Radeon RX 6800/6800 XT / 6900 XT` and `AMD Radeon(TM) Graphics` share nothing useful with what `vulkaninfo` prints, and it only worked on my card because the two names happen to overlap. I've pushed a different approach: filter by the device UUID instead of the name. - `vulkaninfo --summary` prints `deviceUUID` for each device, and DXVK accepts `DXVK_FILTER_DEVICE_UUID` (32 hex digits, compared in `dxvk_device_filter.cpp`). The UUID does not depend on how the guest names the device, and it also tells apart two cards of the same model and the 7900 XT / 7900 XTX case @⁠ReverendOzmund raised. - The name filters are no longer set when a UUID is available. vkd3d-proton only has a name filter, so it gets none; the guests create their device on DXVK's default adapter, which is now the only one DXVK exposes. - If the summary has no UUID, it falls back to the name as before. On the RX 6700 XT: the stage passes 30 of 30 with the right UUID, and with a wrong UUID every guest logs `Skipping: UUID filter`, so the filter is doing the selecting. @⁠DrArroway, could you run it again on the dual-GPU host, once per adapter? That is the case I can't test: whether vkd3d-proton follows DXVK's adapter when two devices are present. The `Found device` / `Skipping` lines from `gpu.log` for each run would show it.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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