diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 20:26:00 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 20:26:00 -0500 |
| commit | 154e4ec034902deffa4b89b2cbca9a949f38baec (patch) | |
| tree | 1b2ef5656de42c172291bc6009efa4c510650815 /scripts/windows-boot/README.md | |
| parent | eb6a08cd359d98b5777e70d54d0ae8a75879495a (diff) | |
| parent | 8a242efebf823aeb23c72d17c3d666daf0bbd3e2 (diff) | |
Merge the #984 result (main + RT-PROTON-STORY-LOAD) into #939
The base is 8a242efeb, the merge of main and #984. 68 files conflicted; they were resolved in seven groups by
one rule: the same change in two forms keeps the base's form, everything only #939 has is kept, and where the
two solve one problem in two ways the base's is the frame and #939's plugs into it.
A, the Xbox proxy (d3d12_xs_device.cpp/.h, d3d12_xs.cpp, d3d12_xs_pso_stream.cpp/.h, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, device_proxy_test.cpp, queue_proxy_test.cpp): the base's files with #939's additions
ported in. Device slot 57 asks #939's NativeGraphicsFactory first and falls back to the base's
proxy_create_graphics_pipeline_from_native_code on E_NOTIMPL. Kept from #939: the providers (texture lease,
raw texture view, resource by address, constant view, descriptor mapping, depth-stencil UAV, texture pages),
the title-backed descriptor mirror, slot 13's feature answers, GPU labels on list slots 71/72. Dropped: #939's
duplicates of the boot ladder routes, its fallback window, its slot 133 stand-in.
A2 (xs_proxy_mock_test.cpp): the base's test with #939's slot 70 raw-buffer case; presentation cases follow
#939's rule that a device which ever had a handler has no queue fallback.
B1, the Vulkan device (d3d12_vulkan_device.cpp, d3d12_com.cpp/.h, shader_library.h, queue_families.h,
pipeline_cache_file.h, startup_trace.h): one lazy-pipeline mechanism, the base's; #939's pending_base_compile
and first_use_backend_pipelines dropped, prepare_on_bind and cold_graphics_compile kept. create_texture keeps
the base's signature; #939's deferred backing is folded into the base's placed-memory binder. #939's quad
lists as triangle indices.
B2, the D3D12 tests (d3d12_existing_heap, a8_dimensions, pipeline_cache_seed, title_va, rect_list,
shader_library, loader_tls_index0, draw, compute, xmem_placed, shader_library_corpus): the base's tests where
both carry the same case, #939's cases added (rebound tables, linear texture map, large vertex batch,
executable shaders, default A8 views).
C, the backend (vulkan_replay.h, vulkan_backend.h, vulkan_bindless.h, vulkan_scratch.h, vulkan_present.h,
rect_list_geometry.h, vk_test_device.h, vk_pipeline_check.cpp, vk_store_test.cpp, bindless_sizing_test.cpp,
replay_texture_barrier_test.cpp): the base's prepare_draw and lazy compute, its #1055 release rule and its
rectangle generator; #939's rectangle variants, GPU quad index expansion, 1D/3D and depth-stencil UAVs, the
label fence on the base's submit.
D, memory, services, presentation (xmem.cpp/.h, xg_xs.cpp, xg_xs_test.cpp, title_va_alias.h and its test,
main.cpp, frame_pacer.h, xbox_present.cpp/.h; xgameruntime_offline.cpp for one comment): the base's xmem with
#939's label hooks, file-backed sections and pin_mapped_data; both texture computers in xg_xs.cpp, the base's
answering first; --first-run-ui kept without host speech in its profile.
E, build, tools, docs (runtime/CMakeLists.txt, make_game.py, tools/rdna2spirv.py, tools/shader_disasm.py,
scripts, tests, docs; docs/README.md and tests/test_exe_shaders_stage.py beyond the conflicts): the base's
v_dot4 decode, #281's disassembler form and tests/semantic/test_fspx_dot4_op_sel_disasm.py dropped; the
base's executable-shader step with #939's cache fix; 366 registered tests.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'scripts/windows-boot/README.md')
| -rw-r--r-- | scripts/windows-boot/README.md | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/scripts/windows-boot/README.md b/scripts/windows-boot/README.md new file mode 100644 index 000000000..3a875af4b --- /dev/null +++ b/scripts/windows-boot/README.md | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | # Native Windows boot harness | ||
| 2 | |||
| 3 | `boot.ps1` boots the retail executable under `gta6rt` on native Windows the way the Linux harness | ||
| 4 | ([`scripts/linux-boot/`](../linux-boot/)) does under Proton: same switches, one game process at a time, a trace of | ||
| 5 | every boot and a short digest at the end. Windows PowerShell 5.1 is enough. New here? the repository README | ||
| 6 | covers the setup that comes before this. | ||
| 7 | |||
| 8 | ## Run it | ||
| 9 | |||
| 10 | ```powershell | ||
| 11 | # What would run, with every path checked; launches nothing. | ||
| 12 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -DryRun -GameDir D:\GTA6pkg -Shaders E:\leonida-work\shaders\spirv | ||
| 13 | |||
| 14 | # A 200 s boot with the default unattended presses (a@45,a@60,a@75,a@90). | ||
| 15 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name first -Seconds 200 -GameDir D:\GTA6pkg -Shaders E:\leonida-work\shaders\spirv | ||
| 16 | |||
| 17 | # Extra or changed switches: trailing KEY=VALUE arguments (KEY= removes one), as run-boot.sh takes them. | ||
| 18 | powershell -NoProfile -File scripts\windows-boot\boot.ps1 -Name split -Seconds 120 LEONIDA_PRESENT_PLANE1=0 "LEONIDA_PEEK=0x7446510,0x98f828c,0x78b2818" | ||
| 19 | |||
| 20 | # Every parameter. | ||
| 21 | Get-Help -Full .\scripts\windows-boot\boot.ps1 | ||
| 22 | ``` | ||
| 23 | |||
| 24 | Set `LEONIDA_GAME_DIR`, `LEONIDA_SHADERS` (and `GTA6RT`, `LEONIDA_RUNS` if you use other places) once in your | ||
| 25 | profile and the parameters can be left out. Defaults: `gta6rt` from `runtime\build\RelWithDebInfo\` of this | ||
| 26 | checkout, the executable from the game folder (`-Exe` or `LEONIDA_EXE` when it lives elsewhere), outputs in `$HOME\leonida-runs`. | ||
| 27 | The script refuses an output folder inside the repository. | ||
| 28 | |||
| 29 | ## What it sets | ||
| 30 | |||
| 31 | Only when your shell has not set them already (`-DryRun` prints the final list): | ||
| 32 | |||
| 33 | | Variable | Default | Why | | ||
| 34 | |---|---|---| | ||
| 35 | | `LEONIDA_D3D12` | `vulkan` | the runtime's D3D12-on-Vulkan backend | | ||
| 36 | | `LEONIDA_DEVICE_TYPE` | `6` | Series S identity; the runtime answers the title's `ConsoleMode` registry read with it (1920x1080) | | ||
| 37 | | `LEONIDA_ARENA_MB` | `2048` | as on Linux | | ||
| 38 | | `LEONIDA_PIPELINE_CACHE_BYTES` | `4294967296` | pipeline cache size limit | | ||
| 39 | | `LEONIDA_STARTUP_CACHE_CHECKPOINTS` | `1` | save the pipeline cache during startup | | ||
| 40 | | `LEONIDA_PIPELINE_CACHE_DIR` | `<out>\pipeline-cache` | one warmed cache shared by every build you boot | | ||
| 41 | | `LEONIDA_PEEK` / `_SECONDS` | `0x7446510,0x98f828c` / `5` | game state and session state (low dword), the two numbers every RESULT reports | | ||
| 42 | | `LEONIDA_DEVICE_FAULT` | `1` | on device loss: `VK_EXT_device_fault` info, checkpoints, last replay steps | | ||
| 43 | | `LEONIDA_KEYBOARD_PAD` | `always` (with an input script) | keyboard as a pad even unfocused, so the script's presses arrive | | ||
| 44 | | `LEONIDA_CAPTURE_EVERY` / `_LIMIT` | `60` / `40` | a swapchain read-back every 60 presents, at most 40 | | ||
| 45 | | `DISABLE_RTSS_LAYER`, `DISABLE_VULKAN_OBS_CAPTURE` | `1` | keep third-party Vulkan overlay layers out of the process | | ||
| 46 | |||
| 47 | Per run, from the parameters: `LEONIDA_SHADERS` (`-Shaders`), `LEONIDA_CAPTURE` (`<out>\cap_<name>`, `-NoCapture` | ||
| 48 | turns it off), `LEONIDA_INPUT_SCRIPT` (`-InputScript`, `-NoInput` for none), `LEONIDA_STACKS` (`-Stacks 30,60`: every | ||
| 49 | thread's call chain at those seconds, unwound in-process, which works natively where `tools/re/mdmp_unwind.py` | ||
| 50 | cannot walk Windows' own DLLs). Other `LEONIDA_*` variables in your shell pass through and are listed. | ||
| 51 | |||
| 52 | The command is `gta6rt --run <exe> --game-dir <game> --overlay <out>\overlay --trace <name>.jsonl --trace-d3d12`. | ||
| 53 | The overlay takes everything the title writes, so the package folder can stay read-only. | ||
| 54 | |||
| 55 | ## What you get | ||
| 56 | |||
| 57 | In the output folder: `<name>.log` (stderr: `[rt]` lines and the D3D12 trace), `<name>.stdout.log`, | ||
| 58 | `<name>.jsonl` (startup trace), `<name>.summary.txt` (`tools/boot_trace.py`), `<name>.digest.txt` and | ||
| 59 | `cap_<name>\` (PPM frames plus `index.txt` with the mean RGB of each). The digest: | ||
| 60 | |||
| 61 | ``` | ||
| 62 | == boot first: ran its full time limit (200 s), stopped | ||
| 63 | shaders: [rt] d3d12: 26586 translated shaders (21 fspx, 0 fspx_compute, 0 fspx_gfx, 52 bvh, 10 exe) from ... | ||
| 64 | states: t=0s game=0 session=0 | t=15s game=2 session=0 | t=30s game=3 session=3 | t=60s game=3 session=d | ||
| 65 | presents: PresentX ok 1581, failed 0 | ||
| 66 | input: 13 presses logged | ||
| 67 | faults: none | ||
| 68 | frames: 14 captured, 0 non-black; last mean rgb 0.00 0.00 0.00; brightest 0.00 0.00 0.00 | ||
| 69 | ``` | ||
| 70 | |||
| 71 | `-DigestOnly -Name <name>` writes the summary and digest again for an earlier run. The digest holds counts and | ||
| 72 | states only, which is what goes into a RESULT on the board; the logs, traces, captures and dumps can quote the game | ||
| 73 | and stay on your machine ([AGENTS.md](../../AGENTS.md), "No game data"). | ||
| 74 | |||
| 75 | How to read the states: game state `0x7446510` goes 1, 2 (init), 3 (running); session state goes 0, 1, 3 (landing | ||
| 76 | screen waiting for A), `d` after A. `docs/linux_proton.md` (the same stages apply natively) | ||
| 77 | section 2 has the healthy sequence with times and section 3 "which blank do you have". | ||
| 78 | |||
| 79 | ## One game at a time | ||
| 80 | |||
| 81 | The script holds the named mutex `Local\LeonidaGameBoot` for the whole boot and also waits while any `gta6rt.exe` | ||
| 82 | runs (another agent's boot, or one started by hand), up to `-LockWaitSeconds` (default an hour, then exit 3). Two | ||
| 83 | game processes on one GPU make both runs meaningless and can take the driver down. | ||
| 84 | |||
| 85 | ## Helper tools (`tools/re/windows/`) | ||
| 86 | |||
| 87 | | Tool | What for | | ||
| 88 | |---|---| | ||
| 89 | | `sym.py IMAGE RVA...` | `gta6rt.exe+0x...` frames to function and line through dbghelp and the build's PDB (the Windows SDK's or Visual Studio's `dbghelp.dll`; `LEONIDA_DBGHELP` names another) | | ||
| 90 | | `ripsample.ps1 [-Seconds 20]` | sampling profiler of a running `gta6rt`: per thread, where it spends its time, as module+RVA (`TITLE+0x...` for the title) | | ||
| 91 | | `minidump.py PID OUT.dmp` | a minidump through dbghelp's `MiniDumpWriteDump`. Do not use `rundll32 comsvcs.dll MiniDump`: Defender flags it. A dump holds game memory: local only | | ||
| 92 | |||
| 93 | Each prints its usage with `-h` (Python) or `Get-Help` (PowerShell). | ||