[PR #1066] [MERGED] d3d12: ExecuteIndirect accepts the argument ranges newer D3D12 runtimes accept (D3D-EXECIND-RANGE-CARRY) #1103

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1066
Author: @klikso
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142

Base: main ← Head: carry/d3d-execind-range


📝 Commits (1)

  • 10f7fc2 d3d12: ExecuteIndirect accepts the argument ranges newer D3D12 runtimes accept

📊 Changes

3 files changed (+63 additions, -26 deletions)

View changed files

📝 runtime/shims/d3d12_com.cpp (+13 -6)
📝 runtime/src/vulkan_replay.h (+7 -7)
📝 runtime/test/d3d12_execute_indirect_validation_test.cpp (+43 -13)

📄 Description

Claimed in the coordination issue as: D3D-EXECIND-RANGE-CARRY

Fixes: #504

What and why

d3d12_execute_indirect_validation is red on main on current Windows 11: the layer refuses five ExecuteIndirect calls that live WARP and the hardware driver both accept (#504, reported from seven machines today). #337 by @natterman12 fixed it and was verified independently on six hosts (RTX 5070 Ti, 4060 Ti, 5070, 2060 SUPER, Radeon 660M, and Linux replay on an RTX 3060), but its author closed it on 24 November along with his other open pull requests, so nothing open carries the fix.

This is that one commit, 7f96cff90, cherry-picked onto current main with its author kept. No change of mine is in it; the cherry-pick applied without conflicts.

  • The layer bounds the bytes the commands read, (max_count - 1) * stride + record_size, and checks no range at a zero count, in recording (d3d12_com.cpp) and in replay (vulkan_replay.h).
  • The test marks the five disputed rows as host-dependent (the layer must accept them, a live host may answer either way) and adds two rows that overrun the buffer under either rule.

@natterman12: this is your work. If you reopen #337 or want this branch, say so and I will close this.

The alternative is draft #306 (old PR 10041), which keeps the layer strict and relaxes the test only. Only one of the two should land.

Tested

Windows 11 26200.9974, D3D12Core and d3d10warp.dll 10.0.26100.9818, MSVC 14.44.35207 with Ninja, RelWithDebInfo, Windows SDK 10.0.26100.0, Vulkan 1.4.357. Built and run at base 32950551e; the four commits main gained since do not touch runtime/.

main 32950551e with this commit
ctest -j 6 270 of 271 pass 271 of 271 pass
d3d12_execute_indirect_validation 49 parity cases, 5 failures 51 parity cases, 0 failures
Host-dependent answers (WARP + hardware) n/a 10 accepted, 0 refused
Positive GPU dispatch, Vulkan validation errors ok, 0 ok, 0

On main the five failing rows are the ones in #504, each layer=0 warp=1 hw=1 expected=0: the two aligned offsets past the buffer at max=0, and the three padded-stride exact fits (240+20, 220+40, 244+20 in a 256-byte buffer). The two new overrun rows (244+16>256, 224+20+16>256) are refused by the layer, WARP and the hardware alike.

  • python -I scripts/check_no_game_data.py on the three changed files: no hits.
  • git diff --check: clean.

GPUs tested: NVIDIA GeForce RTX 3060 Ti (Ampere), driver 621.14, Windows 11 26200

AI-assisted: yes (Claude Code; built, run and measured on the machine above)

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: n/a (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/1066 **Author:** [@klikso](https://github.com/klikso) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `carry/d3d-execind-range` --- ### 📝 Commits (1) - [`10f7fc2`](https://github.com/ubiquitarianism/leonida/commit/10f7fc21c76368414ae14115f6ae04effeb12dc1) d3d12: ExecuteIndirect accepts the argument ranges newer D3D12 runtimes accept ### 📊 Changes **3 files changed** (+63 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_com.cpp` (+13 -6) 📝 `runtime/src/vulkan_replay.h` (+7 -7) 📝 `runtime/test/d3d12_execute_indirect_validation_test.cpp` (+43 -13) </details> ### 📄 Description Claimed in the coordination issue as: D3D-EXECIND-RANGE-CARRY Fixes: #504 ### What and why `d3d12_execute_indirect_validation` is red on `main` on current Windows 11: the layer refuses five `ExecuteIndirect` calls that live WARP and the hardware driver both accept (#504, reported from seven machines today). #337 by @natterman12 fixed it and was verified independently on six hosts (RTX 5070 Ti, 4060 Ti, 5070, 2060 SUPER, Radeon 660M, and Linux replay on an RTX 3060), but its author closed it on 24 November along with his other open pull requests, so nothing open carries the fix. This is that one commit, `7f96cff90`, cherry-picked onto current `main` with its author kept. No change of mine is in it; the cherry-pick applied without conflicts. - The layer bounds the bytes the commands read, `(max_count - 1) * stride + record_size`, and checks no range at a zero count, in recording (`d3d12_com.cpp`) and in replay (`vulkan_replay.h`). - The test marks the five disputed rows as host-dependent (the layer must accept them, a live host may answer either way) and adds two rows that overrun the buffer under either rule. @natterman12: this is your work. If you reopen #337 or want this branch, say so and I will close this. The alternative is draft #306 (old PR 10041), which keeps the layer strict and relaxes the test only. Only one of the two should land. ### Tested Windows 11 26200.9974, D3D12Core and `d3d10warp.dll` 10.0.26100.9818, MSVC 14.44.35207 with Ninja, `RelWithDebInfo`, Windows SDK 10.0.26100.0, Vulkan 1.4.357. Built and run at base `32950551e`; the four commits `main` gained since do not touch `runtime/`. | | `main` `32950551e` | with this commit | |---|---|---| | `ctest -j 6` | 270 of 271 pass | 271 of 271 pass | | `d3d12_execute_indirect_validation` | 49 parity cases, 5 failures | 51 parity cases, 0 failures | | Host-dependent answers (WARP + hardware) | n/a | 10 accepted, 0 refused | | Positive GPU dispatch, Vulkan validation errors | ok, 0 | ok, 0 | On `main` the five failing rows are the ones in #504, each `layer=0 warp=1 hw=1 expected=0`: the two aligned offsets past the buffer at `max=0`, and the three padded-stride exact fits (`240+20`, `220+40`, `244+20` in a 256-byte buffer). The two new overrun rows (`244+16>256`, `224+20+16>256`) are refused by the layer, WARP and the hardware alike. - `python -I scripts/check_no_game_data.py` on the three changed files: no hits. - `git diff --check`: clean. GPUs tested: NVIDIA GeForce RTX 3060 Ti (Ampere), driver 621.14, Windows 11 26200 AI-assisted: yes (Claude Code; built, run and measured on the machine above) ### 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. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (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>
4ld0 2026-11-26 20:20:06 +01:00
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#1103
No description provided.