diff options
| author | CLHelper <359823989+CLHelper@users.noreply.github.com> | 2026-11-22 15:11:45 +0000 |
|---|---|---|
| committer | CLHelper <359823989+CLHelper@users.noreply.github.com> | 2026-11-22 15:11:45 +0000 |
| commit | 51345fc6b1278ee2f7e03787e360e0f810550422 (patch) | |
| tree | 89c4b6bce4758aadbdde8c6189ee73363f2d3037 /docs/d3d12_command_objects.md | |
| parent | 003e78129303643a3fdc9e5f0e31a01b09759236 (diff) | |
docs: the five-word inline dispatch and byte +0x143 of the console list
Section 3.5a names the four-word inline dispatch. The BVH builder also
writes a five-word form, 0x4003cc00, x, 1, 1, W, at 0x14972, 0x15215,
0x1536a and 0x1d002. It is the inline form of console slot 80: when the
buffer is full each site calls +0x280 with the same (x, 1, 1, W). W is
0x8020 at two sites and 0x20 at the other two.
Byte +0x143 is read at 31 sites in the builder and one in the FSR DLL
and written by neither; every store into +0x140..+0x143 is a byte store
to +0x140 or +0x141. A replacement list can leave it 0. The slot-80 row
of section 3.3a points at the packet and the 0x20 calls.
Diffstat (limited to 'docs/d3d12_command_objects.md')
| -rw-r--r-- | docs/d3d12_command_objects.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md index a55c3d964..6e80c22b6 100644 --- a/docs/d3d12_command_objects.md +++ b/docs/d3d12_command_objects.md | |||
| @@ -303,7 +303,7 @@ of an inline write of the same values. | |||
| 303 | | `0x1a3b0` | `+0x168` | 45 → 41 `SetComputeRootUnorderedAccessView` | `(0, VA)` (inline: header + a 64-bit value) | **Measured** shape | | 303 | | `0x1a3b0` | `+0x168` | 45 → 41 `SetComputeRootUnorderedAccessView` | `(0, VA)` (inline: header + a 64-bit value) | **Measured** shape | |
| 304 | | `0x20ed6` | `+0x4a0` | 148 → none | `(list, count * 40, 16)` returns a pointer; on null the DLL prints `D3D12 XDXR Error: Failed to allocate upload buffer` and throws `E_FAIL` | **Measured**: an upload allocator `(size, alignment)` | | 304 | | `0x20ed6` | `+0x4a0` | 148 → none | `(list, count * 40, 16)` returns a pointer; on null the DLL prints `D3D12 XDXR Error: Failed to allocate upload buffer` and throws `E_FAIL` | **Measured**: an upload allocator `(size, alignment)` | |
| 305 | | `0x20f99` | `+0x158` | 43 → 39 `SetComputeRootShaderResourceView` | `(0, p)`, `p` the pointer slot 148 returned at `0x20ed6`, unchanged | **Measured**: the CPU pointer is used as the GPU address | | 305 | | `0x20f99` | `+0x158` | 43 → 39 `SetComputeRootShaderResourceView` | `(0, p)`, `p` the pointer slot 148 returned at `0x20ed6`, unchanged | **Measured**: the CPU pointer is used as the GPU address | |
| 306 | | `0x149ba` | `+0x280` | 80 → none | `(x, 1, 1, 0x8020)`: `EDX=EDI`, `R8D=R9D=1`, fifth argument `0x8020` (inline: a five-dword packet) | Inferred: a `Dispatch` with one extra word | | 306 | | `0x149ba` | `+0x280` | 80 → none | `(x, 1, 1, 0x8020)`: `EDX=EDI`, `R8D=R9D=1`, fifth argument `0x8020` (inline: the five-dword packet `0x4003cc00, x, 1, 1, W` of section 3.5a; the calls at `0x1525d` and `0x153b4` pass `0x20`) | Inferred: a `Dispatch` with one extra word | |
| 307 | | `0xd6de` | `+0x238` | 71 → none | `(&label, counter, 0 or 0x1000, 0)`: the counter at `[rbx+0x9c]` is incremented first; `0x1000` on the last item of a batch | Inferred: a GPU write of a 32-bit value to memory | | 307 | | `0xd6de` | `+0x238` | 71 → none | `(&label, counter, 0 or 0x1000, 0)`: the counter at `[rbx+0x9c]` is incremented first; `0x1000` on the last item of a batch | Inferred: a GPU write of a 32-bit value to memory | |
| 308 | | `0xd679` | `+0x248` | 73 → none | `(&label, 3, reference, 0xffffffff, 0)` | Inferred: a GPU wait until the masked value compares (function 3) with the reference | | 308 | | `0xd679` | `+0x248` | 73 → none | `(&label, 3, reference, 0xffffffff, 0)` | Inferred: a GPU wait until the masked value compares (function 3) with the reference | |
| 309 | | `0xd7b4` | `+0x490` | 146 → GCL7 80 `Barrier` | the same global UAV barrier as `0x1da02` | **Measured** | | 309 | | `0xd7b4` | `+0x490` | 146 → GCL7 80 `Barrier` | the same global UAV barrier as `0x1da02` | **Measured** | |
| @@ -426,6 +426,18 @@ call the DLL checks a write cursor at `+0x18` against a limit (`+0x30` for root | |||
| 426 | it writes the command into that buffer itself instead of calling: a root argument is a header word from the | 426 | it writes the command into that buffer itself instead of calling: a root argument is a header word from the |
| 427 | per-root-parameter table at `+0x344` and then the value (32 bits for a descriptor table, 64 for the slot-41 GPU VA), | 427 | per-root-parameter table at `+0x344` and then the value (32 bits for a descriptor table, 64 for the slot-41 GPU VA), |
| 428 | a dispatch four words (`0x4002c400`, or `(flag | 0x1000ba00) << 2`, then x, y, z). | 428 | a dispatch four words (`0x4002c400`, or `(flag | 0x1000ba00) << 2`, then x, y, z). |
| 429 | The BVH builder also writes a five-word dispatch, `0x4003cc00, x, 1, 1, W`. | ||
| 430 | - **Sites:** `0x14972`, `0x15215`, `0x1536a` and `0x1d002`, each checked against the dispatch limit `+0x28`. The | ||
| 431 | cursor advances 20 bytes and the flag byte at `+0x140` is cleared. | ||
| 432 | - **It is the inline form of console slot 80** (section 3.3a). When the buffer is full, each site calls slot 80 | ||
| 433 | (`+0x280`) instead, as `(x, 1, 1, W)` with the same `W`. | ||
| 434 | - **`W` is `0x8020`** at `0x14972` and `0x1d002`, and **`0x20`** at `0x15215` and `0x1536a`. What bit 15 selects is | ||
| 435 | open. | ||
| 436 | |||
| 437 | The FSR DLL never writes this form. | ||
| 438 | **Byte `+0x143` is console-runtime state:** the BVH builder reads it at 31 sites and the FSR DLL at one (all `cmp | ||
| 439 | byte ptr [reg+143h]`), but neither DLL writes it. Every store into `+0x140`..`+0x143` in either DLL is a byte store to | ||
| 440 | `+0x140` or `+0x141`, and no wider store reaches `+0x143`. A replacement list can leave it 0. | ||
| 429 | It sets a flag byte at `+0x140`, stores a flag at `+0x141` from the | 441 | It sets a flag byte at `+0x140`, stores a flag at `+0x141` from the |
| 430 | pipeline, and copies 32 bytes of the pipeline object (from its `+0x10`) to `+0x544`. These are the fields | 442 | pipeline, and copies 32 bytes of the pipeline object (from its `+0x10`) to `+0x544`. These are the fields |
| 431 | section 3.4 measured in the BVH builder's helper without a meaning (`+0x18`, `+0x30`, `+0x140`, `+0x344`, `+0x544`). | 443 | section 3.4 measured in the BVH builder's helper without a meaning (`+0x18`, `+0x30`, `+0x140`, `+0x344`, `+0x544`). |