runtime: forward indirect Dispatch signatures with root constants #2084
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2091"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-25T00:07:32Z.
Refs #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