diff options
Diffstat (limited to 'docs/dev-tools.md')
| -rw-r--r-- | docs/dev-tools.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/dev-tools.md b/docs/dev-tools.md index d36091ec3..ed7fa4355 100644 --- a/docs/dev-tools.md +++ b/docs/dev-tools.md | |||
| @@ -59,6 +59,39 @@ recorded events, and the exit status reports the analysis result. | |||
| 59 | 59 | ||
| 60 | You can also run `python -I tools/boot_trace.py` with the same arguments. | 60 | You 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 | ||
| 65 | work folder that `make_game.py` built and, if you pass one, the log of one run: | ||
| 66 | |||
| 67 | ```powershell | ||
| 68 | python -I tools/chain_check.py <work> | ||
| 69 | python -I tools/chain_check.py <work> --log <OutDir>\<Name>.log --json | ||
| 70 | ``` | ||
| 71 | |||
| 72 | The 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 | |||
| 83 | The last line names the weakest link: the first block, in chain order, with the worst verdict. | ||
| 84 | |||
| 85 | A 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 | ||
| 87 | and no paths. A refusal reason is printed only when it matches a message from `tools/rdna2spirv.py`; any other | ||
| 88 | reason is counted as `other`. A D3D12 method name is printed only when the runtime's sources contain it, and the | ||
| 89 | end of a boot digest only in the forms boot.ps1 writes. Add `--show-paths` to name the folder and the log, but not | ||
| 90 | in a report you publish. | ||
| 91 | |||
| 92 | The exit code is `0` whatever the verdicts. With `--strict` it is `1` when a block is FAIL, and bad arguments exit | ||
| 93 | `2`. Probing asks llvm-mc, spirv-val and git for their versions; `--no-probe` runs nothing. | ||
| 94 | |||
| 62 | ## Run a synthetic guest scene | 95 | ## Run a synthetic guest scene |
| 63 | 96 | ||
| 64 | Use the existing headless runner with a loader and guest built on Windows | 97 | Use the existing headless runner with a loader and guest built on Windows |