Commit Graph

87 Commits

Author SHA1 Message Date
2d9987f3cd Merge the upstream offline services, frame events and queue ABI into the Windows UI integration
Retain the first-run origin-token poll and shared tokens alongside standard origin, vblank and flip events. Route attached presenter callbacks before the fallback window and dispatch local speech through the Windows provider with the upstream offline fallback.

The offline pipeline checker now enables the runtime mesh query feature for cache-producing runs. A controlled GPU comparison with the same compute shader changed from a miss to an application cache hit.
2026-11-24 22:51:02 +08:00
37c601760e docs/cpu_features.md: document hosts without AVX and SDE+Wine findings (DOC-NO-AVX-HOSTS) 2026-11-24 15:18:07 +01:00
de223bed9e Merge pull request #357 from ubiquitarianism/feat/ws2-offline-shim
runtime: add offline loopback-only Winsock2 (ws2_32.dll) shim
2026-11-24 08:44:13 -05:00
abbd7d9b27 Document the boot profile and verify descriptor guards and per-device GPU completion
Keep completion batches with their owning Vulkan context. Test switching primitives, caller overrides, and the dynamic EXEC and uniform null-descriptor guards used for dimension-specific storage views.
2026-11-24 21:40:02 +08:00
1d37e033eb file_system: reserve T:'s folder with a create-only call, never reuse one
Xiiano's review of old upstream PR 8161: the folder name (start time to
the millisecond plus process id) is not guaranteed unique, and earlier
runs' folders are kept, so a reused id in the same millisecond would
land in a stale folder and bring ERROR_FILE_EXISTS back. Under Wine
every fresh run gets the same small ids (both run_tiny_game_dir runs
here were pid 32).

rt::fs::reserve_unique_dir(base, stem) makes base\stem with
CreateDirectoryW and takes success as ownership; on ERROR_ALREADY_EXISTS
it tries stem-2, stem-3, ... up to 1000 names, and fails with the Win32
error otherwise. T:'s folder is reserved once per overlay under a mutex
(the first T: call or rt::fs::scratch_dir(), which the startup line
calls), so concurrent first calls share it. A failed reservation is
printed once and T: paths fail with ERROR_INVALID_NAME.
rt::fs::scratch_stem() gives the first name tried.

file_system_test: with stem and stem-2 taken, reserve_unique_dir makes
stem-3, new and empty, then stem-4; a file with the next name counts as
taken; max_tries names taken fail with ERROR_ALREADY_EXISTS; a missing
base is made. T: with folders of this process's own stem and stem-2
already kept takes stem-3 and CREATE_NEW succeeds; eight threads making
their first T: call at once reserve one folder. The second-process test
stays.

Restored from old upstream PR 8161 and ported onto the new main: the
base folder and every candidate go through main's win32_io_path, like
the other creates in file_system.cpp, so a long overlay root keeps
working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 06:54:37 -05:00
297ad86854 file_system: T: is a folder of each process's own in the overlay
T:\ mapped to <overlay>\.gta6rt-temp, one folder shared by every run and
kept between runs. The title makes its crash dump and crash log there
with CREATE_NEW, and a name an earlier run (or a second process) had
left failed with ERROR_FILE_EXISTS (80), so no report landed (old
upstream issue 7913, measured by Spacecer2 under Wine 11.22).

T:\ now names <overlay>\.gta6rt-temp\<YYYYMMDD-HHMMSS-mmm>-pid<id>, the
process's start time in UTC and its id, made on the first T: call. The
start time keeps a reused process id (Wine hands each fresh prefix the
same small ids) out of an old run's folder. T:\.. cannot climb into the
shared folder, T:\ itself still cannot be removed or moved, and earlier
runs' folders are kept so their crash files can be read. GAME: and G:
are unchanged.

rt::fs::scratch_dir() returns the folder, and the startup line names it:
"console paths: GAME: -> ..., writes -> ..., T: -> ...". The two CMake
checks of that line (run_tiny_game_console_paths, run_tiny_game_dir)
and the synthetic test of the first now expect the T: part.

file_system_test: a CREATE_NEW of a name earlier runs left in
.gta6rt-temp succeeds and lands in the process's own folder; the folder
is stable for the process; a second process (the test started again)
creating the same name on the same overlay succeeds in a folder of its
own; GAME: reads and writes are unchanged. On main these fail with
ERROR_FILE_EXISTS (80), in this process and in the second one.

Restored from old upstream PR 8161 and ported onto the new main: the
folder is made through main's win32_io_path, so long overlay roots keep
working, and the scratch-folder check of the write-open path is kept.
Main's long-overlay T: check now finds scratch.bin in the process's own
folder below .gta6rt-temp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 06:54:36 -05:00
4d470fd69b docs/boot.md: the Windows PowerShell 5.1 capture survives ErrorActionPreference Stop (PROC-271)
- docs/boot.md: the Windows PowerShell 5.1 capture survives ErrorActionPreference Stop (PROC-271)

Carried over from old-pr/9939 (old upstream PR 9939), rebased on main.
2026-11-24 08:15:59 -03:00
60fce7a747 startup_trace: LEONIDA_SKIP_INT3 works on title threads and with Wine's breakpoint address
Spacecer2 measured under Wine 11.22 (old upstream 7599) that LEONIDA_SKIP_INT3 never took
effect: the flag was a block-scope static first read on a title thread, whose
MSVC thread-safe-static guard passed with the object still zero, and the
handler's int3 set and the trace lock had the same shape.

- The flag is read by startup_trace::open(), on the thread that opens the trace,
  into a constant-initialized atomic.
- The trace lock is a constant-initialized SRW lock (no constructor, never
  destroyed), and the logged int3 sites are a constant-initialized table of
  atomics: the handler touches no block-scope static.
- The int3 is found from Rip (Windows) or Rip - 1 (Spacecer2's Wine run), and
  Rip always ends one byte past the 0xCC.
- skip_int3 returns false for a null EXCEPTION_POINTERS, record or context.
- LEONIDA_LOG_GAME_EVENTS and LEONIDA_HDR, read on title threads, are cached in
  namespace-scope atomics instead of block-scope statics.

int3_skip_test runs each case in a child process: real int3s, the Windows and
the Wine breakpoint forms, the null pointers, the flag read at open() and the
flag off. The wine, null and init cases fail on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 05:38:10 -05: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
9b59db02f9 ws2_offline: add offline loopback-only Winsock2 (ws2_32.dll) shim (RT-WS2-OFFLINE) 2026-11-24 00:53:14 -03:00
f7b3afcda9 Merge remote-tracking branch 'origin/pr/9754'
# Conflicts:
#	scripts/build_runtime.ps1
2026-11-23 17:29:12 -05:00
ad6e5d6bbe gta6rt: --init/--run stop with a clear message on a host without AVX
The game runs AVX code from its TLS callbacks on, so a CPU or OS without
AVX (a QEMU qemu64 guest) died with a bare 0xC000001D. Check CPUID.1
AVX/OSXSAVE and XCR0 YMM state first, print one line and exit 4 (3 is
LEONIDA_UNIMPLEMENTED=stop). --dry-run is unchanged and
LEONIDA_SKIP_CPU_CHECK=1 skips the check.

AI-assisted.
2026-11-23 23:07:51 +01:00
82c5a2ed22 docs/boot.md: what a Wine prefix has to supply, and the quiet failure without it
The retail executable imports D3D12SerializeVersionedRootSignature, and Wine's own d3d12.dll
does not answer that export for the runtime's shim. The result is hard to place: the D3D12 trace
stops at about 1,658 calls, the startup trace ends in an access violation inside the executable,
and nothing in the log but one [rt] line names the cause. Two of us read that as a boot-chain stop
before finding it.

Document the prefix requirement, the three DLLs and the override that make Wine use them, and the
measured difference: 1.4 million calls with no exception against 1,658 calls and a fault.
2026-11-24 00:35:10 +03:00
85441c34fb xbox_present: one [d3d12-trace] line per PresentX, with its outcome
The queue proxy's PresentX slot is past the PC chain, so nothing recorded
a present: a --trace-d3d12 run of a frame loop could not say how many
frames were presented, or whether one was refused. XboxPresentation::PresentX
now writes one line per call through d3d12_trace::result (ok or failed).

xbox_present_test captures the trace around a blank present and a refused
three-plane call and checks for exactly those two lines.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
2026-11-23 15:27:18 -06:00
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
74eb264a79 RT-5: the retail executable maps under gta6rt --dry-run, with 30 unimplemented imports in seven Xbox-only DLLs (#6715)
Squash-merged after diff review of PR #6715 - RT-5: the retail executable maps under gta6rt --dry-run, with 30 unimplemented imports in seven Xbox-only DLLs
2026-11-23 09:40:32 -06: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
57c175391d Revert #2490: its console-ABI list proxy breaks run_tiny_frame (please rebase and split)
With it, d3d12_xs reads list slot 48 as the console's IASetVertexBuffers, so the PC-shaped fixture list's
ClearRenderTargetView never runs and Close fails. The branch also changes runtime/src/pe_loader.cpp and carried
committed conflict markers in docs/fssm_crosscheck.md. Its docs rows go with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:42:53 -05:00
21f3da2621 Merge pull request #4650 from kingzzim7-create
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:16:49 -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
65d2fd733c Merge pull request #3893 from desamodeth
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:17 -05:00
0eb3a7698c d3d12_xs: print D3D12XboxCreateDevice's parameter words with --trace-d3d12 too (RT-310) 2026-11-23 08:42:50 +05:00
5c72b6f41a fix(tools): report the last observed TLS callback 2026-11-23 01:53:06 +00:00
4dc3115297 Keep complete native trace lines in the PowerShell runbook 2026-11-23 02:33:32 +01:00
ed988486b8 Read UTF-16 boot trace logs from Windows PowerShell 2026-11-23 02:22:00 +01:00
40d9fed33c docs: the probe is the package's only registered executable
MicrosoftGame.Config declares the identity "GTA6.Probe.PC" and names
game_scarlett_master.exe as the sole entry in ExecutableList, so the
payload is a packaging verification build with the retail payload's
shape rather than a retail dump missing its engine. boot.md also notes
the clean --init pass on all eleven bundled DLLs.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 18:00:47 -07:00
2f85105492 docs: record the first boot — the exe ran clean, and it is a probe
boot.md's "prepared, not yet run" status was written before a
game_scarlett_master.exe reached the corpus. The measured first run:
map/init/run all clean, and the binary's own output identifies it as a
payload verification probe (verdict PASS over the full 1.0.2.1
payload). The engine image is still absent, so design.md's day-one
note now points at the engine image rather than the probe's name.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 17:53:25 -07: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
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