upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/dev-tools.md
diff options
context:
space:
mode:
authorMoonEyes <14891700+MoonEyes@users.noreply.github.com>2026-11-26 08:59:43 +0100
committerMoonEyes <14891700+MoonEyes@users.noreply.github.com>2026-11-26 09:05:37 +0100
commitd41d6a16bb2c0831ccfd7ab1f097fce03d97b033 (patch)
tree2e17998af35551ba94a1beb1c9dd13c355c41645 /docs/dev-tools.md
parenta73a57e1339be072baf5522351c8ec7f1482b56b (diff)
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>
Diffstat (limited to 'docs/dev-tools.md')
-rw-r--r--docs/dev-tools.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/dev-tools.md b/docs/dev-tools.md
index d36091ec3..bd326662b 100644
--- a/docs/dev-tools.md
+++ b/docs/dev-tools.md
@@ -59,6 +59,37 @@ recorded events, and the exit status reports the analysis result.
59 59
60You can also run `python -I tools/boot_trace.py` with the same arguments. 60You can also run `python -I tools/boot_trace.py` with the same arguments.
61 61
62## Check the shader chain of a work folder
63
64`tools/chain_check.py` prints one page of counts for each link between the game files and the GPU. It reads the
65work folder that `make_game.py` built and, if you pass one, the log of one run:
66
67```powershell
68python -I tools/chain_check.py <work>
69python -I tools/chain_check.py <work> --log <OutDir>\<Name>.log --json
70```
71
72The page has one block per link, and each block gets a verdict (OK, WARN or FAIL) and its most likely cause:
73
74- tools: the llvm-mc each family was disassembled with and its AMDGPU target, spirv-val, and whether the
75 translator sources recorded in the folder still match this checkout's;
76- one block per family (game programs, pipeline library, FSPX, BVH, executable): programs unpacked, listings,
77 listings with rejected words, programs translated, and up to 5 refusal reasons from `logs/shaders.log`;
78- contract: tagged and plain modules, and the runtime folders that are present or absent (`fspx_compute` and the
79 others);
80- runtime, from `--log` (`scripts/windows-boot/boot.ps1`'s `<Name>.log`): modules loaded, failed device slot calls,
81 failed D3D12 calls, compute pipeline builds, waits at the compile gate, device faults and the exit code.
82
83The last line names the weakest link: the first block, in chain order, with the worst verdict.
84
85A family is FAIL when more than 1% of its programs have no module. An llvm-mc older than 23 is a WARN (#1923). The
86`--help` text lists every threshold. The report prints counts and fixed words only: no program names, no log lines
87and no paths. A refusal reason is printed only when it matches a message from `tools/rdna2spirv.py`; any other
88reason is counted as `other`. Add `--show-paths` to name the folder and the log, but not in a report you publish.
89
90The exit code is `0` whatever the verdicts. With `--strict` it is `1` when a block is FAIL, and bad arguments exit
91`2`. Probing asks llvm-mc, spirv-val and git for their versions; `--no-probe` runs nothing.
92
62## Run a synthetic guest scene 93## Run a synthetic guest scene
63 94
64Use the existing headless runner with a loader and guest built on Windows 95Use the existing headless runner with a loader and guest built on Windows