d3d12: defer fixed-count indirect compute dispatches in bundles #1077

Closed
PyZikYG wants to merge 1 commit from upstream-pr/1077 into main
PyZikYG commented 2026-11-24 18:01:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PyZikYG on 2026-11-24T18:01:56Z.


Claimed as D3D-BUNDLE-INDIRECT-DISPATCH.

ExecuteIndirect(DISPATCH) used to invalidate every bundle that contained it. For a signature consisting of a single DISPATCH argument and a fixed command count, defer the command until ExecuteBundle. Record the compute pipeline and root arguments in effect on the parent for each use of the bundle. Count buffers and state-changing signatures remain rejected in bundles.

Related: #377, #424, #429 and #499 touch the indirect command path. This change can land independently of the mesh and graphics features.

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5477604164 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1077). Originally posted by [PyZikYG](https://github.com/PyZikYG) on 2026-11-24T18:01:56Z. --- Claimed as [D3D-BUNDLE-INDIRECT-DISPATCH](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7139963909). ExecuteIndirect(DISPATCH) used to invalidate every bundle that contained it. For a signature consisting of a single DISPATCH argument and a fixed command count, defer the command until ExecuteBundle. Record the compute pipeline and root arguments in effect on the parent for each use of the bundle. Count buffers and state-changing signatures remain rejected in bundles. Related: #377, #424, #429 and #499 touch the indirect command path. This change can land independently of the mesh and graphics features. AI-assisted: yes.
abnalstlll-byte commented 2026-11-24 18:50:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T18:50:22Z.

Review: APPROVED


Reviewed and verified. Enables deferral of single-argument, fixed-count indirect compute dispatches inside D3D12 bundles until ExecuteBundle, recording active pipeline and root arguments without invalidating the bundle. Thoroughly validated against WARP in d3d12_indirect_compute_test.cpp. 100% clean-room.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045345994 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1077#pullrequestreview-6045345994). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T18:50:22Z. **Review:** APPROVED --- Reviewed and verified. Enables deferral of single-argument, fixed-count indirect compute dispatches inside D3D12 bundles until ExecuteBundle, recording active pipeline and root arguments without invalidating the bundle. Thoroughly validated against WARP in d3d12_indirect_compute_test.cpp. 100% clean-room.

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