Files
metal2vulkan/scripts/metal-coverage
Anees Iqbal 21f0cae67b ICB: a kernel's plain triangle draws into an indirect command buffer, executed through a layout of plain draws
The owner's 3406 order, the planner's first indirect command kind: MTLIndirectCommandTypeDraw.

Translator (lower/access/icb.rs): a render_command's draw_primitives of the constant triangle type
writes VkDrawIndirectCommand (vertex count, instances, vertex start, base instance) where an
indexed draw's VkDrawIndexedIndirectCommand goes, 20 bytes past the index token's place, and
writes nothing else. Both kinds share the records (pipeline::IndirectDrawLayout), so an encoding
writes one shape whatever buffer it reaches. A kernel cannot know a buffer's kind when it is
translated, because it reaches the buffer through an argument buffer. A reset's draw of nothing
reads as either kind's. Points and lines stay refused, as for indexed draws, because an execution
draws one topology.

Runtime: Device::new_indirect_command_buffer takes DRAW alone as well as DRAW_INDEXED alone, and
the buffer keeps its kind (indirect::CommandDraw). An execution's command layout follows the
kind. A layout of plain draws holds no index buffer token, which
VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11095 forbids there, and ends in TOKEN_DRAW.
Its tokens are one fewer. The execution shapes' cache keys on the kind, and the reset templates
serve both kinds.

DRAW together with DRAW_INDEXED stays a typed refusal, CommandTypes, until the planner rules. A
layout takes one draw token (VUID-...-11100), and no form found draws both kinds in command order
at a bounded cost: two executions reorder the commands, an execution per command costs two a
command, and identity indices hold only as many vertices as a bound buffer of them. The
CommandTypes doc, the runtime README's ICB section and its refusal line say so.

Docs: the README ICB section; METAL-COVERAGE (coverage.tsv: "plain or indexed triangle draws");
CONFORMANCE-COVERAGE regenerated for the new row's recording and ledger row. REFUSALS.md
regenerated with no change.

Not run on an Intel card: the Iris Xe lacks VK_EXT_device_generated_commands, so its ledger row
is the Extension refusal; the four-card proof jobs are named in the hand-over.
2026-12-02 21:06:03 -08:00
..