BL-2 (#913), BL-5 (#882) and BL-6 (#891) are merged, but the page still
listed them as open hypotheses, and it did not point at the open pull
requests for BL-3 (#1050) and BL-4 (#1166). Add a status table at the top
and a Status line per lead: the merged commit, where the result is
recorded, and what is still open (the Wine/Proton reproduction for BL-2,
the geometry-shader payload choice for BL-5, retail numbers for BL-6).
The leads' implementation notes stay as they were. docs/README.md's entry
names the status table instead of "hypotheses, not measurements".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R3jaqKsiawUYYVBKWHmGr8
Split non-escaped, statically indexed Function-scope arrays (such as
%vgpr[256] and %sgpr[128] when no dynamic v_movrel*/s_movrel* indexing
exists) into per-slot scalar OpVariables for only the live slots
referenced after dominator-tree forwarding and DCE, eliminating the
monolithic array allocas and their static OpAccessChains.
Preserves arrays with dynamic indices, whole-array loads/stores,
escapes, decorations, non-null initializers, or negative/out-of-bounds
static indices; canonicalizes signed/unsigned constant indices with
equal value and rewrites multi-index OpAccessChains cleanly.
- Mark Gen.ij_quad_eval with shortcut: in tools/rdna2spirv.py and update docs/design.md
to state that binary32 quad finite differences amplify rasterizer input rounding by
(1 + 2|alpha| + 2|beta|) (~|i - I_c| / |dI/dx| up to primitive pixel span) and that
det == 0 (including 1D/line primitives with constant J) falls back to P_c.
- Tighten test_perspective_fixture_branch_and_f16_halves against a binary64 Jacobian
oracle and add test_wide_2048px_perspective_extrapolation_bound_and_line_det_zero_fallback
covering a 2048px perspective triangle (P in [1.5, 4096.0]) and line det == 0 fallback.
Gen.ds_permute lets each destination lane scan the 32 source lanes of its half: per source
lane a shuffle of the published target, a shuffle of the data and an OpSelect that keeps the
data when the target is this lane. Each shuffle was used once and so was every link of that
chain, so SPIRV-Cross (MoltenVK) wrote the 32 steps as one nested ternary under the EXEC
ternary of the register write. A lane that takes an outer arm, or is off in EXEC, then runs
none of the shuffles inside it (the SHADER-529 mechanism).
On an Apple M5 (MoltenVK 1.4.2) tools/lds_fuzz.py --wave 32 --permute had 17 of the 100
programs of seed 31002 differ from the model, every one in a ds_permute_b32 result, mostly 0
where a source lane's data belongs. Both shuffles are now stored to Function variables
(Gen.eager), as the DPP rule stores its ballot bit and its shuffle.
tests/semantic/test_ds_permute_eager.py checks the three native forms with
test_dpp_eager_subgroup.py's model of SPIRV-Cross's single-use forwarding, and the values
against test_ds_permute.py's ISA model.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
With its f16 operands taken at run time the test passes on the macos-26
runner (Apple Paravirtual device, MoltenVK 1.4.2): the job's last run on
this branch printed "cs_fma_fused passed: drop it from the expected
failures". The Known problems row says where it passes now.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Tauwni measured it in the review of #1724 (Apple M3, Mesa 26.3.1, 20 of 20 runs): with
run-time operands the f16 multiply-add comes out as if the product were rounded first, one
step from 0x7351. With literal operands the constant was folded exactly, so the fixture
passed there before. MoltenVK 1.4.2 and llvmpipe give 0x7351 on the same machine.
A Known problems row and a line in the fixture's header; no instruction changes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The fixture reads the operands of its f32 multiply-adds from s4..s7 so that a driver has to
compute them at run time. The three operands of its v_fma_f16 were literals, which made the
whole f16 multiply-add a compile-time constant. MoltenVK 1.4.2 gives the wrong constant: word
7 read 0x0000 on an Apple M5 (0x3c00 in the docs' row) where 0x7351 is expected, the
cs_fma_fused failure listed in docs/testing.md and in the macOS job's EXPECTED_FAILURES. The
same translation with any one of the three operands taken at run time gives 0x7351.
The triple is now the s4 word XOR a literal each, so the test checks the translator's
round-to-odd sequence as the GPU runs it. The translator is not changed.
tests/semantic/test_fma_fused_fixture.py runs the fixture in the interpreter against the eight
words of its header and checks that no multiply-add in it reads a register only literals fed.
The Known problems row says what is left: an f16 multiply-add with only constant operands.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A register holds this lane's bit of a lane mask; v_mbcnt, s_bcnt1 and
s_ff1 gather the other lanes' bits with a subgroup operation
(Gen.wave_mask). v_mbcnt writes a VGPR, so its result is selected on the
lane's EXEC, and MoltenVK's SPIRV-Cross inlined the single-use gather
into the taken arm of that ternary:
v6 = active ? popcount(simd_or(mine ? bit : 0) & below) + acc : v6;
A lane that is off never ran the gather, so its bit was missing from
every other lane's count. Gen.wave_mask now stores the gather to a
variable of its own with Gen.eager, as SHADER-529 did for DPP's ballot
and shuffle.
On an Apple M5 (MoltenVK 1.4.2), tools/crosslane_fuzz.py with wave 32,
native and no maskdata goes from 92 of 100 programs matching to 100 of
100, and from 193 to 200 of 200 with DPP at seed 7.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
run_gpu_tests.py and make_game.py translate with --f16-interp-fallback by
themselves where tools/vk_subgroup_info.py reports per_vertex_inputs
false (MoltenVK). build.py and check.py only did so with
LEONIDA_F16_INTERP_FALLBACK=1, so the two-step form on a Mac built
ps_ij_computed and ps_interp_f16_high for PerVertexKHR inputs and
check.py reported both as failed.
Both scripts now ask the device when the variable is unset, the way they
already do for the barycentric fallback, and take 1/0 (true/false, yes/no,
on/off) as run_gpu_tests.py does. On an Apple M5 (MoltenVK 1.4.2) check.py
goes from 175 of 220 pass, 39 skipped, 6 failed to 176 pass, 40 skipped,
4 failed: ps_interp_f16_high passes and ps_ij_computed is a SKIP.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>