A post-tessellation vertex function may read a control-point attribute
whose vertex buffer layout has the Constant step function (step rate 0).
Metal makes such a pipeline, and on an Apple M3 Max every control point of
every patch reads the layout's element 0 at the attribute's offset (an
Objective-C probe, Mac job m3-max-80062; the other elements held other
values and none was read). That matches Apple's documentation of
MTLVertexStepFunctionConstant ("fetches attribute data once and uses that
data for every vertex"). The translator refuses the pair,
NotImplemented(Tessellation), and a walk met that refusal behind the
array-field one.
- a_control_point_attribute_on_a_constant_layout_reads_its_one_element
(engine_tessellation): tess_triangle_points with its control points'
half2 from buffer 2 at offset 4, on a Constant layout, compiles. It
pushes no stride of buffer 2 and passes L3.
- every_device_reads_a_constant_layout_s_one_element_at_each_control_point
(rt, patch): the same draw as
every_device_draws_patches_from_their_factors, with that half2 shifting
the third control point's x. Element 0's half2 at offset 4 is 0;
element e's is e, with 5 at offset 0. So a control point that reads
another element, or the element's first bytes, moves the patch and
changes the texels.
Red: lavapipe (llvmpipe), job m3-max-80108: both refused, "Tessellation;
needs NotImplemented at function tess_triangle_points"; the control draw
passes.