Files
metal2vulkan/docs
Anees Iqbal da6cc554bb SEMANTICS 2125, RUNTIME 2376: Rate maps: a region-copy recording draws one row, its region its first's segments plus DrawIndex
A recording through the region-copy variant drew a box of several rows, so its vertex function
found its region as `first + (DrawIndex / c)·nx + DrawIndex mod c`: it read the table's count of
columns, divided by it and by the box's columns, and only then read its region's terms.

Now each row of a box is its own recording (in parts of at most a multi-draw's draws), and
`PushField::RegionBox` holds the row's first region's segments `[x0, y0]`: the vertex function
draws the region of segments `(x0 + DrawIndex, y0)`, dividing nothing and reading no table word
before its region's own, the row's `y0` the same at every vertex. A row is recorded a region at
a time where a sample may lie on a pixel's left edge (`folds` answers that axis alone: a row's top
and bottom edges are its scissor's). The pixels and positions are the route's as before: the same
copy arithmetic of the same region, under the same viewport, its row's scissor holding the
regions' pixels. A whole-table draw is 34 recordings where it was 2
(rate_map_region_copy_recordings). The docs, the FAST-PATHS fan-out row and the boxes test say
rows; the docs drop the cost claim the Iris A/B disproved.

Kept though neutral on the Iris: the shorter vertex function (42 instructions, 428 estimated
cycles, 8 sends -> 37, 258, 7) did not move the per vertex-region cost, which lies in the fixed
function after it (four user clip distances tested on every copy; 2073 of 2074 rejected there).

Verified: m3-max-33295 (msi, at 72bd8baa20): clippy of the translator and runtime (all targets,
all features, -D warnings) plain, m2v_cpu_icd and m2v_gpu 0; translator 47/47 and runtime
fan_out 6/6 unit tests; lavapipe 24/24 rate-map device tests. m3-max-33355 (ef59a08250, docs):
clippy plain and Rustdoc 0. Iris (ms01) m3-max-33332: 24/24 rate-map device tests
(region_boxes direct [3 draws, 39 recordings] against indirect [3, 624], 0 texels differ;
depth_equal 0 red). Negative control m3-max-33327: the base's divided region restored, the SPIR-V
divisions assertion fails (4 vs 0). Iris A/B m3-max-33262 (warm, no INTEL_MEASURE): whole-table
commit frame 671.1 -> 670.9 ms, Exact 505.7 -> 498.7 ms; per sub-draw 1.068 us + 0.3626 ns x V
-> 0.926 us + 0.3697 ns x V.
2026-11-15 12:25:53 -08:00
..