diff options
| author | abilliontokens <abilliontokens@users.noreply.github.com> | 2026-11-22 16:32:02 -0800 |
|---|---|---|
| committer | abilliontokens <abilliontokens@users.noreply.github.com> | 2026-11-22 16:35:11 -0800 |
| commit | cf5c0f7fbf43d0428782d4f7f395c758abbfeba8 (patch) | |
| tree | 03b9fdcec7129eca3f5758c101ab88d99dd054e5 /docs/d3d12_command_objects.md | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
docs+tools: no shipped module passes an unknown GUID at a call site (D3D-441)
The call-site scan tools/d3d12_guid_sites.py enumerates every 16-byte constant
a module's code can name (RIP-relative lea targets, absolute data pointers,
adjacent movabs immediates, import-slot loads) and classifies it against the
SDK's IID set. Over the 16 modules of the 1.0.2.1 package only the ten known
IIDs of the two D3D12 clients appear; no unknown GUID exists at any call site,
no module imports IID data, and no code-referenced static queue description
carries a list type outside the PC enum. The compute/copy console list IIDs
and the DMA type's numeric value therefore have no static source in the
package (consistent with #3520's export-table negative) and stay reachable
only through the running title.
Diffstat (limited to 'docs/d3d12_command_objects.md')
| -rw-r--r-- | docs/d3d12_command_objects.md | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md index 0c94f58c7..c185bb7e8 100644 --- a/docs/d3d12_command_objects.md +++ b/docs/d3d12_command_objects.md | |||
| @@ -270,6 +270,41 @@ shipped modules, not a claim that the game never queries for them. | |||
| 270 | The `GraphicsCommandList` ASCII string occurs 30 times in `XboxBvhBuilder.dll` (type/debug | 270 | The `GraphicsCommandList` ASCII string occurs 30 times in `XboxBvhBuilder.dll` (type/debug |
| 271 | names); `PresentX` does not occur in any of the 16 DLLs. | 271 | names); `PresentX` does not occur in any of the 16 DLLs. |
| 272 | 272 | ||
| 273 | |||
| 274 | ### 3.2a No shipped module passes an unknown GUID at a call site | ||
| 275 | |||
| 276 | Section 3.2's byte scan can only recognise *known* IIDs; a console-only GUID (the four list IIDs of | ||
| 277 | [`d3d12_xs_surface.md §4`](d3d12_xs_surface.md)) would scan as anonymous data. The call-site scan closes | ||
| 278 | that hole: `tools/d3d12_guid_sites.py` enumerates every 16-byte constant a module's code can name — | ||
| 279 | RIP-relative `lea` targets in data sections, absolute pointers stored in data, two adjacent | ||
| 280 | `movabs` immediates that inline a GUID without a constant pool, and `mov reg, [rip+...]` loads | ||
| 281 | through import slots (a GUID imported as data) — and reports which are GUID-shaped. Over all 16 | ||
| 282 | modules of the 1.0.2.1 package: | ||
| 283 | |||
| 284 | | Binary | GUID-shaped constants the code references | | ||
| 285 | |---|---| | ||
| 286 | | `XboxBvhBuilder.dll` | 2: `IID_ID3D12RootSignature`, `IID_ID3D12PipelineState` (the same pair as §3.2) | | ||
| 287 | | `amd_fidelityfx_upscaler_xbox.dll` | 8: the §3.2 set, nothing else | | ||
| 288 | | `amd_fidelityfx_loader_xbox.dll` | 0 | | ||
| 289 | | the other 13 modules | 0–44 GUIDs each (six have none); where present they are HTTP, WinRT and CRT interfaces — none of these modules imports `d3d12_xs.dll`, so none can call D3D12 at all | | ||
| 290 | |||
| 291 | No module loads a GUID through an import slot, and no `movabs` pair inlines one. As a control, the | ||
| 292 | upscaler's single `IID_ID3D12Device` reference (rva `0x482f0`) is the IID of a real slot-0 | ||
| 293 | `QueryInterface` call (`(this, &IID, &out)`, decompiled at rva `0xde66`). So the only | ||
| 294 | interfaces any shipped module can name at a `QueryInterface` or a creation call are the ten it | ||
| 295 | already uses; a console compute/copy list IID cannot appear in the package, statically, in any | ||
| 296 | form. The same scan looks for code-referenced static `D3D12_COMMAND_QUEUE_DESC` windows | ||
| 297 | `{Type, Priority, Flags, NodeMask}`: 10 windows in 3 modules survive the shape filter, every one with | ||
| 298 | `Type` 1 — a PC enum value — and all of them offset tables read by stride arithmetic, not queue | ||
| 299 | descriptions (checked by decompiling the referencing function of the upscaler's six). None has a | ||
| 300 | value past `VIDEO_DECODE` (4), so the DMA type's numeric value has no static source in the package | ||
| 301 | either. | ||
| 302 | |||
| 303 | Reproduce: `python -I tools/d3d12_guid_sites.py <package>/*.dll --known | ||
| 304 | IID_ID3D12ConsDmaCommandList=30bc77b9-8379-4b25-95de-b8588c42275d` (prints GUID values and counts | ||
| 305 | only). The four list IIDs and the DMA type remain reachable only through the running title, as | ||
| 306 | [`d3d12_xs_surface.md §4`](d3d12_xs_surface.md) already requires for the IIDs. | ||
| 307 | |||
| 273 | ### 3.3 The BVH builder's command-list call sites | 308 | ### 3.3 The BVH builder's command-list call sites |
| 274 | 309 | ||
| 275 | The exported `BuildRaytracingAccelerationStructure` (ordinal 3, RVA `0x21610`) copies the input | 310 | The exported `BuildRaytracingAccelerationStructure` (ordinal 3, RVA `0x21610`) copies the input |
| @@ -664,7 +699,8 @@ Even taking both projects at face value, the following remain **Open**: | |||
| 664 | - the Xbox queue vtable beyond the public chain (`PresentX`, `SuspendX`, `ResumeX`); | 699 | - the Xbox queue vtable beyond the public chain (`PresentX`, `SuspendX`, `ResumeX`); |
| 665 | - the `PresentX` signature, plane struct, resource/view arrays and swapchain parameters; | 700 | - the `PresentX` signature, plane struct, resource/view arrays and swapchain parameters; |
| 666 | - the command-list extension slots other than the ones sections 3.3a and 3.5a measured (71, 73, 80, 85, 141, 146, 148); | 701 | - the command-list extension slots other than the ones sections 3.3a and 3.5a measured (71, 73, 80, 85, 141, 146, 148); |
| 667 | - the DMA list type's real numeric value and the compute/copy console list IIDs; | 702 | - the DMA list type's real numeric value and the compute/copy console list IIDs, which the package |
| 703 | itself cannot supply (§3.2a): they need the running title or a vendor runtime; | ||
| 668 | - any Xbox-specific return convention on these interfaces. | 704 | - any Xbox-specific return convention on these interfaces. |
| 669 | 705 | ||
| 670 | ## 5. What a runtime can do without the executable | 706 | ## 5. What a runtime can do without the executable |
| @@ -780,7 +816,8 @@ command object. | |||
| 780 | | `SuspendX` / `ResumeX` | No slot or signature. | | 816 | | `SuspendX` / `ResumeX` | No slot or signature. | |
| 781 | | Xbox queue/list/fence/allocator slot deviations | No runtime binary and no game executable; the package has no queue, fence or allocator client, and its only command-list client is the BVH builder. | | 817 | | Xbox queue/list/fence/allocator slot deviations | No runtime binary and no game executable; the package has no queue, fence or allocator client, and its only command-list client is the BVH builder. | |
| 782 | | Builder's list field `+0x350` | Read once (`0x1d877`) and not explained by the inline buffer of section 3.5a, which covers `+0x18`, `+0x28`, `+0x30`, `+0x140`, `+0x141`, `+0x344` and `+0x544`. | | 818 | | Builder's list field `+0x350` | Read once (`0x1d877`) and not explained by the inline buffer of section 3.5a, which covers `+0x18`, `+0x28`, `+0x30`, `+0x140`, `+0x141`, `+0x344` and `+0x544`. | |
| 783 | | DMA list use/value | The IID is prior art; type 6 is derived; no shipped module uses it. | | 819 | | DMA list use/value | The IID is prior art; type 6 is derived; no shipped module uses it, and no module can name any GUID at a call site beyond its known ten or holds a static queue description with a non-PC type (§3.2a). | |
| 820 | | Compute/copy console list IIDs | Not exported (see #3520) and not present at any call site (§3.2a); only the running title can supply them. | | ||
| 784 | 821 | ||
| 785 | ### 5.4 GCL8 (resolved in PR #164) | 822 | ### 5.4 GCL8 (resolved in PR #164) |
| 786 | 823 | ||