docs: démarrage du 1.0.2.1 sous Leonida, recherches du 23 novembre #110

Merged
LooperSalty merged 2 commits from upstream-pr/110 into main 2026-11-23 23:09:48 +00:00
LooperSalty commented 2026-11-23 22:07:33 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-23T22:07:33Z.


Résumé

  • Ajoute docs/research/leonida-boot-2026-11-23.md (anglais) et docs/fr/recherche/demarrage-leonida-2026-11-23.md (français), liés l'un à l'autre.
  • Contenu : chaîne de démarrage mesurée sur Windows natif (RTX 4070 SUPER) arrêt par arrêt avec les PR et leurs auteurs, boucle de frames, les 4 causes mesurées des images noires, constats statiques de Claude et Codex (piège HRESULT de perte de device, descripteurs des slots 55/57/86/108/70/127, types 23/24 avec la correction « 24 = mesh shader », slots 131/132, limites d'inline_scan, les deux messages Vulkan, IID de liste), nos erreurs, et ce que le proxy TomBox doit encore servir.
  • Chaque ligne est étiquetée mesuré / déduit statiquement / supposé. La compilation des pipelines (25 s à froid, < 1 s avec le cache du pilote) est mesurée, avec lien vers Leonida #7231.
  • Liens ajoutés depuis first-boot-1021.md, neighbors.md et leurs versions françaises.

Règle 1

Aucun code décompilé ou désassemblé, aucune adresse ni RVA, aucun octet, aucune chaîne ni nom de fichier ou de shader du jeu, aucun log brut, aucun hash de shader. Seulement des slots, valeurs de drapeaux, HRESULT, noms de types du SDK, numéros de PR, comptes, durées et tailles. Rien copié depuis reverse-codex\ ni outils\.

Test plan

  • liens relatifs vérifiés par script (python -I)
  • python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools
  • pytest -q : 383 réussis, 157 ignorés, 5 échecs de tests/test_native.py dus au runtime C++ non compilé dans ce worktree neuf (aucun fichier de code modifié)

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL5Lxc1rum25b6tnpo8

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6569811656 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/110). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-23T22:07:33Z. --- ## Résumé - Ajoute `docs/research/leonida-boot-2026-11-23.md` (anglais) et `docs/fr/recherche/demarrage-leonida-2026-11-23.md` (français), liés l'un à l'autre. - Contenu : chaîne de démarrage mesurée sur Windows natif (RTX 4070 SUPER) arrêt par arrêt avec les PR et leurs auteurs, boucle de frames, les 4 causes mesurées des images noires, constats statiques de Claude et Codex (piège HRESULT de perte de device, descripteurs des slots 55/57/86/108/70/127, types 23/24 avec la correction « 24 = mesh shader », slots 131/132, limites d'`inline_scan`, les deux messages Vulkan, IID de liste), nos erreurs, et ce que le proxy TomBox doit encore servir. - Chaque ligne est étiquetée mesuré / déduit statiquement / supposé. La compilation des pipelines (25 s à froid, < 1 s avec le cache du pilote) est mesurée, avec lien vers Leonida #7231. - Liens ajoutés depuis `first-boot-1021.md`, `neighbors.md` et leurs versions françaises. ## Règle 1 Aucun code décompilé ou désassemblé, aucune adresse ni RVA, aucun octet, aucune chaîne ni nom de fichier ou de shader du jeu, aucun log brut, aucun hash de shader. Seulement des slots, valeurs de drapeaux, HRESULT, noms de types du SDK, numéros de PR, comptes, durées et tailles. Rien copié depuis `reverse-codex\` ni `outils\`. ## Test plan - [x] liens relatifs vérifiés par script (`python -I`) - [x] `python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools` - [x] `pytest -q` : 383 réussis, 157 ignorés, 5 échecs de `tests/test_native.py` dus au runtime C++ non compilé dans ce worktree neuf (aucun fichier de code modifié) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL5Lxc1rum25b6tnpo8
chatgpt-codex-connector[bot] commented 2026-11-23 22:07:47 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-23T22:07:47Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T22:09:18.459320Z 2306667 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7115361186 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/110#issuecomment-7115361186). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-23T22:07:47Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"230666710794fe94cd0d390635606a1f9538cc7a","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-23T22:09:18.459320Z">2026-11-23T22:09:18.459320Z</relative-time> | `2306667` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot] commented 2026-11-23 22:09:15 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-23T22:09:15Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2306667107

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<!-- greyfinch-sync:LooperSalty/AnyXboxX:review:6030311156 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/110#pullrequestreview-6030311156). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-23T22:09:15Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `2306667107` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
chatgpt-codex-connector[bot] commented 2026-11-23 22:09:16 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-23T22:09:16Z.

Code review location: docs/research/leonida-boot-2026-11-23.md; line 163

@@ -0,0 +1,296 @@
+> Français : [demarrage-leonida-2026-11-23.md](../fr/recherche/demarrage-leonida-2026-11-23.md)
+
+# Booting 1.0.2.1 under Leonida, 23 November 2026: stops, black frames, static findings
+
+State as of the evening of 23 November 2026. This note files the research of that day (Claude and Codex, on the
+maintainer's machine) on the boot of build 1.0.2.1 under [Leonida](https://github.com/ItsNotRexed/Leonida)'s
+`gta6rt`, from the first stop to the frame loop. It continues [first-boot-1021.md](first-boot-1021.md), which stops at
+the first six stops and the work list for AnyXboxX. Neighbours in general: [neighbors.md](neighbors.md); Leonida's
+GTA 6 notes: [leonida-gta6.md](leonida-gta6.md).
+
+**Rule 1 of [AGENTS.md](../../AGENTS.md) applies, and more strictly than in the first note.** This note holds
+vtable slot numbers, flag values, HRESULTs, public SDK type names, PR numbers, counts, times and memory sizes. It
+holds no address or offset of the executable, no disassembled or decompiled code, no byte, no string, no file or
+shader name of the package, no raw log and no hash of a shader. Descriptor layouts are given as field positions of
+public SDK structures, never as code. The local reports behind it (REA, Ghidra and capstone by Claude, Codex's
+reports, launch logs) stay outside the repository, as do the names of their files.
+
+**Three levels, in every table.**
+
+| Label | Meaning |
+| --- | --- |
+| measured | observed on a run, or read from a tool's output by a method anyone can repeat. Says who measured. |
+| deduced statically | read from the executable without running it (targeted decompilation, disassembly). Direct calls only, so it is a lower bound; no reachability is proven |
+| assumed | inferred from the two above, from a name, or true on one configuration only |
+
+Measurements are ours unless a name is given. Names are GitHub logins of [Leonida](https://github.com/ItsNotRexed/Leonida)
+participants; their numbering of the stops is not ours unless said.
+
+## 1. Set-up of the measurements
+
+| Item | Value | Status |
+| --- | --- | --- |
+| Machine | Windows 11 (build 26300), Core i7-13700KF, RTX 4070 SUPER (driver 610.88), native, no Wine | measured |
+| Runtime | `gta6rt`, MSVC RelWithDebInfo, `LEONIDA_D3D12=vulkan` from the second pass on | measured |
+| Executable | the 1.0.2.1 build already described (SHA-256 starting `e95020b2`), own copy, package read-only | measured |
+| Stacks | Leonida `main` at various dates (`1cc6e3c1`, then `ec0e01c5`, then `dde82f27`) with open pull requests merged locally, conflicts resolved by hand, **only `gta6rt` built, the PRs' own tests not run** unless a PR comment says so | measured |
+| Later base | the maintainers' forge `main` (`2ac38583`, contains #7759), journal in issue #8851 | measured |
+| Shaders | `make_game --stages shaders`: 26,503 translated in 32 min on one stack (wave64 tiers: A 236, B 7, C 425 for VS, PS, GS) | measured |
+| Environment variables of the loop runs | `LEONIDA_ARENA_MB=4095` (otherwise `E_OUTOFMEMORY`), `LEONIDA_STUB_PIPELINES=1` for some runs, `LEONIDA_SKIP_INT3=1` for one in-image `int3` | measured |
+
+Ordinary test results at rest on this machine, main `dde82f27`: ctest 268 of 272. The four failures are
+`d3d12_vulkan_device` (a `tiles == 1` check), `d3d12_indirect_dispatch_count`, `d3d12_depth_resolve` and
+`d3d12_indirect_rt`; they fail the same way on main and are not caused by the PRs we tested. Without SDL3 the
+GameInput shim is not built (ctest reports `gameinput` as disabled): `-DLEONIDA_SDL3_FETCH=ON` builds it. measured.
+
+## 2. The measured chain, stop by stop
+
+Each row is the stop met after adding the pull request of the previous row to the local stack. "t" is wall time
+to the stop, "peak" is the peak working set. Numbers 1 to 6 are those of [first-boot-1021.md](first-boot-1021.md);
+numbers 13 to 19 are KkelebekK's (Linux, Wine, #6910). Pull requests belong to the people named; "ours" marks the
+ones we wrote.
+
+| Stop | What the title does there | Cleared by | t (s) | Peak (MB) |
+| --- | --- | --- | --- | --- |
+| 1, 2 | `D3D12ConfigureVirtualMemoryX` absent, then `XMemVirtualAlloc` of the init refused | #6792 (undeadhuman37), then the attribute-word forms of #6709 (Stalkerino), #4531 (labj1987), #6919 (NiiRoZz) | 6.3 to 8.3 | 238 |
+| (log mode) | `XErrorReport` not exported by the shim: `WinMain` takes the failure branch | #6582 (Kam471) | 4.9 to 7.2 | 238 |
+| 24 | `DStorageGetFactory` unimplemented | #4348 (mariuslozo-boop) with #4313 (TLS index) | 3.1 to 6.5 | 237 |
+| (host) | access violation in the host after `XMemAllocatePhysicalPages` (0x280 requested, 11,360 pages), device slot 26 | #6964 (sennecools); the Vulkan backend raises the peak from 395 to 687 MB | 7.0 to 9.8 | 395, then 687 |
+| 4 | device slot 48, queue `Flags` `0x2`, `0x3` | #6954 (Pipodi) | 7.4 | 687 |
+| 5 | device slot 73, console list IID | #7076 (NiiRoZz), with #6953 (Pipodi) and #2490 (NolanCotter). #6953 and #2490 alone left the stop | 7.0 to 8.2 | 687 |
+| after 6 | device slot 133 `E_NOTIMPL` "beyond the PC vtable" | #7075 (NiiRoZz) | 6.8 to 7.1 | 687 |
+| 13 | descriptor heap slot 9, `GetCPUDescriptorHandleForHeapStart` | #7021 (Khuraie); the title then goes through slots 17, 18, 19 | 6.5 | 687 |
+| (host) | host write access violation at the first slot 70 call | #7066 (tedin7) | 6.5 to 6.9 | 687 |
+| (host) | read access violation at address -1, first slot 25 call | #7110 (tedin7). Merge note: it and #6964 both define the helper `proxy_get_custom_heap_properties`; together the file does not compile (`C2440`) | 7.1 | 687 |
+| 16 | slot 127 `E_NOTIMPL`, then `int3` | #7052 (tedin7) | 6.9 to 7.0 | 687 |
+| 17 | budget test after the render targets | #7235 (NiiRoZz): 33,423,360 bytes per target on this GPU. #7115 (slot 61, mrp1no) changes nothing here because the stop comes before slot 61 | 6.7 to 6.9 | 687 |
+| 18 | uncaught C++ exception from the package's BVH builder DLL | #5680 (zzEmmazz, closed) plus the 52 embedded programs translated by hand into a work folder; #7180 (KkelebekK, zlib DirectStorage) changes nothing before it | 6.6, then 31.9 in stop mode | 687, then 1,091 |
+| 19 | `int3` after device slots 39, 27, 41 | local stand-ins (section 2.2) | 7 (log mode) | 686 |
+
+Our #6279 (narrow MUBUF stores) is byte-identical on the 52 programs to what main already produces thanks to
+#1864 (LouisRiverstone): it changes nothing on the boot path (measured, comment on #6279).
+
+All rows above are **measured**. The causes in the "what the title does there" column are measured for the first
+six (see the first note) and deduced from the call site for the later ones.
+
+### 2.1 Cross-checks of other people's pull requests (same machine, same stack)
+
+We posted measured comments, as tester, on the pull requests below. They do not change the table, they add
+independent runs. All of them end with the same four ctest failures of section 1.
+
+| PR | Result | Note |
+| --- | --- | --- |
+| #6935 (Kam471) | queue `Flags` measurement | the three queues are created once `Flags &= 0x1` |
+| #7006 | pass, with a note | without `LEONIDA_FFX_PC=1` the upscaler flag hooks nothing, contrary to the PR text; the picker is never reached on that base |
+| #6986 | pass | 154 `xgameruntime_test` checks |
+| #8003 and #7896 (Spacecer2) | #8003 pass, 342 checks, `GameInput.dll!#1` binds to the shim | the two add the same table row: a merge keeps it twice, the second to land must drop its row |
+| #8033, #8055, #8043, #8023, #7937 | pass on NVIDIA (the previous checks were on AMD or GTX 1070) | #8033: nothing fails without the change, a small teardown test would pin it. #8043: 601 state cases compared with the host, 0 differ. #7937: 119 display modes on slot 21 |
+| #7969 (on #7490) | the commit passes, the stack fails `queue_proxy` 3 of 3 | the failure comes from #7490 (tedin7), as sgonzalez-glitch reported |
+| #7095 | pass (`inline_scan`: 18 tests) | see the limits in section 5.5 |
+
+### 2.2 Local stand-ins, never published
+
+The third pass (frame loop) used private patches to find the next stop. They are listed so nobody reads the
+results below as the effect of public pull requests alone.
+
+| Stand-in | Effect | Status |
+| --- | --- | --- |
+| list slot 139 answers like `Reset` | the title's list reset works (the same as #2490's idea) | measured |
+| slot 133 state word read as a barrier layout; depth-stencil with UAV created without the UAV flag; fallback to a committed resource when the page import of #7218 fails | passes the first `int3` after slot 133 | measured |
+| `LEONIDA_SKIP_INT3=1` | the title continues past one in-image `int3` that follows slot 25 | measured |
+| `TF_LENIENT` (what #7007 intended) | a list with an invalid draw is still submitted | measured |
+
+## 3. From the first draw to the frame loop
+
+The same machine, native, Vulkan backend. The base is Leonida `main` `dde82f27` plus the boot-path PRs (#7201,
+#7323, #7759, #7286, #7290, #7111, #7403, #7417, #7529, #7581, #6891, #7685, #7356, #7880, #7448, #7218, #7949,
+#6885, #6981), plus the stand-ins of section 2.2. The runs are numbered in our journal; the table keeps what bears on
+the result.
+
+| Run | Result | Time (s) | Peak |
+| --- | --- | --- | --- |
+| stubs only (no translated shaders) | 4 `PresentX`, then a host access violation (null write); the arena is full without `LEONIDA_ARENA_MB` | 40 to 110 | 2 to 6 GB |
+| with the translated shaders | 300 s loop; 53,830 pipelines created, 602 refused; at least 16 `PresentX` (about one every 10 s, the rest is compilation); 0 call of device slot 55 | 307 | 13.4 GB |
+| lists executed | 0 draw: the frame list fails `Close`, so is never submitted; window white | 224 | 14 GB |
+| lenient lists | `Close`: 661 ok, 0 failures; 17 batches executed with a clear and two rectangle-list draws | 200 | not recorded |
+| with the swap chain checks | `PresentX` fails 16 of 16 with `E_INVALIDARG` (the frame token is never issued); at least 2,048 pipelines refused "as AS" (no VS, no MS) | 150 | not recorded |
+| with the frame tokens of #7685 (Cattn) | `PresentX` succeeds; the window, made visible by hand, is 100 percent black | 160 | not recorded |
+| type 24 read as VS (local, since disproved, section 6) | refusals 602 to 219 on two different stacks, then 3,140 to 219 with the stub option, see section 6 | 160 | not recorded |
+
+Other stacks, same machine:
+
+| Stack | Result | Status |
+| --- | --- | --- |
+| main `dde82f27` plus #7201 #7323 #7759 #7286 #7290 #7356 #7880 #7448 #7218 #7949 #6885 #6981, list slot 139 as `Reset` | 4 `PresentX` (R8G8B8A8 3840 by 2160, render target and UAV, double buffered), then an access violation. #7218's import of the slot 133 buffers onto the title's pages works on NVIDIA but needs `LEONIDA_ARENA_MB=4095`. Under `LEONIDA_STUB_PIPELINES` every draw is refused (pipeline 0) | measured |
+| base `rt5-integration` (tibzejoker) plus #7759 plus #8815 | without slot 57 served, the title loops on slot 57: `CreateLifetimeTracker` refuses more than 3,600 calls in 5 minutes, 0 call of slot 55, 0 `PresentX`. With #8890 (RipcuBAN: slot 57 returns `E_INVALIDARG` for lack of `fspx_gfx`) the loop advances: more than 3,300 `CreatePipelineState` succeed in 5 minutes. Without the `AcpHal` shim (#6885, #6981 by Jadiac5) an access violation follows `ApuCreateHeap` | measured |
+| maintainers' forge `main` `2ac38583` | `gta6rt` builds; the shader stage was still running at the end of the day (estimated 1 h 30). No frame result yet | measured (build), pending (runs) |
+
+Measured by others, on forge `main` once slot 55 is in (#7759): Yoshi-OOF counts 41,545 successful derivations once
+the slot 57 base objects are kept. lines9686-rgb and sh1shu1 run the same frame loop and give the two Vulkan
+messages of section 5.6 and the mesh shader A/B of section 5.3. The title draws on forge `main`; the images stay
+black (maintainer's report and issue #8851).
+
+### 3.1 Pipeline compilation
+
+The maintainer reports that compiling the title's pipelines takes about 25 s on a cold run and under 1 s when the
+driver's pipeline cache is warm, on this machine. The log of those runs is not among the files read for this note,
+so the two figures are **reported, not re-checked here**. For scale, the shader count and the 31.9 s of stop 18
+(52 compute programs created, 1,091 MB) are measured. The 26,503 translated shaders and the 53,830 pipelines of the
+300 s run above come from different runs and must not be divided into each other.
+
+## 4. The four measured causes of the black frames
+
+Native, NVIDIA, frame loop. Each cause was measured by switching it on or off; the table gives what clears it and
+who wrote that.
+
+| # | Cause | Measurement | Clears it | Status |
+| --- | --- | --- | --- | --- |
+| 1 | `PresentX` fails with `E_INVALIDARG` | 16 of 16 calls fail while the device has no frame token | #7685 (Cattn): device-side `WaitFrameEventX` and the pacer share one token. With it `PresentX` returns success | measured |
+| 2 | The window is never visible | `IsWindowVisible` is 0 for the whole run; the title never shows its window | local `TF_SHOW` only; no public PR identified | measured |
+| 3 | The frame list never reaches the queue | a draw or dispatch is recorded without a pipeline, so `Close` returns `E_INVALIDARG` and the list is not submitted | #7007 (lines9686-rgb, closed) together with #7417 (rafaelpssz, `LEONIDA_STUB_PIPELINES`): with the lenient mode, `Close` succeeds 661 times of 661 | measured |
+| 4 | Pipelines refused at creation | at least 2,048 device slot 86 streams arrive with subobject type 24, no VS and no MS, a pixel shader and a triangle topology; they were refused as amplification shaders | taking type 24 as the mesh shader (section 5.3, sh1shu1 and lines9686-rgb) | measured; the fix is the one corrected after our wrong reading, section 6 |
+
+After causes 1 to 3, a triangle draw (topology 4, count 3, one instance) still has no pipeline: it needs a title
+vertex program that is embedded and not yet translated (#7746 by Faterek). Codex checked two traces and found the
+same refused draw with pipeline 0 and root signature 1; the same lines show two recorded draws with topology 17
+(rectangle lists), and `PresentX` returning 0. This confirms the symptom, not the identity of the shader nor a single
+cause of the black screen (static reading by Codex, measured counts).
+
+## 5. Static findings
+
+All of this is **deduced statically**, by Claude (REA 6.10.1, capstone, targeted Ghidra decompilation) and by Codex
+(Ghidra, capstone, a synthetic C++ test), on our own copy. Slot numbers are the vtable index of the console device,
+list or queue. Where Codex gives a limit, the limit is kept.

P1 Badge Keep private executable-derived findings out of the public notes

Section 5 explicitly sources new ABI layouts and control-flow findings from targeted decompilation of a private commercial executable, rather than an allowed public source. This violates AGENTS.md's “Public sources only” rule even though raw code and executable bytes are omitted; section 7 also proposes using these private findings to construct repository tests. Remove the privately derived details from both language versions, or replace them with findings supported by the permitted public documentation or compatibly licensed source code before using them as implementation inputs.

AGENTS.md reference: AGENTS.md:L47-L47

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:review-comment:4672689220 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/110#discussion_r4672689220). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-23T22:09:16Z. **Code review location:** `docs/research/leonida-boot-2026-11-23.md`; line 163 ~~~~diff @@ -0,0 +1,296 @@ +> Français : [demarrage-leonida-2026-11-23.md](../fr/recherche/demarrage-leonida-2026-11-23.md) + +# Booting 1.0.2.1 under Leonida, 23 November 2026: stops, black frames, static findings + +State as of the evening of 23 November 2026. This note files the research of that day (Claude and Codex, on the +maintainer's machine) on the boot of build 1.0.2.1 under [Leonida](https://github.com/ItsNotRexed/Leonida)'s +`gta6rt`, from the first stop to the frame loop. It continues [first-boot-1021.md](first-boot-1021.md), which stops at +the first six stops and the work list for AnyXboxX. Neighbours in general: [neighbors.md](neighbors.md); Leonida's +GTA 6 notes: [leonida-gta6.md](leonida-gta6.md). + +**Rule 1 of [AGENTS.md](../../AGENTS.md) applies, and more strictly than in the first note.** This note holds +vtable slot numbers, flag values, HRESULTs, public SDK type names, PR numbers, counts, times and memory sizes. It +holds no address or offset of the executable, no disassembled or decompiled code, no byte, no string, no file or +shader name of the package, no raw log and no hash of a shader. Descriptor layouts are given as field positions of +public SDK structures, never as code. The local reports behind it (REA, Ghidra and capstone by Claude, Codex's +reports, launch logs) stay outside the repository, as do the names of their files. + +**Three levels, in every table.** + +| Label | Meaning | +| --- | --- | +| measured | observed on a run, or read from a tool's output by a method anyone can repeat. Says who measured. | +| deduced statically | read from the executable without running it (targeted decompilation, disassembly). Direct calls only, so it is a lower bound; no reachability is proven | +| assumed | inferred from the two above, from a name, or true on one configuration only | + +Measurements are ours unless a name is given. Names are GitHub logins of [Leonida](https://github.com/ItsNotRexed/Leonida) +participants; their numbering of the stops is not ours unless said. + +## 1. Set-up of the measurements + +| Item | Value | Status | +| --- | --- | --- | +| Machine | Windows 11 (build 26300), Core i7-13700KF, RTX 4070 SUPER (driver 610.88), native, no Wine | measured | +| Runtime | `gta6rt`, MSVC RelWithDebInfo, `LEONIDA_D3D12=vulkan` from the second pass on | measured | +| Executable | the 1.0.2.1 build already described (SHA-256 starting `e95020b2`), own copy, package read-only | measured | +| Stacks | Leonida `main` at various dates (`1cc6e3c1`, then `ec0e01c5`, then `dde82f27`) with open pull requests merged locally, conflicts resolved by hand, **only `gta6rt` built, the PRs' own tests not run** unless a PR comment says so | measured | +| Later base | the maintainers' forge `main` (`2ac38583`, contains #7759), journal in issue #8851 | measured | +| Shaders | `make_game --stages shaders`: 26,503 translated in 32 min on one stack (wave64 tiers: A 236, B 7, C 425 for VS, PS, GS) | measured | +| Environment variables of the loop runs | `LEONIDA_ARENA_MB=4095` (otherwise `E_OUTOFMEMORY`), `LEONIDA_STUB_PIPELINES=1` for some runs, `LEONIDA_SKIP_INT3=1` for one in-image `int3` | measured | + +Ordinary test results at rest on this machine, main `dde82f27`: ctest 268 of 272. The four failures are +`d3d12_vulkan_device` (a `tiles == 1` check), `d3d12_indirect_dispatch_count`, `d3d12_depth_resolve` and +`d3d12_indirect_rt`; they fail the same way on main and are not caused by the PRs we tested. Without SDL3 the +GameInput shim is not built (ctest reports `gameinput` as disabled): `-DLEONIDA_SDL3_FETCH=ON` builds it. measured. + +## 2. The measured chain, stop by stop + +Each row is the stop met after adding the pull request of the previous row to the local stack. "t" is wall time +to the stop, "peak" is the peak working set. Numbers 1 to 6 are those of [first-boot-1021.md](first-boot-1021.md); +numbers 13 to 19 are KkelebekK's (Linux, Wine, #6910). Pull requests belong to the people named; "ours" marks the +ones we wrote. + +| Stop | What the title does there | Cleared by | t (s) | Peak (MB) | +| --- | --- | --- | --- | --- | +| 1, 2 | `D3D12ConfigureVirtualMemoryX` absent, then `XMemVirtualAlloc` of the init refused | #6792 (undeadhuman37), then the attribute-word forms of #6709 (Stalkerino), #4531 (labj1987), #6919 (NiiRoZz) | 6.3 to 8.3 | 238 | +| (log mode) | `XErrorReport` not exported by the shim: `WinMain` takes the failure branch | #6582 (Kam471) | 4.9 to 7.2 | 238 | +| 24 | `DStorageGetFactory` unimplemented | #4348 (mariuslozo-boop) with #4313 (TLS index) | 3.1 to 6.5 | 237 | +| (host) | access violation in the host after `XMemAllocatePhysicalPages` (0x280 requested, 11,360 pages), device slot 26 | #6964 (sennecools); the Vulkan backend raises the peak from 395 to 687 MB | 7.0 to 9.8 | 395, then 687 | +| 4 | device slot 48, queue `Flags` `0x2`, `0x3` | #6954 (Pipodi) | 7.4 | 687 | +| 5 | device slot 73, console list IID | #7076 (NiiRoZz), with #6953 (Pipodi) and #2490 (NolanCotter). #6953 and #2490 alone left the stop | 7.0 to 8.2 | 687 | +| after 6 | device slot 133 `E_NOTIMPL` "beyond the PC vtable" | #7075 (NiiRoZz) | 6.8 to 7.1 | 687 | +| 13 | descriptor heap slot 9, `GetCPUDescriptorHandleForHeapStart` | #7021 (Khuraie); the title then goes through slots 17, 18, 19 | 6.5 | 687 | +| (host) | host write access violation at the first slot 70 call | #7066 (tedin7) | 6.5 to 6.9 | 687 | +| (host) | read access violation at address -1, first slot 25 call | #7110 (tedin7). Merge note: it and #6964 both define the helper `proxy_get_custom_heap_properties`; together the file does not compile (`C2440`) | 7.1 | 687 | +| 16 | slot 127 `E_NOTIMPL`, then `int3` | #7052 (tedin7) | 6.9 to 7.0 | 687 | +| 17 | budget test after the render targets | #7235 (NiiRoZz): 33,423,360 bytes per target on this GPU. #7115 (slot 61, mrp1no) changes nothing here because the stop comes before slot 61 | 6.7 to 6.9 | 687 | +| 18 | uncaught C++ exception from the package's BVH builder DLL | #5680 (zzEmmazz, closed) plus the 52 embedded programs translated by hand into a work folder; #7180 (KkelebekK, zlib DirectStorage) changes nothing before it | 6.6, then 31.9 in stop mode | 687, then 1,091 | +| 19 | `int3` after device slots 39, 27, 41 | local stand-ins (section 2.2) | 7 (log mode) | 686 | + +Our #6279 (narrow MUBUF stores) is byte-identical on the 52 programs to what main already produces thanks to +#1864 (LouisRiverstone): it changes nothing on the boot path (measured, comment on #6279). + +All rows above are **measured**. The causes in the "what the title does there" column are measured for the first +six (see the first note) and deduced from the call site for the later ones. + +### 2.1 Cross-checks of other people's pull requests (same machine, same stack) + +We posted measured comments, as tester, on the pull requests below. They do not change the table, they add +independent runs. All of them end with the same four ctest failures of section 1. + +| PR | Result | Note | +| --- | --- | --- | +| #6935 (Kam471) | queue `Flags` measurement | the three queues are created once `Flags &= 0x1` | +| #7006 | pass, with a note | without `LEONIDA_FFX_PC=1` the upscaler flag hooks nothing, contrary to the PR text; the picker is never reached on that base | +| #6986 | pass | 154 `xgameruntime_test` checks | +| #8003 and #7896 (Spacecer2) | #8003 pass, 342 checks, `GameInput.dll!#1` binds to the shim | the two add the same table row: a merge keeps it twice, the second to land must drop its row | +| #8033, #8055, #8043, #8023, #7937 | pass on NVIDIA (the previous checks were on AMD or GTX 1070) | #8033: nothing fails without the change, a small teardown test would pin it. #8043: 601 state cases compared with the host, 0 differ. #7937: 119 display modes on slot 21 | +| #7969 (on #7490) | the commit passes, the stack fails `queue_proxy` 3 of 3 | the failure comes from #7490 (tedin7), as sgonzalez-glitch reported | +| #7095 | pass (`inline_scan`: 18 tests) | see the limits in section 5.5 | + +### 2.2 Local stand-ins, never published + +The third pass (frame loop) used private patches to find the next stop. They are listed so nobody reads the +results below as the effect of public pull requests alone. + +| Stand-in | Effect | Status | +| --- | --- | --- | +| list slot 139 answers like `Reset` | the title's list reset works (the same as #2490's idea) | measured | +| slot 133 state word read as a barrier layout; depth-stencil with UAV created without the UAV flag; fallback to a committed resource when the page import of #7218 fails | passes the first `int3` after slot 133 | measured | +| `LEONIDA_SKIP_INT3=1` | the title continues past one in-image `int3` that follows slot 25 | measured | +| `TF_LENIENT` (what #7007 intended) | a list with an invalid draw is still submitted | measured | + +## 3. From the first draw to the frame loop + +The same machine, native, Vulkan backend. The base is Leonida `main` `dde82f27` plus the boot-path PRs (#7201, +#7323, #7759, #7286, #7290, #7111, #7403, #7417, #7529, #7581, #6891, #7685, #7356, #7880, #7448, #7218, #7949, +#6885, #6981), plus the stand-ins of section 2.2. The runs are numbered in our journal; the table keeps what bears on +the result. + +| Run | Result | Time (s) | Peak | +| --- | --- | --- | --- | +| stubs only (no translated shaders) | 4 `PresentX`, then a host access violation (null write); the arena is full without `LEONIDA_ARENA_MB` | 40 to 110 | 2 to 6 GB | +| with the translated shaders | 300 s loop; 53,830 pipelines created, 602 refused; at least 16 `PresentX` (about one every 10 s, the rest is compilation); 0 call of device slot 55 | 307 | 13.4 GB | +| lists executed | 0 draw: the frame list fails `Close`, so is never submitted; window white | 224 | 14 GB | +| lenient lists | `Close`: 661 ok, 0 failures; 17 batches executed with a clear and two rectangle-list draws | 200 | not recorded | +| with the swap chain checks | `PresentX` fails 16 of 16 with `E_INVALIDARG` (the frame token is never issued); at least 2,048 pipelines refused "as AS" (no VS, no MS) | 150 | not recorded | +| with the frame tokens of #7685 (Cattn) | `PresentX` succeeds; the window, made visible by hand, is 100 percent black | 160 | not recorded | +| type 24 read as VS (local, since disproved, section 6) | refusals 602 to 219 on two different stacks, then 3,140 to 219 with the stub option, see section 6 | 160 | not recorded | + +Other stacks, same machine: + +| Stack | Result | Status | +| --- | --- | --- | +| main `dde82f27` plus #7201 #7323 #7759 #7286 #7290 #7356 #7880 #7448 #7218 #7949 #6885 #6981, list slot 139 as `Reset` | 4 `PresentX` (R8G8B8A8 3840 by 2160, render target and UAV, double buffered), then an access violation. #7218's import of the slot 133 buffers onto the title's pages works on NVIDIA but needs `LEONIDA_ARENA_MB=4095`. Under `LEONIDA_STUB_PIPELINES` every draw is refused (pipeline 0) | measured | +| base `rt5-integration` (tibzejoker) plus #7759 plus #8815 | without slot 57 served, the title loops on slot 57: `CreateLifetimeTracker` refuses more than 3,600 calls in 5 minutes, 0 call of slot 55, 0 `PresentX`. With #8890 (RipcuBAN: slot 57 returns `E_INVALIDARG` for lack of `fspx_gfx`) the loop advances: more than 3,300 `CreatePipelineState` succeed in 5 minutes. Without the `AcpHal` shim (#6885, #6981 by Jadiac5) an access violation follows `ApuCreateHeap` | measured | +| maintainers' forge `main` `2ac38583` | `gta6rt` builds; the shader stage was still running at the end of the day (estimated 1 h 30). No frame result yet | measured (build), pending (runs) | + +Measured by others, on forge `main` once slot 55 is in (#7759): Yoshi-OOF counts 41,545 successful derivations once +the slot 57 base objects are kept. lines9686-rgb and sh1shu1 run the same frame loop and give the two Vulkan +messages of section 5.6 and the mesh shader A/B of section 5.3. The title draws on forge `main`; the images stay +black (maintainer's report and issue #8851). + +### 3.1 Pipeline compilation + +The maintainer reports that compiling the title's pipelines takes about 25 s on a cold run and under 1 s when the +driver's pipeline cache is warm, on this machine. The log of those runs is not among the files read for this note, +so the two figures are **reported, not re-checked here**. For scale, the shader count and the 31.9 s of stop 18 +(52 compute programs created, 1,091 MB) are measured. The 26,503 translated shaders and the 53,830 pipelines of the +300 s run above come from different runs and must not be divided into each other. + +## 4. The four measured causes of the black frames + +Native, NVIDIA, frame loop. Each cause was measured by switching it on or off; the table gives what clears it and +who wrote that. + +| # | Cause | Measurement | Clears it | Status | +| --- | --- | --- | --- | --- | +| 1 | `PresentX` fails with `E_INVALIDARG` | 16 of 16 calls fail while the device has no frame token | #7685 (Cattn): device-side `WaitFrameEventX` and the pacer share one token. With it `PresentX` returns success | measured | +| 2 | The window is never visible | `IsWindowVisible` is 0 for the whole run; the title never shows its window | local `TF_SHOW` only; no public PR identified | measured | +| 3 | The frame list never reaches the queue | a draw or dispatch is recorded without a pipeline, so `Close` returns `E_INVALIDARG` and the list is not submitted | #7007 (lines9686-rgb, closed) together with #7417 (rafaelpssz, `LEONIDA_STUB_PIPELINES`): with the lenient mode, `Close` succeeds 661 times of 661 | measured | +| 4 | Pipelines refused at creation | at least 2,048 device slot 86 streams arrive with subobject type 24, no VS and no MS, a pixel shader and a triangle topology; they were refused as amplification shaders | taking type 24 as the mesh shader (section 5.3, sh1shu1 and lines9686-rgb) | measured; the fix is the one corrected after our wrong reading, section 6 | + +After causes 1 to 3, a triangle draw (topology 4, count 3, one instance) still has no pipeline: it needs a title +vertex program that is embedded and not yet translated (#7746 by Faterek). Codex checked two traces and found the +same refused draw with pipeline 0 and root signature 1; the same lines show two recorded draws with topology 17 +(rectangle lists), and `PresentX` returning 0. This confirms the symptom, not the identity of the shader nor a single +cause of the black screen (static reading by Codex, measured counts). + +## 5. Static findings + +All of this is **deduced statically**, by Claude (REA 6.10.1, capstone, targeted Ghidra decompilation) and by Codex +(Ghidra, capstone, a synthetic C++ test), on our own copy. Slot numbers are the vtable index of the console device, +list or queue. Where Codex gives a limit, the limit is kept. ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Keep private executable-derived findings out of the public notes** Section 5 explicitly sources new ABI layouts and control-flow findings from targeted decompilation of a private commercial executable, rather than an allowed public source. This violates AGENTS.md's “Public sources only” rule even though raw code and executable bytes are omitted; section 7 also proposes using these private findings to construct repository tests. Remove the privately derived details from both language versions, or replace them with findings supported by the permitted public documentation or compatibly licensed source code before using them as implementation inputs. AGENTS.md reference: [AGENTS.md:L47-L47](https://github.com/LooperSalty/AnyXboxX/blob/230666710794fe94cd0d390635606a1f9538cc7a/AGENTS.md#L47-L47) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
LooperSalty commented 2026-11-23 22:49:38 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-23T22:49:38Z.


Réponse à la revue automatique (P1 « Keep private executable-derived findings out of the public notes ») : la remarque est juste au regard de la règle 2 actuelle d'AGENTS.md. Décision du mainteneur : la règle est assouplie sur le modèle de Leonida (constats d'interopérabilité sur une copie possédée légalement : noms d'exports, slots, formes d'arguments, flags, HRESULT, IID, comptes, chacun étiqueté mesuré / lu statiquement / supposé ; jamais de code, d'octets, d'adresses, de chaînes, de shaders ni de logs du jeu). La PR qui change la règle et nettoie les notes déjà fusionnées suit ; celle-ci sera fusionnée après elle, et vérifiée contre la nouvelle règle.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7116228718 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/110#issuecomment-7116228718). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-23T22:49:38Z. --- Réponse à la revue automatique (P1 « Keep private executable-derived findings out of the public notes ») : la remarque est juste au regard de la règle 2 actuelle d'AGENTS.md. Décision du mainteneur : la règle est assouplie sur le modèle de Leonida (constats d'interopérabilité sur une copie possédée légalement : noms d'exports, slots, formes d'arguments, flags, HRESULT, IID, comptes, chacun étiqueté mesuré / lu statiquement / supposé ; jamais de code, d'octets, d'adresses, de chaînes, de shaders ni de logs du jeu). La PR qui change la règle et nettoie les notes déjà fusionnées suit ; celle-ci sera fusionnée après elle, et vérifiée contre la nouvelle règle.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LooperSalty/AnyXboxX!110
No description provided.