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

Closed
PyZikYG wants to merge 1 commit from upstream-pr/424 into main
PyZikYG commented 2026-11-24 04:59:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PyZikYG on 2026-11-24T04:59:55Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466385641 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/424). Originally posted by [PyZikYG](https://github.com/PyZikYG) on 2026-11-24T04:59:55Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Sangonapou on 2026-11-24T14:54:00Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7135130732 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/424#issuecomment-7135130732). Originally posted by [Sangonapou](https://github.com/Sangonapou) on 2026-11-24T14:54:00Z. --- 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.

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!424
No description provided.