docs(d3d12_xs_surface): slot 108 is an allocation-info query, not a GUID query (D3D12-SLOT108-QUERY) #1117

Manually merged
github merged 2 commits from gh-pr/1117/head into gh-pr/1117/base 2026-11-26 09:39:07 +00:00
Owner

@⁠robot00f on GitHub · 2026-11-24 18:47 UTC · original
robot00f:docs/b3 → main · +122 −3 · 1 files · 2 commits · merged 2026-11-25 21:28 UTC

Claimed in the coordination issue as: D3D12-SLOT108-QUERY (#14)

Depends on: #1038 (this patch lives inside the §5.2 table and slot-108 bullet that PR adds; it is stacked on that commit and will show it until #1038 lands).

What and why

§5.2 records slot 108's two device sites (0x140ABFDA9, 0x140ABFE07) and cross-references docs/d3d12_vulkan.md §3.1's GetResourceAllocationInfo2 route. This patch adds the full callee measurement of 0x140ABFAE0-0x140ABFE6C (reached through the thunk at 0x140ABFAD0):

  • The 5th argument ([rsp+0x20]) is a 56-byte D3D12_RESOURCE_DESC; the callee reads Dimension (+0), Alignment (+8), Width (+0x10), Height (+0x18), DepthOrArraySize (+0x1C), Format (+0x20), Layout (+0x2C) and Flags (+0x30), and writes back the 4-texel-aligned extent for block-compressed formats (0x140ABFB2B-0x140ABFB40).
  • Dimension 4 (3D) with Layout 0 gets the console word 0x105 written into Layout (0x140ABFD4B).
  • Under 0x80008 bits it sets Alignment = 0x1000, calls slot 108, and if the returned alignment is not 0x1000 clears Alignment to 0 and calls again (0x140ABFDBF-0x140ABFE07) — the 4 KiB D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT retry (docs/d3d12_vulkan.md §4.2).
  • The 16-byte return is {SizeInBytes, Alignment} (rcx is the hidden return buffer, this is in rdx), the 6th argument ([rsp+0x28]) is a 24-byte D3D12_RESOURCE_ALLOCATION_INFO1 scratch buffer, and the code int3s unless the high dword of SizeInBytes is 0 (0x140ABFE15).

That matches ID3D12Device4::GetResourceAllocationInfo1's 56-byte desc shape (docs/d3d12_vulkan.md §3.1 expands the 56-byte desc, normalises 0x105 and Xbox flags, and routes to PC slot 68 ID3D12Device8::GetResourceAllocationInfo2). Measured: shape, offsets, 0x1000/0x105, retry, assert. Open: exact console wire method name (GetResourceAllocationInfo1 vs GetResourceAllocationInfoX / 2).

Tested

  • Static disassembly of the function, both call sites and the return use (nothing executed).
  • python -I scripts/check_no_game_data.py docs/d3d12_xs_surface.md -> exit 0; tests/test_d3d12_xs_surface.py, tests/test_docs_table_rows.py, tests/test_docs_links.py -> OK.

GPUs tested: n/a

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

Checklist

  • Based on current main and merges cleanly; stacked on #1038, declared.
  • One topic.
  • 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-24 18:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1117) `robot00f:docs/b3` → `main` · +122 −3 · 1 files · 2 commits · merged 2026-11-25 21:28 UTC Claimed in the coordination issue as: D3D12-SLOT108-QUERY (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #1038 (this patch lives inside the §5.2 table and slot-108 bullet that PR adds; it is stacked on that commit and will show it until #1038 lands). ### What and why §5.2 records slot 108's two device sites (`0x140ABFDA9`, `0x140ABFE07`) and cross-references `docs/d3d12_vulkan.md` §3.1's `GetResourceAllocationInfo2` route. This patch adds the full callee measurement of `0x140ABFAE0`-`0x140ABFE6C` (reached through the thunk at `0x140ABFAD0`): - The 5th argument (`[rsp+0x20]`) is a 56-byte `D3D12_RESOURCE_DESC`; the callee reads `Dimension` (`+0`), `Alignment` (`+8`), `Width` (`+0x10`), `Height` (`+0x18`), `DepthOrArraySize` (`+0x1C`), `Format` (`+0x20`), `Layout` (`+0x2C`) and `Flags` (`+0x30`), and writes back the 4-texel-aligned extent for block-compressed formats (`0x140ABFB2B`-`0x140ABFB40`). - Dimension 4 (3D) with `Layout` 0 gets the console word `0x105` written into `Layout` (`0x140ABFD4B`). - Under `0x80008` bits it sets `Alignment = 0x1000`, calls slot 108, and if the returned alignment is not `0x1000` clears `Alignment` to 0 and calls again (`0x140ABFDBF`-`0x140ABFE07`) — the 4 KiB `D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT` retry (`docs/d3d12_vulkan.md` §4.2). - The 16-byte return is `{SizeInBytes, Alignment}` (`rcx` is the hidden return buffer, `this` is in `rdx`), the 6th argument (`[rsp+0x28]`) is a 24-byte `D3D12_RESOURCE_ALLOCATION_INFO1` scratch buffer, and the code `int3`s unless the high dword of `SizeInBytes` is 0 (`0x140ABFE15`). That matches `ID3D12Device4::GetResourceAllocationInfo1`'s 56-byte desc shape (`docs/d3d12_vulkan.md` §3.1 expands the 56-byte desc, normalises `0x105` and Xbox flags, and routes to PC slot 68 `ID3D12Device8::GetResourceAllocationInfo2`). Measured: shape, offsets, `0x1000`/`0x105`, retry, assert. Open: exact console wire method name (`GetResourceAllocationInfo1` vs `GetResourceAllocationInfoX` / `2`). ### Tested - Static disassembly of the function, both call sites and the return use (nothing executed). - `python -I scripts/check_no_game_data.py docs/d3d12_xs_surface.md` -> exit 0; `tests/test_d3d12_xs_surface.py`, `tests/test_docs_table_rows.py`, `tests/test_docs_links.py` -> OK. GPUs tested: n/a AI-assisted: yes (Antigravity, Gemini 4 Carbon) ### Checklist - [x] Based on current `main` and merges cleanly; stacked on #1038, declared. - [x] One topic. - [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.)
Adds section 5.2: per-slot receiver proof, register/stack shape and arity for
device slots 86, 101, 108, 132 and 133 (and offset +0x418 / 131), from the 243
raw call sites at those offsets. Cross-references d3d12_vulkan.md §3.1 and
retail_boot_chain.md §3.4 for slots 86, 101, 108 and 133; offset +0x418 (131)
has 0 device sites and stays open.
The two device sites of slot 108 are one allocation-info call shape over a
56-byte D3D12_RESOURCE_DESC: the 16-byte return is {SizeInBytes, Alignment}
and the 24-byte 4th argument is D3D12_RESOURCE_ALLOCATION_INFO1-sized. Record
the struct offsets, the 0x1000 alignment request and its retry, the 0x105
layout word for 3D, and the 32-bit size assert, cross-referencing main's
GetResourceAllocationInfo2 route in d3d12_vulkan.md §3.1.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:39:05 +00:00
github manually merged commit b9ad785e5f into gh-pr/1117/base 2026-11-26 09:39:07 +00:00
Author
Owner

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

Reviewed and verified. Precise documentation in docs/d3d12_xs_surface.md §5.2 identifying Xbox device slot 108 as GetResourceAllocationInfo1 allocation query rather than a GUID query, detailing the 56-byte D3D12_RESOURCE_DESC layout, extent alignment, and 4 KiB retry semantics. Verified clean-room compliant.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 18:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1117#pullrequestreview-6045432281) · **approved these changes** Reviewed and verified. Precise documentation in `docs/d3d12_xs_surface.md §5.2` identifying Xbox device slot 108 as `GetResourceAllocationInfo1` allocation query rather than a GUID query, detailing the 56-byte D3D12_RESOURCE_DESC layout, extent alignment, and 4 KiB retry semantics. Verified clean-room compliant.
Author
Owner

@⁠robot00f on GitHub · 2026-11-24 19:07 UTC · original

Thanks for the review. One ordering note: this branch is stacked on #1038, because the slot-108 text lives inside the §5.2 table that PR adds, so until #1038 lands this diff also shows its 110 lines. Once #1038 is in, this one is a single-file, single-hunk change; if preferred I can rebase it onto main the moment that happens.

**@⁠robot00f** on GitHub · 2026-11-24 19:07 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1117#issuecomment-7141644181) Thanks for the review. One ordering note: this branch is stacked on #1038, because the slot-108 text lives inside the §5.2 table that PR adds, so until #1038 lands this diff also shows its 110 lines. Once #1038 is in, this one is a single-file, single-hunk change; if preferred I can rebase it onto main the moment that happens.
Author
Owner

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

Recommendation: [WAIT]

Reasoning: Docs: re-identifies device slot 108 as an allocation-info query rather than a GUID query, with measured call-site evidence. The branch is stacked on #1038 (the section 5.2 table), so the diff currently includes #1038's lines. Merge after #1038 lands and this is rebased so only the slot-108 change remains. 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.

Impact level: 2/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1117#issuecomment-7143280511) **Recommendation:** [WAIT] **Reasoning:** Docs: re-identifies device slot 108 as an allocation-info query rather than a GUID query, with measured call-site evidence. The branch is stacked on #1038 (the section 5.2 table), so the diff currently includes #1038's lines. Merge after #1038 lands and this is rebased so only the slot-108 change remains. 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`. **Impact level:** 2/10
Author
Owner

@⁠robot00f on GitHub · 2026-11-25 19:07 UTC · original

Restacked onto updated #1038 (b6d6b702, rebased on main 9f9a7c5f), cross-referencing docs/d3d12_vulkan.md §3.1's GetResourceAllocationInfo2 route alongside the 0x140ABFAE0-0x140ABFE6C callee measurement and updating the small-resource alignment reference to docs/d3d12_vulkan.md §4.2. Re-ran check_no_game_data.py and the docs test suite (all pass).

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

**@⁠robot00f** on GitHub · 2026-11-25 19:07 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1117#issuecomment-7171851145) Restacked onto updated #1038 (`b6d6b702`, rebased on `main` `9f9a7c5f`), cross-referencing `docs/d3d12_vulkan.md` §3.1's `GetResourceAllocationInfo2` route alongside the `0x140ABFAE0`-`0x140ABFE6C` callee measurement and updating the small-resource alignment reference to `docs/d3d12_vulkan.md` §4.2. Re-ran `check_no_game_data.py` and the docs test suite (all pass). AI-assisted: yes (Antigravity, Gemini 4 Carbon)
This discussion has been locked. Commenting is limited to contributors.
No description provided.