diff options
| author | rasptum <348594691+rasptum@users.noreply.github.com> | 2026-11-21 21:56:53 -0500 |
|---|---|---|
| committer | rasptum <348594691+rasptum@users.noreply.github.com> | 2026-11-21 21:56:53 -0500 |
| commit | 4fa0fb7dee0f7e9d78e719e2b05f3636e56fc773 (patch) | |
| tree | 69b1667f11d28fce3e1c6555d56ff40993372cd0 /docs | |
| parent | 67204bf8c0471335d9046890288b33e8d5e2875b (diff) | |
Runtime: ID3D12Resource::GetDesc fills in a defaulted Alignment, as the host does
A resource created with Alignment 0 read back Alignment 0 from the Vulkan-backed
device. The PC runtime and WARP report the placement alignment instead: 64 KiB,
or 4 MiB for a multisampled texture, and keep one the description asked for.
d3d12_resource_desc_test compares every GetDesc field of 26 committed and
reserved descriptions with the default adapter and WARP.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/d3d12_vulkan.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index d45a072a6..091f44667 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -875,6 +875,11 @@ The trace will enumerate them. | |||
| 875 | - `CreateCommittedResource`: allocate an aligned range in the arena for a buffer, or a separate `VkDeviceMemory` | 875 | - `CreateCommittedResource`: allocate an aligned range in the arena for a buffer, or a separate `VkDeviceMemory` |
| 876 | for an image; record the initial state. Map `D3D12_HEAP_TYPE_DEFAULT` to device-local memory, `UPLOAD`/`READBACK` | 876 | for an image; record the initial state. Map `D3D12_HEAP_TYPE_DEFAULT` to device-local memory, `UPLOAD`/`READBACK` |
| 877 | to separate host-visible buffers. This remains the path for buffers and for any PC-style committed resource. | 877 | to separate host-visible buffers. This remains the path for buffers and for any PC-style committed resource. |
| 878 | - `ID3D12Resource::GetDesc` returns the description with its defaults filled in, as the PC runtime does: `MipLevels` | ||
| 879 | 0 becomes the full chain, and `Alignment` 0 becomes the placement alignment, 64 KiB, or 4 MiB for a multisampled | ||
| 880 | texture (an alignment the description asked for is kept). **Implemented** and compared field by field with the | ||
| 881 | PC runtime and WARP by `d3d12_resource_desc_test`: 25 committed and reserved buffers and 2D, array, volume and | ||
| 882 | multisampled textures (measured on an RTX 3060 host and WARP, Windows 10). | ||
| 878 | - `CreateHeap`: reserve a VA range with the requested size/alignment. `CreatePlacedResource`: assign the resource | 883 | - `CreateHeap`: reserve a VA range with the requested size/alignment. `CreatePlacedResource`: assign the resource |
| 879 | the range at `heap_va + offset`; a buffer uses that range in the arena, an image uses the offset as a key and | 884 | the range at `heap_va + offset`; a buffer uses that range in the arena, an image uses the offset as a key and |
| 880 | binds its own memory. Vulkan image alignment can exceed D3D12's 64 KiB; because images do not share the arena, | 885 | binds its own memory. Vulkan image alignment can exceed D3D12's 64 KiB; because images do not share the arena, |