tools: run translator GPU checks on the requested adapter #194

Merged
NickStallman merged 1 commit from upstream-pr/194 into main 2026-11-25 23:23:58 +00:00
NickStallman commented 2026-11-25 19:52:12 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-25T19:52:12Z.


check_translator_gpu.py takes --adapter, but its guests create the D3D12 device on the default adapter. On a machine with an RTX 5090 (10de:2b85) and a RADV iGPU (1002:13c0), --adapter 1002:13c0 still ran on the NVIDIA card, and every check then failed its adapter comparison.

The tool now looks up the adapter's Vulkan deviceName in vulkaninfo --summary and sets VKD3D_FILTER_DEVICE_NAME and DXVK_FILTER_DEVICE_NAME before running the guests. Several tools/check_*.py already set these two variables, but to a fixed AMD or NVIDIA. If vulkaninfo doesn't list the adapter, the tool keeps the default device, and each check still rejects a result from the wrong adapter. A unit test covers the lookup.

Results with --only alu --only swizzle:

Without the change With the change
--adapter 1002:13c0 (RADV) both FAIL: the guests ran on 10de:2b85 adapter 1002:13c0: AMD Ryzen 9 9950X 16-Core Processor (RADV RAPHAEL_MENDOCINO); alu PASS (144 instructions, 0 wrong); swizzle PASS (104 cases)

All 28 checks pass on --adapter 10de:2b85 (RTX 5090, NVIDIA 595.99.02, Proton Experimental experimental-11.0-20261112). At 1b32189, without the change, python tuxbox.py check on the 5090 passes every group: Lanes and fixtures 67/67, D3D12 regression controls 17/17 and shader translator 28/28. With the change, the unit tests pass.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:6612490208 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/194). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-25T19:52:12Z. --- `check_translator_gpu.py` takes `--adapter`, but its guests create the D3D12 device on the default adapter. On a machine with an RTX 5090 (`10de:2b85`) and a RADV iGPU (`1002:13c0`), `--adapter 1002:13c0` still ran on the NVIDIA card, and every check then failed its adapter comparison. The tool now looks up the adapter's Vulkan `deviceName` in `vulkaninfo --summary` and sets `VKD3D_FILTER_DEVICE_NAME` and `DXVK_FILTER_DEVICE_NAME` before running the guests. Several `tools/check_*.py` already set these two variables, but to a fixed `AMD` or `NVIDIA`. If `vulkaninfo` doesn't list the adapter, the tool keeps the default device, and each check still rejects a result from the wrong adapter. A unit test covers the lookup. Results with `--only alu --only swizzle`: | | Without the change | With the change | |---|---|---| | `--adapter 1002:13c0` (RADV) | both FAIL: the guests ran on `10de:2b85` | `adapter 1002:13c0: AMD Ryzen 9 9950X 16-Core Processor (RADV RAPHAEL_MENDOCINO)`; alu PASS (144 instructions, 0 wrong); swizzle PASS (104 cases) | All 28 checks pass on `--adapter 10de:2b85` (RTX 5090, NVIDIA 595.99.02, Proton Experimental experimental-11.0-20261112). At 1b32189, without the change, `python tuxbox.py check` on the 5090 passes every group: Lanes and fixtures 67/67, D3D12 regression controls 17/17 and shader translator 28/28. With the change, the unit tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
brcly/TuxBox!194
No description provided.