[PR #1165] d3d12_root_args_validation: a hardware driver that removes its device does not fail the test (TEST-ROOT-ARGS-HW-DEVICE-REMOVED) #1198

Open
opened 2026-11-26 20:20:25 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1165
Author: @MalexAson
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/root-args-hw-device-removed


📝 Commits (1)

  • 48319c7 d3d12_root_args_validation: a hardware driver that removes its device does not fail the test (TEST-ROOT-ARGS-HW-DEVICE-REMOVED)

📊 Changes

1 file changed (+28 additions, -3 deletions)

View changed files

📝 runtime/test/d3d12_root_args_validation_test.cpp (+28 -3)

📄 Description

Claimed in the coordination issue as: TEST-ROOT-ARGS-HW-DEVICE-REMOVED

What and why

d3d12_root_args_validation runs its table on the layer, on WARP and on the first hardware D3D12 adapter. Where that adapter is an Intel Iris Xe (Intel 32.0.101.7092) the hardware pass fails, with the layer on any GPU:

line 194: SUCCEEDED(env.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_BUNDLE, IID_PPV_ARGS(&balloc.p)))
line 500: run_case(env, table[j], true, hw_hr[j])

The cause is two cases earlier. On direct: SetGraphicsRoot32BitConstants(0, 0, nullptr, 0) the Intel driver's Close() returns DXGI_ERROR_DEVICE_REMOVED (0x887a0005) and the device's removed reason becomes DXGI_ERROR_DRIVER_INTERNAL_ERROR (0x887a0020). The next case is the compute form, which is run_on_hw = false already (the NVIDIA driver crashes on it), and the one after it cannot create an allocator on the removed device. The same driver also removes its device on the two bundle forms.

This is the situation run_on_hw = false was written for, a hardware UMD failing on a call WARP and the layer accept, but which cases do it depends on the driver. So the hardware pass now checks GetDeviceRemovedReason() after each case. A case that removed the device is printed, counted as not run on hardware (the table shows skip(umd), as for run_on_hw = false), and the remaining cases run on a new device, created after every reference to the removed one is released. A case that fails with its device still alive fails the test as before.

Tested

Windows 11 24H2 (26100.6584), MSVC 19.50 + Ninja RelWithDebInfo, main 6293c1c4f. The first hardware adapter is the Iris Xe (8086:a7a0).

layer (LEONIDA_VK_DEVICE) main this branch
Intel Iris Xe fails at line 194 pass: 29 parity cases, 25 compared on hardware, 4 skip(umd), 0 failures, 0 validation errors
RTX 4060 Laptop GPU (NVIDIA 616.92) fails at line 194 pass, the same counts

With the change the test prints, for the Intel host:

direct: SetGraphicsRoot32BitConstants(0, 0, nullptr, 0): the hardware driver removed its device (0x887a0020); not compared on hardware
bundle: SetGraphicsRoot32BitConstants(0, 0, nullptr, 0): the hardware driver removed its device (0x887a0020); not compared on hardware
bundle: SetComputeRoot32BitConstants(0, 0, nullptr, 0): the hardware driver removed its device (0x887a0020); not compared on hardware

Not tested: a machine whose first hardware adapter keeps its device through every case. That path is the old one, REQUIRE(ran) after each case.

tests/test_ctest_registration.py and tests/test_text_write_line_endings.py: OK. scripts/check_no_game_data.py on the changed file: clean.

GPUs tested: Intel Iris Xe (8086:a7a0), Intel 32.0.101.7092, and NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 616.92, Windows 11

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (no translator rule)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1165 **Author:** [@MalexAson](https://github.com/MalexAson) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/root-args-hw-device-removed` --- ### 📝 Commits (1) - [`48319c7`](https://github.com/ubiquitarianism/leonida/commit/48319c70727a27f14dbc6d7d72e10f180becda99) d3d12_root_args_validation: a hardware driver that removes its device does not fail the test (TEST-ROOT-ARGS-HW-DEVICE-REMOVED) ### 📊 Changes **1 file changed** (+28 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/d3d12_root_args_validation_test.cpp` (+28 -3) </details> ### 📄 Description Claimed in the coordination issue as: TEST-ROOT-ARGS-HW-DEVICE-REMOVED ### What and why `d3d12_root_args_validation` runs its table on the layer, on WARP and on the first hardware D3D12 adapter. Where that adapter is an Intel Iris Xe (Intel 32.0.101.7092) the hardware pass fails, with the layer on any GPU: line 194: SUCCEEDED(env.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_BUNDLE, IID_PPV_ARGS(&balloc.p))) line 500: run_case(env, table[j], true, hw_hr[j]) The cause is two cases earlier. On `direct: SetGraphicsRoot32BitConstants(0, 0, nullptr, 0)` the Intel driver's `Close()` returns `DXGI_ERROR_DEVICE_REMOVED` (0x887a0005) and the device's removed reason becomes `DXGI_ERROR_DRIVER_INTERNAL_ERROR` (0x887a0020). The next case is the compute form, which is `run_on_hw = false` already (the NVIDIA driver crashes on it), and the one after it cannot create an allocator on the removed device. The same driver also removes its device on the two bundle forms. This is the situation `run_on_hw = false` was written for, a hardware UMD failing on a call WARP and the layer accept, but which cases do it depends on the driver. So the hardware pass now checks `GetDeviceRemovedReason()` after each case. A case that removed the device is printed, counted as not run on hardware (the table shows `skip(umd)`, as for `run_on_hw = false`), and the remaining cases run on a new device, created after every reference to the removed one is released. A case that fails with its device still alive fails the test as before. ### Tested Windows 11 24H2 (26100.6584), MSVC 19.50 + Ninja RelWithDebInfo, `main` 6293c1c4f. The first hardware adapter is the Iris Xe (8086:a7a0). | layer (`LEONIDA_VK_DEVICE`) | `main` | this branch | |---|---|---| | Intel Iris Xe | fails at line 194 | pass: 29 parity cases, 25 compared on hardware, 4 `skip(umd)`, 0 failures, 0 validation errors | | RTX 4060 Laptop GPU (NVIDIA 616.92) | fails at line 194 | pass, the same counts | With the change the test prints, for the Intel host: direct: SetGraphicsRoot32BitConstants(0, 0, nullptr, 0): the hardware driver removed its device (0x887a0020); not compared on hardware bundle: SetGraphicsRoot32BitConstants(0, 0, nullptr, 0): the hardware driver removed its device (0x887a0020); not compared on hardware bundle: SetComputeRoot32BitConstants(0, 0, nullptr, 0): the hardware driver removed its device (0x887a0020); not compared on hardware Not tested: a machine whose first hardware adapter keeps its device through every case. That path is the old one, `REQUIRE(ran)` after each case. `tests/test_ctest_registration.py` and `tests/test_text_write_line_endings.py`: OK. `scripts/check_no_game_data.py` on the changed file: clean. GPUs tested: Intel Iris Xe (8086:a7a0), Intel 32.0.101.7092, and NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 616.92, Windows 11 AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (no translator rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1198
No description provided.