docs(d3d12_vulkan): measured presentation slots 78-81 (D3D12-PRESENT-SLOTS-MEASURED) #1125

Merged
robot00f merged 1 commit from upstream-pr/1125 into main 2026-11-29 21:12:40 +00:00
robot00f commented 2026-11-24 18:56:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by robot00f on 2026-11-24T18:56:05Z.


Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140229785 (D3D12-PRESENT-SLOTS-MEASURED)

What

Measured the four device presentation slots of the GDKX ABI in game_scarlett_master.exe, statically, and recorded it
in docs/d3d12_vulkan.md §7.1 (new Measured block with a per-site table) and in the three rows that still said
"Open" (§4.9 rows "PresentX / present planes / frame events", "Device slots 48/73/78/79/80" and "Device slot 81 …",
plus §8.2 item 6).

Result: 78, 79, 80 and 81 are all really called, each from the frame/present code, each on the same device pointer
(the BSS global 0x148759D00, the same global the layer's known device calls use, e.g. CreateCommittedResource at
slot 27) and each at the arity the public HLE documents:

slot offset raw sites device sites arguments (receiver rcx omitted)
78 0x270 31 1 rdx=0, r8d=latency, r9d=2/3, [rsp+0x20]=0
79 0x278 40 3 event 0/2, r8=offset/0, r9=0, [rsp+0x20]=0
80 0x280 42 3 event 0/2, r8d=INFINITE, r9=0, [rsp+0x20]=flags 0/2, [rsp+0x28]=token out
81 0x288 522 1 rdx=token, r8d=0x11100 mask, r9=&count (6), [rsp+0x20]=&stats

So the env-var guesses in the proxy (LEONIDA_XS_FRAME_INTERVAL_SLOT, _SCHEDULE_EVENT_SLOT, _WAIT_EVENT_SLOT,
_FRAME_STATISTICS_SLOT) name the slots the game really calls, at these shapes. The statistic call even walks the
returned FRAME_INTERVAL/FRAME_EVENT entries afterwards.

Why

The rows and §7.1 listed the presentation slots as unknown while every other measured slot has a site table. This
closes the "which slots, what arity, which receiver" half; the plane/parameter struct layouts and the queue
PresentX/SuspendX/ResumeX slots stay Open (they are not device slots and are not in this set).

Tested

  • python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md → 0
  • python -I tests/test_docs_links.py → OK (16 tests)
  • python -I tests/test_docs_table_rows.py → OK (2 tests)
  • Measurement was static only (capstone over the vt_calls index plus a Ghidra/capstone cross-check); the exe was not
    run. Ghidra MCP was not needed: capstone was enough for the receiver chains.

GPUs tested: n/a

AI-assisted: yes (OpenCode)

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5478397774 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1125). Originally posted by [robot00f](https://github.com/robot00f) on 2026-11-24T18:56:05Z. --- Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140229785 (`D3D12-PRESENT-SLOTS-MEASURED`) ## What Measured the four device presentation slots of the GDKX ABI in `game_scarlett_master.exe`, statically, and recorded it in `docs/d3d12_vulkan.md` §7.1 (new **Measured** block with a per-site table) and in the three rows that still said "Open" (§4.9 rows "PresentX / present planes / frame events", "Device slots 48/73/78/79/80" and "Device slot 81 …", plus §8.2 item 6). Result: **78, 79, 80 and 81 are all really called**, each from the frame/present code, each on the same device pointer (the BSS global `0x148759D00`, the same global the layer's known device calls use, e.g. `CreateCommittedResource` at slot 27) and each at the arity the public HLE documents: | slot | offset | raw sites | device sites | arguments (receiver `rcx` omitted) | |---:|---|---:|---:|---| | 78 | `0x270` | 31 | 1 | `rdx`=0, `r8d`=latency, `r9d`=2/3, `[rsp+0x20]`=0 | | 79 | `0x278` | 40 | 3 | event 0/2, `r8`=offset/0, `r9`=0, `[rsp+0x20]`=0 | | 80 | `0x280` | 42 | 3 | event 0/2, `r8d`=INFINITE, `r9`=0, `[rsp+0x20]`=flags 0/2, `[rsp+0x28]`=token out | | 81 | `0x288` | 522 | 1 | `rdx`=token, `r8d`=0x11100 mask, `r9`=&count (6), `[rsp+0x20]`=&stats | So the env-var guesses in the proxy (`LEONIDA_XS_FRAME_INTERVAL_SLOT`, `_SCHEDULE_EVENT_SLOT`, `_WAIT_EVENT_SLOT`, `_FRAME_STATISTICS_SLOT`) name the slots the game really calls, at these shapes. The statistic call even walks the returned `FRAME_INTERVAL`/`FRAME_EVENT` entries afterwards. ## Why The rows and §7.1 listed the presentation slots as unknown while every other measured slot has a site table. This closes the "which slots, what arity, which receiver" half; the plane/parameter struct layouts and the queue `PresentX`/`SuspendX`/`ResumeX` slots stay **Open** (they are not device slots and are not in this set). ## Tested - `python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md` → 0 - `python -I tests/test_docs_links.py` → OK (16 tests) - `python -I tests/test_docs_table_rows.py` → OK (2 tests) - Measurement was static only (capstone over the `vt_calls` index plus a Ghidra/capstone cross-check); the exe was not run. Ghidra MCP was not needed: capstone was enough for the receiver chains. GPUs tested: n/a AI-assisted: yes (OpenCode)
abnalstlll-byte commented 2026-11-24 19:16:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:16:39Z.

Review: APPROVED


Reviewed and verified. Conclusively confirms that Xbox device presentation slots 78 (frame latency), 79 (schedule frame event), 80 (wait frame event), and 81 (frame statistics) are actively called by the game executable on device global 0x148759D00. Accurately documents their exact argument layouts, offsets, and receiver chains in docs/d3d12_vulkan.md §7.1. Clean-room compliant.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045745258 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1125#pullrequestreview-6045745258). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T19:16:39Z. **Review:** APPROVED --- Reviewed and verified. Conclusively confirms that Xbox device presentation slots 78 (frame latency), 79 (schedule frame event), 80 (wait frame event), and 81 (frame statistics) are actively called by the game executable on device global `0x148759D00`. Accurately documents their exact argument layouts, offsets, and receiver chains in `docs/d3d12_vulkan.md §7.1`. Clean-room compliant.
Deedlyy commented 2026-11-24 20:15:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:15:25Z.


Recommendation: [MERGE]

Reasoning: Docs: records static measurements showing presentation slots 78-81 are all called from the frame/present path on the device global, and updates the rows that still said "Open". Documentation only, with per-site evidence. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7143260282 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1125#issuecomment-7143260282). Originally posted by [Deedlyy](https://github.com/Deedlyy) on 2026-11-24T20:15:25Z. --- **Recommendation:** [MERGE] **Reasoning:** Docs: records static measurements showing presentation slots 78-81 are all called from the frame/present path on the device global, and updates the rows that still said "Open". Documentation only, with per-site evidence. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
robot00f commented 2026-11-25 15:48:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by robot00f on 2026-11-25T15:48:33Z.


Rebased onto origin/main to resolve the conflicts in docs/d3d12_vulkan.md (§4.9 and §8.2), keeping the new Xbox device/queue rows and runtime slot-81 behavior alongside the measured presentation-slot 78–81 updates. Verified with check_no_game_data.py, test_docs_links.py, test_docs_table_rows.py, and the remaining test_docs_*.py / test_i18n_index.py checks.

AI-assisted: yes (Antigravity)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167332322 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1125#issuecomment-7167332322). Originally posted by [robot00f](https://github.com/robot00f) on 2026-11-25T15:48:33Z. --- Rebased onto `origin/main` to resolve the conflicts in `docs/d3d12_vulkan.md` (§4.9 and §8.2), keeping the new Xbox device/queue rows and runtime slot-81 behavior alongside the measured presentation-slot 78–81 updates. Verified with `check_no_game_data.py`, `test_docs_links.py`, `test_docs_table_rows.py`, and the remaining `test_docs_*.py` / `test_i18n_index.py` checks. AI-assisted: yes (Antigravity)
zmasi commented 2026-11-29 00:08:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:08:47Z.


Native Windows 11 Verification (0f61686696) — PASS

Diff-audited docs/d3d12_vulkan.md (+25/-7) and verified merged onto origin/main (829530dbd0) on Windows 11 (10.0.26200, Python 3.12.10 with -I).

Results

  • Technical & Multi-PR Merge Check:
    • Verified all four presentation device vtable slot / byte-offset pairs (slot 78 -> 0x270, slot 79 -> 0x278, slot 80 -> 0x280, slot 81 -> 0x288 — exact slot * 8 x64 vtable offsets) and their SetFrameIntervalX / ScheduleFrameEventX / WaitFrameEventX / GetFrameStatisticsX arities against runtime/shims/d3d12_xs_device.cpp.
    • Confirmed clean automatic merge (rc=0, 0 conflicts) both onto origin/main (829530dbd0) and simultaneously alongside open PR #1007 on docs/d3d12_vulkan.md.
  • Documentation & Policy Suites:
    • Verified 0 PR-introduced issues across tests/test_docs_links.py (including the new #71-what-this-confirms-corrects-and-narrows anchor), tests/test_docs_adjacent_fenced_blocks.py, tests/test_docs_design_rows.py, tests/test_docs_encoding.py, tests/test_docs_env_vars.py, tests/test_docs_list_items.py, tests/test_docs_pr_template.py, tests/test_docs_python_deps.py, tests/test_docs_repeated_lines.py, tests/test_docs_repo_paths.py, tests/test_docs_table_ids.py, tests/test_docs_table_rows.py, tests/test_text_write_line_endings.py (3/3), and scripts/check_no_game_data.py.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247907428 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1125#issuecomment-7247907428). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:08:47Z. --- ### Native Windows 11 Verification (`0f61686696`) — PASS Diff-audited `docs/d3d12_vulkan.md` (`+25/-7`) and verified merged onto `origin/main` (`829530dbd0`) on Windows 11 (`10.0.26200`, Python `3.12.10` with `-I`). #### Results - **Technical & Multi-PR Merge Check**: - Verified all four presentation device vtable slot / byte-offset pairs (`slot 78 -> 0x270`, `slot 79 -> 0x278`, `slot 80 -> 0x280`, `slot 81 -> 0x288` — exact `slot * 8` x64 vtable offsets) and their `SetFrameIntervalX` / `ScheduleFrameEventX` / `WaitFrameEventX` / `GetFrameStatisticsX` arities against `runtime/shims/d3d12_xs_device.cpp`. - Confirmed clean automatic merge (`rc=0`, `0` conflicts) both onto `origin/main` (`829530dbd0`) and simultaneously alongside open PR `#1007` on `docs/d3d12_vulkan.md`. - **Documentation & Policy Suites**: - Verified **`0` PR-introduced issues** across `tests/test_docs_links.py` (including the new `#71-what-this-confirms-corrects-and-narrows` anchor), `tests/test_docs_adjacent_fenced_blocks.py`, `tests/test_docs_design_rows.py`, `tests/test_docs_encoding.py`, `tests/test_docs_env_vars.py`, `tests/test_docs_list_items.py`, `tests/test_docs_pr_template.py`, `tests/test_docs_python_deps.py`, `tests/test_docs_repeated_lines.py`, `tests/test_docs_repo_paths.py`, `tests/test_docs_table_ids.py`, `tests/test_docs_table_rows.py`, `tests/test_text_write_line_endings.py` (`3/3`), and `scripts/check_no_game_data.py`. AI-assisted.
enlight3d commented 2026-11-29 09:04:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T09:04:56Z.


RUN of #1125 (docs only: no ctest, no build, no red)

Heads: PR head 0f616866965a, main 54b2a81e95c4. Tested as main + PR head (git merge --no-ff, local only): merged cleanly, no conflicts. The PR changes one file, docs/d3d12_vulkan.md; it has no ctest test, so there is no red and I built nothing (no source file changes, so gta6rt.exe's imports cannot change: no new imports vs main).

Checks run from the worktree root, one process each (python -I tests/<file>), on main and on main + PR: the 16 files matching tests/test_docs_*.py plus test_i18n_index.py, test_ctest_registration.py and test_text_write_line_endings.py; and python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md (exit 0).

  • Same result on main and on main + PR: 14 files OK (including test_docs_table_rows.py, test_docs_table_ids.py, test_docs_design_rows.py, test_docs_repo_paths.py, test_docs_env_vars.py) and 2 failures that are already there on plain main and are not about this file: test_docs_links.py (a relative link in d3d12/README.md) and test_docs_cli_flags.py (a fenced PowerShell command using a flag its script lacks).
  • I did not re-measure the disassembly claims (slots 78 to 81, call-site counts); that needs the game executable, which this check does not use.

Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12; the GPU was not used.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253523769 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1125#issuecomment-7253523769). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:04:56Z. --- RUN of #1125 (docs only: no ctest, no build, no red) Heads: PR head `0f616866965a`, main `54b2a81e95c4`. Tested as main + PR head (`git merge --no-ff`, local only): merged cleanly, no conflicts. The PR changes one file, `docs/d3d12_vulkan.md`; it has no ctest test, so there is no red and I built nothing (no source file changes, so `gta6rt.exe`'s imports cannot change: no new imports vs main). Checks run from the worktree root, one process each (`python -I tests/<file>`), on main and on main + PR: the 16 files matching `tests/test_docs_*.py` plus `test_i18n_index.py`, `test_ctest_registration.py` and `test_text_write_line_endings.py`; and `python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md` (exit 0). - Same result on main and on main + PR: 14 files OK (including `test_docs_table_rows.py`, `test_docs_table_ids.py`, `test_docs_design_rows.py`, `test_docs_repo_paths.py`, `test_docs_env_vars.py`) and 2 failures that are already there on plain main and are not about this file: `test_docs_links.py` (a relative link in `d3d12/README.md`) and `test_docs_cli_flags.py` (a fenced PowerShell command using a flag its script lacks). - I did not re-measure the disassembly claims (slots 78 to 81, call-site counts); that needs the game executable, which this check does not use. Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12; the GPU was not used.
MoonEyes commented 2026-11-29 19:44:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T19:44:52Z.


Tested 0f6168669 merged (no commit) with main 0e8737f2a: Windows 11, Python 3.12.

  • Docs only, so no red/green test is possible. Every python -I tests/test_docs_*.py passes on the merge.
  • Merges cleanly with main and does not force a rebase of #2566 (merge-tree against its current head).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261523133 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1125#issuecomment-7261523133). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T19:44:52Z. --- Tested `0f6168669` merged (no commit) with `main` `0e8737f2a`: Windows 11, Python 3.12. - Docs only, so no red/green test is possible. Every `python -I tests/test_docs_*.py` passes on the merge. - Merges cleanly with `main` and does not force a rebase of #2566 (merge-tree against its current head). AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 21:12:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T21:12:37Z.


Merging. Head 0f6168669 has red/green verdicts from reviewers other than the author (above), merges cleanly with main 255b6752c, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-tests mesh, semantic-tests f16) are pre-existing. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7262692474 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1125#issuecomment-7262692474). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T21:12:37Z. --- Merging. Head `0f6168669` has red/green verdicts from reviewers other than the author (above), merges cleanly with `main` `255b6752c`, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (`translator-tests` mesh, `semantic-tests` f16) are pre-existing. Merged by MoonEyes. AI-assisted (Claude Code).
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
ProjectLeonida/mandy!1125
No description provided.