Commit Graph

27 Commits

Author SHA1 Message Date
1abef08d09 Merge pull request #2902 from budanga/fix/boot-ps1-python-alias
boot.ps1: take a Python that starts and is 3.12+, not the Microsoft Store alias (BOOT-PS1-PYTHON-ALIAS)
2026-12-01 22:15:01 +00:00
298313282a test_boot_ps1_python: test the 3.12 floor and that a hanging candidate leaves no process (BOOT-PS1-PYTHON-ALIAS)
The older-Python stand-in only exited 1, so changing (3, 12) in Test-Python left every test green. A stand-in now
runs Test-Python's own check with sys.version_info set: 3.11.9 is passed over for py -3 and 3.12.0 is taken. The
hanging stand-in sleeps in a Python child with a unique tag on its command line, and the test asserts that no
process holding the tag is left once Resolve-Python returns.

Test-Python's comment now gives the requirement it follows: the repository needs 3.12+ (README.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:46:47 -03:00
79f89c4906 Merge pull request #1609 from lixonik/windows-boot-scratch-cwd
windows-boot: keep driver artifacts outside the checkout (RT-WINDOWS-BOOT-SCRATCH-CWD)
2026-11-29 20:01:20 +01:00
761578d776 Merge pull request #1766 from sodove/fix/windows-boot-fault-context
windows-boot: report the loss API, fault query and checkpoint counts
2026-11-29 19:28:29 +01:00
f569782332 windows-boot: test_crash_monitor tolerates code-page module names in stack.txt 2026-11-29 09:05:17 -08:00
6d5a3ba260 windows-boot: test_crash_monitor reads its text files as UTF-8 (text-encoding lint red on main since 1b9e4969) 2026-11-29 08:03:13 -08:00
931a8f7511 Merge pull request #2599 from enlight3d/fix/boot-device-fault-keeps-journal
Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the precompiled compute journal (BOOT-DEVICE-FAULT-2)
2026-11-29 09:14:40 +01:00
a79340fae8 windows-boot: summarize device loss API and queue checkpoints 2026-11-29 11:29:56 +05:00
9cb0c02784 Merge main and resolve cache path after choosing a seed 2026-11-29 08:44:31 +03:00
0d7c1c0802 Merge pull request #1693 from sodove/feat/windows-boot-private-minidump
windows-boot: collect private crash dumps and stack traces on request
2026-11-29 04:35:44 +01:00
202ad50e5b Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the compute journal gta6rt --precompile-pipelines wrote (1 with LEONIDA_AFTERMATH=1)
boot.ps1 set LEONIDA_DEVICE_FAULT=1 when the shell had not set it. On NVIDIA, 1 also enables
VK_NV_device_diagnostics_config (d3d12_vulkan_device.cpp:23349-23360), and the runtime then
puts that config into the key of every compute journal file (d3d12_vulkan_device.cpp:11818-11824,
"nv-diagnostics-config"). So a boot read none of the journal a pre-compile without the variable
had written, though boot.ps1 hands that journal to the boot as its seed since #2481. 2 is the
runtime's mode for this case: the device-fault report, checkpoints and the submit ring, without
the diagnostics config.

LEONIDA_AFTERMATH=1 still gets 1. The runtime takes the LEONIDA_DEVICE_FAULT branch before the
Aftermath one (d3d12_vulkan_device.cpp:23352-23371), so under 2 a crash dump would lose NVIDIA's
diagnostics config (no shader debug info). A LEONIDA_DEVICE_FAULT the user gives (shell, -SetEnv
or KEY=VALUE) always wins, and LEONIDA_DEVICE_FAULT= leaves it unset, as before.

Measured on an RTX 3090 24 GB, NVIDIA 621.40, Windows 11: two builds, each with its own fresh
compute pre-compile and an A/B pair of 60 s boots of that build, n=1 per cell. The counts are
from the runtime's last "pipeline journal" progress line within the 60 s (it prints at the
first event of a kind, then every 100th):

  build      LEONIDA_DEVICE_FAULT  from the precompiled journal  compiled
  1bc055e6c  1                       0                           500
  1bc055e6c  unset                 700                             0
  ace0e9d1c  unset                 700                             0
  ace0e9d1c  2                     700                             0

With 1 the line said 25 from journal files: files that same boot had just written (zmasi's
reading on #2570; the boot's writable journal gained about 519 files). No commit in
1bc055e6c..ace0e9d1c touches d3d12_vulkan_device.cpp, vulkan_device_fault.h or
pipeline_cache_journal.h. Found by MoonEyes on #2570; zmasi pointed there at mode 2.

The README's row says 2, when 1 is used, and that "NVIDIA diagnostics config unavailable" in
the runtime's device-fault line means "not requested" under 2. Its seed row no longer says the
script sets 1. The comment over the defaults says the Linux harness does not set the variable.

Test: tests/test_windows_boot_journal_seed.py, dry runs for the default, the shell, -SetEnv and
KEY=VALUE overrides, the removal and LEONIDA_AFTERMATH, and the README row (read as text, on any
system).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 02:22:23 +01:00
d11ca4308a Merge pull request #2186 from ecox982745/ed/stage-timeline-peek-rvas
tools: read boot timeline states from the configured RVAs
2026-11-28 21:17:06 +01:00
39b900ad77 tools: read boot timeline states from the configured RVAs
Use the state addresses supplied to the boot script, with command-line overrides for saved logs. Retain #1789's input validation and file-error behavior. Adapt both parser test suites to synthetic addresses.

Original implementation AI-assisted by OpenAI Codex (gpt-6.2-astra).
Upstream reconciliation AI-assisted by OpenAI Codex (GPT-6).
2026-11-29 01:35:29 +10:00
4574fe6f5b Merge pull request #1649 from sodove/fix/windows-boot-fault-digest
windows-boot: report Vulkan fault classes in the digest
2026-11-28 15:46:40 +01:00
7ce0112058 Merge pull request #1772 from sodove/feat/windows-boot-mapped-image-stack
windows-boot: recover private stacks for manually mapped images
2026-11-28 14:26:09 +01:00
2893fae21c windows-boot: compare the boot's journal and the seed by Windows' final paths (BOOT-PRECOMPILED-JOURNAL)
The seed was kept when LEONIDA_PIPELINE_CACHE_DIR named the precompiled folder under another spelling (a
junction, or the \\.\ device prefix), although the runtime's std::filesystem checks see one folder and turn
the journal off. Ask Windows for each folder's final path (GetFinalPathNameByHandle, from the deepest
existing parent), which sees through junctions, symbolic links, substituted and mapped drives, 8.3 names and
the \\?\ and \\.\ prefixes; the spelled paths remain the fallback when the helper is not available.
Reported by TheGeogeo's agent (repro on #2481); the approach was suggested by OreoFR's agent. The test file
gains the \\.\ and junction cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:50:56 +01:00
ba19ca8ada windows-boot: read the precompiled journal beside gta6rt.exe as the boot's seed (BOOT-PRECOMPILED-JOURNAL)
boot.ps1 points the runtime at <OutDir>\pipeline-cache, so a boot never read the journal that
gta6rt --precompile-pipelines writes beside gta6rt.exe and compiled those pipelines again. When
pipeline_cache.d exists there, neither the shell nor -SetEnv/KEY= set LEONIDA_PIPELINE_JOURNAL_SEED_DIR,
and the boot's own journal is a different folder (the runtime turns the journal off for a seed that
overlaps its writable journal), pass it as the read-only seed and list it in the [boot] env lines.

tests/test_windows_boot_journal_seed.py runs boot.ps1 -DryRun against a temporary runtime folder
(Windows only; nothing is launched, no game files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:36:00 +01:00
48defb9c08 boot.ps1: take a Python that starts and is 3.12+, not the Microsoft Store alias (BOOT-PS1-PYTHON-ALIAS)
Resolve-Python took `python` as soon as Get-Command found it. On Windows that also finds the Store's
app execution alias in WindowsApps, which only says how to install Python and exits 9009, so with
Python installed through `py` the boot's summary held that message and `py -3` was never tried.

Test-Python now starts each candidate (python, then py -3) and takes the first that exits 0 on a
3.12+ check, within 15 s; one that hangs is ended with its children and passed over. -Python is
used as given. tests/test_boot_ps1_python.py runs both functions against stand-in commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:24:49 -03:00
ee47019246 Improve first-run input diagnostics 2026-11-26 17:49:58 +01:00
7bd4cec026 gameinput: boot.ps1 names the :hold form; rewrap the script header comment
Review follow-up (MoonEyes): the InputScript help in boot.ps1 now says
each press is held 300 ms and that button@seconds:hold holds it longer.
The header comment in gameinput_script.h is wrapped at 120 like the rest
of the file. Comments only; no code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:09:17 +00:00
7b1fe62850 Keep main's watchdog switch and say where the peek default went
f0611b752 took the executable's addresses out of the code. Two behaviours
changed with it; the removal stays, the changes are now explicit:

- runtime/src/main.cpp: the watchdog kick runs again only with
  LEONIDA_TITLE_WATCHDOG=0, as on main; LEONIDA_TITLE_WATCHDOG_KICK only
  supplies the two RVAs it needs. Either variable alone leaves the
  watchdog armed and the loader says so once (before this commit the kick
  ran whenever LEONIDA_TITLE_WATCHDOG_KICK was set).
- scripts/windows-boot/boot.ps1 no longer has the game- and
  session-state RVAs built in, so LEONIDA_PEEK has no default and the
  RESULT states read "?" unless LEONIDA_GAME_STATE_RVA and
  LEONIDA_SESSION_STATE_RVA are set. The script now warns when they are
  not, and runtime/README.md (LEONIDA_PEEK, LEONIDA_TITLE_WATCHDOG and
  _KICK rows), scripts/windows-boot/README.md and docs/first_run_ui.md
  say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:55:15 -05:00
056e682321 windows-boot: recover private stacks for manually mapped images 2026-11-25 16:47:22 +05:00
1b9e4969a5 windows-boot: capture private minidumps and stacks on abnormal exit 2026-11-25 13:22:52 +05:00
9c65c6ef2d windows-boot: summarize device loss and Vulkan fault classes in the digest 2026-11-25 12:00:24 +05:00
f0611b752f Remove the title's executable addresses #984 brought in; read them from the environment
#984 (273b3bdf9) put RVAs and file offsets of the retail executable into code, docs and scripts.
The code paths that need one now read it from an environment variable and are off when it is
unset; the docs and examples say the location is measured locally.

- runtime/src/main.cpp: the hang-watchdog kick takes its trap and kick RVAs from
  LEONIDA_TITLE_WATCHDOG_KICK="<trap RVA>,<kick RVA>" (hex), still only when the trap
  instruction is at the first one. Unset, the watchdog stays armed, as before by default;
  LEONIDA_TITLE_WATCHDOG=1 keeps it armed, and LEONIDA_TITLE_WATCHDOG=0 without the RVAs says
  once that it needs them. The LEONIDA_PEEK example uses placeholders.
- runtime/shims/startup_trace.h: the transient-pool dump fires at the int3 that
  LEONIDA_POOL_DIAG_AT names (`<module>+0x<offset>`, as the trace prints it), off when unset.
- scripts/windows-boot/boot.ps1: LEONIDA_PEEK's default comes from LEONIDA_GAME_STATE_RVA and
  LEONIDA_SESSION_STATE_RVA (no peek when unset), and the RESULT digest matches those values;
  the examples and README use placeholders.
- runtime/README.md documents LEONIDA_TITLE_WATCHDOG_KICK and LEONIDA_POOL_DIAG_AT.
- docs/fspx.md, docs/d3d12_vulkan.md, docs/movies.md, docs/embedded_shaders.md and a comment in
  runtime/shims/d3d12_xs_alloc_size.h drop the addresses and offsets.

This follows the same change on the earlier integration branch (#1495).
2026-11-25 01:00:37 -05:00
0236b63f4e Keep Windows boot driver artifacts outside the checkout 2026-11-25 08:50:31 +03:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00