diff options
| author | Shang Li <144836394+Mby159@users.noreply.github.com> | 2026-11-24 15:14:59 +0800 |
|---|---|---|
| committer | Shang Li <144836394+Mby159@users.noreply.github.com> | 2026-11-24 12:35:29 +0000 |
| commit | 916dbc619df63fb169cf5e587f4d53d8884eaccd (patch) | |
| tree | e1dabdbf1f403785e973200b4a48d68c978afba4 /docs | |
| parent | 21625bca8c675c62f9dbffc318ce6a59d57faf31 (diff) | |
d3d12/vulkan: the mesh statistics pool enables no forbidden counter (D3D-291)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/d3d12_vulkan.md | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index 3ae29163e..eb8f11740 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -3288,23 +3288,24 @@ Implemented (`QueryHeap` in `runtime/shims/d3d12_vulkan_device.cpp`, the query c | |||
| 3288 | recording. The resolve fallback is unchanged: only resolves needing dispatches are refused there. | 3288 | recording. The resolve fallback is unchanged: only resolves needing dispatches are refused there. |
| 3289 | - **Mesh draws during a pipeline-statistics query** (D3D-291). D3D12 allows `DispatchMesh` inside a statistics query | 3289 | - **Mesh draws during a pipeline-statistics query** (D3D-291). D3D12 allows `DispatchMesh` inside a statistics query |
| 3290 | and reads its input-assembly, vertex, geometry and tessellation fields as 0. Vulkan forbids `vkCmdDrawMeshTasksEXT` | 3290 | and reads its input-assembly, vertex, geometry and tessellation fields as 0. Vulkan forbids `vkCmdDrawMeshTasksEXT` |
| 3291 | while a query with those counters is active (`VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076`), and the heap's | 3291 | while a query with the input-assembly, vertex, geometry, tessellation or clipping counters is active |
| 3292 | pool has all eleven. So a statistics query that holds a mesh draw is split as above, and a split before a draw stays | 3292 | (`VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076`), and the heap's pool has all eleven. So a statistics query |
| 3293 | outside its rendering scope. A segment's first draw decides its pool: the submission's full pool, or a second pool | 3293 | that holds a mesh draw is split as above, and a split before a draw stays outside its rendering scope. A segment's first draw decides its pool: the submission's full pool, or a second pool |
| 3294 | with only clipping invocations and primitives, fragment and compute invocations. A later draw of the other kind ends | 3294 | with only the fragment and compute invocations, the two the VUID leaves allowed. A later draw of the other kind ends |
| 3295 | the segment and begins one of its own kind; dispatches and segments without draws use the full pool, and | 3295 | the segment and begins one of its own kind; dispatches and segments without draws use the full pool, and |
| 3296 | `ExecuteIndirect` draws count as vertex draws. The sum copies a mesh segment's four counters into fields 5 to 8 of | 3296 | `ExecuteIndirect` draws count as vertex draws. The sum copies a mesh segment's two counters into fields 7 and 8 of |
| 3297 | its record, and `statistics_sum.comp` adds them as `CInvocations`, `CPrimitives`, `PSInvocations` and | 3297 | its record, and `statistics_sum.comp` adds them as `PSInvocations` and `CSInvocations`, so the other fields get |
| 3298 | `CSInvocations`, so the other fields get nothing from it. A query that holds only mesh draws is one mesh segment, | 3298 | nothing from it. D3D12 counts the clipping invocations and primitives of a mesh pipeline, but Vulkan has no counter |
| 3299 | resolved through the same sum. Without the compute helper there is no segment pool and such a list is refused | 3299 | for them during a mesh draw, so `CInvocations` and `CPrimitives` read 0 for a mesh segment. A query that holds only |
| 3300 | (`unsupported`) rather than run unsplit; so is one on the single-list `replay()` (D3D-399), whose | 3300 | mesh draws is one mesh segment, resolved through the same sum. Without the compute helper there is no segment pool |
| 3301 | `create_segment_pool` gives no mesh pool. Overlapping statistics queries (D3D-252) split the same way inside their | 3301 | and such a list is refused (`unsupported`) rather than run unsplit; so is one on the single-list `replay()` (D3D-399), |
| 3302 | shared segments: a draw of the other kind than the open segment's opens a new one, so every query that segment | 3302 | whose `create_segment_pool` gives no mesh pool. Overlapping statistics queries (D3D-252) split the same way inside |
| 3303 | belongs to sums both kinds. `replay_query_predication_test` (cases 15 and 16) checks the split points, the segment | 3303 | their shared segments: a draw of the other kind than the open segment's opens a new one, so every query that segment |
| 3304 | kinds and the resolve plan on the CPU. `d3d12_mesh_test` resolves a query around a vertex, two mesh and a vertex | 3304 | belongs to sums both kinds. `replay_query_predication_test` (cases 15 to 17) checks the split points, the segment |
| 3305 | draw, one around a mesh draw and one around the two vertex draws: the vertex fields count only the two triangles, | 3305 | kinds, the resolve plan and the counters the mesh pool may enable on the CPU. `d3d12_mesh_test` resolves a query |
| 3306 | and the mixed query has more clipping and pixel-shader invocations than the vertex-only one. On the RX 9060 XT | 3306 | around a vertex, two mesh and a vertex draw, one around a mesh draw and one around the two vertex draws: the vertex |
| 3307 | (RADV), the clipping counts add up exactly (2 + 10 = 12). | 3307 | fields count only the two triangles, the mixed query has the same clipping count as the vertex-only one and more |
| 3308 | pixel-shader invocations, and the mesh-only query has no clipping count. | ||
| 3308 | - **Timestamps.** `GetTimestampFrequency` is `1e9 / timestampPeriod` (1 GHz on the test GPU). Every D3D12 queue | 3309 | - **Timestamps.** `GetTimestampFrequency` is `1e9 / timestampPeriod` (1 GHz on the test GPU). Every D3D12 queue |
| 3309 | shares one `VkQueue` for now (question 12), so they share one frequency. | 3310 | shares one `VkQueue` for now (question 12), so they share one frequency. |
| 3310 | - **Timestamp resolves on MoltenVK.** On Apple GPUs, MoltenVK delays every `vkCmdWriteTimestamp` to the end of | 3311 | - **Timestamp resolves on MoltenVK.** On Apple GPUs, MoltenVK delays every `vkCmdWriteTimestamp` to the end of |