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

Closed
leonida/mandy
robot00f wants to merge 0 commits from docs/d3d12-creator-slots-retail into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

robot00f commented 2026-11-25 19:29:09 +00:00

Claim: D3D12-COMMAND-OBJECT-CREATOR-SLOTS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172190888)

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.)
Claim: `D3D12-COMMAND-OBJECT-CREATOR-SLOTS` (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172190888) 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.)
zmasi commented 2026-11-28 23:17:09 +00:00

Native Windows 11 Verification (3fd332dc8f) — PASS

Diff-audited docs/d3d12_command_objects.md (+48/-3) and verified merged onto origin/main (adfb3821a2) on Windows 11 (10.0.26200, Python 3.12.10 with -I).

Results

  • Technical & Cross-Reference Audit:
    • Verified all six vtable slot / byte-offset pairs (slot 8 -> +0x40, slot 48 -> +0x180, slot 9 -> +0x48, slot 12 -> +0x60, slot 73 -> +0x248, slot 36 -> +0x120 — all exact slot * 8 x64 vtable offsets).
    • Cross-checked console command-list IID {C3827890-4024-474C-98CF-645B51DC4874} and slot 48 / 73 creator semantics against runtime/shims/d3d12_xs_device.cpp and docs/retail_boot_chain.md (§3.2–§3.3).
  • Documentation & Policy Suites (PR #2070 merged onto origin/main):
    • python -I tests/test_docs_links.py: Ran 17 tests in 2.744s — OK
    • python -I tests/test_docs_repo_paths.py: Ran 5 tests in 0.152s — OK
    • python -I tests/test_docs_table_rows.py: Ran 2 tests in 0.064s — OK
    • python -I tests/test_docs_list_items.py: Ran 3 tests in 0.630s — OK
    • python -I tests/test_docs_encoding.py: Ran 1 test in 0.026s — OK
    • python -I tests/test_docs_cli_flags.py: Ran 4 tests in 21.163s — OK
    • python -I scripts/check_no_game_data.py & tests/test_text_write_line_endings.py (3/3): OK.

AI-assisted.

### Native Windows 11 Verification (`3fd332dc8f`) — PASS Diff-audited `docs/d3d12_command_objects.md` (`+48/-3`) and verified merged onto `origin/main` (`adfb3821a2`) on Windows 11 (`10.0.26200`, Python `3.12.10` with `-I`). #### Results - **Technical & Cross-Reference Audit**: - Verified all six vtable slot / byte-offset pairs (`slot 8 -> +0x40`, `slot 48 -> +0x180`, `slot 9 -> +0x48`, `slot 12 -> +0x60`, `slot 73 -> +0x248`, `slot 36 -> +0x120` — all exact `slot * 8` x64 vtable offsets). - Cross-checked console command-list IID `{C3827890-4024-474C-98CF-645B51DC4874}` and slot `48` / `73` creator semantics against `runtime/shims/d3d12_xs_device.cpp` and `docs/retail_boot_chain.md` (§3.2–§3.3). - **Documentation & Policy Suites (`PR #2070` merged onto `origin/main`)**: - `python -I tests/test_docs_links.py`: **`Ran 17 tests in 2.744s — OK`** - `python -I tests/test_docs_repo_paths.py`: **`Ran 5 tests in 0.152s — OK`** - `python -I tests/test_docs_table_rows.py`: **`Ran 2 tests in 0.064s — OK`** - `python -I tests/test_docs_list_items.py`: **`Ran 3 tests in 0.630s — OK`** - `python -I tests/test_docs_encoding.py`: **`Ran 1 test in 0.026s — OK`** - `python -I tests/test_docs_cli_flags.py`: **`Ran 4 tests in 21.163s — OK`** - `python -I scripts/check_no_game_data.py` & `tests/test_text_write_line_endings.py` (`3/3`): **`OK`**. AI-assisted.
OreoFR commented 2026-11-29 12:56:32 +00:00

TAKEN by OreoFR (Windows, RTX 4070 8 GB)

TAKEN by OreoFR (Windows, RTX 4070 8 GB)
OreoFR commented 2026-11-29 13:05:25 +00:00

Verified by OreoFR — READY

  • Base: main 3535eb5c4 + this PR (head 3fd332dc8) merged with --no-ff, no conflict. Docs only (docs/d3d12_command_objects.md).
  • Red: n/a for a measurement note. On main all 13 tests/test_docs_*.py files pass, so the baseline is clean.
  • Green (merge): all 13 tests/test_docs_*.py files pass, among them test_docs_links.py (18 tests), test_docs_cli_flags.py, test_docs_repo_paths.py, test_docs_table_rows.py and test_docs_table_ids.py. scripts/check_no_game_data.py docs/d3d12_command_objects.md: clean.
  • What the text cites, checked on main: tools/d3d12_iid_scan.py and its --header default (IIDs read from the SDK d3d12.h, so ID3D12Device11 is in its set); is_device_iid in runtime/shims/d3d12_xs_device.cpp accepts ID3D12Device11; the console list IID {C3827890-…} is the one in d3d12_xs_device.cpp and docs/retail_boot_chain.md; §3.2 (slot 48, (desc, riid, out)) and §3.3 (slot 73, (desc, allocator, pso, riid, out)) match the argument registers in the new table; every slot/offset pair is slot * 8; the 13 carried IIDs add up (4 + 9). #1006, which this was stacked on, is merged.
  • Diff read: no issue. The retail addresses are measurements I cannot reproduce without the executable, so I checked them for consistency, not by rerunning the scan. Non-blocking: later sections still say the four creation slots "still need a trace" (lines 776 and 816 to 818 on the merge); a follow-up could point them at this measurement.
  • Other runs: consistent with zmasi's PASS on the same head against an older main (adfb3821a). Since then main changed tests/test_docs_links.py and tests/test_docs_cli_flags.py; both still pass.
  • Machine: Windows 11, Intel Core Ultra 7 155H, RTX 4070 Laptop 8 GB, NVIDIA 621.40, Python 3.12.10 (no GPU used)

AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.

Ready to merge per the maintainers' plan (green, no conflict, tested).

**Verified by OreoFR** — READY - Base: main 3535eb5c4 + this PR (head 3fd332dc8) merged with --no-ff, no conflict. Docs only (`docs/d3d12_command_objects.md`). - Red: n/a for a measurement note. On main all 13 `tests/test_docs_*.py` files pass, so the baseline is clean. - Green (merge): all 13 `tests/test_docs_*.py` files pass, among them `test_docs_links.py` (18 tests), `test_docs_cli_flags.py`, `test_docs_repo_paths.py`, `test_docs_table_rows.py` and `test_docs_table_ids.py`. `scripts/check_no_game_data.py docs/d3d12_command_objects.md`: clean. - What the text cites, checked on main: `tools/d3d12_iid_scan.py` and its `--header` default (IIDs read from the SDK `d3d12.h`, so `ID3D12Device11` is in its set); `is_device_iid` in `runtime/shims/d3d12_xs_device.cpp` accepts `ID3D12Device11`; the console list IID `{C3827890-…}` is the one in `d3d12_xs_device.cpp` and `docs/retail_boot_chain.md`; §3.2 (slot 48, `(desc, riid, out)`) and §3.3 (slot 73, `(desc, allocator, pso, riid, out)`) match the argument registers in the new table; every slot/offset pair is `slot * 8`; the 13 carried IIDs add up (4 + 9). #1006, which this was stacked on, is merged. - Diff read: no issue. The retail addresses are measurements I cannot reproduce without the executable, so I checked them for consistency, not by rerunning the scan. Non-blocking: later sections still say the four creation slots "still need a trace" (lines 776 and 816 to 818 on the merge); a follow-up could point them at this measurement. - Other runs: consistent with zmasi's PASS on the same head against an older main (adfb3821a). Since then main changed `tests/test_docs_links.py` and `tests/test_docs_cli_flags.py`; both still pass. - Machine: Windows 11, Intel Core Ultra 7 155H, RTX 4070 Laptop 8 GB, NVIDIA 621.40, Python 3.12.10 (no GPU used) AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR. Ready to merge per the maintainers' plan (green, no conflict, tested).
OreoFR commented 2026-11-29 15:31:48 +00:00

Update from OreoFR, CONFLICT after my run: #1045 (ca89cb018, also docs/d3d12_command_objects.md, new §2.1a) was merged after my verification. This PR now conflicts with main c22a0a732 (git merge-tree: content conflict in docs/d3d12_command_objects.md; GitHub shows CONFLICTING). My READY above holds for main 3535eb5c4 only; it needs a rebase on main before it can be merged.

AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.

**Update from OreoFR, CONFLICT after my run:** #1045 (`ca89cb018`, also `docs/d3d12_command_objects.md`, new §2.1a) was merged after my verification. This PR now conflicts with main `c22a0a732` (`git merge-tree`: content conflict in `docs/d3d12_command_objects.md`; GitHub shows CONFLICTING). My READY above holds for main 3535eb5c4 only; it needs a rebase on main before it can be merged. AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.
aslan2142 reviewed 2026-12-01 10:58:52 +00:00
aslan2142 left a comment
No description provided.
The retail creator call-site measurements for device slots 8, 9, 12, and 36 in `docs/d3d12_command_objects.md` are clean-room compliant and independently verified, but `docs/d3d12_command_objects.md` now conflicts with `main` (after #1045 landed, as @OreoFR noted). Please rebase onto current `main` and ensure `change-scope` and `no-game-data` pass cleanly. *(AI-assisted review.)*
MoonEyes commented 2026-12-02 11:49:41 +00:00

Closing: this pull request no longer applies to current main (merge conflict in docs/d3d12_command_objects.md), and open pull requests that have fallen out of step with main are being closed so the list stays workable. If you still want this change, rebase it on current main and reopen it (or open a new pull request); it will be looked at again.

AI-assisted (Claude Code).

Closing: this pull request no longer applies to current `main` (merge conflict in `docs/d3d12_command_objects.md`), and open pull requests that have fallen out of step with `main` are being closed so the list stays workable. If you still want this change, rebase it on current `main` and reopen it (or open a new pull request); it will be looked at again. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.