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

Open
opened 2026-11-26 20:20:17 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1125
Author: @robot00f
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: docs/b1


📝 Commits (1)

  • 0f61686 docs(d3d12_vulkan): measured presentation slots 78-81 (D3D12-PRESENT-SLOTS-MEASURED)

📊 Changes

1 file changed (+25 additions, -7 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+25 -7)

📄 Description

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)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1125 **Author:** [@robot00f](https://github.com/robot00f) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/b1` --- ### 📝 Commits (1) - [`0f61686`](https://github.com/ubiquitarianism/leonida/commit/0f616866965a6035b6abdb9350183f86429db543) docs(d3d12_vulkan): measured presentation slots 78-81 (D3D12-PRESENT-SLOTS-MEASURED) ### 📊 Changes **1 file changed** (+25 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+25 -7) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1159
No description provided.