xshader: keep the wave together for a program that walks its lanes #609
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/609"
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 brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T02:39:18Z.
A 32-lane compute program that walks its lanes in order (a scalar counter, reads of lane N's registers with
v_readlane_b32, a write-back to the one lanev_cmpx_eq_u32 sN, laneselects) was refused as "compute swizzle inside a loop": the lane exchange sits in a loop the one-thread-at-a-time translation can't take. The lockstep translation can, because it keeps the wave together, but its retry ran only for the refusal "inside non-uniform loop". It now also runs for this one.Refs #533 (claimed there). Based on
a4eeeac9.Why it is sound, and one gap closed
v0 = gtid.x). Nothing promises thread N sits in host lane N. A program admitted this way now takes the host's lane number (WaveGetLaneIndex()) as its thread number. It is admitted only for a 32x1x1 group under[WaveSize(32)], and only if the finished HLSL has no other source of a thread or lane number. Anything else keeps the old refusal.[WaveSize(32)]is one host wave.Measured
a4eeeac9): 6 programs newly accepted on both hosts (12 requests), 0 newly refused, 0 changed. All compile with DXC 1.9.2609 and pass dxv.lockstepgains a sweep: pass n reads lane n and, where its value is odd, writes the sum of lanes n and n + 1 back to lane n + 1 alone; a CPU model walks the lanes. The inputs are checked to tell the walk from a reversed one and from one that never writes back. 792 cases, all match, on both cards.python tuxbox.py checkofc17adcfa(GE-Proton11-15): RTX 5090 (10de:2b85, 620.70.10) 206 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 205 pass, 0 fail.Evidence: TuxBox check of
c17adcfad8, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not runEvidence: TuxBox check of
c17adcfad8, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not runNot covered
🤖 Generated with Claude Code