Files
metal2vulkan/docs
Anees Iqbal 3051b00b00 conformance: fractional-viewport-coverage and lines-fill-past-the-viewport (unrecorded)
What: one module, cases/viewport_cuts.rs, of two cases. Each is one pass into an RGBA32Float
target cleared to -7.5, every draw its own colour (tob_renders: tob_rect, tob_triangle,
tob_solid), the whole target read back.
- fractional-viewport-coverage: a filled draw over four viewports whose edges lie inside a
  pixel, each in a 12-pixel cell of a 48 by 24 target: far edges .7 into a pixel from an edge on
  a pixel boundary; .3 and .7; .75 and .25 (near and far pixel each a quarter inside, neither
  centre held); both edges on a pixel centre. Each viewport is drawn twice: a rectangle reaching
  to clip 1.25 (inside the 1.5 w band point-viewport-coverage found Metal keeping points in) and
  a triangle reaching to clip 6 (past it).
- lines-fill-past-the-viewport: setTriangleFillMode Lines, three triangles each through an
  integer 8 by 8 viewport in a 16-pixel cell of a 48 by 16 target: one corner inside and two past
  the right and bottom edges, inside the 1.5 w band; the same shape past the band; and a triangle
  the viewport lies wholly inside, every edge more than a pixel outside it.

Why: a fractional viewport's far row or column, whose pixel centre lies inside, is cut on one
Vulkan driver, and a triangle under the Lines fill mode larger than its viewport has no Metal
recording. Both need Metal's own answer before anything is ruled. The M3's next recording batch
records them; until then the replay reports each as "no recording" and nothing is ledgered.

Tests (no device): every viewport lies in its own cell with unreached pixels around it; each
arm's near and far pixel lies against its viewport as its docs say; the geometry reaches past the
viewport inside and past the band; every colour is its own; the line triangles cross or surround
their viewport; every line edge passes at least 1/16 pixel from every pixel centre and diamond
corner of the target. Once recorded, Metal's target is held to what every viewport rule gives
(a pixel held whole is drawn, a pixel not reached is the clear), never to one rule.

docs/CONFORMANCE-COVERAGE.md regenerated (case modules 181).
2026-11-21 08:56:40 -08:00
..