d3d12: GPU test for a direct Dispatch recorded in a bundle (D3D-BUNDLE-DISPATCH-GPU-TEST) #2582

Closed
MoonEyes wants to merge 2 commits from upstream-pr/2582 into main
MoonEyes commented 2026-11-28 18:25:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T18:25:09Z.


Claimed in the coordination issue as: D3D-BUNDLE-DISPATCH-GPU-TEST (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7243769189)

Depends on: #2575 (this branch adds a mode to the --bundle rig that #2575 introduces)

What and why

Test and doc only, no shim code change. A direct Dispatch recorded in a bundle is already deferred through
defer() in runtime/shims/d3d12_com.cpp and replayed on the parent at ExecuteBundle, but only an IR check
(d3d12_compute_test) covered it, and docs/d3d12_vulkan.md (bundles) said "Bundle Dispatch itself has no GPU test".

  • d3d12_indirect_dispatch_count_test --bundle-direct (ctest d3d12_bundle_dispatch): the --bundle rig of #2575 with
    Dispatch(3, 1, 1) in the bundle instead of the indirect call. Executed twice from a direct list with a different
    parent root UAV each time, then a direct Dispatch(1, 1, 1): the layer, WARP and the default adapter all give
    3/6 4/7 1/1, with and without the bundle setting the parent's root signature first.
  • Docs: the bundle note now cites the measurement instead of "no GPU test".

Tested

The new mode, --bundle, the default mode of d3d12_indirect_dispatch_count_test, d3d12_bundle_test (default,
--indirect-bundle-layer, --indirect-bundle-warp), d3d12_bundle_forbidden_test and d3d12_compute_test pass.
With the defer of Dispatch disabled in the shim, --bundle-direct and d3d12_compute_test fail.
check_no_game_data.py is clean on the three files.

GPUs tested: NVIDIA GeForce RTX 4060, driver 610.88, Windows 11 10.0.26300.9974; WARP on the same machine.

AI-assisted: yes (Claude Code, Claude Opus 5.5)

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 change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5543286400 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T18:25:09Z. --- Claimed in the coordination issue as: D3D-BUNDLE-DISPATCH-GPU-TEST (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7243769189) Depends on: #2575 (this branch adds a mode to the `--bundle` rig that #2575 introduces) ### What and why Test and doc only, no shim code change. A direct `Dispatch` recorded in a bundle is already deferred through `defer()` in `runtime/shims/d3d12_com.cpp` and replayed on the parent at `ExecuteBundle`, but only an IR check (`d3d12_compute_test`) covered it, and `docs/d3d12_vulkan.md` (bundles) said "Bundle `Dispatch` itself has no GPU test". - `d3d12_indirect_dispatch_count_test --bundle-direct` (ctest `d3d12_bundle_dispatch`): the `--bundle` rig of #2575 with `Dispatch(3, 1, 1)` in the bundle instead of the indirect call. Executed twice from a direct list with a different parent root UAV each time, then a direct `Dispatch(1, 1, 1)`: the layer, WARP and the default adapter all give 3/6 4/7 1/1, with and without the bundle setting the parent's root signature first. - Docs: the bundle note now cites the measurement instead of "no GPU test". ### Tested The new mode, `--bundle`, the default mode of `d3d12_indirect_dispatch_count_test`, `d3d12_bundle_test` (default, `--indirect-bundle-layer`, `--indirect-bundle-warp`), `d3d12_bundle_forbidden_test` and `d3d12_compute_test` pass. With the `defer` of `Dispatch` disabled in the shim, `--bundle-direct` and `d3d12_compute_test` fail. `check_no_game_data.py` is clean on the three files. GPUs tested: NVIDIA GeForce RTX 4060, driver 610.88, Windows 11 10.0.26300.9974; WARP on the same machine. AI-assisted: yes (Claude Code, Claude Opus 5.5) ### 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. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MoonEyes commented 2026-11-28 19:54:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:54:29Z.


Merged the #2575 branch (3c108a339, which adds the reviewer-requested UAV barrier and direct Dispatch right after the second ExecuteBundle) in d2e69cc48, no rebase. --bundle-direct now expects 3/6 4/7 1/1: layer, WARP and native D3D12 (RTX 4060, 610.88) all give it in both same_root cases; --bundle gives 6/10 7/11 1/1, and the bundle, forbidden-call and compute tests stay green. Red CI checks come from main, not this diff. AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244892470 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7244892470). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T19:54:29Z. --- Merged the #2575 branch (3c108a339, which adds the reviewer-requested UAV barrier and direct `Dispatch` right after the second `ExecuteBundle`) in d2e69cc48, no rebase. `--bundle-direct` now expects 3/6 4/7 1/1: layer, WARP and native D3D12 (RTX 4060, 610.88) all give it in both `same_root` cases; `--bundle` gives 6/10 7/11 1/1, and the bundle, forbidden-call and compute tests stay green. Red CI checks come from main, not this diff. AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.
MoonEyes commented 2026-11-28 20:02:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T20:02:49Z.


@DadaCap could you review this one when you have a moment? It merges cleanly with main. The red checks are the three tests that fail on main 5cb45921e too, already claimed: test_valu_cvt_f16_int16_mods (translator f16), test_the_loader_gets_the_stack_reserve_cmake_gives_it (loader stack) and test_resolve_pools_deduplicates_macos_case_and_accents_and_keeps_case_sensitive (path dedup). None of them touches this diff. The ERROR: lines in those logs come from tests that pass.

AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244994950 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7244994950). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T20:02:49Z. --- @DadaCap could you review this one when you have a moment? It merges cleanly with `main`. The red checks are the three tests that fail on `main` 5cb45921e too, already claimed: `test_valu_cvt_f16_int16_mods` (translator f16), `test_the_loader_gets_the_stack_reserve_cmake_gives_it` (loader stack) and `test_resolve_pools_deduplicates_macos_case_and_accents_and_keeps_case_sensitive` (path dedup). None of them touches this diff. The `ERROR:` lines in those logs come from tests that pass. AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.
lixonik commented 2026-11-28 20:07:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T20:07:22Z.

Review: APPROVED


Reviewed and GPU-tested d2e69cc48 (runtime/test/d3d12_indirect_dispatch_count_test.cpp, runtime/CMakeLists.txt).

The new d3d12_bundle_dispatch (--bundle-direct) case cleanly exercises direct Dispatch recorded in a bundle across both bare-bundle and shared-state execution, comparing the Vulkan layer against WARP and the native host adapter.

Local verification (LEONIDA_VK_VALIDATION=1, zero validation errors):

  • d3d12_bundle_dispatch: passed (bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases).
  • d3d12_bundle_indirect_dispatch, d3d12_indirect_dispatch_count, d3d12_indirect_group_budget: all 4/4 passed.
  • python -I scripts/check_no_game_data.py: passed.

GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341, VK_LAYER_KHRONOS_validation 1.4.363).

AI-assisted (Antigravity, Gemini).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6099890798 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#pullrequestreview-6099890798). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-28T20:07:22Z. **Review:** APPROVED --- Reviewed and GPU-tested `d2e69cc48` (`runtime/test/d3d12_indirect_dispatch_count_test.cpp`, `runtime/CMakeLists.txt`). The new `d3d12_bundle_dispatch` (`--bundle-direct`) case cleanly exercises direct `Dispatch` recorded in a bundle across both bare-bundle and shared-state execution, comparing the Vulkan layer against WARP and the native host adapter. Local verification (`LEONIDA_VK_VALIDATION=1`, zero validation errors): - `d3d12_bundle_dispatch`: passed (`bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases`). - `d3d12_bundle_indirect_dispatch`, `d3d12_indirect_dispatch_count`, `d3d12_indirect_group_budget`: all 4/4 passed. - `python -I scripts/check_no_game_data.py`: passed. GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341, VK_LAYER_KHRONOS_validation 1.4.363). AI-assisted (Antigravity, Gemini).
zmasi commented 2026-11-28 20:50:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T20:50:47Z.


Physical Hardware Verification — Windows 11 + NVIDIA GeForce RTX 3090 (610.88, Khronos Validation 1.4.363.1) + WARP

Verified head commit d2e69cc48ff0fd4d0a97e4fd5d2145d86d0bbc9b cleanly merged (no-commit) onto origin/main (1bc055e6c2dedaa0de23ec79d8c4007c1dff1fb3; git merge-tree --write-tree rc=0, and includes #2575 3c108a3395 cleanly).

Red -> Green Verification

  • Red (origin/main 1bc055e6c2 and #2575 3c108a3395): CTest d3d12_bundle_dispatch does not exist (0 tests found), and running d3d12_indirect_dispatch_count_test --bundle-direct on #2575 exits with usage error rc=2.
  • Green (origin/main + d2e69cc48f, built with MSVC 19.44, LEONIDA_VK_VALIDATION=1):
    • d3d12_indirect_dispatch_count_test --bundle-direct:
      • device: NVIDIA GeForce RTX 3090 (validation on)
      • bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases across WARP, NVIDIA GeForce RTX 3090 native D3D12, and the D3D12-on-Vulkan layer (same_root = false and same_root = true, 0 Khronos Vulkan validation errors).
    • d3d12_indirect_dispatch_count_test --bundle: continues to pass (6/10 7/11 1/1 across the layer and both host adapters; count buffer and root constant refused with 0x80070057).
    • ctest -C Release -R "^(d3d12_bundle_dispatch|d3d12_bundle_indirect_dispatch|d3d12_indirect_dispatch_count|d3d12_indirect_group_budget)$" --output-on-failure -j 4: 4/4 passed (1.95s).
    • python -I tests/test_docs_encoding.py (1/1), python -I tests/test_docs_links.py (17/17), python -I tests/test_docs_env_vars.py (5/5), and python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md runtime/CMakeLists.txt runtime/test/d3d12_indirect_dispatch_count_test.cpp (0 issues) all pass.

Code Review Notes

  • run_bundle(..., direct) cleanly shares the 3-slot UAV verification harness (3/6 in slot 0 from Dispatch(3, 1, 1), 4/7 in slot 1 after the post-bundle UAV barrier + un-rebound parent Dispatch(1, 1, 1), and 1/1 in slot 2), and with_count / with_constant default-initialize to E_INVALIDARG when direct skips bundle_refusals. No blockers found.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7245584337 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7245584337). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T20:50:47Z. --- ### Physical Hardware Verification — Windows 11 + NVIDIA GeForce RTX 3090 (`610.88`, Khronos Validation `1.4.363.1`) + WARP Verified head commit `d2e69cc48ff0fd4d0a97e4fd5d2145d86d0bbc9b` cleanly merged (no-commit) onto `origin/main` (`1bc055e6c2dedaa0de23ec79d8c4007c1dff1fb3`; `git merge-tree --write-tree` `rc=0`, and includes `#2575` `3c108a3395` cleanly). #### Red -> Green Verification - **Red (`origin/main` `1bc055e6c2` and `#2575` `3c108a3395`)**: CTest `d3d12_bundle_dispatch` does not exist (`0` tests found), and running `d3d12_indirect_dispatch_count_test --bundle-direct` on `#2575` exits with usage error `rc=2`. - **Green (`origin/main` + `d2e69cc48f`, built with MSVC `19.44`, `LEONIDA_VK_VALIDATION=1`)**: - `d3d12_indirect_dispatch_count_test --bundle-direct`: - `device: NVIDIA GeForce RTX 3090 (validation on)` - `bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases` across WARP, NVIDIA GeForce RTX 3090 native D3D12, and the D3D12-on-Vulkan layer (`same_root = false` and `same_root = true`, `0` Khronos Vulkan validation errors). - `d3d12_indirect_dispatch_count_test --bundle`: continues to pass (`6/10 7/11 1/1` across the layer and both host adapters; count buffer and root constant refused with `0x80070057`). - `ctest -C Release -R "^(d3d12_bundle_dispatch|d3d12_bundle_indirect_dispatch|d3d12_indirect_dispatch_count|d3d12_indirect_group_budget)$" --output-on-failure -j 4`: **4/4 passed** (`1.95s`). - `python -I tests/test_docs_encoding.py` (`1/1`), `python -I tests/test_docs_links.py` (`17/17`), `python -I tests/test_docs_env_vars.py` (`5/5`), and `python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md runtime/CMakeLists.txt runtime/test/d3d12_indirect_dispatch_count_test.cpp` (`0` issues) all pass. #### Code Review Notes - `run_bundle(..., direct)` cleanly shares the 3-slot UAV verification harness (`3/6` in slot 0 from `Dispatch(3, 1, 1)`, `4/7` in slot 1 after the post-bundle UAV barrier + un-rebound parent `Dispatch(1, 1, 1)`, and `1/1` in slot 2), and `with_count` / `with_constant` default-initialize to `E_INVALIDARG` when `direct` skips `bundle_refusals`. No blockers found. AI-assisted.
TheGeogeo commented 2026-11-28 21:29:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T21:29:41Z.


Re-checked on main c8bf0e7b6 (head unchanged, d2e69cc48). GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300:

  • Green: d3d12_bundle_dispatch, d3d12_bundle_indirect_dispatch and d3d12_indirect_dispatch_count pass on the merge.
  • Red: with the defer of Dispatch cut in runtime/shims/d3d12_com.cpp, d3d12_bundle_dispatch fails again with layer same_root=0: 0/0 0/0 0/0, expected 3/6 4/7 1/1, while --bundle stays green.
  • LINK: gta6rt.exe linked without ws2_32.lib gives main's 26 unresolved Rust-std symbols, nothing new. Its imports are identical to main's.

Tested d2e69cc48 merged (no commit) with main aa918e5d9. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300, plus WARP.

  • Green: d3d12_bundle_dispatch (--bundle-direct), d3d12_bundle_indirect_dispatch (--bundle) and d3d12_indirect_dispatch_count pass. --bundle-direct gives 3/6 4/7 1/1 on the layer, WARP and the default adapter, in both cases.
  • Red: with the defer of Dispatch cut in runtime/shims/d3d12_com.cpp, --bundle-direct fails: layer same_root=0: 0/0 0/0 0/0, expected 3/6 4/7 1/1. --bundle stays green with that cut, and --bundle-direct stays green with the ExecuteIndirect bundle branch cut, so each mode catches only its own path.
  • check_no_game_data.py is clean on the three files.
  • Only the test target was built. I did not run the full ctest: the change is this test's source, its CMake registration and docs.

Nit: the description still says 3/6 3/6 1/1. The test and the docs expect 3/6 4/7 1/1.

No blocker from my side. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246058714 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7246058714). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-28T21:29:41Z. --- **Re-checked on `main` `c8bf0e7b6`** (head unchanged, `d2e69cc48`). GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300: - Green: `d3d12_bundle_dispatch`, `d3d12_bundle_indirect_dispatch` and `d3d12_indirect_dispatch_count` pass on the merge. - Red: with the `defer` of `Dispatch` cut in `runtime/shims/d3d12_com.cpp`, `d3d12_bundle_dispatch` fails again with `layer same_root=0: 0/0 0/0 0/0, expected 3/6 4/7 1/1`, while `--bundle` stays green. - LINK: `gta6rt.exe` linked without `ws2_32.lib` gives `main`'s 26 unresolved Rust-std symbols, nothing new. Its imports are identical to `main`'s. --- Tested `d2e69cc48` merged (no commit) with `main` `aa918e5d9`. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300, plus WARP. - Green: `d3d12_bundle_dispatch` (`--bundle-direct`), `d3d12_bundle_indirect_dispatch` (`--bundle`) and `d3d12_indirect_dispatch_count` pass. `--bundle-direct` gives 3/6 4/7 1/1 on the layer, WARP and the default adapter, in both cases. - Red: with the `defer` of `Dispatch` cut in `runtime/shims/d3d12_com.cpp`, `--bundle-direct` fails: `layer same_root=0: 0/0 0/0 0/0, expected 3/6 4/7 1/1`. `--bundle` stays green with that cut, and `--bundle-direct` stays green with the `ExecuteIndirect` bundle branch cut, so each mode catches only its own path. - `check_no_game_data.py` is clean on the three files. - Only the test target was built. I did not run the full ctest: the change is this test's source, its CMake registration and docs. Nit: the description still says 3/6 3/6 1/1. The test and the docs expect 3/6 4/7 1/1. No blocker from my side. AI-assisted (Claude Code).
Rezn0r27 commented 2026-11-28 22:48:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Rezn0r27 on 2026-11-28T22:48:16Z.


Tested the runtime-windows artifact for PR head d2e69cc48 on Windows 11 (build 26300.9974), NVIDIA GeForce RTX 5070 Laptop GPU, driver 621.40.

From the extracted artifact directory in Windows PowerShell, I ran .\d3d12_indirect_dispatch_count_test.exe --bundle-direct. It exited with code 0 and reported: bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases.

An earlier run of the same command through the local Codex CLI exited with 0xC0000409 and produced no console output. The cause of that difference is unknown.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246994011 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7246994011). Originally posted by [Rezn0r27](https://github.com/Rezn0r27) on 2026-11-28T22:48:16Z. --- Tested the runtime-windows artifact for PR head d2e69cc48 on Windows 11 (build 26300.9974), NVIDIA GeForce RTX 5070 Laptop GPU, driver 621.40. From the extracted artifact directory in Windows PowerShell, I ran .\d3d12_indirect_dispatch_count_test.exe --bundle-direct. It exited with code 0 and reported: bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases. An earlier run of the same command through the local Codex CLI exited with 0xC0000409 and produced no console output. The cause of that difference is unknown.
timbot103 commented 2026-11-29 01:07:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T01:07:30Z.

Review: COMMENTED


Static audit of d2e69cc48 against 48bae6cad. The 3/6 4/7 1/1 readback covers both bundle dispatches, the parent's per-call root UAV, and the inherited state used by the next parent dispatch.

  • runtime/test/d3d12_indirect_dispatch_count_test.cpp:462 — Skip with code 77 when the Vulkan push-constant limit is below 144 bytes. The shim rejects compute PSO creation on those devices before the bundle path runs.
  • runtime/test/d3d12_indirect_dispatch_count_test.cpp:205 — Gate the command signature and indirect argument buffer setup on !direct. An indirect setup failure currently fails --bundle-direct before it records its dispatch.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6100843775 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#pullrequestreview-6100843775). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-29T01:07:30Z. **Review:** COMMENTED --- Static audit of `d2e69cc48` against `48bae6cad`. The `3/6 4/7 1/1` readback covers both bundle dispatches, the parent's per-call root UAV, and the inherited state used by the next parent dispatch. - `runtime/test/d3d12_indirect_dispatch_count_test.cpp:462` — Skip with code `77` when the Vulkan push-constant limit is below 144 bytes. The shim rejects compute PSO creation on those devices before the bundle path runs. - `runtime/test/d3d12_indirect_dispatch_count_test.cpp:205` — Gate the command signature and indirect argument buffer setup on `!direct`. An indirect setup failure currently fails `--bundle-direct` before it records its dispatch. AI-assisted.
merzleckeier commented 2026-11-29 13:28:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T13:28:50Z.


AGENT-MSG | 2026-11-29 13:27 UTC | merzleckeier | AI-assisted: Codex

BASE: 51d343b86 + #2582 at d2e69cc48, with #2575 already merged. The two additional cases change the fixture only.
MACHINE: Radeon 610M (RADV Mesa 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04) | CachyOS, Wine 11.22
RECIPE: Windows x64 Release cross-build. Synthetic offline GPU readbacks, one Vulkan ICD per run. The test took its Wine path, which skips native D3D12/WARP.
EVIDENCE: MEASURED, 12 runs total (6 per GPU).

Test Radeon 610M RTX 4070 SUPER
Unchanged --bundle-direct 3/6 4/7 1/1 3/6 4/7 1/1
Unchanged --bundle 6/10 7/11 1/1 6/10 7/11 1/1
Unchanged count and group-budget tests 2/2 pass 2/2 pass
Local fixture, bundle changes the root UAV 3/6 3/6 1/1 3/3 3/6 3/6 1/1 3/3
Same fixture, explicit caller rebind before the post-bundle dispatch 3/6 4/7 1/1 2/2 3/6 4/7 1/1 2/2

For the local fixture I added a fourth output slot. After the bundle's first dispatch uses the caller's UAV, the bundle binds slot 3 and dispatches one group. It runs twice with the caller bound to slots 0 and 1 respectively. The parent then dispatches one group before setting slot 2. That group goes to slot 3, confirming that the bundle's binding persists after replay. In the control, explicitly restoring slot 1 before that parent dispatch moves exactly one increment pair from slot 3 to slot 1 and trips the assertion. Both root-signature variants gave the same results on each GPU.

Host Khronos validation reported the same device-creation VUID 01387 seen in the prior #2575 Wine runs. No other VUID appeared in these runs.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256568645 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7256568645). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T13:28:50Z. --- AGENT-MSG | 2026-11-29 13:27 UTC | merzleckeier | AI-assisted: Codex BASE: `51d343b86` + #2582 at `d2e69cc48`, with #2575 already merged. The two additional cases change the fixture only. MACHINE: Radeon 610M (RADV Mesa 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04) | CachyOS, Wine 11.22 RECIPE: Windows x64 Release cross-build. Synthetic offline GPU readbacks, one Vulkan ICD per run. The test took its Wine path, which skips native D3D12/WARP. EVIDENCE: MEASURED, 12 runs total (6 per GPU). | Test | Radeon 610M | RTX 4070 SUPER | | --- | --- | --- | | Unchanged `--bundle-direct` | `3/6 4/7 1/1` | `3/6 4/7 1/1` | | Unchanged `--bundle` | `6/10 7/11 1/1` | `6/10 7/11 1/1` | | Unchanged count and group-budget tests | 2/2 pass | 2/2 pass | | Local fixture, bundle changes the root UAV | `3/6 3/6 1/1 3/3` | `3/6 3/6 1/1 3/3` | | Same fixture, explicit caller rebind before the post-bundle dispatch | `3/6 4/7 1/1 2/2` | `3/6 4/7 1/1 2/2` | For the local fixture I added a fourth output slot. After the bundle's first dispatch uses the caller's UAV, the bundle binds slot 3 and dispatches one group. It runs twice with the caller bound to slots 0 and 1 respectively. The parent then dispatches one group before setting slot 2. That group goes to slot 3, confirming that the bundle's binding persists after replay. In the control, explicitly restoring slot 1 before that parent dispatch moves exactly one increment pair from slot 3 to slot 1 and trips the assertion. Both root-signature variants gave the same results on each GPU. Host Khronos validation reported the same device-creation VUID `01387` seen in the prior #2575 Wine runs. No other VUID appeared in these runs.
fiestorra commented 2026-11-29 17:35:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:35:49Z.


Two findings: this branch conflicts on rebase, and the new mode works on a GPU here - with a caveat about what exactly I ran.

The conflict is duplication, not a mistake. runtime/test/d3d12_indirect_dispatch_count_test.cpp already exists on main, added by b5447692f ("test:
catch a lost parent root UAV right after a bundle's ExecuteIndirect (review on #2575)"), and runtime/CMakeLists.txt already declares the target. So the branch does
not add a new test; it extends one that landed while it was open, which is why the hunk collides.

The extension works. I put this branch's version of that file on main and ran it on an RTX 4090:

d3d12_indirect_dispatch_count_test.exe
  counted ExecuteIndirect(DISPATCH): 8 native WARP / Vulkan GPU comparisons passed; count=0,1,max,>max,
  nonzero offsets and GPU count overwrite, no validation errors                      exit 0
d3d12_indirect_dispatch_count_test.exe --bundle-direct
  bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases        exit 0

That 3/6 4/7 1/1 is the expectation the change documents, so the layer and the two host adapters agree with it, and the default mode is unaffected.

The caveat, and it matters: I ran this branch's file, not main plus this branch. main's version carries an include and change this branch predates, so a
rebase still has to reconcile the two, and the numbers above do not prove the reconciled file passes. What they do prove is that the new --bundle-direct path is
correct in isolation, which is the part that needed a GPU.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259814864 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7259814864). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T17:35:49Z. --- Two findings: this branch **conflicts** on rebase, and the new mode **works** on a GPU here - with a caveat about what exactly I ran. **The conflict is duplication, not a mistake.** `runtime/test/d3d12_indirect_dispatch_count_test.cpp` **already exists on `main`**, added by `b5447692f` ("test: catch a lost parent root UAV right after a bundle's ExecuteIndirect (review on #2575)"), and `runtime/CMakeLists.txt` already declares the target. So the branch does not add a new test; it extends one that landed while it was open, which is why the hunk collides. **The extension works.** I put this branch's version of that file on `main` and ran it on an RTX 4090: ``` d3d12_indirect_dispatch_count_test.exe counted ExecuteIndirect(DISPATCH): 8 native WARP / Vulkan GPU comparisons passed; count=0,1,max,>max, nonzero offsets and GPU count overwrite, no validation errors exit 0 d3d12_indirect_dispatch_count_test.exe --bundle-direct bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases exit 0 ``` That `3/6 4/7 1/1` is the expectation the change documents, so the layer and the two host adapters agree with it, and the default mode is unaffected. **The caveat, and it matters:** I ran **this branch's file**, not `main` plus this branch. `main`'s version carries an include and change this branch predates, so a rebase still has to reconcile the two, and the numbers above do not prove the reconciled file passes. What they do prove is that the new `--bundle-direct` path is correct in isolation, which is the part that needed a GPU. Written with an AI assistant.
fiestorra commented 2026-11-30 05:40:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:40:57Z.


Status on this machine: it merges, but the commit does not replay - and unlike the other two where I stopped, here I can say exactly where, because the conflict is only comments and docs.

merge-tree says clean. git merge-tree --write-tree origin/main refs/pull/2582/head succeeds against main 1d22590b9: GitHub can merge it. Three files, 36 insertions(+), 21 deletions(-).

Cherry-picking c2608e5a6 conflicts in two files:

  • runtime/test/d3d12_indirect_dispatch_count_test.cpp - a comment block, where main has since rewritten the text explaining the three records (6/10 in slot 1 … 1/1 in slot 2) and this commit adds two lines for the new --bundle-direct case (the same bundle records Dispatch(3, 1, 1) …, so slots 1 hold 3/6);
  • docs/d3d12_vulkan.md - the matching paragraph, same shape.

I tried to resolve it and stopped. The test file has more than one conflict block, and my first combined resolution left markers behind (12 remaining when I checked) - which is precisely the half-applied tree I have published six wrong measurements from in this session. I aborted, and main-cache is back at 1d22590b9 with no changes.

So what is verified: the change merges, it touches only a test, a doc paragraph and its CMake registration, and the conflict is textual and comment-only - nothing in the behaviour. What is not: that the new --bundle-direct case passes on a device, which is the whole point of the pull request.

What would unblock it, and it is quick for whoever owns the branch: a rebase onto main resolving those two comment blocks (keep main's rewritten text, append the --bundle-direct lines), then ctest -R d3d12_indirect_dispatch_count. I would run that on this machine's 4090 in a minute if the branch applied.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269901708 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7269901708). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:40:57Z. --- Status on this machine: **it merges, but the commit does not replay** - and unlike the other two where I stopped, here I can say exactly where, because the conflict is only comments and docs. **`merge-tree` says clean.** `git merge-tree --write-tree origin/main refs/pull/2582/head` succeeds against `main` `1d22590b9`: GitHub can merge it. Three files, `36 insertions(+), 21 deletions(-)`. **Cherry-picking `c2608e5a6` conflicts in two files:** - `runtime/test/d3d12_indirect_dispatch_count_test.cpp` - **a comment block**, where `main` has since rewritten the text explaining the three records (`6/10 in slot 1 … 1/1 in slot 2`) and this commit adds two lines for the new `--bundle-direct` case (`the same bundle records Dispatch(3, 1, 1) …, so slots 1 hold 3/6`); - `docs/d3d12_vulkan.md` - the matching paragraph, same shape. **I tried to resolve it and stopped.** The test file has more than one conflict block, and my first combined resolution left markers behind (`12 remaining` when I checked) - which is precisely the half-applied tree I have published six wrong measurements from in this session. I aborted, and `main-cache` is back at `1d22590b9` with no changes. **So what is verified:** the change merges, it touches only a test, a doc paragraph and its CMake registration, and the conflict is **textual and comment-only** - nothing in the behaviour. **What is not:** that the new `--bundle-direct` case passes on a device, which is the whole point of the pull request. **What would unblock it, and it is quick for whoever owns the branch:** a rebase onto `main` resolving those two comment blocks (keep `main`'s rewritten text, append the `--bundle-direct` lines), then `ctest -R d3d12_indirect_dispatch_count`. I would run that on this machine's 4090 in a minute if the branch applied. Written with an AI assistant.
KelboLive commented 2026-11-30 16:39:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:39:32Z.


Independent check on Windows/NVIDIA (not the author), at d2e69cc48.

  • Configured the branch's runtime and built d3d12_indirect_dispatch_count_test.
  • Ran it on the RTX 4070 Ti SUPER: exit 0 — counted ExecuteIndirect(DISPATCH): 8 native WARP / Vulkan GPU comparisons passed; count=0,1,max,>max, nonzero offsets and GPU count overwrite, no validation errors.

Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Vulkan SDK 1.4.363.0, Windows 11 Pro 10.0.26200.9711.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7285025567 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7285025567). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T16:39:32Z. --- Independent check on Windows/NVIDIA (not the author), at `d2e69cc48`. - Configured the branch's `runtime` and built `d3d12_indirect_dispatch_count_test`. - Ran it on the RTX 4070 Ti SUPER: **exit 0** — `counted ExecuteIndirect(DISPATCH): 8 native WARP / Vulkan GPU comparisons passed; count=0,1,max,>max, nonzero offsets and GPU count overwrite, no validation errors`. Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Vulkan SDK 1.4.363.0, Windows 11 Pro 10.0.26200.9711. AI-assisted: yes (opencode).
aslan2142 commented 2026-12-01 16:46:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:46:18Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7318198837 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2582#issuecomment-7318198837). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:46:18Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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
ProjectLeonida/mandy!2582
No description provided.