upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs/boot.md
diff options
context:
space:
mode:
authorCodex <codex@openai.com>2026-11-25 21:56:37 +0000
committerCodex <codex@openai.com>2026-11-25 21:56:37 +0000
commita6e0360f44fb836e9bb40266fb4ebf76f6d331a1 (patch)
treea19b310fd9e4e2f90ce42e146afbb2974ae30cb3 /docs/boot.md
parent9439e6083dd23bce6c8d4021ccc0d3a21644942d (diff)
parentcb699500acb724f4ffa2873ee61b578e9d3e8627 (diff)
Merge upstream main into io-trace
Conflict resolution assisted by Codex.
Diffstat (limited to 'docs/boot.md')
-rw-r--r--docs/boot.md44
1 files changed, 43 insertions, 1 deletions
diff --git a/docs/boot.md b/docs/boot.md
index 4901a4474..d7c0d4889 100644
--- a/docs/boot.md
+++ b/docs/boot.md
@@ -95,7 +95,8 @@ Useful switches:
95 This switch covers imports only; it does not affect the D3D12 outcomes. 95 This switch covers imports only; it does not affect the D3D12 outcomes.
96* `LEONIDA_SKIP_CPU_CHECK=1` skips the AVX preflight of `--init` and `--run`, which otherwise exits 4 with one line 96* `LEONIDA_SKIP_CPU_CHECK=1` skips the AVX preflight of `--init` and `--run`, which otherwise exits 4 with one line
97 naming the missing feature on a host without AVX (a QEMU `qemu64` guest; under Rosetta, set 97 naming the missing feature on a host without AVX (a QEMU `qemu64` guest; under Rosetta, set
98 `ROSETTA_ADVERTISE_AVX=1` instead). The game itself still needs AVX, so this is for the #UD emulation work. 98 `ROSETTA_ADVERTISE_AVX=1` instead). The game itself still needs AVX, so this is for the #UD emulation work (see
99 [cpu_features.md](cpu_features.md#hosts-without-avx) for what works on a host without AVX).
99* `LEONIDA_SKIP_INT3=1` (with `--trace`) steps over each int3 in guest code and logs it once per address as an 100* `LEONIDA_SKIP_INT3=1` (with `--trace`) steps over each int3 in guest code and logs it once per address as an
100 `int3_skipped` event, so a boot can be followed past soft asserts (an int3 followed by code that carries on). 101 `int3_skipped` event, so a boot can be followed past soft asserts (an int3 followed by code that carries on).
101 Diagnostic only: a correct run reaches none, so each skipped address is a finding, not a fix. A failed guest file 102 Diagnostic only: a correct run reaches none, so each skipped address is a finding, not a fix. A failed guest file
@@ -123,6 +124,18 @@ Useful switches:
123 124
124 Each line starts with the local time, as the `mem-probe` lines do. Each line is flushed at once and the file can be 125 Each line starts with the local time, as the `mem-probe` lines do. Each line is flushed at once and the file can be
125 read while the game runs, so the last reads before a crash or a device loss name what the title was loading. 126 read while the game runs, so the last reads before a crash or a device loss name what the title was loading.
127* `LEONIDA_TITLE_HUD=1` shows live counters in the title bar of the window the title presents in
128 (`runtime/shims/title_hud.h`). It updates twice a second with:
129 - the frame rate and the average and worst frame time from PresentX, or, when no frame came in that half
130 second, how long since the last one (a hang reads "0 fps, no frame for 12.5 s");
131 - the process's private memory and working set;
132 - its local GPU memory against the DXGI budget, and its shared GPU memory;
133 - the graphics and compute pipelines created, and the seconds spent in `vkCreate*Pipelines` in the last half
134 second. A pipeline compiled in the frame shows up there as a hitch. This needs `LEONIDA_MEM_PROBE`; without it
135 the field reads `PSO -`.
136 - the time since the first present.
137
138 A thread of its own sets the text with `SendMessageTimeout`, so a busy window thread never holds a present.
126* `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` when MSI Afterburner or OBS is installed; their 139* `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` when MSI Afterburner or OBS is installed; their
127 implicit layers add swapchain usage that shows up as validation errors ([testing.md](testing.md), "Known 140 implicit layers add swapchain usage that shows up as validation errors ([testing.md](testing.md), "Known
128 problems"). 141 problems").
@@ -131,6 +144,35 @@ Useful switches:
131 for one run (it wins over `--overlay`). For a fresh first-run profile, also set `LEONIDA_SAVE_DIR` to a separate 144 for one run (it wins over `--overlay`). For a fresh first-run profile, also set `LEONIDA_SAVE_DIR` to a separate
132 empty directory for the local game-save provider. 145 empty directory for the local game-save provider.
133 146
147### Under Wine on Linux
148
149The prefix has to supply a `d3d12.dll` that exports `D3D12SerializeVersionedRootSignature`, because the executable
150imports it. Wine's own `d3d12.dll` does not answer that export for the runtime's shim, and the failure is quiet:
151the D3D12 trace ends at about 1,658 calls, the startup trace ends in an access violation inside the executable,
152and the one line that names the cause is
153`[rt] d3d12_xs: host d3d12.dll has no D3D12SerializeVersionedRootSignature`. The run never reaches
154`CreateRootSignature`.
155
156Copying the DLLs a Proton prefix installs is not enough on its own: Wine keeps preferring its own copy next to
157them. Name them in the overrides.
158
159```bash
160GE=$HOME/GE-Proton11-13-x86_64/files/lib/wine
161cp "$GE/vkd3d-proton/x86_64-windows/d3d12.dll" \
162 "$GE/vkd3d-proton/x86_64-windows/d3d12core.dll" \
163 "$GE/dxvk/x86_64-windows/dxgi.dll" "$WINEPREFIX/drive_c/windows/system32/"
164export WINEDLLOVERRIDES="d3d12,d3d12core,dxgi=n,b"
165export LEONIDA_D3D12=vulkan
166export LEONIDA_SHADERS='Z:\path\to\shaders\spirv'
167wine ./gta6rt.exe --run 'Z:\path\to\game_scarlett_master.exe' --game-dir 'Z:\path\to\the\package' \
168 --trace /tmp/boot.jsonl --trace-d3d12
169```
170
171With those three DLLs and the override, the same prefix reaches the frame loop: about 1.4 million D3D12 calls in
17290 s, no exception, `PresentX ready`, against 1,658 calls and an access violation without them, measured on Wine
17311.13 (GE-Proton 11-13) with an RDNA2 iGPU. A prefix that Proton itself created already carries these files and
174needs no override.
175
134## 3. Triage order 176## 3. Triage order
135 177
136Read the startup trace first; the first event that is not the expected one is the run's first fact. 178Read the startup trace first; the first event that is not the expected one is the run's first fact.