Files
metal2vulkan/crates
Anees Iqbal 941e1105ce Fixture pooled_cells: thread pointers held in an array of structs, and Metal's answer
An owned fixture of a renderer's closure array: closure_alloc hands out the next element or
null, closure_alloc_extra hands out a thread pointer to room at the array's end, which the
element keeps among its data. Four kernels:

- pooled_closures: elements and extra room handed out at run-time indices, read back and
  summed.
- pooled_bytes: a pointer into another array copied into an element as bytes, over a length the
  run reads, then read and written through.
- pooled_spill: the same pointer's bits stored into device memory (volatile) and read back into
  the element as an integer.
- pooled_context: the closures beside a context struct holding a constant pointer to an
  argument buffer whose pointer leads to two textures' resource IDs, read by a noinline
  function through the context.

The .ll and .air.ll companions and the TOOLCHAIN line are regenerated on the M3 Max.
probes/pooled_cells.m prints Metal's words on the M3 Max (macOS 27.0.1). pooled_bytes and
pooled_spill answer alike there.

Verified: the probe ran on the M3 Max and its words are the tests' constants.
2026-11-12 10:57:17 -08:00
..