upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/d3d12_command_objects.md
diff options
context:
space:
mode:
authorNiiRoZz <simonin.remi25@gmail.com>2026-11-22 20:13:37 +0100
committerNiiRoZz <simonin.remi25@gmail.com>2026-11-22 20:13:37 +0100
commit56839d2dd9a7de444b267216b49cc25938ef6659 (patch)
treea85d57774a6f4fcf795996994c858bead99918c7 /docs/d3d12_command_objects.md
parent162821017ea3c286c8bec860f3ff94f037912061 (diff)
D3D-350: device slots 8, 9, 12 and 36 cannot be measured from the package
The package ships no D3D12 runtime (d3d12_xs.dll is part of the console OS), and the device clients it does ship never create a queue, allocator, command list or fence: neither XboxBvhBuilder.dll nor amd_fidelityfx_upscaler_xbox.dll contains those IIDs or imports GUID data from d3d12_xs.dll, and none of their indirect calls at 0x40/0x48/0x60/0x120 is made on the device. The callers are in the game executable, so the slots stay Open. tools/d3d12_iid_scan.py reports which ID3D12 IIDs (from the SDK's d3d12.h) an image contains and what it imports from d3d12_xs.dll, warning on imports that could be IID data. It prints names and counts only. docs/d3d12_command_objects.md section 2.1 records the result with counts and how each column was measured. tests/test_d3d12_iid_scan.py covers the tool on a hand-written header and hand-built PE images (no game files). 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.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md
index 56e1fd5cd..4331d5ddb 100644
--- a/docs/d3d12_command_objects.md
+++ b/docs/d3d12_command_objects.md
@@ -112,6 +112,33 @@ texture-creation method at 76 where the PC interface has `CreateStateObject`/som
112by that work.** They are the four calls a game must make before it can have a queue, allocator, 112by that work.** They are the four calls a game must make before it can have a queue, allocator,
113list or fence, so they are the first thing a trace must confirm. 113list or fence, so they are the first thing a trace must confirm.
114 114
115**They cannot be measured from the package either (D3D-350).** The package ships no D3D12 runtime:
116the 16 DLLs in [`game/xbox-1.0.2.1.json`](../game/xbox-1.0.2.1.json) do not include
117`d3d12_xs.dll`, which is part of the console OS, and the device clients that are shipped never call
118these four slots. Measured on 1.0.2.1 (counts only):
119
120| Image | `ID3D12*` IIDs it contains | Imports from `d3d12_xs.dll` | Calls at `0x40`/`0x48`/`0x60`/`0x120` on the device |
121|---|---|---|---|
122| `XboxBvhBuilder.dll` | `PipelineState`, `RootSignature` | `D3D12SerializeVersionedRootSignature` | none: no indirect call at any of the four offsets |
123| `amd_fidelityfx_upscaler_xbox.dll` | `CommandSignature`, `DescriptorHeap`, `Device`, `Heap`, `PipelineState`, `Resource`, `RootSignature`, `RootSignatureDeserializer` | `D3D12CreateRootSignatureDeserializer` | none: the 3 calls at `0x40` are `ID3D12Resource::Map` on a resource it has just created, the 29 at `0x48` are `Close`/`Unmap`-shaped calls with no `(type, &IID, &out)` arguments, the 4 at `0x60` are a function-pointer field in a plain struct (no vtable load), and there are none at `0x120` |
124| `amd_fidelityfx_loader_xbox.dll`, `Bink2Scarlett.dll` | none | none | — |
125
126Neither image contains the IID of `ID3D12CommandQueue`, `ID3D12CommandAllocator`,
127`ID3D12CommandList`, `ID3D12GraphicsCommandList`, `ID3D12Fence` or `ID3D12Fence1`, and neither
128can take one from `d3d12_xs.dll`: each imports one function there and no GUID data (ordinals
12923–115). A creator called through `IID_PPV_ARGS` needs that IID, so these clients do not create
130queues, allocators, lists or fences; they record into lists the game gives them. The interfaces
131that *are* present are the positive control: they are what each client is known to create
132(compute PSOs through slot 62, root signatures, descriptor heaps, and resources through slots 27
133and 76). The IID column is reproduced by `python -I tools/d3d12_iid_scan.py <package>/*.dll`
134(`tests/test_d3d12_iid_scan.py`); the call-site column comes from `dumpbin /disasm` listings,
135following each `0x40`/`0x48`/`0x60`/`0x120` call back to its receiver.
136
137So the four slots' callers are in the game executable, which the package does not contain (the
138same blocker as RT-5). Confidence for slots 8, 9, 12 and 36 stays **Open**: the table in §2.1 is
139still the SDK baseline. Once the executable is available, `tools/d3d12_iid_scan.py` run on it
140shows whether it carries these IIDs, and its call sites through them give the slots.
141
115### 2.2 Queue, allocator and fence 142### 2.2 Queue, allocator and fence
116 143
117`ID3D12CommandQueue` is declared at `d3d12.h:8701`. It has 19 slots (0–18); its own methods start 144`ID3D12CommandQueue` is declared at `d3d12.h:8701`. It has 19 slots (0–18); its own methods start