xshader: admit a pixel guard that counts over the quad #604
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/604"
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-11-30T23:04:03Z.
Builds on @csj0oe's kept branch from #542; the first four commits are theirs, unchanged:
494fff69(per-quad lowering),2a6a5ee3(elections kept out),8e8e44c4(refuse a guarded exchange),ea4196b3(admit behind a proven-uniform guard). Agreed with @brcly on #533: "a result the console can produce for that quad under some packing is the right standard here".Under whole-quad mode the console compiler counts a quad's helper pixels with two quad moves and integer adds, compares, and branches: a complete quad uses a value summed over the quad, an incomplete one the pixel's own. The compare's operands differ between the four pixels, so the uniform-guard rule refused it. It is uniform all the same, and
quad_formsproves it: each register is a wrapping linear form over one per-pixel value at the quad's four positions, and an equality whose sides differ by a form that weighs the positions alike gives one answer per quad.Each quad gets a result the console produces for that quad under some packing of quads into waves: a quad with a helper pixel takes the own-value arm, exactly as on the console; a complete quad always takes the quad arm. For the count to be the console's, such a program's EXEC starts as the pixel's coverage (
IsHelperLane) and whole-quad mode is a vote over the quad; nothing else changes text. A first-lane read of a value built only from scalars and constants is emitted as the pixel's own; any other first-lane read still keeps a program out.Measured
quad-guard: slanted triangles leave quads with one, two and three helper pixels; each quad is classified from the coverage the same draw reads back (not predicted), and each covered pixel must hold the quad's sum if its quad is complete and its own value otherwise. 12 draws, 3,072 pixels: 436 pixels in complete quads and 63 / 52 / 24 in quads missing one, two and three, 0 failures on both cards; a program whose guard differs within a quad must be refused, and is.python tuxbox.py checkof534cc3f6(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
534cc3f6b7, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not runEvidence: TuxBox check of
534cc3f6b7, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not runNot covered
🤖 Generated with Claude Code