startup: implement command-list slot 14 Dispatch (Part of #870) #1967
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1974"
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 tedin7 on 2026-11-24T22:21:17Z.
Part of #870
What this unblocks: compute passes recorded on a command list (slot 14
Dispatch) reach the desktop list instead of the no-op trap, so a scene that pulls GPU-written arguments from them can run.Changes:
src/startup_stubs/list_dispatch.h: forward-or-refuse decision (list open, direct/compute list, desktop compute pipeline and root bound, each group count <= 65535; zero groups is valid).d3d12_xs_device.cpp: newlist_dispatch, registered at slot 14 next tolist_draw; refusals are logged (first 16).tests/startup_list_dispatch_check.cppplus cteststartup_list_dispatchand two WILL_FAIL controls (no-limit,no-state).Verification:
git diff --check: clean.x86_64-w64-mingw32-g++ -std=c++17 -Isrc tests/startup_list_dispatch_check.cppthen run under wine:11 cases passed;--mutate no-limit: 3 of 11 failed (rc 1);--mutate no-state: 2 of 11 failed (rc 1).d3d12_xs_device.cpp(needs MSVC,__try); the end-to-end UAV fill/readback fixture on WARP + hardware is still to do. Depends softly on #1803 (compute root).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T22:35:57Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
0e684dcf87ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T22:27:33Z.
For the planned end-to-end fixture, please combine the existing compute-root/PSO path with #1975's slots 37/39 and one source-built shader that stores distinguishable root DWORDs into a UAV. Right now #1974 issues desktop
Dispatchdirectly, while #1975 only keeps the DWORDs inPass.compute_constants. This pair needs a real consumer for those words. Please verify correct and swapped values after a fence, zero groups preserving the sentinel, and a second list recording after Reset with fresh bindings. One shared fixture can cover both PRs. Keep the unit decisions as negative controls.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T22:29:38Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
0e684dcℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T22:35:57Z.
Code review location:
src/startup_stubs/d3d12_xs_device.cpp; line 2325With
X2W_D3D12_RENDER=1andX2W_D3D12_LIST_NOOP=1, a desktop compute PSO requiring a root UAV passes this guard after slots 25 and 33, but slot 45 (SetComputeRootUnorderedAccessView) has no handler inbuild_tables()and is dropped bynoop_slot(). This now records a dispatch with an unset required UAV instead of dropping unsupported work, so a valid guest producer cannot write its output and D3D12 validation can reject the recording. Forward only after the required compute arguments have actually been bound, or refuse those roots until their setters are implemented; the decision-only test cannot detect this.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T22:35:58Z.
Code review location:
src/startup_stubs/d3d12_xs_device.cpp; line 3708Enabling slot 14 changes a public startup-rendering capability, but this commit updates neither the README nor
docs/experiments.md.AGENTS.mdrequires an update to one of those files when a public capability or reproduction command changes. Add a focused experiment entry describing the supported desktop compute-state constraints and thestartup_list_dispatchreproduction command, clearly separating the device-free decision checks from the still-unverified GPU execution, so contributors can reproduce the checks and understand the new path's limits.AGENTS.md reference: AGENTS.md:L204-L205
Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:15:33Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:15:35Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:15:37Z.
Pushed
6c901b20: Dispatch is refused under a compute root with arguments (slots 35-45 not forwarded yet), plus docs. The shared end-to-end fixture with #1975 (root DWORDs stored into a UAV, swapped values after a fence, zero groups, Reset with fresh bindings) is not done here and needs the root-argument forwarding first. This PR stays at decision-level checks.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:15:32Z.
Code review location:
src/startup_stubs/d3d12_xs_device.cpp; line 2325Fixed in
6c901b20: Dispatch is now refused (logged as 'compute root arguments are not forwarded') when the bound compute root declares any parameter or static sampler, since slots 35-45 are not forwarded. New negative control startup_list_dispatch_no-root-args_control. Win2025 dev+release: startup_list_dispatch 4/4.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:15:35Z.
Code review location:
src/startup_stubs/d3d12_xs_device.cpp; line 3708Fixed in
6c901b20: added a 'Startup list Dispatch' section to docs/experiments.md with the supported compute-state constraints and the startup_list_dispatch reproduction command. It separates the device-free decision checks from GPU execution, which is not verified yet.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:10:07Z.
I built the shim in Release with this head (
078c3dd8) and #1803 (bb6b9a1a) replayed onto main2017e1bb. The replay preserves main's desktop slot 33 bind.ctest --preset release -j1 --no-tests=error -R '^startup_(compute_root|list_dispatch)'passed all five cases, including the three Dispatch negative controls.That combination still has a forwarding gap. #1803 records slot 35 tables, and #1974 refuses roots containing those tables, so the five tests do not reach a desktop UAV write. For the SRV-only path that is permitted, main's slot 43 handler returns early on an invalid upload address or wrong parameter type. It does not record which parameters actually reached the desktop list or invalidate a previous SRV after a rejected replacement. The Dispatch decision would still forward with the same root and pipeline booleans. It also does not check compatibility between the bound root and the compute PSO.
Please cover those cases before forwarding. A source-built shader on the existing slot 86 desktop PSO path can write distinguishing words to a UAV once the bounded bindings are available. Check exact fenced readback, then check the sentinel with a missing or invalid binding and after Reset. Coordinate the slot 35 case with #1803 so its nonzero UAV descriptor offset and wrong or cleared binding exercise the actual Dispatch consumer. The current unit decisions are useful independent controls.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T06:23:49Z.
Pushed
cd38b2ed. It closes the slot 43 and root/PSO gaps from your comment. Dispatch is now forwarded only when:compute pipeline was built against another root signature;a compute root SRV is not bound.Regression test:
startup_list_dispatch_checkgains cases for a root/PSO mismatch, an unbound SRV (also with zero groups) and the paired and fully bound forward. It has two new mutation controls,no-pairingandno-bound, which must fail. The docs entry is updated.Not done here: the slot 35 table forwarding and the shared UAV readback fixture (exact fenced values, sentinel after a rejected binding and after Reset). Those need #1803's descriptor-table forwarding first, so tables and UAV roots are still refused. The unit decisions stay as negative controls.
Verification (Win2025, 3-slot pool,
x2w_pipe.py win2025 1974 --force):/O2): 27/27 passed, 0 skippedstartup_list_dispatchplus all five_controlmutation testsAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:13:39Z.
Stage-2 verification of head
24c5f554.Co-Authored-By, no references to local probes.python3 x2w_pipe.py win2025 1974 --force100% tests passed out of 28100% tests passed out of 28C1060: compiler is out of heap spaceond3d12_xs_device.cppwhile three slots compiled in parallel. An identical re-run passed. Treated as VM memory pressure, not a code defect. Worth watching if this file keeps growing.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:51:27Z.
Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is.
We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T21:51:25Z.
Reopening at the unchanged head
8a4df523, per @R0Y00's 21:15 note on #2470: this lands second, after #1803 and before #1975. @tedin7, it's still your PR, so I've only changed its state.It conflicts with current
maininsrc/startup_stubs/d3d12_xs_device.cpp, atbuild_tables: this branch'slist_typed[14]sits next tomain's newlist_typed[16]. Could you rebase it? Once the new head is green, I'll verify native slot 14 there, with a mutant control.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T22:29:36Z.
@tedin7: #1803 has landed (
4ce2931d), so this PR is next in the order. It still conflicts withmaininsrc/startup_stubs/d3d12_xs_device.cpp(thebuild_tablesslot entries). Once you've rebased it, or mergedmainin, I'll verify native slot 14 at the new head with a mutant control.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T22:48:06Z.
@MasterDomino: #1974 is ready for review/merge at head
d2c7782f(second in the #1803 -> #1974 -> #1975 order).What changed since
8a4df523: merged currentmain(merge commit, no force-push). The only conflict was inbuild_tables: slot 14 (Dispatch) and main's slot 16 are both kept. CI is green on this head.Note for review: the forwarded Dispatch is limited to roots with root SRVs only, so it has no observable GPU output yet. A readback test needs the UAV descriptor table consumer that follows in #1975.
Win2025 receipt on this exact head:
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
d2c7782fd510952d2b4b641d16d29d8c70fc7b18:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_list_dispatch_check startup_indirect_dispatch startup_compute_root startup_command_list_slot_names startup_list_resubmit -- -j 2):23.10s(configure1.76s)ctest --preset dev -R '^(startup_list_dispatch_check|startup_indirect_dispatch.*|startup_compute_root|startup_stubs|startup_command_list_slot_names|startup_list_resubmit.*)$' --parallel 4 --no-tests=error --output-on-failure): 13/13 passed (0.93s:startup_list_resubmit_untracked_hardware0.24s,startup_list_resubmit_warp0.25s,startup_list_resubmit_untracked_warp0.24s,startup_command_list_slot_names0.02s,startup_compute_root0.01s,startup_indirect_dispatch_warp0.08s,startup_list_resubmit_hardware0.22s,startup_list_resubmit_nodebug_warp0.21s,startup_list_resubmit_nodebug_untracked_warp0.21s,startup_indirect_dispatch_hardware0.07s,startup_list_resubmit_nodebug_hardware0.20s,startup_list_resubmit_nodebug_untracked_hardware0.23s,startup_stubs0.83s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_list_dispatch_check startup_indirect_dispatch startup_compute_root startup_command_list_slot_names startup_list_resubmit -- -j 2):53.90s(configure1.76s)ctest --preset release -R '^(startup_list_dispatch_check|startup_indirect_dispatch.*|startup_compute_root|startup_stubs|startup_command_list_slot_names|startup_list_resubmit.*)$' --parallel 4 --no-tests=error --output-on-failure): 13/13 passed (1.10s:startup_list_resubmit_untracked_warp0.23s,startup_list_resubmit_untracked_hardware0.26s,startup_list_resubmit_hardware0.25s,startup_compute_root0.01s,startup_command_list_slot_names0.01s,startup_indirect_dispatch_warp0.11s,startup_list_resubmit_warp0.23s,startup_list_resubmit_nodebug_warp0.24s,startup_list_resubmit_nodebug_untracked_warp0.22s,startup_indirect_dispatch_hardware0.09s,startup_list_resubmit_nodebug_hardware0.22s,startup_list_resubmit_nodebug_untracked_hardware0.22s,startup_stubs0.93s)sccache: 1/12 hits; wall86.6sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T23:05:15Z.
Review: DISMISSED
Thanks for the merge with
main. I checked outd2c7782fand built it with the dev preset on Windows 11 build 26300 (AMD Radeon RX 9070 XT, driver 32.0.32029.2010; WARP 10.0.26100.9818).ctest --preset dev --no-tests=error -j 4 -R '^(startup_list_dispatch.*|startup_indirect_.*|startup_compute_root|startup_stubs|startup_command_list_slot_names|startup_list_resubmit.*|desktop_root_signature|cpu_shim_compute.*|d3d12x_compute_list.*)$': 92/92 passed, 0 skipped, with the hardware variants on the RX 9070 XT. The branch merges cleanly onto currentmain, and CI is green.The decision and its inputs address @R0Y00's 06:10 points:
compute_srv_boundrecords only root SRVs that reached the desktop list.Passbefore Reset.The header's unit decisions catch mutations of
list_dispatch.h: "always forward", "root arguments ignored" and "zero groups refused" each failstartup_list_dispatch.Blocking: native slot 14 itself is not verified
These one-line mutants in
d3d12_xs_device.cppeach still pass all 92 tests:list_dispatchnever taken (always forward)compute_srv_boundnot cleared on a slot 33 root changerequest.compute_root_has_arguments = falseroot_matches_pipeline = true(pairing off)list_typed[14]registration removed (slot 14 a no-op)startup_command_list_slot_namesandstartup_stubsNo test records command-list slot 14 through the stand-in, so neither the request built in
list_dispatchnor the binding state behind it is checked. That falls short of the merge rule's "source-built regression plus a negative control that catches the intended failure" for the forwarding.With only root-SRV roots forwarded there's no UAV, so this PR can't have a readback. A device-level fixture can still cover the forwarding. On WARP, with the debug layer, it would drive slots 86/25/33/43/14 and assert:
Dispatch(...) refused: <reason>line for each of:The six mutants above should fail against that. The exact fenced UAV readback with the sentinel controls stays with the table/UAV consumer.
Smaller items
-R '^(startup_list_dispatch_check|...)$'doesn't match the registered names (startup_list_dispatchplus its five_controltests), so none of them were in the 13/13.docs/experiments.mdand thelist_dispatch.hcomment say slots 35 and 43 have no handler. Slot 43 islist_compute_upload_srv, and slot 35 has been handled since #1803. The comment abovelist_dispatchand the test header's list of mutations are out of date too.root_matches_pipelineandroot_arguments_boundtofalseinListDispatch, so a caller that omits them refuses.For the combined review:
startup_compute_dispatch_*in #2470 only builds slot 67 pipelines, so the native-versus-translated split @R0Y00 wants kept would also need a slot 86 desktop compute PSO case there.@tedin7, if it helps the landing order, I can write that fixture and send it as a PR against your branch. Just say which you prefer.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T23:39:49Z.
@tedin7, as offered in my review, the native slot-14 fixture is up as a PR into this branch: https://github.com/tedin7/Xbox2Windows/pull/1. It's one test-only commit on
d2c7782f:tests/startup_list_dispatch_native.cpp, its CMake entries and a docs note. Production code is unchanged.CSInvocations);ctest --preset dev --no-tests=error -R "^startup_list_dispatch": 9/9, also over 20 repeats;If you merge it, or carry the commit over, my change request is resolved at that head. I'll re-review and dismiss it then. Because the fixture is my work, I'd leave the merge of #1974 to @R0Y00 or you.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:00:21Z.
I independently ran the offered native slot 14 fixture at
a8275935, Windows 11 build 26200, Release,ctest --preset release --no-tests=error -j 1 -R '^startup_list_dispatch' -V. All 9 passed with no skips. WARP and RTX 4060 Laptop both reported 24 CS invocations for the initial bound Dispatch, 0 for the rejected cases, and 16 after Reset and rebind, with the debug layer enabled. The WARP skip-SRV control observed the named refusal. @tedin7, please integrate the fixture or an equivalent into your branch when resolving the currentmainconflicts. We can then recheck the exact upstream head and proceed with #1975 in order.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:01:07Z.
@R0Y00 Cannot run Win2025 tests on
d2c7782fyet because this branch has merge conflicts withmain; please rebase and tag@tedin7again.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:14:33Z.
Review: APPROVED
I resolved the documentation conflict by keeping both the slot 14 Dispatch and the explicit-gradient sections. The fast-forward candidate
9c678547preserves the native fixture and its author. Windows 11 build 26200 Release passed 9/9 with no skips usingctest --preset release --no-tests=error -j 1 -R '^startup_list_dispatch' -V. On WARP and RTX 4060 Laptop with the debug layer enabled, the bound call produced 24 invocations, refused calls produced zero, and Reset followed by rebind produced 16. The WARP skip-SRV control gave the expected refusal. Documentation validation checked 507 links. This verifies source-built native slot 14 forwarding.Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T00:06:24Z.
Thanks, @tedin7. At
221e6c4fthe fixture is in unchanged:tests/startup_list_dispatch_native.cppis byte-identical toa8275935. Thelist_dispatch.hcomment fix is in too, so I've dismissed my change request. @R0Y00 ran the fixture 9/9 on WARP and RTX 4060 Laptop, and the six device-side mutants from my review all fail it on WARP and the RX 9070 XT.One thing remains before this can land:
mainmoved to8ecaa8ec, with #2636 merged, and this branch now conflicts indocs/experiments.mdonly. The code still merges cleanly. Could you mergemainagain?Because the fixture is my work, I'll leave the final recheck and the merge of this head to @R0Y00. #1975 follows in order.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:20:32Z.
@MasterDomino: #1974 is ready for re-review at head
9c678547(third-party merge ofmainby @R0Y00 on top of my221e6c4f).What changed since
d2c7782f:main(merge commit, no force-push). Only conflict:docs/experiments.md, both sections kept.tests/startup_list_dispatch_native.cpp, its CMake entries and the docs note (commita8275935, merged as-is). It covers the native slot 14 forwarding and refusal paths you listed, so your change request should be resolved at this head.list_dispatch.hheader comment: slot 43 (root SRV) is forwarded; the other compute root-argument slots are not.Not changed: the forwarded Dispatch still has no UAV, so the fenced readback stays with the table/UAV consumer in #1975.
Win2025 receipt on this exact head, with the fixture included (22/22 in both presets, incl.
startup_list_dispatch_native_warp,_hardwareand theskip_srvcontrol):Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
9c67854719fc62c813e9d84489a2b096ef45ade1:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_list_dispatch_check startup_list_dispatch_native startup_indirect_dispatch startup_compute_root startup_command_list_slot_names startup_list_resubmit -- -j 2):8.10s(configure0.00s)ctest --preset dev -R '^(startup_list_dispatch.*|startup_indirect_dispatch.*|startup_compute_root|startup_stubs|startup_command_list_slot_names|startup_list_resubmit.*)$' --parallel 2 --no-tests=error --output-on-failure): 22/22 passed (2.54s:startup_indirect_dispatch_warp0.16s,startup_indirect_dispatch_hardware0.12s,startup_compute_root0.02s,startup_command_list_slot_names0.03s,startup_list_resubmit_warp0.40s,startup_list_resubmit_nodebug_warp0.25s,startup_stubs1.13s,startup_list_resubmit_nodebug_untracked_warp0.28s,startup_list_resubmit_untracked_warp0.29s,startup_list_resubmit_hardware0.24s,startup_list_resubmit_nodebug_hardware0.25s,startup_list_resubmit_nodebug_untracked_hardware0.23s,startup_list_dispatch0.02s,startup_list_dispatch_no-limit_control0.02s,startup_list_dispatch_no-state_control0.02s,startup_list_dispatch_no-root-args_control0.02s,startup_list_dispatch_no-pairing_control0.02s,startup_list_dispatch_no-bound_control0.02s,startup_list_resubmit_untracked_hardware0.25s,startup_list_dispatch_native_hardware0.27s,startup_list_dispatch_native_warp0.31s,startup_list_dispatch_native_skip_srv_warp_control0.08s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_list_dispatch_check startup_list_dispatch_native startup_indirect_dispatch startup_compute_root startup_command_list_slot_names startup_list_resubmit -- -j 2):8.33s(configure0.00s)ctest --preset release -R '^(startup_list_dispatch.*|startup_indirect_dispatch.*|startup_compute_root|startup_stubs|startup_command_list_slot_names|startup_list_resubmit.*)$' --parallel 2 --no-tests=error --output-on-failure): 22/22 passed (2.58s:startup_indirect_dispatch_warp0.15s,startup_indirect_dispatch_hardware0.12s,startup_compute_root0.02s,startup_command_list_slot_names0.03s,startup_list_resubmit_warp0.38s,startup_list_resubmit_nodebug_warp0.28s,startup_stubs1.09s,startup_list_resubmit_nodebug_untracked_warp0.27s,startup_list_resubmit_untracked_warp0.27s,startup_list_resubmit_hardware0.30s,startup_list_resubmit_nodebug_hardware0.31s,startup_list_resubmit_nodebug_untracked_hardware0.25s,startup_list_dispatch0.02s,startup_list_dispatch_no-limit_control0.02s,startup_list_dispatch_no-state_control0.02s,startup_list_dispatch_no-root-args_control0.02s,startup_list_resubmit_untracked_hardware0.25s,startup_list_dispatch_no-pairing_control0.02s,startup_list_dispatch_no-bound_control0.02s,startup_list_dispatch_native_warp0.28s,startup_list_dispatch_native_hardware0.30s,startup_list_dispatch_native_skip_srv_warp_control0.09s)sccache: 8/14 hits; wall27.4sAI-assisted; commands listed were executed locally.