shader: prove zero scalar offsets and literal-uniform wave guards #79

Manually merged
github merged 3 commits from gh-pr/79/head into gh-pr/79/base 2026-11-26 06:29:35 +00:00
Owner

@⁠Valdi320 on GitHub · 2026-11-24 19:12 UTC · original
Valdi320:work/scarlett-offset-wave-proofs → main · +654 −39 · 9 files · 3 commits · merged 2026-11-24 19:48 UTC

Two bounded, independently testable compiler improvements motivated by the aggregate refusal counts in #39 and #75.

  • Extend existing CFG zero-offset analysis to ordinary SMEM descriptor and code-table loads, including scalar copies. All reaching paths must prove zero; overlapping writes, unknown inputs and nonzero values remain refused. Existing heap-specific lowering is preserved.
  • Accept forward SCC guards whose immediately preceding scalar literal definition proves uniformity, only when the existing control-flow checks exclude bypasses or loop entries. Real divergent collectives remain refused.

Validation on current main: 87 shader compiler tests (5 new), 18 DXBC tests, 132 Python tests; DXC cs_6_6 plus DXV accepted both original and new literal-guard wave32/wave64 synthetic fixtures. No runtime GPU readback for these additions yet. No proprietary inputs, game files or raw logs included.

This is not a claim that the two refusal buckets are closed. Actual recovery counts require paired testing on the same privately held request set; if convenient, rerun the aggregate-only comparison locally and share counts only. Keep unsupported cases explicit rather than substitute incorrect translations.

**@⁠Valdi320** on GitHub · 2026-11-24 19:12 UTC · [original](https://github.com/brcly/TuxBox/pull/79) `Valdi320:work/scarlett-offset-wave-proofs` → `main` · +654 −39 · 9 files · 3 commits · merged 2026-11-24 19:48 UTC Two bounded, independently testable compiler improvements motivated by the aggregate refusal counts in #39 and #75. * Extend existing CFG zero-offset analysis to ordinary SMEM descriptor and code-table loads, including scalar copies. All reaching paths must prove zero; overlapping writes, unknown inputs and nonzero values remain refused. Existing heap-specific lowering is preserved. * Accept forward SCC guards whose immediately preceding scalar literal definition proves uniformity, only when the existing control-flow checks exclude bypasses or loop entries. Real divergent collectives remain refused. Validation on current main: 87 shader compiler tests (5 new), 18 DXBC tests, 132 Python tests; DXC cs_6_6 plus DXV accepted both original and new literal-guard wave32/wave64 synthetic fixtures. No runtime GPU readback for these additions yet. No proprietary inputs, game files or raw logs included. This is not a claim that the two refusal buckets are closed. Actual recovery counts require paired testing on the same privately held request set; if convenient, rerun the aggregate-only comparison locally and share counts only. Keep unsupported cases explicit rather than substitute incorrect translations.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:29:34 +00:00
github manually merged commit 188463ff26 into gh-pr/79/base 2026-11-26 06:29:35 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.