Commit Graph

10 Commits

Author SHA1 Message Date
0e9abdc7d4 TEST-722 follow-up: move PSB OpLoad out of OpAccessChain and tighten ps_w64 checks 2026-11-26 11:34:24 +00:00
005ba67c55 Merge pull request #3508 from shdann
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:36 -05:00
c962d09d0c Merge upstream main into interp-int64-width
Keep null constant type information and composite constant handling. AI-assisted.
2026-11-23 05:41:38 +03:00
0600822f83 Check operand widths for signed and bit-search GLSL operations
AI-assisted.
2026-11-23 05:30:53 +03:00
e5bdbe01f5 Merge pull request #3556 from markankamaransheogarat-sys 2026-11-22 17:02:41 -05:00
b168216aba Merge pull request #3508 from shdann 2026-11-22 17:02:24 -05:00
d7d9a8e55b TEST-722: run ps_w64_* pixel shader fixtures on spirv_wave_interp 2026-11-22 20:54:42 +00:00
829af7fd6a tests/semantic: the interpreters run OpBitCount and the signed GLSL ops at the width of a 64-bit type
Both interpreters accept OpTypeInt 64 but treated a 64-bit operand of
OpBitCount, SMin, SMax, SClamp, SAbs, FindILsb, FindUMsb and FindSMsb as
32-bit: OpBitCount of 0xFFFFFFFF00000000 gave 0, and SMin(2^31, 1) on a
64-bit type gave 2^31.

OpBitCount now counts every bit of its operand's type, and SMin, SMax,
SClamp and SAbs read their operands as signed at the width of their type.
FindILsb, FindUMsb and FindSMsb raise UnsupportedConstruct for a type that
is not 32-bit, since GLSL.std.450 limits them to 32-bit components. Results
for 32-bit types are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 23:44:12 +03:00
52d8e0d36c fix(test): match signed SPIR-V switch literals
The wave interpreter stores integers as unsigned bit patterns. Normalize each switch literal to the selector width so a negative case reaches its target.
2026-11-22 20:16:43 +01:00
71a16c11cf FUZZ-8: control-flow/EXEC differential fuzzer; wave32 SCC of mask ops is wave-wide
tools/cf_diff.py generates seeded wave32/wave64 pixel shaders from the
control-flow shapes compilers emit (saveexec if/else, v_cmpx, VCC- and
SCC-voted branches, uniform and per-lane loops, two-entry cycles) and
compares every lane's export between:
  * tools/cf_ref.py: cpu_ref's Machine plus branches, compares, v_cmpx,
    saveexec and 64-bit masks (the ISA model, one wave)
  * rdna2spirv + tests/semantic/spirv_wave_interp.py: every invocation of
    one subgroup in lockstep, split at selections and rejoined at merges,
    with the subgroup operations the translator emits
in both the structured and the dispatch-loop form; --spirv-val also
validates each module, --minimize reduces a mismatch.

Finding (fixed here): in a wave32 program s_and/or/xor/andn2/orn2/nand/
nor/xnor_b32 on lane masks set SCC from the lane's own bit instead of the
whole mask, so `s_and_b32 s0, vcc_lo, exec_lo; s_cbranch_scc0` and loops
closed by `s_andn2_b32 exec_lo, ...; s_cbranch_scc1` split the wave. SCC
is now the same subgroup vote as for the _b64 forms. GPU test
ps_scc_mask32 (not run on a GPU yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:02:16 +00:00