Files
metal2vulkan/docs
Anees Iqbal da020e5d7b Runtime: a compute kernel that reaches an explicit imageblock gets its state; its dispatch is refused
A compute pipeline state whose kernel reaches an explicit imageblock was refused at its make as
Gap::KernelInput of KernelInputKind::RuntimeFact naming ImageblockSize, which every arm64 macOS
guest boot meets once. The state is now made, and what stays refused is the dispatch, where Metal
reads the extent setImageblockWidth:height: set, which the compute encoder does not have:

- interface() takes RuntimeFact::ImageblockSize, keeping its cell bytes as Interface::imageblock,
  and leaves SpecKey::ImageblockWidth and ImageblockHeight at the module's default (0 by 0)
  instead of refusing them as a specialization it does not set.
- encoder::decide, which the dispatch, prepare_dispatch, dispatch_variant and the main pipeline's
  key all go through, refuses a kernel with an imageblock first, as Gap::KernelInput of
  RuntimeFact naming the fact (RuntimeFact::name). So no VkPipeline of such a kernel is made:
  finish_pipeline has no main key, and a pre-pass gets no key. A dispatch of such a kernel that
  writes no memory records nothing and is not refused, as for any kernel without effects.
- imageblock_memory_length_for_dimensions keeps its typed answer, Gap::ImageblockLength, for a
  kernel that declares an imageblock: the one recording of Metal's answer for such a kernel
  (conformance pipeline-facts-compute-imageblock, M3 Max, 256 bytes at 8 by 4 by 3) settles no rule.

The translator is untouched. Gap and KernelInputKind keep their variants; the docs of
Gap::KernelInput, KernelInputKind::RuntimeFact and Specialization, Gap::ImageblockLength (and its
basis line), the dispatch and the state's make say where the refusal now is. docs/REFUSALS.md,
docs/METAL-COVERAGE.md (setImageblockWidth:height:'s note) and docs/CONFORMANCE-COVERAGE.md are
regenerated. The runtime README's state facts and its known gap are re-worded, with the counts and
jobs kept. The conformance ledger's pipeline-facts-compute-imageblock row moves from case/state to
the facts' label and device (the consumer's own, as for every state) and imageblock_memory_length
(Gap::ImageblockLength). Validation's KernelImageblock requirement doc and its acceptance test's doc
name the dispatch's refusal and the renamed device test.

Test: tests::kernel_input::an_explicit_imageblock_kernel_is_made_and_its_dispatch_refused_as_its_named_runtime_fact
(replacing an_explicit_imageblock_kernel_is_refused_as_its_named_runtime_fact) makes a4_imageblock_extent's
state, reads its imageblock length as Gap::ImageblockLength, gets no dispatch_variant key, and has
one 4 by 2 threadgroup's dispatch refused as Gap::KernelInput of RuntimeFact { fact: "ImageblockSize" }.
2026-11-22 20:15:34 -08:00
..