d3d12: defer DispatchMesh in bundles (D3D-BUNDLE-DISPATCH-MESH) #841

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

@⁠Maticcm on GitHub · 2026-11-24 14:26 UTC · original
Maticcm:feat/d3d12-bundle-dispatch-mesh → main · +122 −9 · 3 files · 2 commits · open

Claimed in the coordination issue as: D3D-BUNDLE-DISPATCH-MESH

What and why

ID3D12GraphicsCommandList6::DispatchMesh in runtime/shims/d3d12_com.cpp previously evaluated graphics_pipeline_, graphics_.layout, and viewport_ immediately when recorded, so calling DispatchMesh inside a D3D12_COMMAND_LIST_TYPE_BUNDLE command list did not defer through defer() and failed to inherit the parent direct list's render targets, viewport, scissor, or root arguments at ExecuteBundle. It also skipped note_direct_heap_indexing(graphics_.layout).

This change:

  • Keeps d3d12_trace::record and the D3D12 grid-dimension checks (<= 65535 per axis and product <= 2^22) at record time in GraphicsCommandList::DispatchMesh, then routes the recording through defer([=](GraphicsCommandList& l) { l.record_dispatch_mesh(x, y, z); }, true).
  • Adds record_dispatch_mesh(UINT x, UINT y, UINT z) (matching record_draw and record_dispatch) with note_direct_heap_indexing(graphics_.layout), empty-viewport skip, and leonida::Draw (draw.mesh = true).
  • Updates docs/d3d12_vulkan.md section 3.2 to note that DispatchMesh is deferred alongside draws and dispatches.
  • Adds GPU + negative bundle tests in runtime/test/d3d12_mesh_test.cpp:
    • A bundle created with mesh_pso executing DispatchMesh(2, 2, 1) twice from a parent created with vs_pso using different parent root constants/CBVs (verifying bundle initial PSO override and inherited render target, viewport, scissor, and root arguments).
    • A state-setting bundle handing back mesh_pso and root arguments to the parent for a subsequent DispatchMesh(2, 2, 1), verifying all 4,096 pixels (64x64) read back exact.
    • Negative checks: oversized grid in a bundle (E_INVALIDARG on bundle Close), executing a DispatchMesh bundle on a parent with no graphics root signature (E_INVALIDARG on parent Close), and calling DispatchMesh on an already-closed bundle (E_INVALIDARG on parent Close).

Tested

  • scripts\build_runtime.ps1 (MSVC 19.50.35729.0, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.1, RelWithDebInfo): [263/263] targets built cleanly.
  • ctest --test-dir runtime/build -R "^(d3d12_mesh|d3d12_bundle|d3d12_bundle_forbidden|d3d12_close_parity)$" --output-on-failure: 4/4 passed (100%).
  • Same 4 tests with LEONIDA_VK_VALIDATION=1 (VK_ADD_LAYER_PATH): 4/4 passed (100%, 0 Vulkan validation errors).
  • python -I scripts/check_no_game_data.py runtime/shims/d3d12_com.cpp runtime/test/d3d12_mesh_test.cpp docs/d3d12_vulkan.md: ok (3 file(s)).
  • python -m compileall -q make_game.py tools tests: exit 0.

GPUs tested: NVIDIA GeForce RTX 3080, driver 630.20, Windows 11

AI-assisted: yes

Known limitations: ExecuteIndirect inside a bundle remains un-deferred, and bundle Dispatch still has no dedicated GPU test (both noted in docs/d3d12_vulkan.md).

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 changes)
**@⁠Maticcm** on GitHub · 2026-11-24 14:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841) `Maticcm:feat/d3d12-bundle-dispatch-mesh` → `main` · +122 −9 · 3 files · 2 commits · open Claimed in the coordination issue as: D3D-BUNDLE-DISPATCH-MESH ### What and why `ID3D12GraphicsCommandList6::DispatchMesh` in `runtime/shims/d3d12_com.cpp` previously evaluated `graphics_pipeline_`, `graphics_.layout`, and `viewport_` immediately when recorded, so calling `DispatchMesh` inside a `D3D12_COMMAND_LIST_TYPE_BUNDLE` command list did not defer through `defer()` and failed to inherit the parent direct list's render targets, viewport, scissor, or root arguments at `ExecuteBundle`. It also skipped `note_direct_heap_indexing(graphics_.layout)`. This change: - Keeps `d3d12_trace::record` and the D3D12 grid-dimension checks (`<= 65535` per axis and product `<= 2^22`) at record time in `GraphicsCommandList::DispatchMesh`, then routes the recording through `defer([=](GraphicsCommandList& l) { l.record_dispatch_mesh(x, y, z); }, true)`. - Adds `record_dispatch_mesh(UINT x, UINT y, UINT z)` (matching `record_draw` and `record_dispatch`) with `note_direct_heap_indexing(graphics_.layout)`, empty-viewport skip, and `leonida::Draw` (`draw.mesh = true`). - Updates `docs/d3d12_vulkan.md` section 3.2 to note that `DispatchMesh` is deferred alongside draws and dispatches. - Adds GPU + negative bundle tests in `runtime/test/d3d12_mesh_test.cpp`: - A bundle created with `mesh_pso` executing `DispatchMesh(2, 2, 1)` twice from a parent created with `vs_pso` using different parent root constants/CBVs (verifying bundle initial PSO override and inherited render target, viewport, scissor, and root arguments). - A state-setting bundle handing back `mesh_pso` and root arguments to the parent for a subsequent `DispatchMesh(2, 2, 1)`, verifying all 4,096 pixels (`64x64`) read back exact. - Negative checks: oversized grid in a bundle (`E_INVALIDARG` on bundle `Close`), executing a `DispatchMesh` bundle on a parent with no graphics root signature (`E_INVALIDARG` on parent `Close`), and calling `DispatchMesh` on an already-closed bundle (`E_INVALIDARG` on parent `Close`). ### Tested - `scripts\build_runtime.ps1` (MSVC 19.50.35729.0, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.1, RelWithDebInfo): `[263/263]` targets built cleanly. - `ctest --test-dir runtime/build -R "^(d3d12_mesh|d3d12_bundle|d3d12_bundle_forbidden|d3d12_close_parity)$" --output-on-failure`: `4/4` passed (`100%`). - Same 4 tests with `LEONIDA_VK_VALIDATION=1` (`VK_ADD_LAYER_PATH`): `4/4` passed (`100%`, 0 Vulkan validation errors). - `python -I scripts/check_no_game_data.py runtime/shims/d3d12_com.cpp runtime/test/d3d12_mesh_test.cpp docs/d3d12_vulkan.md`: `ok (3 file(s))`. - `python -m compileall -q make_game.py tools tests`: exit 0. GPUs tested: NVIDIA GeForce RTX 3080, driver 630.20, Windows 11 AI-assisted: yes Known limitations: `ExecuteIndirect` inside a bundle remains un-deferred, and bundle `Dispatch` still has no dedicated GPU test (both noted in `docs/d3d12_vulkan.md`). ### 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 changes)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:24:02 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 14:40 UTC · original · approved these changes

Audited and verified. Implements deferred DispatchMesh recording for D3D12 bundle command lists, validating dispatch grid dimensions (<= 65535) at record time and replaying calls onto the parent command list during ExecuteBundle. Includes comprehensive test additions in
untime/tests/d3d12_mesh_shader_test.cpp covering state inheritance, constant buffer offset updates across bundle executions, and negative error conditions. Approved.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 14:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#pullrequestreview-6041289427) · **approved these changes** Audited and verified. Implements deferred DispatchMesh recording for D3D12 bundle command lists, validating dispatch grid dimensions (<= 65535) at record time and replaying calls onto the parent command list during ExecuteBundle. Includes comprehensive test additions in untime/tests/d3d12_mesh_shader_test.cpp covering state inheritance, constant buffer offset updates across bundle executions, and negative error conditions. Approved.
@ -507,0 +569,4 @@
void* bundle_mapped = nullptr;
EXPECT(SUCCEEDED(readback->Map(0, nullptr, &bundle_mapped)));
std::memcpy(bundle_pixels.data(), bundle_mapped, bundle_pixels.size());
readback->Unmap(0, nullptr);
Author
Owner

@⁠Copilot on GitHub · 2026-11-24 14:43 UTC · original

This maps/reads back the readback resource without waiting for GPU completion. Also, ID3D12Fence::SetEventOnCompletion requires a valid event HANDLE; passing nullptr typically returns E_INVALIDARG and cannot be waited on. Use a real event + WaitForSingleObject, or an existing helper in this test file that waits for fence->GetCompletedValue() >= bundle_fence, before mapping/copying readback.

**@⁠Copilot** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#discussion_r4681694190) This maps/reads back the readback resource without waiting for GPU completion. Also, `ID3D12Fence::SetEventOnCompletion` requires a valid event `HANDLE`; passing `nullptr` typically returns `E_INVALIDARG` and cannot be waited on. Use a real event + `WaitForSingleObject`, or an existing helper in this test file that waits for `fence->GetCompletedValue() >= bundle_fence`, before mapping/copying `readback`.
@ -1423,0 +1421,4 @@
if (!graphics_pipeline_ || !graphics_.layout) return check(false);
note_direct_heap_indexing(graphics_.layout);
if (!(viewport_.width > 0) || !(viewport_.height > 0)) return; // as record_draw: nothing is rasterized
leonida::Draw draw{graphics_pipeline_, graphics_.data, draw_views(), depth_, {}, 0, viewport_,
Author
Owner

@⁠Copilot on GitHub · 2026-11-24 14:43 UTC · original

note_direct_heap_indexing(graphics_.layout) runs even when the viewport is empty and the draw is skipped. The comment says this matches record_draw behavior, but the ordering here can record direct-heap indexing even when nothing is rasterized. Move the empty-viewport early-return before note_direct_heap_indexing(...) (or confirm record_draw does the same ordering) to avoid side effects when the command becomes a no-op.

**@⁠Copilot** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#discussion_r4681694324) `note_direct_heap_indexing(graphics_.layout)` runs even when the viewport is empty and the draw is skipped. The comment says this matches `record_draw` behavior, but the ordering here can record direct-heap indexing even when nothing is rasterized. Move the empty-viewport early-return before `note_direct_heap_indexing(...)` (or confirm `record_draw` does the same ordering) to avoid side effects when the command becomes a no-op.
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-24 14:43 UTC · original · reviewed

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
What changed in this PR

Defers ID3D12GraphicsCommandList6::DispatchMesh through the bundle replay path so bundles correctly inherit parent state at ExecuteBundle, and adds regression tests + documentation for the behavior.

Changes:

  • Route DispatchMesh recording through defer() and add record_dispatch_mesh() to replay with inherited parent state.
  • Add GPU + negative bundle coverage for deferred DispatchMesh behavior.
  • Document that DispatchMesh is deferred like draws/dispatches for bundle replay.
File Description
runtime/​shims/​d3d12_com.cpp Defers DispatchMesh via defer() and adds record_dispatch_mesh() for replay-time state snapshotting.
runtime/​test/​d3d12_mesh_test.cpp Adds bundle execution + negative tests validating deferred DispatchMesh semantics and error cases.
docs/​d3d12_vulkan.md Updates bundle behavior documentation to include deferred DispatchMesh.

Review effort: Lite

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#pullrequestreview-6041361623) · **reviewed** > [!WARNING] > Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a `copilot-code-review.yml` file specifying one with the `runs-on` attribute. See the [docs](https://gh.io/AA11tgch) for more details. <!-- ccr-overview-v2 --> ## Copilot review overview <details open> <summary><strong>3 open issues</strong></summary> - <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/high-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/high-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/high-v2-light.png" alt="High severity" width="62" height="18" align="texttop"></picture> [This maps/reads back the readback resource without waiting for GPU completion. Also,…](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/841) · New - <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/medium-v2-light.png" alt="Medium severity" width="62" height="18" align="texttop"></picture> [`note_direct_heap_indexing(graphics_.layout)` runs even when the viewport is empty and the draw is…](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/841) · New - <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.png" alt="Low severity" width="62" height="18" align="texttop"></picture> [The lambda uses `[=]` even though only `x`, `y`, and `z` are needed. Prefer explicitly capturing…](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/841) · New </details> <details> <summary><strong>What changed in this PR</strong></summary> Defers `ID3D12GraphicsCommandList6::DispatchMesh` through the bundle replay path so bundles correctly inherit parent state at `ExecuteBundle`, and adds regression tests + documentation for the behavior. **Changes:** - Route `DispatchMesh` recording through `defer()` and add `record_dispatch_mesh()` to replay with inherited parent state. - Add GPU + negative bundle coverage for deferred `DispatchMesh` behavior. - Document that `DispatchMesh` is deferred like draws/dispatches for bundle replay. | File | Description | | ---- | ----------- | | runtime/​shims/​d3d12_com.cpp | Defers `DispatchMesh` via `defer()` and adds `record_dispatch_mesh()` for replay-time state snapshotting. | | runtime/​test/​d3d12_mesh_test.cpp | Adds bundle execution + negative tests validating deferred `DispatchMesh` semantics and error cases. | | docs/​d3d12_vulkan.md | Updates bundle behavior documentation to include deferred `DispatchMesh`. | </details> <sub>Review effort: Lite</sub>
Author
Owner

@⁠Copilot on GitHub · 2026-11-24 14:43 UTC · original
On runtime/shims/d3d12_com.cpp line 488 (outdated):

@@ -485,12 +485,8 @@ class GraphicsCommandList final
     void STDMETHODCALLTYPE DispatchMesh(UINT x, UINT y, UINT z) override {
         d3d12_trace::record("ID3D12GraphicsCommandList6::DispatchMesh");
         if (x > 65535 || y > 65535 || z > 65535 || std::uint64_t(x) * y * z > (1u << 22)) return check(false);
-        if (!graphics_pipeline_ || !graphics_.layout) return check(false);
-        if (!(viewport_.width > 0) || !(viewport_.height > 0)) return;  // as record_draw: nothing is rasterized
-        leonida::Draw draw{graphics_pipeline_, graphics_.data, draw_views(), depth_, {}, 0, viewport_,
-                           scissor_, blend_factor_, front_stencil_ref_, back_stencil_ref_, false, x, y, z, 0, 0};
-        draw.mesh = true;
-        check(list_.draw(std::move(draw)));
+        if (defer([=](GraphicsCommandList& l) { l.record_dispatch_mesh(x, y, z); }, true)) return;

The lambda uses [=] even though only x, y, and z are needed. Prefer explicitly capturing [x, y, z] to avoid unintentionally capturing other state (and to avoid the deprecated implicit capture of this concerns in newer C++ standards, even if not used here).

**@⁠Copilot** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#discussion_r4681694402) On `runtime/shims/d3d12_com.cpp` line 488 (outdated): ```diff @@ -485,12 +485,8 @@ class GraphicsCommandList final void STDMETHODCALLTYPE DispatchMesh(UINT x, UINT y, UINT z) override { d3d12_trace::record("ID3D12GraphicsCommandList6::DispatchMesh"); if (x > 65535 || y > 65535 || z > 65535 || std::uint64_t(x) * y * z > (1u << 22)) return check(false); - if (!graphics_pipeline_ || !graphics_.layout) return check(false); - if (!(viewport_.width > 0) || !(viewport_.height > 0)) return; // as record_draw: nothing is rasterized - leonida::Draw draw{graphics_pipeline_, graphics_.data, draw_views(), depth_, {}, 0, viewport_, - scissor_, blend_factor_, front_stencil_ref_, back_stencil_ref_, false, x, y, z, 0, 0}; - draw.mesh = true; - check(list_.draw(std::move(draw))); + if (defer([=](GraphicsCommandList& l) { l.record_dispatch_mesh(x, y, z); }, true)) return; ``` The lambda uses `[=]` even though only `x`, `y`, and `z` are needed. Prefer explicitly capturing `[x, y, z]` to avoid unintentionally capturing other state (and to avoid the deprecated implicit capture of `this` concerns in newer C++ standards, even if not used here).
Author
Owner

@⁠Maticcm on GitHub · 2026-11-24 15:15 UTC · original

Addressed @⁠Copilot review comments (rebased onto current main):
1.
untime/shims/d3d12_com.cpp (DispatchMesh): replaced implicit [=] lambda capture with explicit [x, y, z].
2.
untime/shims/d3d12_com.cpp (
ecord_dispatch_mesh): confirmed
ecord_draw (L1408-1418) uses the exact same ordering (
ote_direct_heap_indexing before the empty-viewport early-return), so both paths behave identically.
3.
untime/test/d3d12_mesh_test.cpp: replaced the
ullptr event in the bundle fence wait with an explicit CreateEventW / WaitForSingleObject / CloseHandle wait before mapping
eadback.

Rebuilt d3d12_mesh_test and verified on NVIDIA GeForce RTX 3080 (LEONIDA_VK_VALIDATION=1, 0 validation errors). AI-assisted.

**@⁠Maticcm** on GitHub · 2026-11-24 15:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#issuecomment-7135709900) Addressed @⁠Copilot review comments (rebased onto current main): 1. untime/shims/d3d12_com.cpp (DispatchMesh): replaced implicit [=] lambda capture with explicit [x, y, z]. 2. untime/shims/d3d12_com.cpp ( ecord_dispatch_mesh): confirmed ecord_draw (L1408-1418) uses the exact same ordering ( ote_direct_heap_indexing before the empty-viewport early-return), so both paths behave identically. 3. untime/test/d3d12_mesh_test.cpp: replaced the ullptr event in the bundle fence wait with an explicit CreateEventW / WaitForSingleObject / CloseHandle wait before mapping eadback. Rebuilt d3d12_mesh_test and verified on NVIDIA GeForce RTX 3080 (LEONIDA_VK_VALIDATION=1, 0 validation errors). AI-assisted.
Author
Owner

@⁠Sangonapou on GitHub · 2026-11-24 16:03 UTC · original

Tested a74ab140 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32, mesh shaders), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: pass

Built at this head with scripts\build_runtime.ps1 (MSVC 19.51, VS Build Tools 2026, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0); llvm-mc 23.1.6, SPIRV-Tools 2026.4. No game files.

ctest -R ^d3d12_mesh$ -V: passed, D3D-29: mesh tier 1; ... DispatchMesh over X, Y and Z, deferred bundle DispatchMesh and a stream VS draw matched all 4096 pixels on the native mesh stage.

One observation, not a failure: the statistics line here reads statistics, mixed: IA 6/2 VS 6 C 12/2 PS 3328 CS 0; mesh only: C 8/0 PS 1024; vertex only: C 2 PS 2048, while on this card the same test printed C 12/12 and mesh only: C 8/8 on the heads of #424 and #815 (older bases). I have not checked whether the second clipper count changed on main or in this branch; mentioning it in case it is the bundle path.

**@⁠Sangonapou** on GitHub · 2026-11-24 16:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#issuecomment-7137054295) Tested a74ab140 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32, mesh shaders), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: pass Built at this head with `scripts\build_runtime.ps1` (MSVC 19.51, VS Build Tools 2026, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0); `llvm-mc` 23.1.6, SPIRV-Tools 2026.4. No game files. `ctest -R ^d3d12_mesh$ -V`: passed, `D3D-29: mesh tier 1; ... DispatchMesh over X, Y and Z, deferred bundle DispatchMesh and a stream VS draw matched` all 4096 pixels on the native mesh stage. One observation, not a failure: the statistics line here reads `statistics, mixed: IA 6/2 VS 6 C 12/2 PS 3328 CS 0; mesh only: C 8/0 PS 1024; vertex only: C 2 PS 2048`, while on this card the same test printed `C 12/12` and `mesh only: C 8/8` on the heads of #424 and #815 (older bases). I have not checked whether the second clipper count changed on `main` or in this branch; mentioning it in case it is the bundle path.
Author
Owner

@⁠Timon360SB on GitHub · 2026-11-24 17:48 UTC · original

Independent testing results

Verified deferred DispatchMesh execution in bundles on NVIDIA Blackwell hardware under native Windows, with Vulkan validation enabled.

Tested revisions

  • BASE: a28927849adb4e40dfdec8c32fb6758dcd205a37
  • HEAD: a74ab14076c803ecf7e9c34f6d2e1158e6d2d194

Test environment

Component Configuration
CPU AMD Ryzen 7 7800X3D
GPU NVIDIA GeForce RTX 5070 (Blackwell)
VRAM 12227 MiB
RAM 31.11 GiB
GPU driver 621.14
OS Windows 11 Pro, build 26200
Vulkan SDK 1.4.363.0
MSVC 19.44.35230
Windows SDK 10.0.26100.0

Test configuration

  • Build configuration: RelWithDebInfo.
  • Build generator: Ninja Multi-Config.
  • Build scope: selected targets.
  • Vulkan core, GPU-assisted and synchronization validation enabled.
  • Three repetitions per revision.
  • Synthetic fixtures only.

Both revisions compiled successfully.

CTest results

Test BASE HEAD
d3d12_mesh 3/3 3/3
d3d12_bundle 3/3 3/3
d3d12_bundle_forbidden 3/3 3/3
d3d12_close_parity 3/3 3/3
vk_sync_validation 3/3 3/3
Total 15/15 15/15

Combined: 30/30 PASS, with no failed or skipped CTest executions.

Deferred DispatchMesh

The mesh test reported mesh shader tier 1 support on the RTX 5070.

All three HEAD executions explicitly confirmed successful deferred bundle DispatchMesh behavior.

The relevant HEAD diagnostic was:

DispatchMesh over X, Y and Z, deferred bundle DispatchMesh and a stream VS draw matched all 4096 pixels
Verification HEAD result
DispatchMesh over X, Y and Z PASS
Deferred bundle DispatchMesh PASS
Pipeline stream VS draw PASS
Pixel comparison 4096/4096 matched
Oversized dispatch grids Rejected at Close
Invalid bundle replays Rejected at Close
Wrong-kind draws Rejected at execution
Mesh statistics queries Resolved successfully

The pipeline state stream checks also consistently reported nine invalid cases and two not-implemented cases being rejected.

Bundle regression coverage

The forbidden bundle calls test reported the same results on BASE and HEAD:

  • 10 calls checked on the layer.
  • 10 compared with the host.
  • 0 host disagreements.
  • 0 failures.

The close-parity test also remained unchanged:

Property BASE HEAD
Cases 113 113
Match WARP 82 82
Known layer-stricter cases 16 16
Known layer-looser cases 15 15
Not run 0 0
Failures 0 0

Vulkan validation

The synchronization self-test produced the expected intentional WRITE_AFTER_WRITE hazard without a barrier and zero validation errors with a barrier.

Limitations

  • Tested on one NVIDIA Blackwell GPU.
  • No second hardware configuration was available for this run.
  • Testing was limited to the five selected CTest tests and synthetic fixtures.
  • No real-title execution was performed.

Conclusion

Result: PASS — no regressions detected within the tested scope.

The new deferred bundle DispatchMesh scenario successfully matched all 4096 pixels in every HEAD repetition. Invalid bundle replays were rejected as expected, and the existing bundle and close-parity regression tests remained successful.

AI-assisted log analysis and report preparation.

**@⁠Timon360SB** on GitHub · 2026-11-24 17:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/841#issuecomment-7139728830) ## Independent testing results Verified deferred `DispatchMesh` execution in bundles on NVIDIA Blackwell hardware under native Windows, with Vulkan validation enabled. ### Tested revisions - BASE: `a28927849adb4e40dfdec8c32fb6758dcd205a37` - HEAD: `a74ab14076c803ecf7e9c34f6d2e1158e6d2d194` ### Test environment | Component | Configuration | | --- | --- | | CPU | AMD Ryzen 7 7800X3D | | GPU | NVIDIA GeForce RTX 5070 (Blackwell) | | VRAM | 12227 MiB | | RAM | 31.11 GiB | | GPU driver | 621.14 | | OS | Windows 11 Pro, build 26200 | | Vulkan SDK | 1.4.363.0 | | MSVC | 19.44.35230 | | Windows SDK | 10.0.26100.0 | ### Test configuration - Build configuration: RelWithDebInfo. - Build generator: Ninja Multi-Config. - Build scope: selected targets. - Vulkan core, GPU-assisted and synchronization validation enabled. - Three repetitions per revision. - Synthetic fixtures only. Both revisions compiled successfully. ### CTest results | Test | BASE | HEAD | | --- | ---: | ---: | | `d3d12_mesh` | 3/3 | 3/3 | | `d3d12_bundle` | 3/3 | 3/3 | | `d3d12_bundle_forbidden` | 3/3 | 3/3 | | `d3d12_close_parity` | 3/3 | 3/3 | | `vk_sync_validation` | 3/3 | 3/3 | | **Total** | **15/15** | **15/15** | Combined: **30/30 PASS**, with no failed or skipped CTest executions. ### Deferred DispatchMesh The mesh test reported mesh shader tier 1 support on the RTX 5070. All three HEAD executions explicitly confirmed successful deferred bundle `DispatchMesh` behavior. The relevant HEAD diagnostic was: ```text DispatchMesh over X, Y and Z, deferred bundle DispatchMesh and a stream VS draw matched all 4096 pixels ``` | Verification | HEAD result | | --- | --- | | DispatchMesh over X, Y and Z | PASS | | Deferred bundle DispatchMesh | PASS | | Pipeline stream VS draw | PASS | | Pixel comparison | 4096/4096 matched | | Oversized dispatch grids | Rejected at Close | | Invalid bundle replays | Rejected at Close | | Wrong-kind draws | Rejected at execution | | Mesh statistics queries | Resolved successfully | The pipeline state stream checks also consistently reported nine invalid cases and two not-implemented cases being rejected. ### Bundle regression coverage The forbidden bundle calls test reported the same results on BASE and HEAD: - 10 calls checked on the layer. - 10 compared with the host. - 0 host disagreements. - 0 failures. The close-parity test also remained unchanged: | Property | BASE | HEAD | | --- | ---: | ---: | | Cases | 113 | 113 | | Match WARP | 82 | 82 | | Known layer-stricter cases | 16 | 16 | | Known layer-looser cases | 15 | 15 | | Not run | 0 | 0 | | Failures | 0 | 0 | ### Vulkan validation The synchronization self-test produced the expected intentional `WRITE_AFTER_WRITE` hazard without a barrier and zero validation errors with a barrier. ### Limitations - Tested on one NVIDIA Blackwell GPU. - No second hardware configuration was available for this run. - Testing was limited to the five selected CTest tests and synthetic fixtures. - No real-title execution was performed. ### Conclusion **Result: PASS — no regressions detected within the tested scope.** The new deferred bundle DispatchMesh scenario successfully matched all 4096 pixels in every HEAD repetition. Invalid bundle replays were rejected as expected, and the existing bundle and close-parity regression tests remained successful. AI-assisted log analysis and report preparation.
This pull request has changes conflicting with the target branch.
  • runtime/shims/d3d12_com.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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