d3d12: execute fixed-count indirect mesh dispatches on Vulkan #424

Closed
leonida/mandy
PyZikYG wants to merge 0 commits from vulkan-mesh-dispatch into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

PyZikYG commented 2026-11-24 04:59:55 +00:00

Claimed in the coordination issue as D3D-MESH-INDIRECT-EXEC.

Depends on: #377 (overlap at mesh signature creation), #337 (indirect argument range rules)

CreateCommandSignature recognizes DISPATCH_MESH, but the Vulkan backend cannot replay it. This change captures the graphics PSO, root arguments and render targets at recording time and replays the strided GPU arguments with vkCmdDrawMeshTasksIndirectEXT. It covers signatures with one DISPATCH_MESH argument and a fixed command count. GPU count buffers and signatures that change root arguments remain unsupported.

AI-assisted: yes.

Claimed in the coordination issue as [D3D-MESH-INDIRECT-EXEC](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7122527843). Depends on: #377 (overlap at mesh signature creation), #337 (indirect argument range rules) CreateCommandSignature recognizes DISPATCH_MESH, but the Vulkan backend cannot replay it. This change captures the graphics PSO, root arguments and render targets at recording time and replays the strided GPU arguments with vkCmdDrawMeshTasksIndirectEXT. It covers signatures with one DISPATCH_MESH argument and a fixed command count. GPU count buffers and signatures that change root arguments remain unsupported. AI-assisted: yes.
Sangonapou commented 2026-11-24 14:54:00 +00:00

Tested 8bc1af85 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

Runtime 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). No game files.

ctest -R ^d3d12_mesh$ -V: passed. On this card's native mesh stage: D3D-29: mesh tier 1; mesh and VS PSOs from pipeline state streams (9 refused as invalid, 2 as not implemented); direct and indirect mesh dispatches and a stream VS draw matched all 4096 pixels, and the pipeline statistics line (mesh only: C 8/8 PS 1024) is as expected. d3d12_mesh also passes on main 2d73c242 here.

Tested 8bc1af85 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 Runtime 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). No game files. `ctest -R ^d3d12_mesh$ -V`: passed. On this card's native mesh stage: `D3D-29: mesh tier 1; mesh and VS PSOs from pipeline state streams (9 refused as invalid, 2 as not implemented); direct and indirect mesh dispatches and a stream VS draw matched all 4096 pixels`, and the pipeline statistics line (`mesh only: C 8/8 PS 1024`) is as expected. `d3d12_mesh` also passes on `main` `2d73c242` here.
Sign in to join this conversation.
No description provided.