Files
metal2vulkan/docs
Anees Iqbal a010d17c6b translator: a fetch's element index first among the floor's fragment fields, from the vertex function's end
On the floor a fragment function's push fields started at the vertex function's push end rounded
up to 8. Where that end is a multiple of 4 and not of 8, the four bytes below the base went
unused, and a fetching fragment function placed its four-byte element index
(PushField::FetchedColor) after its eight-byte fields: a pair that fits the floor's 256 bytes
with those four bytes used was pushed past them. The fragment base is now the vertex function's
push end, and FetchedColor sorts after SlotBindOffset and before the slot addresses
(SlotGuestBase): a fragment function that pushes no parameter block's address places it in those
four bytes. Each field is still placed at the next offset aligned to it, so a fragment function
whose first field is eight bytes, the spilled block's address included, starts where it did, and
the vertex function's window still ends at 248. The fixed windows read no base: the old runtime's
modules are unchanged.

The docs that stated the rounding say the base is the vertex function's end: the push module,
VERTEX_FLOOR_END, LoweringInputs::push_base, docs/API.md section 5, rt's README, and the render
identity test's notes; the spill test reads the base unrounded (its vertex function ends at 248).
2026-11-19 17:22:28 -08:00
..