The linux-gpu-tools job built the GPU test programs but never ran them.
It now installs llvmpipe (software Vulkan), llvm-mc and SPIRV-Tools and
runs scripts/run_gpu_tests.py twice: natively (31 pass, 29 expected
skips: 8-wide subgroups, no fragment barycentrics) and the compute tests
with LEONIDA_W64_EMULATE=1 (33 pass). The emulated mesh tests are left
out because llvmpipe's compiler aborts on them. docs/testing.md gets a
section on running the suite without a GPU.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7JEiKsTUaHQbCTdc4Eghy
CONTRIBUTING.md lists the tool check as `compileall make_game.py tools tests`, but the CI step and
AGENTS.md left out tests/. The pytest-based files are skipped by the Windows test loop, so a syntax
error in them only showed up in the Linux job.
- tools/awc_opus.py: wrap export_bank file read in a with-statement to
close the handle promptly instead of relying on GC (fixes ResourceWarning
seen in test output).
- tests/test_amd_swizzle.py: use raise unittest.SkipTest instead of
import pytest; pytest.skip so the test works under both python -I and
unittest discovery when numpy is absent. No pytest dependency needed.
- tests/test_d3d12_xs_surface.py: same treatment for the two conditional
skips (Windows SDK headers, SCARAB_REF). The test still skips gracefully
without pytest installed.
- .github/workflows/runtime.yml: add a linux-gpu-tools job that installs
libvulkan-dev, builds all GPU test tools with cmake + ninja + g++, and
verifies every tool binary exists. Rename the Windows job from 'build' to
'windows' to disambiguate. This catches build regressions in GPU tool code
that only manifest on Linux.
AI-assisted.
The stdlib loop in the check job ran every tests/test_*.py as a script with 'python -I', which fails for any file that
imports pytest (and for ones that import sibling helpers). It skipped tests/test_translate.py by name; skip every file
that imports pytest instead. They all run in the translator-tests job (pytest tests --ignore=tests/semantic).
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.
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.
Shader pipeline (carve, FSSM unpack, gfx1013 disassembly, RDNA2 to SPIR-V),
asset export via rpf9-explorer's Core (submodule), PE loader and shim
skeleton, and make_game.py, which builds from the user's own copy of the game.
No game data, keys or executables are included.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>