startup: run a GPU-written indirect Dispatch on a translated slot 67 pipeline #2763
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2771"
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 RavenCurseBurg on 2026-11-26T07:32:46Z.
Refs #2492 and #2532. This is the standalone candidate requested in the issue discussion.
The fixture records a GPU producer, an argument readback copy and a slot 61 indirect Dispatch on one command list. A single fence covers both the argument readback and the translated consumer's output. Counts 2 and 5 write exactly 2 and 5 words from the same source-built gfx1013 program. Each dispatch compares all 320 words, including the untouched tail. The direct slot 14 run provides a reference for both counts. The producer helper is shared with the existing desktop indirect fixture.
Why the slot 61 change is included
I first built the test consumer against the unmodified main runtime at
9e5efae4and published a valid translation. WARP, Intel and NVIDIA all produced the guarded argument records for 2 and 5. Direct Dispatch matched its reference at both counts. Slot 61 reportedrequires a desktop compute pipeline and rootand left all 320 words untouched. #2532 provides direct Dispatch through slot 14. This patch reuses that binding path and recordsExecuteIndirectfor one rootless command with fixed-table raw buffers. It validates the placed range, transitions the argument resource, and refuses an argument buffer also bound to the shader. The GPU reads the count at execution time.Verification
Tested on Windows 11 build 26100.9711 with DXC 1.9.2609.5, WARP 10.0.26100.9711, Intel UHD 770 32.0.101.5973 and RTX 4060 32.0.15.9579. I built the native binaries with Zig 0.13/Clang, using Windows-header compatibility definitions for HRESULT, constexpr enum flags and the debug-object-name GUID. The D3D12 debug layer was unavailable locally.
All three adapters passed the translated indirect fixture, the adjacent direct Dispatch and the same-pipeline retry on
e94e984a. The final commit7fdc253aupdates one reference in the desktop counted test to the shared helper name. With an optimized rebuild of the runtime, XG DLL and both consumers at that head, the new fixture and the existing desktop plain, root-constants and counted modes all passed on each adapter (12 runs). In the local unoptimized Zig build, the existing desktop test trapped on its placeholder enum value on both the unmodified runtime and this branch.The GPU evidence includes the actual guarded argument records at both counts. The no-producer control reads
[0,0,0]. The missing-translation control reads[5,1,1], reportsno translation, and preserves all 320 sentinels. Multi-command, counted, out-of-range and output-alias cases each check the refusal and all 320 words. Texture and heap-entry manifests also remain refused with untouched outputs. The independent CPU oracle detects a flipped first/last result, a flipped first/last sentinel and a short/long readback. The machine code matches LLVM 15's gfx1013 assembly. The direct and retry scripts above are adjacent regression runs.The repository's MSVC commands are
cmake --build --preset release --target startup_stream_consumerfollowed byctest --preset release --no-tests=error -j 1 -R "^startup_slot67_indirect_dispatch_(warp|hardware)$" -V. The previous independent MSVC run is for the earlier combined branch. The fixture uses repository-authored synthetic buffers and shaders.AI-assisted with Codex (GPT-6.2 Astra, xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:38:56Z.
Review: COMMENTED
Review of head
7fdc253aagainst main (fixture and code only).Checked:
record_translated_dispatchkeeps the direct slot 14 behavior; the indirect path adds the single rootless command and no-count-buffer checks, the fixed-table raw buffer restriction, the argument-aliasing refusal and the INDIRECT_ARGUMENT transition.python3 -B tests/startup_slot67_indirect_dispatch_check.py mutationPASS (consumer and sentinel flips detected).python3 tests/docs_links_check.py,python3 tests/bidi_controls_check.py,git diff --check origin/main...HEAD: clean.startup_slot67_indirect_dispatch_warp/hardwareand the siblingstartup_indirect_dispatch_*pass, 5/5 each (receipt in the next comment).No blocking findings. This is fixture-level evidence only; I have no game, so no executable startup result is claimed.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:38:57Z.
Win2025 WARP receipt for head
7fdc253a(3 commits behind main, not updated).Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
7fdc253ac2d3f8bf46473fa3441d7344d130b2b7:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_dispatch startup_stream_consumer -- -j 2):32.98s(configure2.22s)ctest --preset dev -R 'startup_slot67_indirect|startup_indirect_dispatch' --parallel 2 --no-tests=error --output-on-failure): 5/5 passed (2.10s:startup_indirect_dispatch_warp0.10s,startup_indirect_dispatch_hardware0.10s,startup_slot67_indirect_dispatch_warp1.53s,startup_indirect_dispatch_adapter_filter0.13s,startup_slot67_indirect_dispatch_hardware1.86s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_dispatch startup_stream_consumer -- -j 2):62.40s(configure2.32s)ctest --preset release -R 'startup_slot67_indirect|startup_indirect_dispatch' --parallel 2 --no-tests=error --output-on-failure): 5/5 passed (1.59s:startup_indirect_dispatch_warp0.10s,startup_indirect_dispatch_hardware0.10s,startup_slot67_indirect_dispatch_hardware1.24s,startup_slot67_indirect_dispatch_warp1.35s,startup_indirect_dispatch_adapter_filter0.10s)sccache: 2/22 hits; wall108.7sAI-assisted; commands listed were executed locally.