Commit Graph

2 Commits

Author SHA1 Message Date
697625209a Apply output modifiers to v_med3_f32 results 2026-11-21 16:09:40 -07:00
439887f04f Tests: check computed values with a small SPIR-V interpreter
tests/spirv_interp.py runs the straight-line, single-lane SPIR-V the translator
emits for branch-free shaders (binary32 rounding after every op, GLSL.std.450
subset, Function/Output variables). Unknown opcodes raise NotImplementedError.

- test_values.py: 49 value checks over the supported instruction families, with
  references written in plain Python from the ISA definitions.
- test_f16_op_sel_values.py: 84 value checks for op_sel on f16 VOP3 ops (all
  select combinations, neg/abs/clamp, fmac).
- listing.py: hand-written listing helper. shader_ir.parse_file treats the first
  line of a listing as its header, so the helper writes one; test_f16_op_sel.py
  used to lose its first instruction and now uses the helper.

None of these need llvm-mc or spirv-tools. Mutation-checked: breaking the
op_sel source index or the destination merge makes them fail.
2026-11-21 17:46:28 +01:00