startup: run GPU-counted indirect Dispatch records through slot 61 #2173
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2181"
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-25T03:02:18Z.
Part of #1759
What this unblocks: ExecuteIndirect through guest slot 61 can now run several desktop Dispatch records, with the number executed taken from a GPU-written count word.
Changes:
COMMON. Every record up to the maximum must fit in the argument buffer.countmode intests/startup_indirect_dispatch.cpp(cteststartup_indirect_count_{warp,hardware}): a GPU writer stores the count word and three distinct Dispatch records. Cases: count 2, count 9 (clamped to the max of 3), count 0, omitted writer, no count buffer with a zero word (all three run), unmapped argument, count word outside the buffer, unaligned count offset, short record range, placeholder signature. Results are compared word by word against a CPU reference.docs/experiments.md: new section with the layout and commands.Verification:
python3 -B tests/docs_links_check.py-> PASS. Linux CI jobs (fixtures, Python checks) pass.b74bf16c, viapython3 x2w_pipe.py win2025 2181 --force(default 3-slot pool):--preset dev): build 80.51s,ctest --preset devon the 24 WARP/startup tests (includingstartup_indirect_dispatch_warp,startup_indirect_root_constants_warp,startup_indirect_count_warp): 24/24 passed, 0 skipped./O2(--preset release): build 106.33s, same 24 tests: 24/24 passed, 0 skipped.startup_indirect_count_hardware), and the fixture against the pre-change runtime.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T03:45:11Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
b74bf16ℹ️ 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 R0Y00 on 2026-11-25T04:09:28Z.
Review: CHANGES_REQUESTED
Windows Release passed the 11 selected WARP and RTX indirect tests. One scope check is still missing. The PR describes batched/count-buffer support for rootless Dispatch only, but the new one-command gate checks only the graphics flag. A Dispatch signature with root constants can follow the same batched path whenever its root matches the bound root. Please keep that shape single-command for this slice and test both a rooted multi-record call and a rooted count-buffer call as refusals, alongside the existing successful one-record root-constant case.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T04:33:12Z.
Review: APPROVED
Re-reviewed
024cd7a1. The new check rejects a rooted Dispatch with multiple records or a count buffer before executing it. All 13 relevant Windows Release cases passed independently, including the root-constant controls on WARP and hardware.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T04:35:33Z.
Review: CHANGES_REQUESTED
Follow-up on the 13/13 run: the two-record control still allocates only one full rooted argument record. It can pass through the older span check even with the new rootless-only guard removed. Keep the production guard and give the control two complete 20-byte records with a nonzero second record. I have a source-built version of that control and will validate it against this head.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T04:37:06Z.
Review: APPROVED
Verified
1427cdccafter extending the controls. The two-record case now has two complete rooted Dispatch records with a valid nonzero second record. The independent Windows Release run passed all 13 indirect-dispatch and adjacent cases, including WARP and hardware.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T04:25:44Z.
Fixed in
024cd7a1.list_execute_indirect, a count above one or any count buffer is refused with a named reason, even when the signature root matches the bound root. Batched and count-buffer calls remain rootless-only.startup_indirect_root_constants_*): a rooted two-record call and a rooted count-buffer call are both refused and leave the result untouched. The existing one-record root-constant success case still runs.docs/experiments.mdstates the rule next to the slot 61 description.Verification:
python3 tests/docs_links_check.py: passed (18 files, 405 links).python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 2181 --force(3-slot pool): dev 24/24 passed, release 24/24 passed, no skips. This includesstartup_indirect_dispatch_warp,startup_indirect_root_constants_warpandstartup_indirect_count_warp. A first attempt hit an sccache server error during compile and was rerun unchanged.AI-assisted; commands listed were executed locally.