diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 23:13:17 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 23:13:17 -0500 |
| commit | 89268c6c1c46436cee36f97a00db367112453945 (patch) | |
| tree | d829e8135ee75b18249e12ba3a3ca86857a204d5 /docs/d3d12_command_objects.md | |
| parent | b6d08110ebd49d8cd318e7833535a77aab32654d (diff) | |
| parent | cf5c0f7fbf43d0428782d4f7f395c758abbfeba8 (diff) | |
Merge pull request #4299 from abilliontokens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 31edd3ae2..00056e2da 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 |
| @@ -683,7 +718,8 @@ Even taking both projects at face value, the following remain **Open**: | |||
| 683 | - the Xbox queue vtable beyond the public chain (`PresentX`, `SuspendX`, `ResumeX`); | 718 | - the Xbox queue vtable beyond the public chain (`PresentX`, `SuspendX`, `ResumeX`); |
| 684 | - the `PresentX` signature, plane struct, resource/view arrays and swapchain parameters; | 719 | - the `PresentX` signature, plane struct, resource/view arrays and swapchain parameters; |
| 685 | - the command-list extension slots other than the ones sections 3.3a and 3.5a measured (71, 73, 80, 85, 141, 146, 148); | 720 | - the command-list extension slots other than the ones sections 3.3a and 3.5a measured (71, 73, 80, 85, 141, 146, 148); |
| 686 | - the DMA list type's real numeric value and the compute/copy console list IIDs; | 721 | - the DMA list type's real numeric value and the compute/copy console list IIDs, which the package |
| 722 | itself cannot supply (§3.2a): they need the running title or a vendor runtime; | ||
| 687 | - any Xbox-specific return convention on these interfaces. | 723 | - any Xbox-specific return convention on these interfaces. |
| 688 | 724 | ||
| 689 | ## 5. What a runtime can do without the executable | 725 | ## 5. What a runtime can do without the executable |
| @@ -799,7 +835,8 @@ command object. | |||
| 799 | | `SuspendX` / `ResumeX` | No slot or signature. | | 835 | | `SuspendX` / `ResumeX` | No slot or signature. | |
| 800 | | 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. | | 836 | | 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. | |
| 801 | | 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`. | | 837 | | 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`. | |
| 802 | | DMA list use/value | The IID is prior art; type 6 is derived; no shipped module uses it. | | 838 | | 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). | |
| 839 | | 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. | | ||
| 803 | 840 | ||
| 804 | ### 5.4 GCL8 (resolved in PR #164) | 841 | ### 5.4 GCL8 (resolved in PR #164) |
| 805 | 842 | ||