diff options
| author | aslan2142 <jan.trencansky@protonmail.com> | 2026-11-25 04:26:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-25 04:26:54 +0100 |
| commit | bfef489cb6307fa4e1dc6ed2c40bfc0ce120d066 (patch) | |
| tree | 19e2f01d50809de00ecba664b4044eed1aad2c36 /docs/d3d12_vulkan.md | |
| parent | 98efc22ca3d2841b985eb36d4afbe7d434628670 (diff) | |
| parent | 3ee0037fd3accba459d0d5ecd8acad831174d4d7 (diff) | |
Merge pull request #1232 from iFeyz/feat/direct-heap-graphics
d3d12: graphics draws supply the directly indexed heaps after their root arguments (RT-DIRECT-HEAP-GRAPHICS)
Diffstat (limited to 'docs/d3d12_vulkan.md')
| -rw-r--r-- | docs/d3d12_vulkan.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index 161705e47..97d737c8e 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -1763,10 +1763,17 @@ The game can use D3D12 descriptors in three ways, and the layer must handle all | |||
| 1763 | only when the signature has its flag, snapshotted per draw. Vertex, pixel and geometry shaders share one | 1763 | only when the signature has its flag, snapshotted per draw. Vertex, pixel and geometry shaders share one |
| 1764 | user-data block and that layout, so one write serves all three; a signature whose explicit arguments take | 1764 | user-data block and that layout, so one write serves all three; a signature whose explicit arguments take |
| 1765 | s8..s10 gives s11, one whose arguments take s8..s11 gives s12 (the two program reads above). A mesh shader reads | 1765 | s8..s10 gives s11, one whose arguments take s8..s11 gives s12 (the two program reads above). A mesh shader reads |
| 1766 | its arguments from s16, which is not modelled, so in a mesh pipeline only the pixel shader gets the heaps. A | 1766 | push dword d as s(d + 8) through its root window (section 3.5), so `DispatchMesh` records the same dwords and |
| 1767 | signature that keeps the s0 graphics layout, or whose arguments fill s31, gets none (logged once). | 1767 | the mesh stage finds the resource heap at s(16 + end − 8), right after its arguments from s16, where DadaCap |
| 1768 | `d3d12_graphics_direct_heaps_test` checks the recorded draws and what a vertex and a pixel shader read, with | 1768 | reports every directly indexed program of the retail library reads it, for compute from s4, VS/PS/GS from s8 |
| 1769 | and without the flags. Set `LEONIDA_GRAPHICS_DIRECT_HEAPS=0` to restore the previous draw arguments. | 1769 | and mesh from s16 (issue #14, comment 7143020922, on a `boot-prototype` run; not reproduced in this |
| 1770 | repository). A mesh signature that fills the window leaves no room there: a heap past s31 of the mesh shader | ||
| 1771 | (push dword 24 or later) is logged once. A signature that keeps the s0 graphics layout, or whose arguments fill | ||
| 1772 | s31, gets none (logged once). `d3d12_graphics_direct_heaps_test` checks the recorded draws and what a vertex | ||
| 1773 | and a pixel shader read, with and without the flags; `d3d12_mesh_test` checks that a mesh draw records the | ||
| 1774 | vertex draw's dwords, a resource-only rebind, a signature ending at s30 and one on the s0 layout (recorded | ||
| 1775 | arguments only; no GPU read through a mesh shader). Set `LEONIDA_GRAPHICS_DIRECT_HEAPS=0` to restore the | ||
| 1776 | previous draw arguments. | ||
| 1770 | 3. **Game-built descriptor memory.** The game writes raw T#/S# bytes into a heap itself, without calling | 1777 | 3. **Game-built descriptor memory.** The game writes raw T#/S# bytes into a heap itself, without calling |
| 1771 | `CreateShaderResourceView`. The shaders then read those bytes exactly as in case 1. | 1778 | `CreateShaderResourceView`. The shaders then read those bytes exactly as in case 1. |
| 1772 | 1779 | ||