diff options
| author | Aslan2142 <jan.trencansky@protonmail.com> | 2026-11-26 22:45:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-26 22:45:14 +0100 |
| commit | 011d446c32554879db1eaa00542caaa79f0dc688 (patch) | |
| tree | 6d08954f37f02be95ccb7abf7228646bcf2111d2 /docs/d3d12_vulkan.md | |
| parent | 55e2bd9e9e4287bbdbe1951446cae1437d4ad57e (diff) | |
| parent | 359ba968d51907ece4438193e03e854ab7bf8d38 (diff) | |
Merge pull request #2408 from aslan2142/dispatch-width-counters
indirect clamp: count dispatch records by width and log them (RT-INDIRECT-DISPATCH-COUNTERS)
Diffstat (limited to 'docs/d3d12_vulkan.md')
| -rw-r--r-- | docs/d3d12_vulkan.md | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index 9fd320d65..414e98e1f 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -1315,7 +1315,8 @@ and any validation error fails them. | |||
| 1315 | - `indirect_clamp_test`: the `ExecuteIndirect` argument clamp pass itself (section 4.7), with no game files: every | 1315 | - `indirect_clamp_test`: the `ExecuteIndirect` argument clamp pass itself (section 4.7), with no game files: every |
| 1316 | argument kind (draw, draw indexed, dispatch, mesh dispatch) and the counted variants, in-range records | 1316 | argument kind (draw, draw indexed, dispatch, mesh dispatch) and the counted variants, in-range records |
| 1317 | bit-identical, garbage records bounded, records and counts past `max_command_count` empty, and the per-batch work | 1317 | bit-identical, garbage records bounded, records and counts past `max_command_count` empty, and the per-batch work |
| 1318 | budget saturating; clean SKIP without a Vulkan device. | 1318 | budget saturating; dispatch records bounded by the device's `maxComputeWorkGroupCount` (70 000 x 1 x 1 kept and run |
| 1319 | where the device allows it, cut and counted where it does not); clean SKIP without a Vulkan device. | ||
| 1319 | - `d3d12_gcl8_test`: the public `ID3D12GraphicsCommandList8` surface: `QueryInterface` for its IID, | 1320 | - `d3d12_gcl8_test`: the public `ID3D12GraphicsCommandList8` surface: `QueryInterface` for its IID, |
| 1320 | `OMSetFrontAndBackStencilRef(1, 2)` with the recorded values, and the reference count around the query. It | 1321 | `OMSetFrontAndBackStencilRef(1, 2)` with the recorded values, and the reference count around the query. It |
| 1321 | creates only an allocator and a list, so it needs no GPU or Vulkan loader. | 1322 | creates only an allocator and a list, so it needs no GPU or Vulkan loader. |
| @@ -4362,14 +4363,22 @@ Not implemented yet: | |||
| 4362 | `LEONIDA_SKIP_COMPUTE`) or mistranslates leaves whatever the memory held: a dispatch of billions of groups or a | 4363 | `LEONIDA_SKIP_COMPUTE`) or mistranslates leaves whatever the memory held: a dispatch of billions of groups or a |
| 4363 | draw of four billion vertices runs until the host resets the display driver. One small compute pass per | 4364 | draw of four billion vertices runs until the host resets the display driver. One small compute pass per |
| 4364 | `ExecuteIndirect` call copies the active records into device-local scratch with their values bounded - 2^24 | 4365 | `ExecuteIndirect` call copies the active records into device-local scratch with their values bounded - 2^24 |
| 4365 | vertices or indices, 2^26 vertex instances (count times instances), 65 535 groups per dimension, 2^20 groups per | 4366 | vertices or indices, 2^26 vertex instances (count times instances), the device's `maxComputeWorkGroupCount` groups |
| 4366 | dispatch and a 2^27-unit work budget per call that saturates through an atomic compare-and-swap - and writes an | 4367 | per dimension for a dispatch (65 535 for a mesh dispatch), 2^20 groups per dispatch and a 2^27-unit work budget per |
| 4368 | call that saturates through an atomic compare-and-swap - and writes an | ||
| 4367 | empty record past `min(count, max_command_count)` and past the budget, and the clamped count word a `*Count` draw | 4369 | empty record past `min(count, max_command_count)` and past the budget, and the clamped count word a `*Count` draw |
| 4368 | then reads (so the count is at most `maxDrawCount`, VUID-vkCmdDrawIndirectCount-countBuffer-02717). A draw record | 4370 | then reads (so the count is at most `maxDrawCount`, VUID-vkCmdDrawIndirectCount-countBuffer-02717). A draw record |
| 4369 | of 2^23 vertices or indices an instance or more is a slot the title has not filled: it runs empty and charges | 4371 | of 2^23 vertices or indices an instance or more is a slot the title has not filled: it runs empty and charges |
| 4370 | nothing (RT-INDIRECT-DRAW-UNFILLED-COUNT). Before, each was cut to 2^24 and charged that, so eight of them used up | 4372 | nothing (RT-INDIRECT-DRAW-UNFILLED-COUNT). Before, each was cut to 2^24 and charged that, so eight of them used up |
| 4371 | the budget and every later draw in the list ran empty; a census in a VIctory fork found 90 such records in one | 4373 | the budget and every later draw in the list ran empty; a census in a VIctory fork found 90 such records in one |
| 4372 | list. The indirect command reads that scratch. A draw emits the pass before its rendering scope opens: `vkCmdCopyBuffer` and a | 4374 | list. A dispatch record's groups per dimension follow the device (#2230): the title's tile |
| 4375 | passes ask for 67 440 groups in x at 2560x1440 (found in the VIctory-Belobug-AMD fork of VIctory, | ||
| 4376 | `crates/victory-gpu/src/indirect.rs`), RADV runs 2^32 - 1 in x in one dispatch, and the cut at 65 535 dropped the | ||
| 4377 | last 1 905 tiles of the pass. A device that allows less (llvmpipe: 65 535) still gets the record cut at its | ||
| 4378 | limit: running the rest would take more dispatches with a group-ID base the translated shader does not read. The | ||
| 4379 | counters' `indirect clamp dispatch:` line (every 10 s while dispatch records are clamped) gives the records, those | ||
| 4380 | wider than 65 535 in x, the widest x that ran and those cut at the device's limits, so a run shows which case it | ||
| 4381 | is. The indirect command reads that scratch. A draw emits the pass before its rendering scope opens: `vkCmdCopyBuffer` and a | ||
| 4373 | memory barrier with a transfer access are not allowed inside a dynamic-rendering scope. The records are | 4382 | memory barrier with a transfer access are not allowed inside a dynamic-rendering scope. The records are |
| 4374 | bit-identical to the application's when they are within the limits, the argument and count buffers are left | 4383 | bit-identical to the application's when they are within the limits, the argument and count buffers are left |
| 4375 | untouched, and the scratch comes from a per-submission pool (`vulkan_scratch.h`) that a list with many indirect | 4384 | untouched, and the scratch comes from a per-submission pool (`vulkan_scratch.h`) that a list with many indirect |