[PR #1038] [MERGED] docs(d3d12_xs_surface): measured arity of device extension slots (D3D12-EXTENSION-SLOT-ARITY) #1076

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1038
Author: @robot00f
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @Andretuta

Base: main ← Head: docs/agent1


📝 Commits (1)

  • b6d6b70 docs(d3d12_xs_surface): measured arity of device extension slots (D3D12-EXTENSION-SLOT-ARITY)

📊 Changes

1 file changed (+105 additions, -3 deletions)

View changed files

📝 docs/d3d12_xs_surface.md (+105 -3)

📄 Description

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138274590

What

docs/d3d12_xs_surface.md gets a new section 5.2 that measures, per slot, the arity and the receiver of the console device extension slots 86 (+0x2B0), 101 (+0x328), 108 (+0x360), 132 (+0x420) and 133 (+0x428), plus offset +0x418 (131).

The image has 243 indirect call [reg+disp] sites at those six offsets and most are not on the device, so each site is classified: a site only counts as a device site when a backward definition chain ends in a full-width load of the device pointer, which the title keeps in a block of .data aliases (0x1475DF000-0x1475DF048, 0x148759D00) filled by one constructor (0x1424785D4-0x142478621). Result: 86 -> 1 site, 101 -> 1, 108 -> 2, 132 -> 1, 133 -> 5, 131 -> 0.

Measured shapes (caller side, rcx = device unless struct-return):

  • 86: (desc, &IID_ID3D12PipelineState, out) — matches CreatePipelineState -> PC slot 47 in docs/d3d12_vulkan.md §3.1.
  • 101: (desc{3, index, ptr}, &IID_ID3D12StateObject, out) — matches CreateStateObject -> PC slot 62 in docs/d3d12_vulkan.md §3.1.
  • 108: (out16, device, 1, 1, ptr, ptr) — C-ABI 16-byte struct return in rcx, matching GetResourceAllocationInfo2 -> PC slot 68 in docs/d3d12_vulkan.md §3.1.
  • 132: (3) — single integer/enum argument on the device; unnamed.
  • 133: (va, &D3D12_RESOURCE_DESC, state, clear, &IID_ID3D12Resource, out) — matches CreatePlacedResourceX in docs/retail_boot_chain.md §3.4.

Why

The page previously had no device slot map past the presentation block. Cross-checking the static device-receiver chains against docs/d3d12_vulkan.md §3.1 and docs/retail_boot_chain.md §3.4 confirms slots 86, 101, 108 and 133 from the executable itself, pins down slot 132's single device site, and shows offset +0x418 (131) has 26 raw sites and 0 device receivers (so §9 counts five device slots, leaving 131 open).

Tested

  • python -I scripts/check_no_game_data.py docs/d3d12_xs_surface.md -> exit 0
  • python -I tests/test_d3d12_xs_surface.py, tests/test_docs_links.py, tests/test_docs_table_rows.py, tests/test_docs_repo_paths.py, tests/test_docs_cli_flags.py -> OK
  • Static only; the executable was never run.

GPUs tested: n/a
AI-assisted: yes (Antigravity, Gemini 4 Carbon)


🔄 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/1038 **Author:** [@robot00f](https://github.com/robot00f) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@Andretuta](https://github.com/Andretuta) **Base:** `main` ← **Head:** `docs/agent1` --- ### 📝 Commits (1) - [`b6d6b70`](https://github.com/ubiquitarianism/leonida/commit/b6d6b702025c542f170f8061ccc8d79cf833f468) docs(d3d12_xs_surface): measured arity of device extension slots (D3D12-EXTENSION-SLOT-ARITY) ### 📊 Changes **1 file changed** (+105 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_xs_surface.md` (+105 -3) </details> ### 📄 Description Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138274590 ## What `docs/d3d12_xs_surface.md` gets a new section 5.2 that measures, per slot, the **arity and the receiver** of the console device extension slots 86 (`+0x2B0`), 101 (`+0x328`), 108 (`+0x360`), 132 (`+0x420`) and 133 (`+0x428`), plus offset `+0x418` (131). The image has 243 indirect `call [reg+disp]` sites at those six offsets and most are **not** on the device, so each site is classified: a site only counts as a device site when a backward definition chain ends in a full-width load of the device pointer, which the title keeps in a block of `.data` aliases (`0x1475DF000`-`0x1475DF048`, `0x148759D00`) filled by one constructor (`0x1424785D4`-`0x142478621`). Result: 86 -> 1 site, 101 -> 1, 108 -> 2, 132 -> 1, 133 -> 5, **131 -> 0**. Measured shapes (caller side, `rcx` = device unless struct-return): - **86**: `(desc, &IID_ID3D12PipelineState, out)` — matches `CreatePipelineState` -> PC slot 47 in `docs/d3d12_vulkan.md` §3.1. - **101**: `(desc{3, index, ptr}, &IID_ID3D12StateObject, out)` — matches `CreateStateObject` -> PC slot 62 in `docs/d3d12_vulkan.md` §3.1. - **108**: `(out16, device, 1, 1, ptr, ptr)` — C-ABI 16-byte struct return in `rcx`, matching `GetResourceAllocationInfo2` -> PC slot 68 in `docs/d3d12_vulkan.md` §3.1. - **132**: `(3)` — single integer/enum argument on the device; unnamed. - **133**: `(va, &D3D12_RESOURCE_DESC, state, clear, &IID_ID3D12Resource, out)` — matches `CreatePlacedResourceX` in `docs/retail_boot_chain.md` §3.4. ## Why The page previously had no device slot map past the presentation block. Cross-checking the static device-receiver chains against `docs/d3d12_vulkan.md` §3.1 and `docs/retail_boot_chain.md` §3.4 confirms slots 86, 101, 108 and 133 from the executable itself, pins down slot 132's single device site, and shows offset `+0x418` (131) has 26 raw sites and 0 device receivers (so §9 counts five device slots, leaving 131 open). ## Tested - `python -I scripts/check_no_game_data.py docs/d3d12_xs_surface.md` -> exit 0 - `python -I tests/test_d3d12_xs_surface.py`, `tests/test_docs_links.py`, `tests/test_docs_table_rows.py`, `tests/test_docs_repo_paths.py`, `tests/test_docs_cli_flags.py` -> OK - Static only; the executable was never run. GPUs tested: n/a AI-assisted: yes (Antigravity, Gemini 4 Carbon) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:00 +01:00
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#1076
No description provided.