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

Open
github-bot wants to merge 1 commit from github-bot/gh-1125 into main AGit
Owner

@⁠robot00f on GitHub · 2026-11-24 18:56 UTC · original
robot00f:docs/b1 → main · +25 −7 · 1 files · 1 commits · open

Claim: #14 (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)

**@⁠robot00f** on GitHub · 2026-11-24 18:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1125) `robot00f:docs/b1` → `main` · +25 −7 · 1 files · 1 commits · open Claim: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 (`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)
Measure the device presentation slots in the executable: 78-81 are called, from one device-pointer global, at the documented arities (4/4/5/4 with the receiver in rcx), and record the argument registers, stack words and receivers. Row 3527/3528/3529 and the section 7.1 open bullet now say Measured for the slots; the struct layouts and the queue PresentX/SuspendX/ResumeX slots stay Open.

AI-assisted: yes (Antigravity)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:39:23 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:16 UTC · original · approved these changes

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.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1125#pullrequestreview-6045745258) · **approved these changes** 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.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:15 UTC · original

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

**@⁠Deedlyy** on GitHub · 2026-11-24 20:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1125#issuecomment-7143260282) **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
Author
Owner

@⁠robot00f on GitHub · 2026-11-25 15:48 UTC · original

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)

**@⁠robot00f** on GitHub · 2026-11-25 15:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1125#issuecomment-7167332322) 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)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1125/head:github-bot/gh-1125'
git switch 'github-bot/gh-1125'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1125'
git switch 'github-bot/gh-1125'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1125'
git switch 'github-bot/gh-1125'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1125'
git switch 'main'
git merge --squash 'github-bot/gh-1125'
git switch 'main'
git merge --ff-only 'github-bot/gh-1125'
git switch 'main'
git merge 'github-bot/gh-1125'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.