[bug] A loop-carried lane mask read after a divergent loop is the lane's last pass, not the wave's #257
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T05:31:45Z.
What is wrong
When lanes leave a divergent loop on different passes, a lane that reads a loop-carried lane mask after the loop gets the value from its own last pass. On the console the mask is a wave-wide scalar, so the lane should read what the wave's last pass left.
Shown with a synthetic program on Metal: lane 0 reads 0 where the console gives 1. Main translates the shape without refusal.
What is known
fill_phis(mask_differs_on_edge,no_mask_lane_on_edge) and of the rules now onfix/loop-and-arm-masks.Help wanted
The area is
crates/victory-shader/src/emit/lower.rsaroundfill_phis. A note on the shape is indocs/native-host.md.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by gagarinyury on 2026-11-27T10:30:33Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by gagarinyury on 2026-11-27T10:31:14Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T10:31:26Z.
Claimed by @gagarinyury. Open a draft pull request with
Refs #257in its description within 24 hours, or the claim expires.