docs(d3d12_command_objects): measure retail creator call sites for slots 8, 9, 12 and 36 (D3D12-COMMAND-OBJECT-CREATOR-SLOTS) #2070

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

@⁠robot00f on GitHub · 2026-11-25 19:29 UTC · original
robot00f:docs/d3d12-creator-slots-retail → main · +48 −3 · 1 files · 2 commits · open

Claim: D3D12-COMMAND-OBJECT-CREATOR-SLOTS (#1608)

Depends on: #1006 (stacked on 6ea4ac39 so the §2.1 IID table and creator-site table sit together cleanly; once #1006 lands, this diff is a single §2.1 hunk).

What and why

docs/d3d12_command_objects.md §2.1 leaves CreateCommandQueue (slot 8), CreateCommandAllocator (slot 9), CreateCommandList (slot 12) and CreateFence (slot 36) at Open ("until a call site is followed"). Following every RIP-relative lea to the carried .rdata IIDs and every load of the device globals (0x148759D00 and 0x1475DF000–0x1475DF048) across .text (0x140001000–0x145F40966) resolves all four:

  • ID3D12CommandQueue (0x1461E0648) — slots 8 (+0x40) and 48 (+0x180): 2 device sites at public slot 8 (0x141E6C2EF, 0x14247878A, 16-byte D3D12_COMMAND_QUEUE_DESC) and 4 sites at console slot 48 (0x142478813, 0x142478853, 0x142478893, 0x1424788D3 in renderer init, matching docs/retail_boot_chain.md §3.2).
  • ID3D12CommandAllocator (0x1461E0658) — slot 9 (+0x48): all 5 allocator creation sites (0x14161D0A0, 0x1417F6BCF, 0x141F75D3A, 0x142478B2D, 0x142478C3B) call public slot 9 with (device, type, &IID_ID3D12CommandAllocator, &out). (The two nearby +0x48 calls at 0x141C74559 and 0x141F75FCB are heap slot 9 on a descriptor heap created at slot 14.)
  • Command lists (0x1461ECFA0, 0x1461E0668) — slot 12 (+0x60) has 0 device sites; all 3 use console slot 73 (+0x248): PC slot 12 is never called on the device in .text. Every list creation calls console slot 73 (CreateCommandListX(device, &16-byte desc, allocator, 0, riid, &out)) — twice in renderer init with {C3827890-4024-474C-98CF-645B51DC4874} (0x142478B71, 0x142478C70) and once in helper 0x1417F6CF0 with IID_ID3D12GraphicsCommandList (0x1417F6D34) — and immediately closes the returned list at list slot 9 (+0x48).
  • ID3D12Fence (0x1461E0618) — slot 36 (+0x120): 1 device site (0x141D0B2FA) calling public slot 36 as (device, 0, 1, &IID_ID3D12Fence, &out).

Tested

  • Static Capstone disassembly over .text (0x140001000–0x145F40966, nothing executed).
  • python -I scripts/check_no_game_data.py docs/d3d12_command_objects.md -> exit 0.
  • python -I tests/test_d3d12_iid_scan.py, tests/test_docs_links.py, tests/test_docs_table_rows.py, tests/test_docs_repo_paths.py, tests/test_docs_cli_flags.py, tests/test_i18n_index.py -> OK.

GPUs tested: n/a

AI-assisted: yes (Antigravity, Gemini 4 Carbon)

Checklist

  • Based on current main (stacked on #1006, declared) and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md).
  • A new translator rule is in the contract table of docs/design.md. (No translator change.)
**@⁠robot00f** on GitHub · 2026-11-25 19:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2070) `robot00f:docs/d3d12-creator-slots-retail` → `main` · +48 −3 · 1 files · 2 commits · open Claim: `D3D12-COMMAND-OBJECT-CREATOR-SLOTS` (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) Depends on: #1006 (stacked on `6ea4ac39` so the §2.1 IID table and creator-site table sit together cleanly; once #1006 lands, this diff is a single §2.1 hunk). ### What and why `docs/d3d12_command_objects.md` §2.1 leaves `CreateCommandQueue` (slot 8), `CreateCommandAllocator` (slot 9), `CreateCommandList` (slot 12) and `CreateFence` (slot 36) at **Open** ("until a call site is followed"). Following every RIP-relative `lea` to the carried `.rdata` IIDs and every load of the device globals (`0x148759D00` and `0x1475DF000`–`0x1475DF048`) across `.text` (`0x140001000`–`0x145F40966`) resolves all four: - **`ID3D12CommandQueue` (`0x1461E0648`) — slots 8 (`+0x40`) and 48 (`+0x180`):** 2 device sites at public slot 8 (`0x141E6C2EF`, `0x14247878A`, 16-byte `D3D12_COMMAND_QUEUE_DESC`) and 4 sites at console slot 48 (`0x142478813`, `0x142478853`, `0x142478893`, `0x1424788D3` in renderer init, matching `docs/retail_boot_chain.md` §3.2). - **`ID3D12CommandAllocator` (`0x1461E0658`) — slot 9 (`+0x48`):** all 5 allocator creation sites (`0x14161D0A0`, `0x1417F6BCF`, `0x141F75D3A`, `0x142478B2D`, `0x142478C3B`) call public slot 9 with `(device, type, &IID_ID3D12CommandAllocator, &out)`. (The two nearby `+0x48` calls at `0x141C74559` and `0x141F75FCB` are heap slot 9 on a descriptor heap created at slot 14.) - **Command lists (`0x1461ECFA0`, `0x1461E0668`) — slot 12 (`+0x60`) has 0 device sites; all 3 use console slot 73 (`+0x248`):** PC slot 12 is never called on the device in `.text`. Every list creation calls console slot 73 (`CreateCommandListX(device, &16-byte desc, allocator, 0, riid, &out)`) — twice in renderer init with `{C3827890-4024-474C-98CF-645B51DC4874}` (`0x142478B71`, `0x142478C70`) and once in helper `0x1417F6CF0` with `IID_ID3D12GraphicsCommandList` (`0x1417F6D34`) — and immediately closes the returned list at list slot 9 (`+0x48`). - **`ID3D12Fence` (`0x1461E0618`) — slot 36 (`+0x120`):** 1 device site (`0x141D0B2FA`) calling public slot 36 as `(device, 0, 1, &IID_ID3D12Fence, &out)`. ### Tested - Static Capstone disassembly over `.text` (`0x140001000`–`0x145F40966`, nothing executed). - `python -I scripts/check_no_game_data.py docs/d3d12_command_objects.md` -> exit 0. - `python -I tests/test_d3d12_iid_scan.py`, `tests/test_docs_links.py`, `tests/test_docs_table_rows.py`, `tests/test_docs_repo_paths.py`, `tests/test_docs_cli_flags.py`, `tests/test_i18n_index.py` -> OK. GPUs tested: n/a AI-assisted: yes (Antigravity, Gemini 4 Carbon) ### Checklist - [x] Based on current `main` (stacked on #1006, declared) and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md). - [ ] A new translator rule is in the contract table of `docs/design.md`. (No translator change.)
Follows the retail executable's .rdata IID references and device-global loads
across .text to resolve the four §2.1 creator rows:
- Command queues: 2 sites at slot 8 (+0x40) and 4 at slot 48 (+0x180).
- Command allocators: 5 sites, all at public slot 9 (+0x48).
- Command lists: 0 device sites at PC slot 12 (+0x60); all 3 sites call console
  slot 73 (+0x248, CreateCommandListX) and immediately call Close (slot 9).
- Fences: 1 site at public slot 36 (+0x120).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:47 +00:00
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/2070/head:github-bot/gh-2070'
git switch 'github-bot/gh-2070'

Merge

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