Commit Graph

6 Commits

Author SHA1 Message Date
09f6ce74e5 shader_diff: reseed integer operands when the clean pool is exhausted (#3189)
Squash-merged after diff review of PR #3189
2026-11-23 09:51:21 -06:00
8b20b95059 fix: make shader_diff scalar copy observable 2026-11-22 13:54:26 -03:00
0e6bc2a491 shader_diff: report the number of programs run 2026-11-22 04:34:11 -03:00
d21d97a9d4 Fix NaN comparison for suffixed float writers 2026-11-22 15:19:23 +10:00
33070ca9b0 Add files via upload 2026-11-22 02:05:03 +00:00
188fb19d0e Tools: CPU differential oracle for the translator (shader_diff.py)
AI-assisted. New runner comparing tools/cpu_ref.py (ISA model, untouched) against rdna2spirv + tests/semantic/spirv_mini_interp.py (translated SPIR-V), bit-exact over seeded straight-line ALU programs.

- tools/shader_diff.py: program table (12 verified vector ALU ops), seed handling, first-mismatch report (case, seed, lane, register, expected/actual bits, last-writer op), counted skips with reasons, exit 0/1/2, --self-test canaries (a passing case, an intentionally wrong expectation that must fail, an unsupported op that must skip).
- tests/test_shader_diff.py: determinism, mismatch + NaN controls, skip accounting, fixed-seed end-to-end run, self-test gate.
- docs/shader_validation.md: harness-design paragraph updated to the shipped tool.

Verified here: 6 pytest green; 400 seeded programs, 0 mismatch, 0 skipped, 0 harness errors; mutation check (blinded comparator) turns 3 tests red; compileall + make_game --help green. Scope is the harness only: no changes to cpu_ref semantics, no GPU needed, runs in standard CI.
2026-11-21 19:05:43 -03:00