Commit Graph

4 Commits

Author SHA1 Message Date
8ceb5ef4b3 chain_check: read the slow compute pipeline line as the runtime prints it now
The line says where the pipeline came from since 7acf84d38, so the pin in
tests/test_chain_check.py failed on main. Only a compile counts as a build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:09:06 +01:00
a6ec8f38a1 chain_check: pin an unknown interface, a non-builtin exception and the slot-57 line
The trace test now feeds PS_Secret::Slot12 and expects one more "(other)";
the reasons test feeds "translator error SecretError" and expects
"translator error #"; the runtime pins add the slot-57 failure fprintf
of d3d12_xs_device.cpp. dev-tools.md says which trace names and digest
endings are printed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:40:26 +01:00
044e27122f chain_check: close the free-text filters and pin the runtime lines it reads
Review of TOOL-CHAIN-CHECK found three filters that were not closed:

- a refusal reason's variable part is kept only when it is an instruction
  of tools/rdna2_isa_tables.py (_dpp/_sdwa/_e32/_e64 removed) or a built-in
  exception name; any other token is "#", a reason matching no translator
  message is "other";
- a [d3d12-trace] method is printed only when it is a string literal of
  runtime/shims or runtime/src, or Interface::Method / Interface::SlotN
  built from them; anything else counts as "(other)";
- boot.ps1's ending is accepted in its three forms only, else "other"; an
  exit code it names is used when the log has none.

Also: "device-fault: submitted dispatch" lines are counted apart (a stall
prints them) and the cause reads "device lost, faulted or stalled"; more
modules than programs is WARN; amdgcn reads n/a without a record; a
missing translated index with shard files reads "translation in progress
or interrupted"; a UTF-16 log without BOM is detected from its zero bytes;
the mixed and LEONIDA_DESCRIPTOR_TABLE-forced descriptor table lines are
read.

The test pins each runtime and boot.ps1 format string the regexes depend
on, and covers the missing-.spv count, the 1% bound (99/100 WARN, 197/200
FAIL) and names slipped into trace, digest and reason lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:31:57 +01:00
d41d6a16bb tools: chain_check.py, one page of counts for the whole shader chain (TOOL-CHAIN-CHECK)
The links between the game files and the GPU fail quietly: an llvm-mc whose
gfx1013 decoder rejects words leaves pipeline library programs untranslated,
a translation from older translator sources keeps loading after the module
contract changed, and the runtime's slot-67 refusals sit in a large log.

tools/chain_check.py reads a make_game.py work folder (and optionally one
run's log) and prints one block per link with OK/WARN/FAIL and the most
likely cause: llvm-mc and spirv-val versions and the translator digest
against this checkout; unpacked, listed and translated programs per family
with up to 5 refusal reasons; tagged/plain modules and runtime folders;
loaded modules, failed slot and D3D12 calls, builds, gate waits, faults and
the exit code. The last line names the weakest link.

Counts and fixed words only: refusal reasons are matched against the
messages rdna2spirv.py raises, anything else counts as "other", and paths
appear only with --show-paths. Exit 0 by default, 1 with --strict on FAIL.
Standard library only; documented in docs/dev-tools.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:05:37 +01:00