Metal's answers here depend on what its compiler compiled before, which it keeps across processes
keyed on the function's AIR. With the probe's salt now in the AIR (d49370d732), an M3 Max under
macOS 27.0.1 answered, twice over, each sequence one fresh salt (m3-max-13430):
- required-object-32-max-64: refused on a first compile ("Kernel specified max total threads per
threadgroup (32) must match compute pipeline specified max total threads per threadgroup (64)"),
refused again, and again after required-object-32x2 or plain; made only after
required-object-64-max-64. required-mesh-32-max-64 the same, made only after
required-mesh-64-max-64. The object stage was made here because an earlier compile let it be.
- A required size gives its stage its threads on a first compile: required-object-32x2 answers an
object maximum of 64 (we answered 1024), required-mesh-16x2 a mesh maximum of 32, and a
required 32 beside a function's [[max_total_threads_per_threadgroup(64)]] 32 in either stage.
So the object stage now refuses a required size of other threads than its maximum
(MaxThreadsDiffer { stage: Object }), as the mesh stage already did, and each stage's thread
limit is the least of the descriptor's maximum, the function's, the required size's threads and
1024. RUNTIME behaviour: new_mesh_render_pipeline_state refuses an object maximum beside a
required object size of other threads, and maxTotalThreadsPer{Object,Mesh}Threadgroup answer a
required size's threads. The translator's mesh answers change, under the branch's
SEMANTICS_VERSION bump (2015).
Tests: engine_mesh's refusal test adds the object cases (32 and 16x2 under 64) and makes 64
under 64; its answers test checks a required size alone in each stage and below a function's
maximum; the runtime lane's mesh test does the same on a device. docs/API.md's accepted
difference, the error's and the getters' docs and the probe's measurements say the first-compile
rule and what later compiles answer.
(cherry picked from commit 3b05b274aec46c172fd0a38276c5ca45a1ade4ca)