Commit Graph

49 Commits

Author SHA1 Message Date
aacc89a1c3 Merge pull request #1395 from Diegobecker07/old-9961-skip-asserts
runtime: LEONIDA_SKIP_ASSERTS steps over guest asserts without a trace (OLD-9961, RT-526)
2026-11-29 19:27:49 +01:00
74f470347a Merge pull request #1124 from Taffyyy-ops/fix/boot-trace-read-error
boot_trace: handle read errors during iteration (BOOT-TRACE-READ-ERROR)
2026-11-29 15:37:47 +01:00
8843102027 Merge pull request #1115 from Taffyyy-ops/fix/d3d12-trace-sequence-limit
boot_trace: skip unparseable D3D12 sequence fields (D3D12-TRACE-SEQUENCE-LIMIT)
2026-11-29 15:37:27 +01:00
528e0862f2 runtime: LEONIDA_SKIP_ASSERTS steps over guest asserts without a trace (RT-526)
A diagnostic for the retail boot (RT-5 follow-ups), off the hot path and with no behaviour change unless asked
for: LEONIDA_SKIP_ASSERTS=N (src/assert_skip.h, installed by main.cpp before any image code runs under
--init/--run): a vectored handler, added last, steps over up to N int3 (0xCC) at addresses in no host module and
logs each one as module+RVA (and as an int3_skipped trace event when --trace is open). After N it says so once
and the next int3 ends the run as before. An int3 in a host module, a breakpoint with no 0xCC at its address, or
a RIP that is neither at nor one past the 0xCC is passed on. Needs no --trace and no debugger.

Tests (synthetic, no game files): assert_skip_test (int3 in a VirtualAlloc'd page, the limit, a host-module int3,
a two-byte int 3, value parsing) and run_tiny_game_skip_asserts (two int3 in the mapped stand-in game, stepped
over end to end).

Carried over from old upstream PR 9961 (#228) without its caller logging for forwarded device slots, which the
carry-over of old PR 9990 (#1390) brings instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:55:11 -03:00
5865220a94 Merge main into boot-render-diagnostics (resolve conflict in tools/boot_trace.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:42:45 +01:00
fdec17cb9e Merge pull request #2246 from kirigayakazima/codex/boot-trace-open-error-counts
boot_trace: count failed file opens by Win32 error
2026-11-28 20:31:14 +01:00
d87299c94a Merge pull request #2245 from kirigayakazima/codex/boot-trace-last-startup-record
boot_trace: identify the last recorded startup event
2026-11-28 20:30:52 +01:00
c835a4ce2d Merge pull request #2244 from kirigayakazima/codex/boot-trace-xmem-attr-samples
boot_trace: summarize XMem allocation attribute observations
2026-11-28 20:30:28 +01:00
4f5e9b65dd Merge pull request #975 from TheGeogeo/fix/boot-trace-corrupt-jsonl
boot_trace: preserve events after JSON decoder limit errors (BOOT-TRACE-CORRUPT-JSONL)
2026-11-28 14:08:09 +01:00
d04d247968 boot_trace: summarize Vulkan pipeline waits and compilation 2026-11-26 19:02:43 +03:00
8489528cb5 boot_trace: count failed file opens by Win32 error 2026-11-26 18:12:49 +08:00
964e4535d7 boot_trace: identify the last recorded startup event 2026-11-26 18:12:27 +08:00
51b4428622 boot_trace: summarize XMem allocation attribute observations 2026-11-26 18:12:07 +08:00
681dae3a71 boot_trace: summarize render diagnostics in boot logs
A D3D12 stderr log can carry shader lookup failures, stub pipeline milestones and presenter capture measurements alongside the method trace. The old parser ignored them, so a first-boot report could not say whether the renderer was black or which shader classes were missing without sharing the raw log.

Parse those fixed categories into aggregate counts and include them in --counts-only and text output. No raw game strings or paths are emitted.

Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
33ab48d3ea/README.md (reading-black-frame-and-missing-shader-evidence-from-a-boot-log)

AI-assisted.
2026-11-24 17:38:23 -06:00
6bd790b2d5 Merge pull request #962 from TheGeogeo/fix/boot-trace-xmem-count
Merging.

**Why merged:** BOOT-TRACE-XMEM-COUNT: boot_trace's --counts-only JSON now includes xmem_physical_pages_count, a one-line addition with a test. kawaii-shakal checked it on Windows (33 OK) and KernelSmoker approved it (33/33, 5/5).

**Why it's good:** test_boot_trace and test_dev_boot_trace: 39 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 6293c1c4f. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 571 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 15:04:07 -05:00
b7ba45dca9 Keep parsing startup traces after JSON decoder limit errors 2026-11-24 20:57:40 +01:00
75fc53309e boot_trace: handle read errors during iteration (BOOT-TRACE-READ-ERROR) 2026-11-24 19:53:27 +01:00
6bceb77787 boot_trace: skip unparseable D3D12 sequence fields (D3D12-TRACE-SEQUENCE-LIMIT) 2026-11-24 19:43:38 +01:00
3ba069ebea Merge pull request #891 from SweatierKey/feat/bl6-frame-pacing-drift
runtime: frame pacing drift and latency percentile reporting (BL-6)
2026-11-24 19:24:15 +01:00
b8e2fa88b3 Merge pull request #379 from lines9686-rgb/docs-boot-runbook
Merging.

**Why merged:** OLD-5794: fixes the first-boot runbook in boot.md, and boot_trace now marks relocated modules in its text report. Oliwettoo checked the doc claims against the code ("Ship").

**Why it's good:** test_boot_trace plus the docs tests: 79 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 82a2aabcc. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 566 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main 32950551e: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or build/CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 12:38:28 -05:00
45883852a3 Count XMem page observations in shareable boot traces 2026-11-24 16:53:04 +01:00
7bb915dd3e runtime: frame pacing drift and latency percentile reporting (BL-6) 2026-11-24 15:58:13 +01:00
45c99d977c boot_trace: show XMem physical page requests 2026-11-24 00:37:54 -05:00
9a12e5ae6f boot.md: first-boot runbook fixes; boot_trace marks relocated modules in its text report
- Where gta6rt.exe is: runtime\build with build_runtime.ps1 (Ninja), runtime\build\RelWithDebInfo with the
  direct CMake (Visual Studio generator) path.
- Without LEONIDA_D3D12=vulkan the trace is not empty: the Xbox-ABI proxy still records device creation, queue,
  fence and allocator calls. Say so, and to check the log for "[rt] d3d12: Vulkan device:".
- The runtime writes no "partial" outcome yet (ExecuteCommandLists records ok or failed); only the tool knows it.
- --overlay: the default is already <game-dir>\overlay; the package is never written.
- d3d12_vulkan.md 8.2 no longer repeats questions 16, 19 and 20.
- Triage step 1 asks whether the executable is at its preferred base, but the text report printed module names
  only; it now marks a relocated module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:05:44 +03:00
2462d00e7f Merge current Leonida main and retain last complete boot call 2026-11-24 00:02:27 +01:00
d8b39a077a Merge PR #9559 2026-11-23 17:07:34 -05:00
90de412630 Merge PR #9552 2026-11-23 17:07:20 -05:00
18d1949f9b Rank unimplemented startup imports by call count 2026-11-24 02:56:34 +05:30
c6ef64e2f7 Add a counts-only JSON mode for boot reports 2026-11-24 02:56:33 +05:30
8f412a3f2f Count D3D12 outcomes per method in boot traces 2026-11-24 02:56:33 +05:30
46492b0219 boot_trace: report discontinuities in numbered D3D12 calls (#6543)
Squash-merged after diff review of PR #6543
2026-11-23 12:49:15 -06:00
1699d00620 Ignore a truncated D3D12 outcome at end of trace 2026-11-23 19:06:21 +01:00
0fbf31a6c7 boot_trace: report the last recorded D3D12 call 2026-11-23 18:33:32 +01:00
b4adb75081 Startup trace: name failed guest file opens, and LEONIDA_SKIP_INT3 to follow a boot past soft asserts (#6937)
Squash-merged after diff review of PR #6937 - Startup trace: name failed guest file opens, and LEONIDA_SKIP_INT3 to follow a boot past soft asserts
2026-11-23 09:35:20 -06:00
020a30407c Merge pull request #4528 from Vonsek
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:37 -05:00
d7ae86d36b Merge pull request #4504 from Vonsek
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:21 -05:00
b665735051 Merge pull request #4424 from AGInformatique81
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:14:36 -05:00
1d8f1b5f86 Merge pull request #4223 from Vonsek
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:29 -05:00
d0890d19eb Merge pull request #4200 from mohamedsaad.lahlou
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:16 -05:00
21ce093cbe fix(tools): validate exit codes in boot traces 2026-11-23 02:05:19 +00:00
5c72b6f41a fix(tools): report the last observed TLS callback 2026-11-23 01:53:06 +00:00
ed988486b8 Read UTF-16 boot trace logs from Windows PowerShell 2026-11-23 02:22:00 +01:00
4866ae5cc6 Preserve the final observed exception in capped startup traces 2026-11-23 00:07:52 +00:00
458b107c36 Report partial D3D12 submissions in boot traces 2026-11-23 00:53:59 +01:00
1507ac5d26 boot: retain available diagnostics when a trace cannot be summarized
AI-assisted-by: Codex Astra 6.2 High
2026-11-23 01:18:44 +03:00
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
  deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
  its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
  resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
  the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
  allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
  reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
  orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:54 -05:00
efcd434cfc boot: keep the first D3D12 call from a PowerShell 5.1 log
PowerShell 5.1 wraps the first stderr line of a native program in an error
record: `d3d12_test.exe : [d3d12-trace] #1 ...`. The anchored tag match
counted that line as noise, so the summary lost call #1 and still exited 0.
The tag may now follow a `<name> : ` prefix; a fixture and a dedicated test
keep it.

docs/boot.md says the prefix is accepted and that the BOM from
Out-File -Encoding utf8 is stripped.
2026-11-22 15:58:29 -03:00
bd6e3afa68 boot: fix what the trace review found
docs/boot.md: the 24 device words print only when --trace-d3d12 is off, so
the Q1 row says to run once without it; the D3D12 outcomes come from the
Vulkan backend and LEONIDA_UNIMPLEMENTED does not affect them; the Windows
command sets LEONIDA_D3D12 and writes the traces to %TEMP%; the page cites
the real runtime/README.md headings; refused has its own triage step; the
CheckFeatureSupport and PIX rows say what is actually logged.

tools/boot_trace.py: a method name with spaces no longer drops the line;
the outcome is taken as the last field. refused joins the failure buckets.
Exceptions print their access/address and a C++ throw as such. A file with
no [d3d12-trace] line exits 2 instead of reporting zero calls, a UTF-16 log
is named with the PowerShell fix, and a UTF-8 BOM is stripped. The tests
cover each of those shapes.
2026-11-22 15:29:34 -03:00
f495169092 boot: the first-boot runbook and the two-trace summary
tools/boot_trace.py reads the `--trace` JSONL and the `[d3d12-trace]`
stderr lines and prints the units a first boot needs: modules, unimplemented
imports with their callers, DllMain/TLS results, exceptions with their
stack, the exit, and the D3D12 calls by outcome and first call per method.
It counts debug strings instead of printing them, so a real trace stays on
the player's machine; the tests use synthetic fixtures only.

docs/boot.md is the runbook around it: the Windows and Wine commands, the
LEONIDA_UNIMPLEMENTED and validation switches, the first-failure triage
order, and the Q1-Q22 table mapping each open question to the event to look
for. docs/README.md and runtime/README.md point at both.
2026-11-22 15:16:15 -03:00