Files
metal2vulkan/crates/metal2vulkan-validation/profiles
Anees Iqbal a5fac6fa9b rt: the depth clip mode Clamp and the triangle fill mode Lines, as pipelines of the draw's class made at first use
setDepthClipMode: and setTriangleFillMode: refused every value but Metal's defaults
(DrawKind::DepthClamp, DrawKind::FillMode). Vulkan 1.3 bakes both in
VkPipelineRasterizationStateCreateInfo, and only VK_EXT_extended_dynamic_state3 makes them
dynamic. The floor cannot require that extension: the UHD 630's Windows driver lists no EDS3, and
KosmicKrisp reports extendedDynamicState3PolygonMode false. So both are now first-use pipeline
variants, the accepted form. The encoder keeps a Raster (clamp, lines) and each draw takes
RenderCompiled::pipeline(topology, raster). The content keeps its primary VkPipeline (the triangle
or patch class at the default state) and a bounded list of the others, by class list topology and
raster state: at most 7 (three more states of the triangle or patch class, two of each other
class). The line and point classes take the clip mode alone, since Metal and Vulkan apply the fill
mode to triangles only. A triangle's edges under Lines chain Bresenham's rule, as the line class
does ("the effective rasterization input topology is in the line topology class"). The first draw
under a state makes its pipeline and waits for it: a first-use wait of a new site,
FirstUse::Raster (Metrics::first_use_raster_waits, _nanos, _max_nanos). The line and point
classes' first draws at the default state count where they did.

Floor:
- depthClamp joins REQUIRED, and the translator is told (=> DepthClamp), so the encoder maps the
  mode through metal::state::depth_clamp_enable. Vulkan 1.4 and Roadmap 2022 require it. The venue
  dumps report it true on every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736, 48737 and
  61508. tests/floor.rs, the README floor table, RUNTIME_FLOOR and profiles/runtime-floor.json
  add it.
- fillModeNonSolid is enabled where reported (FILL_MODES, told to the translator), and the setter
  maps Lines through metal::state::polygon_mode. KosmicKrisp on the M3 Max reports it false
  (m3-max-48737); every other dumped venue reports it true. There Lines stays DrawKind::FillMode,
  and so does the raw value 2, which no SDK header declares.

DrawKind::DepthClamp is deleted. The consumer's checkout names it nowhere (git grep in
reims-vgpu: 0 hits). Its only call sites are set_triangle_fill_mode and set_depth_clip_mode at
crates/reims-vgpu-vulkan/src/rt_platform/render.rs:371 and :374, whose signatures are unchanged.

The translator's raster-state test reads runtime-floor, which now states depthClamp. Clamp maps
there, and the refusal is asserted on runtime-floor without it, as ab8277a560 did for
depthBiasClamp. Other translator tests that read runtime-floor were grepped for DepthClamp and
FillModeNonSolid, and none reads the floor as lacking them.

Known gaps (README): a content's first draw under Clamp or Lines makes a VkPipeline, which Metal
does not. Under Clamp the depth a fragment function writes is the device's clamp's: Metal stores a
negative NaN as 0 below a range above 0, and the translator's depth_clamp_range variant is not
drawn.

Conformance: render-state-depth-clip and render-state-facing leave known-gaps-rt.tsv;
CONFORMANCE-COVERAGE.md regenerated. Docs: README (encoder, first-use waits, floor and fill-mode
tables, known gaps), REFUSALS.md, the api_signatures table (3 Metrics fields, 1 variant gone).

Tests:
- tests/raster.rs: a triangle in front of the near plane draws nothing under Clip and every
  texel under Clamp (twice: one pipeline made). Under Lines, through a viewport half a pixel
  right of and above the corner, the triangle draws its two edges inside the target, column 0
  and row 7, and nothing inside. Without fillModeNonSolid it is FillMode and fills. Pipelines
  made, raster first-use waits and first-use waits are each 1 + fillModeNonSolid.
- draw.rs: setting both modes makes no pipeline when no draw follows.
- floor.rs: depthClamp's missing case, and the fill-mode feature enabled where reported.
- first_use_sites.rs: the raster site.
2026-11-21 00:14:34 -08:00
..

Committed device profiles

Khronos profiles-schema (0.8) JSON, one profile per file (VP_M2V_<file stem>), each with a top-level provenance object. Generated by scripts/regen-device-profiles/; do not hand edit (the lint rejects non-canonical files). The translator parses them into a DeviceDescription; validation uses them for per-profile checks.

below-floor/ holds the descriptions below the translator's floor, which Device::from_queries refuses (a maxPushConstantsSize of 128, below the 256-byte push window): the input of the floor's refusal test alone, read by no other test, census or venue. The committed profiles are the files of this directory.

File Source Device / definition Driver API
runtime-floor derived from VP_LUNARG_minimum_requirements_1_3, plus m2v_runtime_floor the runtime's floor: Vulkan 1.3 required features and minimum limits, the unconditional Vulkan 1.2 Required Format Support entries, and what metal2vulkan-runtime requires of every device (crates/metal2vulkan-runtime/src/floor.rs) – 1.3.204
below-floor/vk12-floor derived from VP_LUNARG_minimum_requirements_1_2 Vulkan 1.2 required features, minimum limits, and the unconditional Required Format Support entries only – 1.2.131
nvidia-rtx50-linux gpuinfo report 51770 NVIDIA GeForce RTX 5080, Linux 615.71.09 1.4.351
nvidia-pascal-linux gpuinfo report 52074 NVIDIA GeForce GTX 1060 6GB, Linux 580.178.04 1.4.312
amd-rdna3-radv gpuinfo report 51898 AMD Radeon RX 7800 XT (RADV NAVI32) Mesa 26.2.3 1.4.354
amd-rdna2-apu-radv gpuinfo report 51886 AMD Radeon 680M (RADV REMBRANDT) Mesa 26.2.3 1.4.354
intel-arl-anv gpuinfo report 52029 Intel(R) Graphics (ARL), ANV Mesa 26.2.3 1.4.354
intel-irisxe-anv gpuinfo report 51836 Intel(R) Iris(R) Xe Graphics (TGL GT2), ANV Mesa 26.2.2 1.4.354
moltenvk-m3 local vulkaninfo --json, portability-subset profile, plus its --capture-formats supplement Apple M3 Max, macOS 27.0.1 MoltenVK 1.4.2 1.4.357
lavapipe gpuinfo report 51983 llvmpipe (LLVM 23.1.1, 256 bits) Mesa 26.2.3 1.4.354
gate-lavapipe vulkaninfo --json capture in scripts/linux-gate --icd lavapipe (arm64 image), plus its supplement llvmpipe (LLVM 21.1.8, 128 bits): the gate's own CPU device, so a run restricted to it under VK_LAYER_KHRONOS_profiles reports the device itself Mesa 26.0.8 1.4.335
gate-lavapipe-x86_64 vulkaninfo --json capture in scripts/linux-gate --icd lavapipe (amd64 image), plus its supplement llvmpipe (LLVM 21.1.8, 256 bits) Mesa 26.0.8 1.4.335
amd-780m-radv local vulkaninfo --json, plus its supplement AMD Radeon 780M Graphics (RADV PHOENIX), CachyOS Mesa 26.2.6 1.4.354
amd-780m-hawkpoint-radv local vulkaninfo --json, plus its supplement AMD Radeon 780M Graphics (RADV PHOENIX) of a Hawk Point Ryzen 7 8845HS (deviceID 0x1900), CachyOS Mesa 26.2.6 1.4.354
intel-irisxe-rplp-anv local vulkaninfo --json, plus its supplement Intel(R) Iris(R) Xe Graphics (RPL-P), ANV, CachyOS Mesa 26.2.6 1.4.354
intel-uhd770-rpls-anv local vulkaninfo --json, plus its supplement Intel(R) Graphics (RPL-S), the UHD Graphics 770 of an i9-13900, ANV, CachyOS Mesa 26.2.4 1.4.354
nvidia-rtx5080-laptop local vulkaninfo --json, plus its supplement NVIDIA GeForce RTX 5080 Laptop GPU, CachyOS 615.71.09 1.4.351

Venue profiles. The profile a venue names (crates/metal2vulkan-validation/cutover/c3-venues.json), and the capture of each further device a venue allows, is a vulkaninfo capture of that device with its corpus-vulkan --capture-formats supplement: moltenvk-m3, gate-lavapipe, gate-lavapipe-x86_64, amd-780m-radv, intel-irisxe-rplp-anv (with intel-uhd770-rpls-anv, the venue's RPL-S device), nvidia-rtx5080-laptop. The venue list refuses a file that is not such a capture, whose device identity is not the one the venue declares for it, or that derives another translation key than the venue's profile. The gpuinfo files above are census profiles of devices in the wild; no venue names them. Nor does it name amd-780m-hawkpoint-radv, the Radeon 780M of Hawk Point: the GPU of amd-780m-radv under another deviceID (0x1900), whose capture under the same RADV build differs from amd-780m-radv's only there, so it takes the 780M's measured driver facts and derives the same translation key.

Reading notes for consumers of these files:

  • A capability the source does not report is absent. Treat absence as "not supported", never as a default.
  • Blocks named m2v_vulkan12_required_formats* are not from the profile's source: they are the Vulkan 1.2 specification's Required Format Support entries that a requirements profile stating no formats implies, generated from the pinned specification text (provenance.required_formats names it and lists the conditional requirements no single profile can state).
  • In the derived profiles, a member the base profile states at a value the Vulkan 1.2 specification contradicts takes the specification's value instead, each named in provenance.spec_corrections: supportedDepthResolveModes and supportedStencilResolveModes, which the base states empty and the specification requires to include VK_RESOLVE_MODE_SAMPLE_ZERO_BIT, and maxDrawIndexedIndexValue, which the base states as 2^24 and the Required Limits table as 2^24 - 1.
  • The block m2v_runtime_floor of runtime-floor is not from the base profile either: it states the device extensions, features and limits metal2vulkan-runtime's floor requires, each limit at the value the floor needs, and the block m2v_required_features the Vulkan 1.3 core features the base profile omits (provenance.added_features). A runtime test holds the former equal to floor.rs. The floor's queue family, timestamp bits, memory types and time domains have no profiles-schema form.
  • The block m2v_unrequired_properties of the derived profiles is not from the base profile either: it states the weakest value the specification permits for each property the product reads, and VK_LAYER_KHRONOS_profiles sets, that the base leaves without a requirement. That is the value a reader takes for the absent member; stated, the layer (which keeps the device's own value for a member a profile omits) reports it too.
  • The block m2v_layer_presentation of a requirements document (a khronos source of the generator; no committed file is one) is not from the profile's source either: it states each feature the profile's core version requires that the profile omits, and each member the product reads of the core property structures of its version and of the property structures of the extensions it lists that it omits, at the value the product's reader takes for the absent member (provenance.layer_presentation lists them). The product's reading does not change; the profiles layer, which reports the device's own value for an omitted member and an omitted feature as absent, then reports the profile as the product reads it. Validation refuses to restrict a device to a requirements document (khronos) without it.
  • A file states what its source reports, not what the driver honors. moltenvk-m3 states robustBufferAccess as MoltenVK reports it, but MoltenVK adds no bounds check for it: on the captured device out-of-bounds storage and uniform buffer accesses, buffer atomics, and vertex fetches read and wrote the next buffer's memory, while texel buffers were contained.
  • A file states no deviation from the specifications, and the product reads none: its profile is derived from the file's Vulkan queries alone (Device::from_queries). The product refuses a file that holds the former top-level m2v_deviations object.
  • The top-level object m2v_color_attachment_sample_counts of a venue profile, keyed by profile name, states each color attachment format's own sample counts (VkSampleCountFlagBits names): the sampleCounts of a 2D, optimal-tiling image of the format with COLOR_ATTACHMENT usage, which no profiles-schema structure holds (VkImageFormatProperties). The venue capture's corpus-vulkan --capture-formats supplement measures them. A file without it states no format's own counts, only the device-wide framebuffer*SampleCounts.
  • provenance.unmapped lists report fields the converter could not represent (pointer members, flag bits outside the registry, extensions outside the registry; for a vulkaninfo capture, a driver's unpublished extension and a pointer member vulkaninfo wrote as NULL). They are dropped, not guessed.
  • No file carries host identity: the device-property members that identify the reporting host or driver build (every UUID and LUID, the PCI address, the DRM node numbers) are withheld, and provenance.withheld names the ones the source reported. Their absence says nothing about what the device supports.
  • gpuinfo-derived files carry both the core VkPhysicalDeviceVulkan1x* structs and the extension structs the report lists, as reported; they are not reconciled.
  • Integers keep the report's full width (maxTimelineSemaphoreValueDifference can be 2^64 - 1), so parsers need u64.