Files
metal2vulkan/scripts
Anees Iqbal 977c9da12f RUNTIME 2246: setTriangleFillMode: 2 (MTLTriangleFillModePoints, Apple-private) draws a triangle's vertices as points
Apple's GL renderer sends setTriangleFillMode:2 for glPolygonMode(GL_POINT) under its Intel and
Apple-silicon caps tables. The value is not in the public headers. Our TriangleFillMode had only
Fill and Lines, so the consumer's raw-value conversion failed and its host died. Measured on
Metal: an M3 Max and an Intel UHD 630 draw only a triangle's 3 vertex pixels (a Radeon Pro 5300M
fills it); our own probe on the M3 (m3-max-26811) draws 1-px points whether point_size is 4, 1 or
unwritten, culls them with CullMode Front, and draws them with Back.

Now TriangleFillMode::Points (2) exists. The generator (scripts/regen-metal-enums) takes a
PRIVATE line for it, with its evidence, and a PRIVATE_DOCS doc comment (metal_enum! accepts
variant attributes); generated.rs stays generated and `--check` passes. The runtime draws it as
VK_POLYGON_MODE_POINT. It needs fillModeNonSolid (refused otherwise:
Feature::TriangleFillPoints) and, on a portability-subset device, pointPolygons
(VkFeature::PointPolygons; MoltenVK withholds it, so it refuses Points). New degradation
TrianglePointSize ("triangle-point-size"): Vulkan sizes the points by the PointSize the vertex
function writes, where Metal draws 1 px. An ICB command still refuses set_triangle_fill_mode, as
before. New lane module runtime_lane::triangle_points.

Verified (fillpoints, 6b9927c402 on 25be73dddf):
- lavapipe lane 30/30: points light {(3,3),(3,12),(12,3)} (Metal's 3 vertex pixels); culled
  front none, back the same 3; fill 45 px (the M3 lit 45); lines 27; fill/lines unchanged.
- msi: clippy plain, m2v_gpu and m2v_cpu_icd 0; rustdoc 0; touched tests 102/102.
- Owed: the XTX leg (m3-max-26943).

ARTIFACT_FORMAT_VERSION 519 -> 520 (VkFeature appended to the codec), RUNTIME_VERSION 2245 -> 2246.
2026-11-13 15:26:44 -08:00
..