diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 15:14:22 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 15:14:22 -0500 |
| commit | c6fc317c257bb1eeb6fb8cc8702d3bfb9746c661 (patch) | |
| tree | ebc5659f7f3ff30b582309c87b1dbade4855beb7 /docs/d3d12_command_objects.md | |
| parent | 295c523c418e41a7d78736dbccbd956bdccfb82e (diff) | |
| parent | 56839d2dd9a7de444b267216b49cc25938ef6659 (diff) | |
Merge pull request #3052 from NiiRoZz
Diffstat (limited to 'docs/d3d12_command_objects.md')
| -rw-r--r-- | docs/d3d12_command_objects.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md index 2cc41a7bf..789ce9bb2 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 | |||
| 112 | by that work.** They are the four calls a game must make before it can have a queue, allocator, | 112 | by that work.** They are the four calls a game must make before it can have a queue, allocator, |
| 113 | list or fence, so they are the first thing a trace must confirm. | 113 | list 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: | ||
| 116 | the 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 | ||
| 118 | these 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 | |||
| 126 | Neither image contains the IID of `ID3D12CommandQueue`, `ID3D12CommandAllocator`, | ||
| 127 | `ID3D12CommandList`, `ID3D12GraphicsCommandList`, `ID3D12Fence` or `ID3D12Fence1`, and neither | ||
| 128 | can take one from `d3d12_xs.dll`: each imports one function there and no GUID data (ordinals | ||
| 129 | 23–115). A creator called through `IID_PPV_ARGS` needs that IID, so these clients do not create | ||
| 130 | queues, allocators, lists or fences; they record into lists the game gives them. The interfaces | ||
| 131 | that *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 | ||
| 133 | and 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, | ||
| 135 | following each `0x40`/`0x48`/`0x60`/`0x120` call back to its receiver. | ||
| 136 | |||
| 137 | So the four slots' callers are in the game executable, which the package does not contain (the | ||
| 138 | same blocker as RT-5). Confidence for slots 8, 9, 12 and 36 stays **Open**: the table in §2.1 is | ||
| 139 | still the SDK baseline. Once the executable is available, `tools/d3d12_iid_scan.py` run on it | ||
| 140 | shows 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 |