Files
metal2vulkan/docs
Anees Iqbal c57b0436c8 rt: a compute state answers Metal's static threadgroup memory, execution width and imageblock length
The consumer counts each Metal answer rt holds but does not give. ComputePipelineState now
answers three more, each from its whole module's translation, kept per content (Answers):

- static_threadgroup_memory_length(): staticThreadgroupMemoryLength, the translator's
  ComputePipelineMetalInfo::static_threadgroup_memory_length (rounded up to 16 as Metal reports
  it); the threadgroup memory rt adds beside it is not counted.
- thread_execution_width(): threadExecutionWidth, the translator's thread_execution_width, 32 on
  every device (the old runtime answers the same value from the translator): a kernel that
  observes its SIMD group runs it 32 wide, and one that does not cannot tell its width.
- imageblock_memory_length_for_dimensions(dimensions): 0 for a kernel that declares no
  imageblock. rt makes no state for a kernel that reaches an imageblock (the translator records
  RuntimeFact::ImageblockSize on its first use, which the interface refuses as Gap::KernelInput),
  but the translator plans only used parameters, so a kernel that declares an imageblock it never
  reaches does get a state. For it, and where the compile kept no reflection to tell, the answer
  is the new Gap::ImageblockMemoryLength { dimensions }: no authored case measures Metal's length.
  Whether the kernel declares one is read once per content from the reflection its compile kept
  (ComputePipelineDescriptor::reflection over StageSource::Compiled, decoding nothing).

Test: every_device_answers_a_state_s_metal_answers (device cfgs): the harness's block_scan
answers 1024 bytes of static threadgroup memory (256 words), sample_down 0; both 32 wide and an
imageblock length of 0. README (compute states), api_signatures.tsv and REFUSALS.md (26 -> 27
gaps) regenerated.

Verified at this commit: cargo fmt only. The build (clippy of rt under both device cfgs) and the
device legs run on the lane's tip.
2026-11-19 02:36:03 -08:00
..