diff options
Diffstat (limited to 'docs/d3d12_command_objects.md')
| -rw-r--r-- | docs/d3d12_command_objects.md | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md index 86660a793..36a02e874 100644 --- a/docs/d3d12_command_objects.md +++ b/docs/d3d12_command_objects.md | |||
| @@ -565,10 +565,10 @@ shape and the shift around them, but the shape alone does not single the method | |||
| 565 | | 55 (`+0x1b8`) | **51** | `DiscardResource` | `(resource, null)` at `0x6dcb`, after the pending barriers are flushed through slot 26 | | 565 | | 55 (`+0x1b8`) | **51** | `DiscardResource` | `(resource, null)` at `0x6dcb`, after the pending barriers are flushed through slot 26 | |
| 566 | | 59 (`+0x1d8`) | — | console only (shape) | four calls, two shapes: `(1, blob, size)` at `0x6b5a` and `0x6d53`, the blob a run of qwords whose first is `0xf3080 \| (qword count & 0x7f)`; and `(0, &qword, 8)` with the qword 1 at `0x6e52` and `0x6eb8`, only when a profiling bit of the context is set (`0x6e2a`). The first argument is set as a byte (`mov dl, 1` / `xor edx, edx`). It looks like one slot for both ends of a GPU event; no public method takes a bool first. With 55 at +4 and 61 at +2, the two slots the console lacks are among 56–60 | | 566 | | 59 (`+0x1d8`) | — | console only (shape) | four calls, two shapes: `(1, blob, size)` at `0x6b5a` and `0x6d53`, the blob a run of qwords whose first is `0xf3080 \| (qword count & 0x7f)`; and `(0, &qword, 8)` with the qword 1 at `0x6e52` and `0x6eb8`, only when a profiling bit of the context is set (`0x6e2a`). The first argument is set as a byte (`mov dl, 1` / `xor edx, edx`). It looks like one slot for both ends of a GPU event; no public method takes a bool first. With 55 at +4 and 61 at +2, the two slots the console lacks are among 56–60 | |
| 567 | | 61 (`+0x1e8`) | **59** | `ExecuteIndirect` | `(signature, 1, argument buffer, offset, null, 0)` at `0x59a0` | | 567 | | 61 (`+0x1e8`) | **59** | `ExecuteIndirect` | `(signature, 1, argument buffer, offset, null, 0)` at `0x59a0` | |
| 568 | | 71 (`+0x238`) | — | console only | `Write32BitValueBottomOfPipeX(address, u32 value, flush, flags)`: the 32-bit value, written into the title's memory once the submission that carried the list has completed on the GPU | | 568 | | 71 (`+0x238`) | — | console only | `Write32BitValueBottomOfPipeX(address, u32 value, flush, flags)`: the 32-bit value, written into the title's memory once the list's work has run (the list values, [d3d12_xs_console_abi.md §5.5](d3d12_xs_console_abi.md)) | |
| 569 | | 72 (`+0x240`) | — | console only | `Write64BitValueBottomOfPipeX(address, u64 value, flush, flags)`: the 64-bit value; flags 1 ask for a GPU timestamp and 2 for a system timestamp instead of the value the call carried | | 569 | | 72 (`+0x240`) | — | console only | `Write64BitValueBottomOfPipeX(address, u64 value, flush, flags)`: the 64-bit value; flags 1 ask for a GPU timestamp and 2 for a system timestamp instead of the value the call carried | |
| 570 | | 73 (`+0x248`) | — | console only | `Wait32BitValueX`: a masked wait on the 32-bit value; stays a no-op | | 570 | | 73 (`+0x248`) | — | console only | `Wait32BitValueX`: a wait on the 32-bit value; the list values hold the queue until it compares true or times out (§5.5 there) | |
| 571 | | 74 (`+0x250`) | — | console only | `Wait64BitValueX`: a masked wait on the 64-bit value; stays a no-op | | 571 | | 74 (`+0x250`) | — | console only | `Wait64BitValueX`: the same on the 64-bit value | |
| 572 | | 85 (`+0x2a8`) | — | `CopyTextureRegion` shape (inferred) | run: `(stack pointer, 0, 0)`, twice per dispatch. Statically six arguments, `(&dst, 0, 0, 0, &src, null)`: the public `CopyTextureRegion` (PC 16) with two `D3D12_TEXTURE_COPY_LOCATION`s, not one pointer. At `0x7147` dst is `{texture, SUBRESOURCE_INDEX, 0}` and src `{buffer, PLACED_FOOTPRINT, footprint}`, the footprint from device slot 38 (`GetCopyableFootprints`, `0x708b`); at `0x7191` both are subresource 0 (texture to texture). The caller also clears the next stack argument (`0x70e7`); whether the method takes a seventh is open, as is what console slot 16 is | | 572 | | 85 (`+0x2a8`) | — | `CopyTextureRegion` shape (inferred) | run: `(stack pointer, 0, 0)`, twice per dispatch. Statically six arguments, `(&dst, 0, 0, 0, &src, null)`: the public `CopyTextureRegion` (PC 16) with two `D3D12_TEXTURE_COPY_LOCATION`s, not one pointer. At `0x7147` dst is `{texture, SUBRESOURCE_INDEX, 0}` and src `{buffer, PLACED_FOOTPRINT, footprint}`, the footprint from device slot 38 (`GetCopyableFootprints`, `0x708b`); at `0x7191` both are subresource 0 (texture to texture). The caller also clears the next stack argument (`0x70e7`); whether the method takes a seventh is open, as is what console slot 16 is | |
| 573 | | 141 (`+0x468`) | — | console only | `(2, GPU VA, size, n)` at `0x65f8`: binds a buffer the DLL names `FFX_XBox_ComputeScratch`; `n` is the bound pipeline's scratch value from pipeline slot 11 (see above) | | 573 | | 141 (`+0x468`) | — | console only | `(2, GPU VA, size, n)` at `0x65f8`: binds a buffer the DLL names `FFX_XBox_ComputeScratch`; `n` is the bound pipeline's scratch value from pipeline slot 11 (see above) | |
| 574 | 574 | ||
| @@ -584,7 +584,12 @@ are at 71/72 rather than at 69/70; and `XboxBvhBuilder.dll` reads a 32-bit value | |||
| 584 | (slot 73). The call shapes are xcl's (crates/xcl/src/hle/d3d12x/list_x.rs, GPL-2.0) and the deferred | 584 | (slot 73). The call shapes are xcl's (crates/xcl/src/hle/d3d12x/list_x.rs, GPL-2.0) and the deferred |
| 585 | bottom-of-pipe write model is VIctory's (crates/victory-gpu/src/list.rs, GPL-3.0): the write is not a GPU command, | 585 | bottom-of-pipe write model is VIctory's (crates/victory-gpu/src/list.rs, GPL-3.0): the write is not a GPU command, |
| 586 | it is a CPU write into the title's memory, made after the submission that recorded it has run. Both projects are | 586 | it is a CPU write into the title's memory, made after the submission that recorded it has run. Both projects are |
| 587 | cited for facts and for the model only, no code copied. | 587 | cited for facts and for the model only, no code copied. The runtime has two writers for them, one per list: the list |
| 588 | values (`runtime/shims/d3d12_xs_list_values.h`, on by default) for the lists they track, with the waits of slots 73 | ||
| 589 | and 74; and the GPU-label path (`runtime/src/vulkan_gpu_labels.h`, `LEONIDA_GPU_LABELS=1`) for the others. Both | ||
| 590 | land a write whose address is a GPU address arena offset in the arena, never at that number in host memory, and one | ||
| 591 | on a page of xmem's that the title's view keeps `PAGE_NOACCESS` through xmem's own mapping of the physical page | ||
| 592 | (`runtime/src/value_write_sink.h`). | ||
| 588 | 593 | ||
| 589 | **The list object is wider than its vtable, and this is what that width is for.** Before a root-argument or dispatch | 594 | **The list object is wider than its vtable, and this is what that width is for.** Before a root-argument or dispatch |
| 590 | call the DLL checks a write cursor at `+0x18` against a limit (`+0x30` for root arguments, `+0x28` for a dispatch). While there is room, | 595 | call the DLL checks a write cursor at `+0x18` against a limit (`+0x30` for root arguments, `+0x28` for a dispatch). While there is room, |