diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 22:35:34 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 22:35:34 -0500 |
| commit | 6ed716a99a7416f1e8a60c2e38e128876ab752ec (patch) | |
| tree | 3c35526aa8b96594252c82c278ab19b9aa3a98ba /docs/d3d12_command_objects.md | |
| parent | 028a414fade7058a96e5933d1325f374a0026588 (diff) | |
| parent | bfef489cb6307fa4e1dc6ed2c40bfc0ce120d066 (diff) | |
Merge main into RT-QUEUE-SIGNAL (#430)
Everything below this rung (#414, #416, #427) and the rung's own routing are in
main already, through #984 and #939, in main's form; what is left of #430 is
its test of queue slot 17, ported onto main's layout detection.
Conflicts, all resolved to main's form:
- runtime/shims/d3d12_xs_device.cpp: main's queue slot 16/17 rule (a fence
there is the newer layout's Signal/Wait, for any caller) replaces the
rung's caller-gated rule; main's PresentX routing (slot 30, or 32 once the
newer layout is detected, LEONIDA_XS_PRESENT_X_SLOT) and lazily built
presenter replace the fixed slot 32 of #414; main's list proxy already
translates the CPU handles of console list slots 50 to 54 (#416) and
drops unordered access from a depth-stencil texture at slot 76 (#427).
- runtime/shims/d3d12_xs_device.h, runtime/shims/xbox_present.cpp,
runtime/shims/xbox_present.h, runtime/src/frame_pacer.h: main's shared
FrameTokenSource (Logan's piece of #414, as #984 carried it).
- runtime/shims/d3d12_xs_desc_clean.h, runtime/test/device_proxy_test.cpp:
main's without_depth_stencil_uav and its slot 25/76 test (#427).
- runtime/test/xs_proxy_mock_test.cpp: main's file, which already has
check_list_cpu_handles (#416's cases and more); the rung's slot 16/17 case
is ported to main's form at the end of check_xbox_queue_slots: slot 16 and
17 with a fence reach PC Signal and Wait with the real fence, not the PC
getters, and the fence proxy's vtable pointer is unchanged. The rung's
host-caller and no-fence expectations are dropped: under main's rule a
fence at 16 proves the newer layout, after which those calls answer S_OK.
Auto-merged, then set to main's content:
- runtime/test/queue_proxy_test.cpp: #414's call of queue slot 32 as an
overridden slot; on main slot 32 is routed only on the newer layout and the
sweep of the console tail already calls it.
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 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md index 5a214e325..1aef12206 100644 --- a/docs/d3d12_command_objects.md +++ b/docs/d3d12_command_objects.md | |||
| @@ -375,9 +375,10 @@ section 3.5a), and the console list has methods well past the PC tail: 71, 73, 8 | |||
| 375 | FSR DLL. | 375 | FSR DLL. |
| 376 | 376 | ||
| 377 | Slot 148 matters beyond the builder: the address it returns is written by the CPU and passed unchanged to the GPU | 377 | Slot 148 matters beyond the builder: the address it returns is written by the CPU and passed unchanged to the GPU |
| 378 | as a root SRV address, so console upload memory has the same address for the CPU and the GPU. A replacement must | 378 | as a root SRV address, so console upload memory has the same address for the CPU and the GPU. On a PC the two |
| 379 | return memory whose CPU pointer is also a valid GPU address (for this layer: inside the arena of | 379 | address spaces differ, so `d3d12_xs_device.cpp` carves a bump arena out of persistently-mapped UPLOAD-heap |
| 380 | [d3d12_vulkan.md §3.3](d3d12_vulkan.md)). | 380 | buffers: the title writes the mapped memory and the six root descriptor setters and the IA/SO view setters |
| 381 | translate the CPU pointer to the chunk's buffer device address before forwarding. | ||
| 381 | 382 | ||
| 382 | The function at `0xd580` uses the 71/73 pair instead of the slot-146 barrier when the byte at RVA `0xd773c` is set. | 383 | The function at `0xd580` uses the 71/73 pair instead of the slot-146 barrier when the byte at RVA `0xd773c` is set. |
| 383 | That byte is one of seven bools at `0xd7738`–`0xd773e` in zero-initialised `.bss`. The only accesses to them in | 384 | That byte is one of seven bools at `0xd7738`–`0xd773e` in zero-initialised `.bss`. The only accesses to them in |
| @@ -764,6 +765,12 @@ Queues and fences are wrapped the same way. | |||
| 764 | object implements but the proxy does not model is logged once and refused. | 765 | object implements but the proxy does not model is logged once and refused. |
| 765 | - **The refused tail.** A slot past the public chain, up to the end of the proxy's own table (128 queue and | 766 | - **The refused tail.** A slot past the public chain, up to the end of the proxy's own table (128 queue and |
| 766 | 64 fence slots, every one a thunk), logs its first four argument words once and returns `E_NOTIMPL`. | 767 | 64 fence slots, every one a thunk), logs its first four argument words once and returns `E_NOTIMPL`. |
| 768 | - **Fence slot 12.** The one served slot past the chain. The retail executable calls it as | ||
| 769 | `(value, descriptor, flags)` and reads the return as a pointer to the fence's 64-bit completed value: it | ||
| 770 | compares that value with `~0` (device removed) and subtracts the value it waits for. The proxy returns a | ||
| 771 | per-fence mirror. Completion events refresh it immediately. A 10 ms wait timeout also refreshes it if the | ||
| 772 | fence rewinds below the pending event's threshold. Slot 12 and the CPU `Signal` (10) refresh it synchronously. | ||
| 773 | The descriptor's second word is a code pointer, which is not called. | ||
| 767 | - **The guard region.** Each table sits at the end of the first page of a 64 KiB reservation, and the rest | 774 | - **The guard region.** Each table sits at the end of the first page of a 64 KiB reservation, and the rest |
| 768 | of that reservation is never committed. A slot past the table therefore faults on the vtable read itself, | 775 | of that reservation is never committed. A slot past the table therefore faults on the vtable read itself, |
| 769 | inside the reservation, and a vectored handler logs the slot before the fault goes on. A vtable read that | 776 | inside the reservation, and a vectored handler logs the slot before the fault goes on. A vtable read that |
| @@ -830,7 +837,7 @@ command object. | |||
| 830 | | Item | Why it is blocked | | 837 | | Item | Why it is blocked | |
| 831 | |---|---| | 838 | |---|---| |
| 832 | | `PresentX` | No slot, signature, plane struct or swapchain/plane parameters. Prior art gives only names, the 2-plane/8-view limits and four flag names. | | 839 | | `PresentX` | No slot, signature, plane struct or swapchain/plane parameters. Prior art gives only names, the 2-plane/8-view limits and four flag names. | |
| 833 | | `CreateCommandQueueX` | No slot or parameter layout; only the UMD message and an inferred shape. | | 840 | | `CreateCommandQueueX` | No slot or parameter layout; only the UMD message and an inferred shape. The retail title calls device slot 48 as (desc, riid, out) with a 32-byte desc (#6954), which differs from the (pDesc, pShaderQueueParams, riid, out) shape inferred above. | |
| 834 | | `SuspendX` / `ResumeX` | No slot or signature. | | 841 | | `SuspendX` / `ResumeX` | No slot or signature. | |
| 835 | | 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. | | 842 | | 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 | | 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`. | | 843 | | 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`. | |