Repository navigation
Conversation
A loop-carried EXEC phi can depend on a latch phi that is not otherwise used. Discover deferred inputs before emitting mask phis, including inputs discovered while walking the deferred worklist. Extend the authored lane-read loop fixture by adding a second predecessor of the latch.
|
Taken into Review. In the console structure a join resolves only the masks arriving on forward edges; a back-edge input that is itself a join, and that nothing else reads as a mask, was never tracked, so the lowering had no boolean for it. Recording the inputs and resolving them after the walk is the smallest change that fixes it. The resolution only follows forward edges, so it cannot recurse through the loop. The per-lane structure is untouched ( Tested on an RTX 5070 (32..32) and a Radeon iGPU (32..64), Windows 11:
Measured locally (local title data, offline AI-assisted (Claude Code). |
This targets
shader/console-flow-ldsin support of Marvisak#439 and the four instance-culling programs discussed in Marvisak#71.A loop header can join an EXEC value from a latch whose mask is itself a phi. The first walk visits the header before it tracks that incoming value. The console-flow pass now records the inputs of nontrivial mask phis and resolves them after that walk, when the loop header is available. The authored lane-read loop regression adds a latch that selects between two live masks.
With just the regression on
e6936e3, emission fails at byte 40 with “a lane-mask join of an untracked mask.” With this change, the compiler emits 32-lane DXIL. In a separate Agility 620 WARP test harness, the single 64-thread dispatch returned all 64 expected words (40 through 103).The clean commit adds no SDK build configuration. The clean local run passed 66 shader tests with 33 filtered. A separate WARP harness passed 73 with 26 filtered. Seven existing tests in the wider clean run require shader model 6.6, unavailable with that system runtime.
For an offline compiler check, we also tested this change in a private build with Marvisak#193's stride lowering. All four reported programs failed at their loop joins before the change. Afterward the Windows SDK validator accepted all four with compute PSV wave limits 32..32. Their runtime descriptor bindings and scene output are still unverified. Only authored test shaders were dispatched on WARP.
AI-assisted implementation and testing.