eval(cell, {}, env) still exposes builtins, so a crafted header
passed via AMD_SWIZZLE_HEADER could run code. addrlib's tables only
use symbols, integers and ^, so parse exactly that and reject the rest.
Add tools/awc_manifest.py, a stdlib CSV/JSON manifest of every stream in .awc banks. It reads the layout through awc_opus.parse_awc/music_channels, reports durations and suspicious metadata, and skips unreadable banks with a warning. Add a synthetic-bank unittest (PCM16, float32, Opus, streamed music, bad magic); music_channels gains a default-on collect_packets flag so metadata callers avoid packet copies.
Default is half the CPU count; --jobs 1 keeps serial hashing. create rebuilds entries in walk order so the JSON does not depend on completion order, and verify prints problems in manifest order so its output and exit code are identical for every job count. Progress now reports completed file counts from the main thread instead of per-file worker lines.
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.
v_fma_f16, v_med3_f16, v_add/sub/mul/max/min_f16, the f16 unary ops and v_fmac_f16
used to raise Unsupported when op_sel was present. Source bit i now reads the high
half of source i and the last bit writes the high half of the destination, the
other half being kept (Mesa ACO can_use_opsel, RDNA2 ISA VOP3 OP_SEL).
The f16 read/write sequences move into f16_in/f16_out/opsel_bits. Output without
op_sel is unchanged apart from SSA numbering.
Tests: tests/test_f16_op_sel.py uses hand-written listings (no llvm-mc needed).
Add tests/semantic: translate two hand-written, branch-free pixel shaders
(ps_sdwa, ps_ops) and execute the resulting SPIR-V with a small strict
interpreter, asserting every mrt0 word against hand-derived expectations.
Catches wrong-value regressions (SDWA selects/sext, min3/max3, bfe_i32,
packed f16 FMA) that spirv-val cannot.
- Standard library only; no LLVM, SPIRV-Tools, GPU or game files.
- Interpreter rejects unmodelled constructs instead of approximating.
- Negative controls sabotage translated output; mutation tests sabotage a
temporary copy of tools/ and require the matching test to fail.
- Fixtures are generated from runtime/test/shaders/*.asm.
- CI job semantic-tests (Windows + Ubuntu, Python 3.12), discovery limited
to tests/semantic.
Only require ffmpeg when the assets stage will run, so --wav with shaders/runtime only is not blocked. Add tests/test_audio_wav.py: standard-library unittest, skipped without ffmpeg, pinning a 1 s Ogg Opus to an exact 48,000-frame 16-bit mono 48 kHz WAV and checking resume and missing-ffmpeg behaviour.
The official Windows LLVM build ships no llvm-mc.exe and has no AMDGPU
target, which is what issue #7 ran into. A tool that existed but could
not disassemble produced empty output, so shader_disasm.py counted 0
invalid words, wrote an empty .s per shader and reported every one as
"clean"; make_game.py then translated nothing.
Probe one s_endpgm before the run and stop with the tool's own error.
Empty per-shader output is now "failed" and exits 1, never "clean".
LLVM_MC may be a whole command line, so Windows can call WSL's llvm-mc:
set LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc
make_game.py accepts the same form in preflight and need(); README and
design.md now state the real requirement. New tests cover a missing
tool, a missing AMDGPU target, empty output and the success path.
Preserve whole-wave mask operations, saved EXEC values and flat
pixel inputs when generating SPIR-V. Keep a dispatch-loop fallback
alongside structured control flow and share the descriptor probe.
Add reproducible GPU fixtures for these cases and exercise the
control-flow and mask analyses in CI.