runtime: forward indirect Dispatch signatures with root constants #2091
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2091
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2091/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Not-Saii on GitHub · 2026-11-25 00:07 UTC · original
Not-Saii:runtime/indirect-root-constants→main· +207 −59 · 4 files · 3 commits · merged 2026-11-25 00:25 UTCRefs #1759 (part 2, root arguments in signatures)
Summary
Device slot 41 now records a compute command signature created with a root signature, whose arguments are one or more
CONSTANTarguments followed byDISPATCH. The stride must equal the constants plus the 12-byte Dispatch record exactly. List slot 61 executes it when the desktop compute root bound through slot 33 is the signature's root, and checks that the whole record (constants and Dispatch) fits in the placed argument buffer. If the bound root differs, the call is refused withsignature root constants require the bound compute rootbefore anything is recorded.Root views, vertex and index buffer views, graphics commands with root arguments and the console-only argument type are still refused, as before. The rootless Dispatch, Draw, DrawIndexed and DispatchMesh paths are unchanged.
Fixture
startup_indirect_dispatchgains aconstantsmode, registered asstartup_indirect_root_constants_{warp,hardware}:scale,bias) atb0. The GPU writer stores(3, 7)and groups(4, 3, 2)after a padding word, on the same list. The swapped writer stores(7, 3).scale * (1 + x + 10y + 100z) + biasper group, so swapped or missing constants change the exact result.The rootless mode keeps its existing cases.
Command
Result
Environment: Windows 11 build 26300.9974, MSVC 14.44,
devpreset (Debug). Branch head:91b2ca48, on top of6218beb2. The D3D12 debug layer was enabled on both adapters.startup_indirect_dispatchstartup_indirect_root_constants4 passed, 0 failed, 0 capability skips. The same four tests also passed on the
releasepreset after the rebase onto6218beb2.In the constants mode, both adapters read back the following. Both argument guards held in every case.
(3, 7)0x31416b62(7, 3)0x314182720x31415926(sentinel)0x31415926(refused)Negative controls
0x31415926, expected0x31416b62. The call is refused as not a single rootless signature.0x31416b62where the sentinel is expected.E_INVALIDARGon both adapters.>=instead of==. The padded signature executes, and both adapters write0x31416b62where the sentinel is expected.Other checks
ctest --preset {dev,release} --no-tests=error -R '^startup_indirect_': 10/10 passed on each preset, including Draw, DrawIndexed and DispatchMesh on WARP and the RTX 4090, with no skips.ctest --preset dev --no-tests=error -R 'command_signature|startup_d3d12|signature': 10/10 passed.ctest --preset dev --no-tests=error -R '^startup_' -j 8on91b2ca48: 323 passed, 0 failed, 2 capability skips (startup_view_heap_warp,startup_logical_view_warp), out of 325.tests/docs_links_check.pyandtests/bidi_controls_check.pypassed.Scope
This uses source-built desktop pipelines only. The #1412 census recorded only argument types 0, 1, 2 and 10 plus one console-only type, so this slice completes the issue's stated contract and does not follow an observed application call. Root views (part 2 continued), console signatures and the application submission path remain open on #1759. No game files were used.
AI-assisted (Claude Code).
🤖 Generated with Claude Code
Device slot 41 records a compute signature with a root signature whose arguments are root constants followed by one Dispatch, with an exact stride. List slot 61 executes it only when the bound desktop compute root is the signature's root, and range-checks the full record. Other root argument types, graphics commands with root arguments and console-only types stay refused. startup_indirect_dispatch gains a constants mode, registered as startup_indirect_root_constants_{warp,hardware}, with a GPU-written record, swapped constants, an omitted writer, the existing refusals and a root-mismatch control. Refs #1759 Co-Authored-By: Claude Opus 5.5 <[email protected]>