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:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-22 09:48:41 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-22 09:48:41 -0500
commit7886972a6b19580d8e28cf6c62763339f49208f6 (patch)
tree525bcd0f019461c1cb3e4f2ed157bda768a47f12 /docs/d3d12_command_objects.md
parentc7801ac6fbdf154735159b6b1f3b223b4f39cf3d (diff)
parent6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff)
Merge upstream main
# Conflicts: # docs/d3d12_command_objects.md
Diffstat (limited to 'docs/d3d12_command_objects.md')
-rw-r--r--docs/d3d12_command_objects.md30
1 files changed, 25 insertions, 5 deletions
diff --git a/docs/d3d12_command_objects.md b/docs/d3d12_command_objects.md
index 9fd4027c7..bc42f3067 100644
--- a/docs/d3d12_command_objects.md
+++ b/docs/d3d12_command_objects.md
@@ -372,11 +372,11 @@ vtable pointer of a public object.
372 with `IID_ID3D12PipelineState`. The DLL's own messages name it `DeserializeComputePipelineStateX`. Its desc is the 372 with `IID_ID3D12PipelineState`. The DLL's own messages name it `DeserializeComputePipelineStateX`. Its desc is the
373 root signature at `+0x00`, then pointer and size pairs for the shader's `FSPX` entries: kind 0 at `+0x08`, kind 1 373 root signature at `+0x00`, then pointer and size pairs for the shader's `FSPX` entries: kind 0 at `+0x08`, kind 1
374 at `+0x18`, a copy of the kind-6 program at `+0x28` with its exact size at `+0x30`, and kind 7 at `+0x38` 374 at `+0x18`, a copy of the kind-6 program at `+0x28` with its exact size at `+0x30`, and kind 7 at `+0x38`
375 ([fspx.md](fspx.md)). The proxy used to forward it to the PC method at the same index; it now refuses it 375 ([fspx.md](fspx.md)). The proxy maps the console desc to `D3D12_COMPUTE_PIPELINE_STATE_DESC` and routes it to
376 (`E_NOTIMPL`). When it fails, the DLL takes slot 62; its message for that failure calls the fallback "NewBE". The 376 `CreateComputePipelineState` (PC slot 11). On a PC device that call fails (`E_FAIL`) because the code is not a PC
377 Vulkan device's `CreateComputePipelineState` takes the bare kind-6 program from `+0x28` and finds its translated 377 shader, so the DLL falls back to slot 62; its message for that failure calls the fallback "NewBE". The Vulkan
378 module by `fspx_code_sha256` ([fspx.md](fspx.md), "Build and run-time lookup"), so a mapping of the description onto 378 device takes the bare kind-6 program and finds its translated module by `fspx_code_sha256` ([fspx.md](fspx.md),
379 that call (#1714) resolves; the mapping itself is not on `main`. 379 "Build and run-time lookup"), for the programs the build translated.
380- **Slot 62** (call at `0x5825`) takes the measured `(D3D12_COMPUTE_PIPELINE_STATE_DESC*, 0, 0, riid, out)`. The PC 380- **Slot 62** (call at `0x5825`) takes the measured `(D3D12_COMPUTE_PIPELINE_STATE_DESC*, 0, 0, riid, out)`. The PC
381 runtime refuses the DLL's code (`E_FAIL`): it is not a PC shader. The DLL's pipeline function then returns 381 runtime refuses the DLL's code (`E_FAIL`): it is not a PC shader. The DLL's pipeline function then returns
382 `0x8000000d` (`0x4b85`), but the dispatch goes on, records the null pipeline and faults (`0x65ff`), which is where a 382 `0x8000000d` (`0x4b85`), but the dispatch goes on, records the null pipeline and faults (`0x65ff`), which is where a
@@ -569,6 +569,26 @@ Queues and fences are wrapped the same way.
569 and a heap proxy given to a list's `SetDescriptorHeaps` reaches the real list unchanged. The command-list 569 and a heap proxy given to a list's `SetDescriptorHeaps` reaches the real list unchanged. The command-list
570 proxy of §3.5a adds the unwrap at both places. 570 proxy of §3.5a adds the unwrap at both places.
571 571
572Command allocators get the same kind of proxy: device slot 9 (`CreateCommandAllocator`) returns one.
573
574- **What is forwarded.** The public chain, 9 slots: the base chain and `Reset` at 8. A slot past it, up to the
575 end of a 64-slot table, is logged and refused, and a read past the table faults in its own guard region.
576 The console allocator's extra methods are not measured.
577- **Where a list takes it.** A list takes an allocator from the title in `CreateCommandList` and `Reset`, so
578 the proxy is safe only where the list side resolves it. Slot 9 therefore wraps an allocator only when it
579 answers `kLeonidaCommandAllocatorTag` (`d3d12_xs_device.h`). That is the Vulkan layer's own allocator, whose
580 `CommandAllocator::from()` resolves the proxy for both list calls.
581- **On the host runtime.** A PC runtime allocator comes back unwrapped, logged once, because the PC runtime's
582 lists would take a proxy for their own allocator. A command-list proxy that unwraps at `Reset` (§3.5a) is
583 what lets the host backend wrap allocators too.
584- **Residency.** An allocator is a pageable, so `MakeResident`/`Evict`/`SetResidencyPriority`/
585 `EnqueueMakeResident` unwrap allocator proxies like heap, queue and fence proxies.
586
587`allocator_proxy_test` checks this on the Vulkan device and on the host runtime, and the mock test checks it
588over allocators with and without the tag. On the Vulkan device it checks forwarding, the refused tail, the guard
589region, identity, and D3D12's allocator rules through the proxy, and runs a list created and `Reset` on the
590proxy whose copies go through the queue and fence proxies and are read back.
591
572Which of this is measured: the slot numbers and signatures are the SDK's (public). That the console 592Which of this is measured: the slot numbers and signatures are the SDK's (public). That the console
573keeps the public queue and fence slots, and device slots 8/32/36/75, is an assumption the package cannot 593keeps the public queue and fence slots, and device slots 8/32/36/75, is an assumption the package cannot
574test, as above. The proxies make a wrong assumption visible in the log; they do not prove it right. 594test, as above. The proxies make a wrong assumption visible in the log; they do not prove it right.