Commit Graph
8585 Commits
Author SHA1 Message Date
Anees Iqbal 2a36291a80 rt test: the raster test's Lines viewport lies off the diamonds' ties
What: under Lines the test drew the triangle through a viewport 0.5 pixels right of and above
the target's corner, so the edges inside the target ran through texel centers: x 0.5 down column
0 and y 7.5 along row 7. On lavapipe the line along row 7 drew no pixel (m3-max-62049, lvp leg),
since a line through centers ties at every diamond's corners under Bresenham's diamond-exit rule.
The viewport is now 0.4 right and 0.3 above. The edges lie at x 0.4 and y 7.7, inside each
pixel's diamond away from its corners, and both start at (0.4, 7.7), strictly inside the corner
pixel's diamond. The pattern expected is unchanged: column 0 and row 7.

Verified by the lavapipe and GPU legs that follow this commit.
2026-11-21 00:14:45 -08:00
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
Anees Iqbal 43f7439dc9 Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-21 00:13:23 -08:00
Anees Iqbal 73ce142afc Bind: a vertex function that chooses its slice writes Layer in every pass; the dropped-Layer variant goes
A vertex function that writes [[render_target_array_index]] had two forms:
- in a pass of at most one layer (BindShape::render_target_array_length 0, Metal's default, or 1),
  the plan asked for VariantKey::dropped_vertex_layer, a variant compiled without the Layer
  output;
- in a longer pass it ran the pipeline that stores Layer as `index < length ? index : 0`, the
  length each draw pushes (PushField::RenderTargetArrayLength).

The second form already answers the short pass exactly. At a length of 0 or 1 it stores 0 for
every index, the slice Metal renders, so a one-layer framebuffer is never written an out-of-range
Layer. The dropped variant's one gain was a pipeline that needs no shaderOutputLayer. The floor
requires that feature, and every committed profile has it. The runtime never asked for the
variant: it compiles every render pipeline under VariantKey::new() and pushes the pass's layers,
at least 1.

After this change the one form draws every pass, and its plan states no variant at any length.
The binder pushes the pass's length as at least 1, as the runtime does; at 0 and 1 alike the
function stores 0 for every index.
Drawn one amplification at a time in a pass of one layer, a vertex function still writes no
Layer (LoweringInputs::amplification_draws, not layered). RuntimeFact::RenderTargetArrayLength's
layer_dropped now states that case alone.

Size: 24 files, +360/-381.

Removed:
- VariantKey::dropped_vertex_layer, with its is_empty term and its per-stage lowering bit;
- LoweringInputs::dropped_vertex_layer and the function key's "dropped-vertex-layer" bytes. A
  function compiled without the input keeps its key;
- the binder's choice of the variant, and its term in the check that answers
  BindError::NeedsVariant;
- the cache's round trip of the variant, and the variant's cases in the function key test.

Rule 1: no precision note changes.

The evidence gate (validation's candidate/platform/device.rs, fails_row) fails a row on every
ERROR the validation layer reports and on every WARNING of the validation type. Without the
variant the layer warns on each such draw into the render executor's one-layer framebuffer:
  WARNING (validation) Undefined-Value-Layer-Written (0x1fc55805): "vkCmdDraw(): Shader stage
  VK_SHADER_STAGE_VERTEX_BIT writes to Layer (gl_Layer) but the framebuffer was created with
  VkFramebufferCreateInfo::layer of 1, this write will have an undefined value set to it."
It warns of the write whatever its value: VK_LAYER_KHRONOS_validation 1.4.363 reports it for a
minimal draw that writes Layer = 0 (job m3-max-61934). The spec leaves the framebuffer undefined
only where "the Layer value is less than 0 or greater than or equal to the number of layers in
the framebuffer" (Layered Rendering, vkspec 1.4.366). This pipeline pushes the length 1 there and
stores 0. As the planner ruled, the gate now withholds that message, under five conditions:
- Exact: a WARNING of the validation type with that id name, number and whole text
  (CLAMPED_LAYER), for a row whose pipeline states RenderTargetArrayLength without layer_dropped,
  drawn in a pass of at most one layer. The render executor sets this per row on the sink
  (MessageSink::clamped_layer), so it is keyed on structure, never on a case.
- Counted: the row's environment records withheld_validation_messages
  {"Undefined-Value-Layer-Written": n}, and corpus-vulkan prints it.
- Proved by our own tests: candidate::tests::engine_render's
  an_index_past_a_one_layer_pass_renders_the_pass_s_slice draws rt6_layered_vertex writing index
  3 in a pass of length 0 and reads Metal's answer: the slice holds the fragment's word
  1 << 8 | 3 (the conformance case layered-render-target-array-length, recorded on an Apple M3
  Max). rt's tests::layered::on_device::every_device_renders_metal_s_layers checks the same for
  the runtime at lengths 0 and 1.
- One definition: rt's own device tests run under the layer and fail on any message, but they do
  not get this one, because rt renders through dynamic rendering:
  every_device_renders_metal_s_layers, index 3 in passes of length 0 and 1, passes under the layer
  on RADV's RX 550 (m3-max-61553).
  CLAMPED_LAYER is the only list.
- It cannot outlive its cause: the same device test asserts that the row withheld exactly one
  such message. When the layer stops reporting it, the test fails, and the exception goes with
  it. The sink's unit test the_clamped_layer_warning_fails_no_row_of_a_clamped_store_alone checks
  the match: the message for another row, another number, an error, or another draw's text still
  fails the row.
The executor version stays: a row the gate passed before draws and records as it did. The layer
bug's minimal repro and the issue text are staged for the owner to file.

Validation: two authored cases write [[render_target_array_index]] from a vertex function. Both
are vertex-stage cases into one 1x1 target, so both ran the dropped variant:
- 013406ac01b7 (public, vertex_amplification_id_layer) now runs the form that stores Layer;
- 434e73e03189's index is not shown the same across a primitive, so the commit below already
  refuses it on every leg.
Qualified on lavapipe at this tree's content (m3-max-61968, at dvl-5 1fa4aed963, which differs only
by a test's needless borrow): 013406ac01b7 matches Metal with robustness on and off (candidate
output e9eec98c138165bb), and each record states the gate's exception ran:
withheld_validation_messages {"Undefined-Value-Layer-Written": 1}.
The candidate engine's graphics tests now expect an empty variant for every case. The case that
chooses its slice in a one-layer pass declares Layer, with layer_dropped false.

Tests:
- engine_render_target_slice: every_pass_runs_the_vertex_function_that_writes_its_layer replaces
  the variant tests. On the 780M and lavapipe, each of three pipelines, at the lengths 0, 1 and 4:
  - states no variant;
  - declares Layer and reads the length, which the draw pushes as 1, 1 and 4;
  - draws.
  An amplified draw in a one-layer pass still draws one amplification at a time.
  the_dropped_variant_needs_no_output_layer goes.
- engine_target_indices loses its compile of the variant on the device without
  shaderOutputLayer.
- validation: an_index_past_a_one_layer_pass_renders_the_pass_s_slice (lavapipe, under the
  layer) and the_clamped_layer_warning_fails_no_row_of_a_clamped_store_alone, above.

Bless due: nothing new. Every golden compiles without a variant.

SEMANTICS_VERSION 2248 -> 2249 and ARTIFACT_FORMAT_VERSION 584 -> 585 are placeholders that main
renumbers.
SEMANTICS: a slice-choosing vertex function in a pass of at most one layer now compiles to the
module that stores Layer. ARTIFACT: VariantKey and LoweringInputs each lose a field.
RUNTIME_VERSION stays, and runtime-sources.sha256 keeps development's (land-pkt re-pins it). api_signatures drops the two
fields. API.md's layered-rendering bullet states the stored 0 in place of the variant.

Consumer check (consumer_check.sh, consumer development b76d6ac4a9): dropped_vertex_layer,
layer_dropped and NeedsVariant have 0 hits.

Verified (jobs read):
- m3-max-61968: the lavapipe device suite at dvl-5 (dvl-6 without the clippy fix), 1483 of 1483,
  qualify 013406ac01b7 Match, the withheld count {Undefined-Value-Layer-Written: 1} under both
  robustness settings.
- At the stack's tip over this change (dvl-5 1fa4aed963 and dvl-6 92fe40c38f): 61978 and 61987,
  fmt, clippy in every configuration, Rustdoc, each feature alone, the API docs and the Windows
  clippy, green; 61891, the suites at dvl-4: 13 failures, each a bless-due golden above or
  development's own (the raster state test, the inventory's sample_fill rows); 61968, the lavapipe
  device suite of metal2vulkan-validation, 1483 of 1483, and public case qualification Match;
  62042, the metal2vulkan-validation suite at dvl-5, 1378 of 1378 passed.
- States-only play of this change's player (p-dv.zst) over 35 distinct streams on ms01 (61971),
  gem10 (61980), um790 (61991) and um870 (62110): 456,384 render and 91,972 compute states made,
  0 refused, every stream exit 0; 62073 (um790) and 62105 (ms01) repeat those nodes' streams with
  the same counts. The msi stream (windrag-780m-b2) is not played: msi had no memory free.

Rebased onto the rebased geomdel over development 4cf936ed4d. The conflicts: the version lines;
runtime-sources.sha256, where development's is kept; and the validation context's device.rs, where
development's robustness record lost its leg and this change adds expect_clamped_layer and
take_withheld beside it. api_signatures.tsv checks against the sources (signatures.py --check) and
docs/REFUSALS.md regenerates unchanged. The jobs above ran at the old base; the rebased tip's are
in the report to main.
2026-11-21 00:04:06 -08:00
Anees Iqbal 57855c6097 Link: the synthesized geometry stage goes, both forms (the barycentric weights and the rate map's fan-out)
The translator built geometry stages in two forms that no Metal function asks for:
- the barycentric weights: a fragment function's [[barycentric_coord]] read as varyings, which a
  generated geometry stage of each topology class wrote, on a device without
  fragmentShaderBarycentric;
- the rate map's fan-out: a draw of a rasterization-rate-mapped pass's triangles once, a geometry
  stage emitting a copy of each per region, with its probe and its region-copy vertex variant.

Neither form reached a guest. The runtime enables no geometryShader, so it refused the weights
form already. It never sets BindShape::region_fan_out, and draws a rate-mapped pass region by
region (the regions route, RateMapRegions, and region_viewports, which stay). Validation never set
region_fan_out either.

After this change, one form is left for each:
- A fragment function that reads [[barycentric_coord]] reads the device's own
  BaryCoordKHR/BaryCoordNoPerspKHR. Without fragmentShaderBarycentric it is refused as
  Unsupported(Barycentrics) needing that feature alone; geometryShader is no longer offered.
- A rate-mapped pass draws through the regions route.

Rule 1: no precision note stops being raised. The fan-out's copies were a near-equivalent of the
regions route, which carries its own note (RateMapRegions::precision), and the weights form
raised none. The catalogue is unchanged.

Removed:
- pipeline::link::geometry (GeometryStages, the three classes' stages) and pipeline::link::fan_out,
  with their tests (link/tests/geometry.rs, link/tests/fan_out.rs) and tests/engine_region_fan_out;
- bind::fan_out (the region table, the probe's word layout and its constants);
- RegionFanOut and FanOutState;
- the region_fan_out fields of GraphicsState, BindState, BindShape, VariantKey and
  RenderLinkInputs, and LoweringInputs::region_copies;
- the region copy's lowering: StageIoPlan::region_copy, RegionCopy and the region table's
  declaration;
- PushField::RegionBox and RegionProbe;
- SyntheticBinding::RateMapRegions and RateMapFlags, and WriteSource::RateMapRegions and
  RateMapFlags;
- RuntimeFact::SynthesizedGeometry, RenderPipeline::runs_stage and Linked::geometry;
- IoRole::Barycentric with VaryingKey::barycentric and its key tag;
- VkProperty::SubgroupGeometryStage;
- the SPIR-V IR's geometry execution model, which only these stages produced: ExecModel::Geometry,
  OpEmitVertex and OpEndPrimitive, the InputPoints, InputLines, OutputLineStrip,
  OutputTriangleStrip and Invocations modes, ModelNeed::Geometry, EntryRule::GeometryModes and the
  builder's geometry ops;
- from scripts/regen-spirv-grammar/items.txt, the opcodes EmitVertex and EndPrimitive, the
  execution model Geometry and those five execution modes. spv.rs is regenerated: the opcodes and
  the model stay as test-only values, which the test parser reads, and the modes go;
- in validation, the census's geometry stage filter, the draw's runs_stage filter and the
  candidate's GEOMETRY stage arm. The census test that read three geometry stages from
  engine/bary_weights goes with them.

The SPIR-V builder now marks only Position Invariant; ClipDistance was the fan-out's.
band::plan loses its geometry flag, and takes the four SPIR-V helpers it shared with the
geometry module. The binder's stage map takes a geometry stage as no render stage.

Validation cases that executed either form: none.
- Fan-out: no validation code sets region_fan_out.
- Weights: two authored cases read [[barycentric_coord]], fa8b920d3cf3 and ae0a7e39b12f. Neither
  has a stored Vulkan observation on a profile without fragmentShaderBarycentric. fa8b920d3cf3 is
  observed on Metal and MoltenVK, and moltenvk-m3 has the feature. ae0a7e39b12f is observed on
  Metal only.

Fourth user of GeometryStages: none. It was used by link, the compile API's splice, the binder's
selection (through RuntimeFact::SynthesizedGeometry and GraphicsState::region_fan_out) and its
own tests.

Tests:
- engine_stage_io_tail's weights test is now without_the_feature_the_weights_are_refused: on
  lavapipe, ANV's Iris Xe, NVIDIA's Pascal (each with geometryShader) and runtime-floor (without
  it), both barycentric entries are refused needing fragmentShaderBarycentric.
- engine_target_indices checks each pipeline's stages valid where it counted geometry stages, and
  loses the_weights_stage_beside_a_vertex_layer_is_not_implemented: that combination is now the
  plain refusal above.
- engine_amplification no longer counts geometry stages.
- The binder's render stage test refuses a geometry stage.
- The builder's invariant test refuses ClipDistance.
- engine_rotated_weights' rotated draw runs on moltenvk-m3 and RDNA3's RADV, each with
  fragmentShaderBarycentric, where it ran on lavapipe through the weights form.
- The fact mechanism test numbers its 100 RuntimeFact variants densely again (PrivateArena,
  which development added, takes 99).

Bless due until the next named pin, where the M3 bless job takes them; nothing is blessed here:
- tests::public_fixtures_engine (the inventory): every [[barycentric_coord]] cell on a profile
  without fragmentShaderBarycentric becomes Unsupported(Barycentrics) needing it alone, where it
  compiled through the geometry stages (with geometryShader) or offered GeometryShader as the
  alternative;
- tests::golden_hashes, and pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value
  (the render key), as under the commit below: the profiles' fingerprints change;
- the authored compile census.

SEMANTICS_VERSION 2247 -> 2248 and ARTIFACT_FORMAT_VERSION 583 -> 584 are placeholders that main
renumbers.
SEMANTICS: a fragment function's weights and every rate-mapped variant change form. ARTIFACT: the
codec loses the RegionFanOut, FanOutState, GraphicsState::region_fan_out, IoRole::Barycentric,
RuntimeFact::SynthesizedGeometry, PushField, SyntheticBinding and VkProperty tags. RUNTIME_VERSION
stays: the runtime's render-pipeline kind no longer reads region_fan_out, which it never set, and
its SynthesizedStages doc names the bands alone. runtime-sources.sha256 keeps development's (land-pkt
re-pins it), api_signatures and api_surface drop the removed items, and docs/REFUSALS.md is regenerated.
API.md drops the geometry stages from RenderPipeline's stages, its barycentric bullet and its band
bullet. ARCHITECTURE.md's link line drops pipeline::link::geometry, and the runtime README's
Barycentrics gap names the feature alone.

Consumer check (consumer_check.sh, consumer development b76d6ac4a9): region_fan_out,
RegionFanOut, FanOutState, region_copies, region_copy, RateMapFlags, RegionBox, RegionProbe,
SynthesizedGeometry, FEW_COPIES, PROBE_DRAW_WORDS, RegionCopies and runs_stage have 0 hits.
GeometryStages appears in crates/reims-vgpu-c/link-order.txt only. fan_out's hits are the
consumer's own event fan-out in crates/reims-vgpu/src/graphics/decode/cmdbuf.rs, not this
module.

Verified (jobs read):
- m3-max-61801: the suites at this change's work in progress (4f1f934423); its real reds were the
  mechanism numbering and the rotated weights on amd-rdna3-radv, both fixed here; the render key
  reads bless-due.
- At the stack's tip over this change (dvl-5 1fa4aed963 and dvl-6 92fe40c38f): 61978 and 61987,
  fmt, clippy in every configuration, Rustdoc, each feature alone, the API docs and the Windows
  clippy, green; 61891, the suites at dvl-4: 13 failures, each a bless-due golden above or
  development's own (the raster state test, the inventory's sample_fill rows); 61968, the lavapipe
  device suite of metal2vulkan-validation, 1483 of 1483, and public case qualification Match;
  62042, the metal2vulkan-validation suite at dvl-5, 1378 of 1378 passed.
- States-only play of this change's player (p-gd.zst) over 35 distinct streams on gem10 (61919),
  um870 (61924), ms01 (61967) and um790 (62004): 456,384 render and 91,972 compute states made,
  0 refused, every stream exit 0. The msi stream (windrag-780m-b2) is not played: msi had no
  memory free.

Rebased onto development 4cf936ed4d (selidx landed as 3ecf606aa8). The conflicts: the version
lines; the mechanism test, where development added RuntimeFact::PrivateArena; runtime-sources.sha256,
where development's is kept; and api_signatures.tsv and docs/REFUSALS.md, both regenerated
(signatures.py --bless, refusal_surface.py) and differing from development by this change's items
alone. The jobs above ran at the old base; the rebased tip's are in the report to main.
2026-11-21 00:03:34 -08:00
Anees Iqbal fa70528de2 validation: the opened chains blessed for drawIndirectFirstInstance on the rebased base; conformance coverage regenerated
The rebase of the indirect draws onto 4cf936ed4d met conflicts in two generated files, which
took the base's side in ec5841552f (whose subject still names the bless it carried before the
rebase). They are regenerated here on the rebased tree:

- opened_chains.txt: the runtime floor's device and restricted chains gain one member each
  (drawIndirectFirstInstance), now 44 and 52 members (bless_opened_chains, job m3-max-62279,
  homelab-gem10-1, at ec5841552f: 1 passed).
- docs/CONFORMANCE-COVERAGE.md: scripts/conformance-coverage/coverage.py on this tree, which
  counts the indirect draw cases that left the ledger.

REFUSALS.md regenerates unchanged; METAL-COVERAGE.md --check passes.
2026-11-21 00:09:33 -08:00
Anees Iqbal ec5841552f conformance: the indirect draw cases leave the ledger; the opened chains blessed for drawIndirectFirstInstance
What: the rt side now draws render-draw-forms-empty, -points and -triangles through the
runtime's indirect draws (f0198015f1), and each compares against Metal's recording as announced,
its notices justified (m3-max-62083, lavapipe). Their three rows, refused "render step
DrawIndirect", leave known-gaps-rt.tsv, and CONFORMANCE-COVERAGE.md is regenerated, which
the_conformance_coverage_document_is_what_the_sources_derive asked for in that job.
runtime-floor's four device chains each state one member more, drawIndirectFirstInstance
(aed460e0da), as bless_opened_chains wrote them in m3-max-62083 (rc 0).

Verified: m3-max-62083 at 53064d173d: fmt, clippy (all, gpu, cpu), doc, bless and lvp (draw,
patch, floor tests on lavapipe) rc 0. Its test step's reds are development's own at
62b3e5a250 (m3-max-61881) plus the coverage document this commit regenerates. Its conformance
lines beyond these three rows are development's 10 argb8-targets lines.
2026-11-21 00:02:51 -08:00
Anees Iqbal f0198015f1 conformance: the rt side draws the indirect steps through the runtime's indirect draws
RenderStep::DrawIndirect and DrawIndexedIndirect were Unavailable ("render step DrawIndirect")
on the rt side; they now call draw_primitives_indirect and draw_indexed_primitives_indirect
with the case's arguments buffer and offset, the indexed one's indices at its index offset.
2026-11-21 00:02:35 -08:00
Anees Iqbal aed460e0da rt: indirect draws, of primitives, indexed primitives and patches
The render encoder builds Metal's three indirect draws:
`drawPrimitives:indirectBuffer:indirectBufferOffset:` (`draw_primitives_indirect`),
`drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:`
(`draw_indexed_primitives_indirect`) and
`drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:`
(`draw_patches_indirect`). Each is one `vkCmdDrawIndirect` or `vkCmdDrawIndexedIndirect` on the
buffer at its offset: Metal's argument structs lie as Vulkan's commands do, so the GPU reads
them as they are and nothing is copied. Before, the encoder had no such methods and the README
listed indirect draws as not built.

drawPatches indirect is built: rt's patch draw is vkCmdDraw(patch_count, instances, patch_start,
base), each patch one vertex of the state's patch list, so Metal's patch count is the indirect
command's vertex count unchanged. A patch index buffer stays `DrawKind::PatchIndexBuffer`, as
the direct draw's.

The arguments' buffer counts among the draw's reads as an index buffer does (draw_reaches,
Managed copies), and the command buffer keeps it until it retires. The pass's first barrier
(Reach::Commands, which has INDIRECT_COMMAND_READ) and the encoder's memory barrier make earlier
writes visible to the read. An offset not a multiple of 4 or without the arguments' 16 bytes (20
indexed) is Refusal::IndirectOffset; arguments at a block byte not a multiple of 4 are
Refusal::ArgumentPlace; an indexed draw's index offset must be a multiple of the index size and
inside the buffer. A device that takes firstInstance 0 alone under a divided step rate refuses
an indirect draw through such a state (DividedBaseInstance), since the GPU reads the base
instance.

Floor: drawIndirectFirstInstance joins REQUIRED (Vulkan 1.4 requires it), so Metal's base
instance is the device's own. The translator is not told. 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, regen_device_profiles.py's RUNTIME_FLOOR and profiles/runtime-floor.json
add it. The translator's tests that read runtime-floor only see indirect_needs_arguments become
false more often, which none asserts the other way.

Known gap (README): an indexed indirect draw's index count is the GPU's, so a count past the
index buffer is not refused as a direct one is. Without robustBufferAccess2, which the floor does
not require, a count past the block's VkBuffer is outside valid usage
(VUID-vkCmdDrawIndexedIndirect-robustBufferAccess2-08798).

The encoder's doc no longer lists `useResource:` as not built (it is, since 62b3e5a250).

Docs: README, REFUSALS.md and METAL-COVERAGE.md (the three selectors now implemented), the
api_signatures table (three methods).

Tests: draw.rs's every_device_draws_from_indirect_arguments_a_blit_wrote: arguments written by a
blit earlier in the command buffer, at offset 16, draw the constant-step triangle as the direct
draw does (vertex 1, instances 1 and 2 at base instance 1), indexed through [7, 0, 1, 2] from
index 1 at base vertex 1 too; arguments of no instances draw nothing. patch.rs's
every_device_draws_patches_from_indirect_arguments: two patches from arguments 4 bytes in draw
as the direct patch test's, and a patch index buffer is PatchIndexBuffer.
2026-11-21 00:02:34 -08:00
Anees Iqbal 4cf936ed4d Identity domains test: the ulong test's written image drops a write outside it where robustImageAccess does
What: ulong_texture_slots_are_rg32_elements_their_resource_ids_name gave every image the
robustness of robustImageAccess2 alone. On the profile without robustImageAccess2
(moltenvk-m3 without it), lanes 16 and on write outside the written image, which the translator
leaves to the device under robustImageAccess at either level (contain::device_drops_texel_writes).
The interpreter trapped there (m3-max-62051: ImageOutOfBounds { image: 6 }, invocation 16). The
read images keep robustImageAccess2's robustness, since the shader checks every read without it.
The written image now drops an outside write where the profile has robustImageAccess, and still
traps where the shader must guard.

Why: the product is unchanged; the test modelled the device's write robustness from the wrong
feature. Verified by the item 11 test job that follows this commit.
2026-11-20 23:30:53 -08:00
Anees Iqbal 95cd368f99 Identity domains test: the ulong test binds its arrays' elements from 0
The interpreter binds a runtime image array's elements from element 0, as many consecutive ones
as are bound; the test bound the sampled array's elements 1 and 2 and the storage array's 3
alone, so both arrays had no element and the first read trapped (m3-max-61897: lavapipe,
ImageOutOfBounds of image 0 at invocation 0). The elements below the named ones now hold a
one-texel filler, which no thread reaches, as the texture-atomic test's do.
2026-11-20 22:28:52 -08:00
Anees Iqbal 4f6dc912f3 Identity domains: a plain ulong texture slot is the RG32 element its resource ID names
A `ulong` texture slot that no `ulong` atomic updates is an `RG32` unsigned image whose two words
the shader joins and splits (`TexelClass::Uint64`), declared `Rg32ui` where it is a storage image
(`ulong_format`, under the floor's `shaderStorageImageExtendedFormats`). Under the identity domains
identity_class refused every `ulong` declaration, so such a kernel was
`Unsupported{IdentityDomains}` ("a type the identity arrays hold no element of"). It now admits it:
its class is the unsigned integer class of its shape, as its declared image is, and a storage
declaration of `Rg32ui` is the class `StorageFormatClass::Format(R32G32_UINT)`, whose variable is
the storage-image array's (set 1, binding 1, which every storage class aliases), as Metal binds
only an `RG32Uint` texture there. A slot a `ulong` atomic updates (an `R64ui` image) and an
argument buffer's `ulong` texture stay refused. The default domains are unchanged.

Docs: RESOURCE-ID.md's arrays name the `RG32Uint` storage class of a `ulong` texture; API.md's
identity forms name a `ulong` slot's reads and writes.

Test: engine_identity's ulong_texture_slots_are_rg32_elements_their_resource_ids_name: the owned
fixture unk_ulong_access (a sample-access and a read-access `texture2d<ulong>`, a write-access
`texture3d<ulong>`) under the identity domains on lavapipe, moltenvk-m3 and moltenvk-m3 without
robustImageAccess2: each passes L3, its classes are the sampled array's unsigned 2D class and the
storage array's 3D `R32G32_UINT` class, and on the CPU interpreter each of 20 threads reads its
elements' two words joined as `(v, 0, 0, 1)`, `(0, 0, 0, 1)` outside the textures, and writes the
sum's two words inside the texture alone.

SEMANTICS_VERSION 2246 -> 2247: a refusal becomes a module.

Evidence:
- The 9 public conformance cases on the plain ulong slot (unk_ulong_rw x7, unk_ulong_access
  x2): before, at f3418eacb9 on lavapipe (m3-max-61725), the 2 access rows not_supported;
  after, at 2796fb6e14 (an earlier form of this commit), 9/9 match, the 2 access rows on
  runtime-compute (m3-max-61703).
- States-only play of all 36 streams at 3bb97361a8 (an earlier form of this commit plus probe
  commits that never land): every render and compute pipeline state made, 0 refused. msi
  m3-max-61733 (1 stream), um870 61734 (1), um790 61760 (5), ms01 61775 (7), gem10 61795 (22).
2026-11-20 22:10:44 -08:00
Anees Iqbal 27cbf8a7df Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-20 23:59:16 -08:00
Anees Iqbal 3ecf606aa8 Stage io: an index not shown the same across a primitive is refused; the selected index store goes
Metal's shading language leaves a primitive whose vertices write different indices undefined:
"You must return the same value of [[render_target_array_index]] for every vertex in a primitive.
If values differ, the behavior and value passed to the fragment function are undefined." The same
sentence covers [[viewport_array_index]]. The selected index store answered that case with the
first vertex's index, through the synthesized geometry stages, and MoltenVK's profile could take
DriverDeviation::MetalFirstVertexIndices to store it as written. Both reproduced undefined Metal.
The runtime never reached either: it enables no geometryShader, and no profile takes the
deviation.

After this change every profile has one form. An index that the function's structure shows to be
the same at every vertex of a primitive is stored to Layer or ViewportIndex where
shaderOutputLayer or shaderOutputViewportIndex is enabled. Without that feature it is refused as
Unsupported(LayeredRendering), or as Unsupported(VertexAmplification) for an index the
amplification's offset alone sets. The refusal needs the output feature only; geometryShader is
no longer offered. An index not shown the same is refused as NotImplemented(LayeredRendering) on
every device. index_store's comment cites the two spec sentences as the reason for that refusal.
It cites Vulkan's same-value rule (VUID-VkPipelineShaderStageCreateInfo-stage-02596 for Layer,
-02597 for ViewportIndex) as the reason the index is not stored as written. A device without
multiViewport still stores no viewport index.

Removed:
- IndexStore::Selected, indices_selected, selected_index;
- StageIoPlan::indices_selected and first_vertex_indices_by_device, and the compile layer's
  requirement;
- IoRole::SelectedLayer and SelectedViewport, with their codec tags;
- VaryingKey::selected_layer and selected_viewport, with their key tags;
- GeometryStages::layer and viewport, the stages' Layer and ViewportIndex stores, and the
  Reason's index half;
- RuntimeFact::SynthesizedGeometry's layer and viewport fields;
- DriverDeviation::MetalFirstVertexIndices, its last variant, and with it the DriverDeviation type
  and DeviceProfile::takes_driver_deviation;
- VkProperty::MetalFirstVertexIndices and its codec tag.

The geometry stages keep the barycentric weights and the fan-out. A fan-out stage past the
geometry limits is now refused as RasterizationRateMap needing the limit. Before, it was refused
as LayeredRendering with an empty alternative, because the stage's reason held neither weights
nor an index.

Rule 1: no note stops being raised. The first-vertex form raised none. The input it served is now
a typed refusal, so no difference goes silent. The catalogue is unchanged.

The command line: no code there names a removed item. Translating a vertex function whose index
is not shown the same now prints FALLBACK (NotImplemented LayeredRendering) on a geometryShader
profile, where before it compiled with the stages. Validation: four authored cases compiled on
every profile-leg but moltenvk-m3 through the stages: 07f125464dac, 434e73e03189, 7ce6dea0475e
and a013a2bcbe56. On moltenvk-m3 they were refused needing geometryShader. They are now refused
on every leg; the authored compile census takes them at the next named pin, not in this change.
The coverage census test that read three geometry stages from engine/rt6_first_vertex now reads
them from engine/bary_weights on the 780M profile without fragmentShaderBarycentric.

Fixture: engine/vertex_amplification's amp_vertex and amp_vertex_layer now take their viewport
and slice from the instance (iid & 1) instead of the vertex (vid & 1). The amplification and
render-target-slice tests then still compile them, and engine/rt6_first_vertex carries the
per-vertex case. The fixture was regenerated by scripts/regen-air-fixtures (Apple metal
32023.922, llvm-dis 21.1.8).

Tests:
- engine_selected_indices becomes engine_target_indices, covering:
  - a uniform slice or viewport takes the output or nothing else;
  - no multiViewport stores nothing;
  - per-vertex indices are refused on every device;
  - the floor's zero reads;
  - the weights' stage beside a vertex Layer is not implemented.
- link/tests/geometry.rs loses its two selected-index tests.
- engine_amplification, engine_render_target_slice and engine_stage_io now expect the builtin and
  the output-only refusal.
- runtime-floor now requires shaderOutputLayer, so the tests that need a device without it
  withhold the feature from the floor's description (engine_target_indices, engine_amplification,
  engine_stage_io).

Bless due until the next named pin, where the M3 bless job takes them; nothing is blessed here:
- tests::air_input::engine_fixtures_match_their_golden_printout: vertex_amplification's printout;
- tests::public_fixtures_engine (the inventory):
  - rt6_first_vertex and rt6_first_vertex_point become NotImplemented(LayeredRendering) on every
    profile;
  - amp_vertex and amp_vertex_layer become ok on moltenvk-m3;
  - each LayeredRendering cell that offered GeometryShader loses that alternative;
- tests::golden_hashes, and pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value
  (the render key): the profiles' fingerprints change with VkProperty's codec;
- the authored compile census.

SEMANTICS_VERSION 2245 -> 2246 and ARTIFACT_FORMAT_VERSION 582 -> 583.
SEMANTICS: an index store changes form. ARTIFACT: the codec loses two IoRole tags, a VkProperty tag
and two RuntimeFact fields. RUNTIME_VERSION stays; runtime-sources.sha256 takes the new hash, and
api_signatures is blessed. docs/REFUSALS.md is regenerated. The runtime README's known gap for a
differing index names the refusal as not implemented and drops the geometry stage form. API.md's
layered-rendering bullet, its RenderPipeline stage list and its profile accessors, and
ARCHITECTURE.md's link line drop the selected index.

Consumer check (consumer_check.sh, consumer development b76d6ac4a9):
- MetalFirstVertexIndices, SelectedLayer, SelectedViewport, selected_layer, selected_viewport,
  SynthesizedGeometry, driver_deviations and DriverDeviation: 0 hits.
- GeometryStages and takes_driver_deviation: in crates/reims-vgpu-c/link-order.txt only.
- DriverDeviation and takes_driver_deviation are named in crates/reims-vgpu-vulkan/src/gpu/rgbx.rs
  and encode_render/tests/metal_tests.rs on some of the consumer's steelbrain/* branches, for
  MetalSampler, MetalHalfConversion and MetalVertexSimdgroups, which the stack below already
  removed. development has neither file.

Verified (jobs read):
- m3-max-61766: lint in every configuration and the suites at this change on the earlier stack
  (eeef281428); its reds were the bless-due goldens above.
- At the stack's tip over this change (dvl-5 1fa4aed963 and dvl-6 92fe40c38f): 61978 and 61987,
  fmt, clippy in every configuration, Rustdoc, each feature alone, the API docs and the Windows
  clippy, green; 61891, the suites at dvl-4: 13 failures, each a bless-due golden above or
  development's own (the raster state test, the inventory's sample_fill rows); 61968, the lavapipe
  device suite of metal2vulkan-validation, 1483 of 1483.
- m3-max-62042: the metal2vulkan-validation suite at dvl-5, 1378 of 1378 passed.
- States-only play of this change's player (p-si.zst) over the 36 streams on um870 (61909),
  gem10 (61912), ms01 (61958), um790 (61990) and msi (62045): 502,920 render and 108,189 compute
  states made, 0 refused, every stream exit 0.
2026-11-20 23:23:51 -08:00
Anees Iqbal 7d106c865a Bless at the pin tip 6c0b1a7f77: golden tables, compile census and the render key
The pin after the private-memory arena (c034220175..8e42292284) and the argument buffers'
constexpr-sampler switch (5cd5de678f). Development's checks at 8e42292284, the last product commit
under this tip (everything after it is validation, its doc and scripts): quick m3-max-62138 green
(clippy plain, --cfg m2v_gpu, --cfg m2v_cpu_icd, doc, rt on lavapipe 527/527); suites m3-max-62141:
validation 1378/1378, conformance 1014/1014, doctests, product 4108/4116 with 8 reds, all bless-due.
GOLDEN read "bless due (stale cells only, keys changed)".

- golden_hashes.tsv, public_fixture_expectations_engine.tsv and air_input/sample_fill.txt: the M3
  bless at 6c0b1a7f77, m3-max-62209 (bless-job.sh; inventory, golden and printouts rc 0). The
  engine/sample_fill fixture gets its inventory, printout and hash rows; the rest are cells keyed
  by the profile fingerprints and SEMANTICS 2245.
- authored-compile.tsv: the census at 6c0b1a7f77, m3-max-62210 (census rc 0). The executor moves
  from vulkan-engine-v191 to v197 and 40 rows move, each by a landed ruling that the case is the
  runtime's limit: 22 vertex cases that bind a visible function table become
  not_supported{render_function_table} (fc168d0173), 9 rows of 64-bit texture atomics move from a
  missing device capability to not_supported{ulong_texture_atomic} (1d16171943), 5 to
  separate_depth_stencil (6af76cf309) and 2 to index_buffer_past_end (9a28de4736); 2 compiled rows
  change only their artifacts.
- the_old_render_descriptor_key_keeps_its_value: the key m3-max-62237 computed at 6c0b1a7f77
  (4affc4d37cf7...), the value the test says to write; it moved with SEMANTICS 2243-2245.

Verified: the three M3 jobs above, each rc 0 at 6c0b1a7f77; privarena's reruns of the same 8 reds
with their full messages (m3-max-62093, 62137) read the same cells and the same key.
2026-11-20 23:57:02 -08:00
Anees Iqbal 6c0b1a7f77 Validation: candidate rows and refusals drop their "backend" field, and Backend goes
8d573e9cbc left observation::Backend as the literal type of one
serialized field, "backend":"vulkan", on every candidate row and refusal.
This commit drops that field from CandidateObservation and
RefusalObservation, deletes the enum, and rewrites the committed shards
without it.

The shards: 12 of the 41 committed shards hold records (24 under
observations/vulkan, 17 under observations/refusals/vulkan). Their 56
records were rewritten by the store's own writer, not by an edit. Job
m3-max-61965 (homelab-gem10-1) built scratch commit 73dd795b28, which
never lands: this commit's code plus a one-shot store method behind
`corpus-status --drop-backend-fields`. The method read every record,
removed its backend field, refused any record whose backend was not
vulkan or which the strict reader refused without the field, and wrote
each shard through stored_jsonl in one recoverable transaction. Then:
- "drop-backend-fields read=56 written=56 refused=0";
- rowdiff (each old record less "backend" against the new record, as
  JSON): rows files=24 records=42 equal=42 differ=0, refusals files=17
  records=14 equal=14 differ=0, rc 0 for both. Re-run here on the
  copied shards: the same counts. Every changed line is also the old
  line with `"backend":"vulkan",` removed, byte for byte (56 of 56);
- corpus-index at that build, cold and then warm on a fresh index of
  the public checkout: both synchronize, the warm pass with
  source_shards_scanned=0 source_bytes_scanned=0 rebuilt=false. In
  this public-only checkout the cold pass scanned none either. The index
  read every candidate row back (31 public, 11 private-AIR rows counted
  as not indexed), and corpus-status's evidence ran (rc 0).

No version moves. No cache keeps parsed rows across a shard change:
the index's candidate table is cleared and refilled from the shards on
every sync, and C3 and corpus-status read the shards themselves.
ENGINE_EXECUTOR_ABI would make every recorded row stale on every
venue, and nothing about what a row records changed. No private store
holds rows: corpus/local has sources, library modules and its index,
and every candidate row and refusal, private-sourced cases' included,
is in these committed shards.

Caveat: a batch out directory written by an earlier build (a venue
rerecord's rows.jsonl and refusals.jsonl) carries the field, so this
build's --batch-install refuses its records (deny_unknown_fields). Such
a directory is installed by the build that wrote it.

Tests: the backend fields go from every row and refusal the tests
build (observation, store, index, C3, batch, refusal, out-of-bounds and
profile tests).

Verified: the job above. This commit's own compile and suites are not
yet run; a gate covers them.
2026-11-20 23:14:49 -08:00
Anees Iqbal 8d573e9cbc Validation: the one-variant candidate Backend no longer threads through the executor
d54a1a5568 left observation::Backend with one variant, Vulkan, so every
parameter, key and check that carried it decided nothing. This commit
removes all of them. One use stays: the rows' and refusals' serialized
"backend":"vulkan" field. Every committed row carries it, and so do the
private store's rows on msi. Dropping the field means rewriting both
stores through the store's writer, and the private rewrite waits for
msi's hold to lift. So the field goes in its own commit, together with
that rewrite. Until then Backend is the field's literal type and nothing
else.

What goes:
- The store: read_candidates and read_refusals take no backend.
  refusal_directory(backend) is now the REFUSAL_DIRECTORY constant,
  beside CANDIDATE_DIRECTORY. The "wrong backend directory" checks and
  the backend in a candidate slot's key go too: a row's field can hold
  only vulkan, so no check could fail.
- CandidateDependencies::backend and its dependency check.
- The executor: engine::execute, execute_case, execute_prepared,
  run_on_context, platform::execute_engine and execute_engine_render
  take no backend. DeviceInput (the device worker's input) has no
  backend field. run_on_context's runtime routing loses its
  `backend == Vulkan` term. check_backend is deleted. It refused a
  context that opened MoltenVK, and validate_host (was
  validate_backend_host) already refuses every candidate run on macOS,
  the only host MoltenVK runs on.
- C3: VenueKind::backend, Venue::backend, VenueSlot::backend. VenueKeys'
  insert, expected, holds and artifact_is_current, and Venues::venue_of,
  take no backend.
- The index: candidate_staleness, candidate_slot_state,
  refusal_staleness, refusal_is_current and candidate_state take no
  backend. The candidate_observations table loses its backend column; its
  key is (case_id, environment_id). Every sync clears the table and
  refills it from the shards, so an older index's table (one with the
  column, or one without translator_fingerprint) is dropped and made
  again (ensure_candidate_columns, which replaces
  ensure_candidate_fingerprint_column). The evidence slots still name
  "metal" or "vulkan".
- The batch: BatchBackend::candidate and From<Backend> go.
  vulkan_batch::install takes no backend; it refuses an out directory
  whose record is not a Vulkan batch's, as before. find_row and
  find_refusal take no backend. BatchBackend keeps its two variants,
  Vulkan and Metal.
- corpus-vulkan: candidate_common::main and candidate_batch::serve take
  no backend; their messages name corpus-vulkan.
- corpus/README.md: a candidate slot is (case_id, environment_id).
  corpus-status's --rekey-venues help loses "of either backend".

No version moves. No row changes: each still records "backend":"vulkan",
and the executor enables, binds, submits, reads back and records what it
did. The index's table is rebuilt by its own migration.

Tests: the backend arguments go from the store, index, C3, batch,
admission and platform tests, and the BACKEND and HOST_BACKEND constants
go with them. The device worker's integration input drops "backend".

Verified: not yet compiled; a gate covers it.
2026-11-20 23:14:39 -08:00
Anees Iqbal f98e692a23 Fix forward of 79d95a2887 and d54a1a5568: two validation test failures
Gate m3-max-62050 (msi; it gates d47d144225, which carries this chain)
found two failures. Both come from this chain.
- d54a1a5568 deleted C3Input's moltenvk field. The stale-records test in
  c3/tests.rs now names all five of C3Input's fields, so its
  `..C3Input::default()` updates nothing, and clippy's needless_update
  denies it (clippy, clippy-gpu, clippy-cpuicd rc 101). The update
  goes.
- 79d95a2887 turned the authored-compile tests' profile pair from
  ["lavapipe", "lavapipe+robustness-off"] into ["lavapipe",
  "gate-lavapipe"].
  host_replayed_command_buffers_are_reported_uncovered expected the
  report's uncovered cells in that declaration order. The report sorts
  them, though (Report::uncovered, by case and profile label), and
  "gate-lavapipe" sorts first. The old pair happened to be in sorted
  order. The test now sorts its expected list as the report does
  (lvp-suite: 1465 passed, this 1 failed).

Verified: not yet compiled; the next gate covers it.
2026-11-20 23:14:34 -08:00
Anees Iqbal 0cdcb67aef Validation: MoltenVK's uncontained robust-buffer forms are deleted
374061b156's message says coverage's MoltenVK host class serves a live
path. That is wrong. HostClass::robust_buffers_uncontained returned forms
only for VK_DRIVER_ID_MOLTENVK. out_of_bounds::uncontained read it to
refuse an out-of-bounds case before a candidate run. No candidate run
opens MoltenVK now:
- every run passes validate_backend_host (engine::execute_prepared),
  which refuses Vulkan candidate execution on macOS;
- check_backend refuses a context that opened MoltenVK.
corpus-pipeline, the one live Vulkan path on macOS, runs no
out-of-bounds case. So the forms were always empty. No committed
refusal and no authored-compile cell names one: git grep for
"uncontained" in corpus/ finds nothing.

What goes:
- coverage's RobustBufferForm, ExecutionClass and HostClass's
  robust_buffers_uncontained, and the module doc's limitation paragraph;
- out_of_bounds's Mechanism::robust_buffer_form and uncontained();
- NotSupported::Uncontained's forms field, its label's form part, and
  its "the device leaves these forms uncontained" display arm. The labels
  a run can produce are unchanged: unchecked forms and the runtime's
  variant;
- the class parameter of engine::out_of_bounds_run,
  draw_out_of_bounds_run, runtime_bounds::contained and drawn, which only
  fed uncontained(). runtime::execution_class is private now; the
  census still records the class;
- profiles/README.md's pointer to the deleted method. Its account of
  what moltenvk-m3 states and MoltenVK does stays.

ExecutionClass and HostClass stay: a run's census records them.

Tests: the two MoltenVK containment tests go. So do the
robust_buffer_form assertions in three containment tests. The refusal
class and bless round-trip tests build Uncontained from an unchecked
form. The census round-trip test records a RADV host (driver id 3)
instead of MoltenVK.

Verified: not yet compiled; the next gate covers it.
2026-11-20 22:27:13 -08:00
Anees Iqbal f8c768c412 Fix forward of 79d95a2887: the batch's pending count and a C3 test compile
Gate m3-max-61853 at d54a1a5568 (msi) failed to compile validation at two
places 79d95a2887 left behind:
- candidate_batch.rs's --batch-report still passed the deleted legs'
  `passes` to plan() for its pending count (E0425). It now plans the
  engine pass, as --batch does.
- c3/tests.rs's ray-tracing refusal test bound a local `slot`, which
  shadowed the slot() helper the test calls again below (E0618). The
  local is now `held`.

Verified: not yet compiled; the next gate covers it.
2026-11-20 22:25:52 -08:00
Anees Iqbal 374061b156 Validation: the MoltenVK MSL helper and corpus-pipeline's .cfg writer are deleted
The MoltenVK MSL helper converted a kept module to MSL as MoltenVK
1.4.1 converts it on the moltenvk-m3 device. It had three parts:
- scripts/moltenvk-msl-helper/build, which built helper.cpp against
  SPIRV-Cross at MoltenVK's commit;
- msl_portability::moltenvk, which derived the helper's configuration
  from the pipeline layout;
- corpus-pipeline --keep-modules, which wrote that configuration beside
  each kept module as <hash>.<stage>.<variant>.cfg, or .cfg.err.
Only the helper read a .cfg. No check, CI job or script ran the helper,
and the MoltenVK backend it served is gone. So the module, its tests,
helper.cpp, the build script and the .cfg writer go. --keep-modules
still writes each stage's .spv and its .json (entry point,
specialization layout, strategy census).

The fixtures under fixtures/public/msl_portability/ stay: the
translator's forwarding tests (spirv/testing/forwarding.rs) read them.

The engine's linked translation returned a translated module's words
with the pipeline layout link gave it, "what msl_portability::moltenvk
configures MoltenVK's conversion from". No caller read that output, so
these go:
- translate_new_linked and translate_row_linked. translate_new and
  translate_row validate directly.
- translate_with, which had no caller. specialization::attempt's doc
  now names translate_unvalidated, which is what it runs.
- PendingL3::layout. validated and PendingL3::validate now return the
  Attempt alone.
- Attempt::settle_l3's bool, which no caller reads now.

Not deleted, because of the macOS grep: corpus-pipeline (L4 driver
acceptance, --device-type gpu) still opens a Vulkan device on macOS,
which is MoltenVK there. acceptance::metal_report parses MoltenVK's
reports for it. So VulkanContext's loader-word restore (loader_word.rs
and clippy.toml's list), MoltenVK's withheld diagnostics (device.rs)
and coverage's MoltenVK host class serve a live path, and stay.

Verified: cargo fmt; no file names msl_portability's module,
moltenvk-msl-helper, translate_new_linked, translate_row_linked or
translate_with (git grep). The compile gate follows as a potluck job.
2026-11-20 22:19:52 -08:00
Anees Iqbal d54a1a5568 Validation: the MoltenVK backend, its C3 venue and the old engine's baseline are deleted
The validation executor's Vulkan side runs on Linux through native ICDs
and the runtime. No lane records MoltenVK rows any more, and no MoltenVK
venue is wanted. This commit deletes the MoltenVK backend from the
store up.

Before the deletion, git grep at e35d9098c0 showed these readers of
Backend::Moltenvk rows outside tests:
- C3's input (c3.rs: C3Input::moltenvk, the baseline, the old-mismatch
  ledger), its venue kind (venues.rs), the evidence census
  (index.rs: the index's candidate table and evidence_status);
- the store's own layout check, shard rewrite and rekey;
- the batch's worker store, which linked the other backend's rows;
- the corpus-moltenvk binary, the host and driver checks
  (candidate.rs, platform/compute.rs) and candidate_batch's CPU refusal.
Every one goes or loses its MoltenVK arm here. No reader is left.

What goes:
- The corpus-moltenvk binary (Cargo.toml entry included), and
  Backend::Moltenvk and BatchBackend::Moltenvk. Backend keeps one
  variant, Vulkan. Collapsing it is a follow-up commit.
- corpus/observations/moltenvk: 64 shards, 4,809 rows. 4,802 of them
  are old-engine rows in about 60 slots: apple-m3-max-moltenvk 1,137,
  the byte-exact-* and local-* runs, and probe slots. The other 7 are
  engine rows of apple-m3-max-moltenvk@engine.
  corpus/observations/refusals/moltenvk: 16 shards, 6 refusals.
- The store's MoltenVK shards: its layout check, the aligned rewrite,
  the refusal follow and the rekey now read the Vulkan backend alone.
  The batch's worker store links only the Metal rows. The index stores
  the Vulkan candidates alone, and evidence_status's rows have no
  moltenvk column (corpus-status's evidence line loses it too).
- C3's MoltenVK venue (VenueKind::Moltenvk, c3-venues.json's
  apple-m3-max-moltenvk entry) and with it the old engine's baseline:
  - Population::OldEngineMatched, the baseline closure and the "new
    mismatch" count (SlotReport::new_mismatches);
  - the old-mismatch ledger (LedgerRow, C3Report::ledger, stale_causes,
    unexplained);
  - the reviewed list's old_mismatches part (OldMismatch,
    ListPart, EntryRow::part), and Venues::baseline and by_environment.
  The venue list's MoltenVK-driver check goes too. VenueDevice's
  metal_environment_id, which only an Apple GPU's venue device set,
  goes with Venue::identities_compared_with: a venue run is held to
  all of its devices' identities.
- c3-reviewed.json: the 12 old_mismatches entries (all signed off),
  and the 10 fast_math_regrouping readings whose only observation was
  the apple-m3-max-moltenvk@engine slot. These are the linked-single
  radix 5/7/11/13/15 zero-write cases, two each, all signed off. A
  reading must list an observation, and theirs named a slot that no
  longer exists. A regrouping mismatch of those cases on another venue
  now reads unreviewed until a reading lists that venue's row. The 12
  apple_reading entries are untouched; none named a MoltenVK slot.
- corpus/authored-compile.tsv: the moltenvk-m3 column keeps its cells
  but drops their artifact digests (2,255 cells). Only a C3 venue's
  profile keeps a digest, and moltenvk-m3 is no venue's now. This is
  what a bless writes; the profile itself stays, since the translator's
  tests read it.
- scripts/rerecord-venue's moltenvk kind (and its Homebrew validation
  layer path), and scripts/rerecord-commit's MoltenVK build, install
  and shard paths. docs/VALIDATION.md loses corpus-moltenvk, and its
  venue list names what each venue covers.
- In the docs, the robustness leg's "profile-leg" (validation README,
  corpus README) is now "profile", which 79d95a2887 missed.

What C3 still decides: per venue of c3-venues.json, lavapipe on arm64
and x86 (the public cases) and the 780M, the Iris Xe RPL-P and the RTX
5080 Laptop (every Metal-qualified case), each case's verdict in the
venue's engine slot by the same rules as before (match, reviewed,
device_gap, out_of_scope, reference_gap, mismatch, refused, stale,
missing). It holds when every slot holds, every reviewed observation
holds, every listed reference gap is recorded, every entry and recorded
reference gap is signed off, and no sign-off is refused. It no longer
holds anything to an old-engine population, counts new mismatches
against one, or keeps a ledger of old-engine mismatch causes.

Tests:
- c3/tests.rs: the synthetic MoltenVK venue becomes a native GPU venue
  (GPU, Metal-qualified, still described by the moltenvk-m3 capture).
  Deleted: the baseline test (moltenvk_must_cover_every_case...), the
  ledger test, and the Apple-GPU Metal-environment test.
  Rewritten: the population tests (two populations now) and the
  reference-gap test (on lavapipe's public population). The schema test
  checks its review fields on a reading. The venue checks lose the
  baseline and driver cases.
- index.rs and store.rs tests run their toy rows as Vulkan's. The
  cross-backend checks have no second backend and go.
- vulkan_batch/tests.rs: the MoltenVK batch test goes. The install test
  refuses a Metal batch's record in place of a MoltenVK one.
- tests/integration: the store-layout and worker tests drop
  corpus-moltenvk. fast_trig_within_apples_bound reads the Vulkan store
  and wants one row per venue (5). It wanted 10, which the robustness-off
  and MoltenVK rows made up.

Device-level MoltenVK accommodations stay for the follow-up commit with
the MSL helper, once a grep shows no Vulkan run on macOS: the loader
word, MoltenVK's withheld diagnostics, coverage's robust-buffer host
class and the pipeline flag.

Verified: cargo fmt; no committed observation path, C3 list entry, venue
or script names the MoltenVK backend (git grep). The compile gate of the
Q3 commits follows as a potluck job.
2026-11-20 22:15:53 -08:00
Anees Iqbal e35d9098c0 Fix forward of 79d95a2887: the device worker test's input and three docs drop the stated leg
79d95a2887 deleted the executor's robustness-off leg, so a run has one
form and no leg. Three places still named it:

- tests/integration/device_worker.rs: the worker input it builds
  carried "leg":"stated", a field DeviceInput no longer has, and its
  doc named the stated robustness leg.
- platform/acceptance.rs: unmet_requirements' doc, its comment, and the
  requirement text a context that could not enable a stated robustness
  feature reports. The text was "... not enabled in the stated leg" and
  is now "... not enabled". No committed row or refusal holds the old
  text (git grep).
- platform/runtime.rs: two docs of a row's environment.

Verified: cargo fmt. The compile gate of the Q3 commits follows as a
potluck job.
2026-11-20 22:15:53 -08:00
Anees Iqbal 6e76d7d78b Validation: the rows of the below-floor profile slots and of SwiftShader are deleted
The committed Vulkan store held 74 rows that no executor writes any more.
They came from environments the cutover removed:
- 57 in engine slots restricted to profiles below the runtime's floor:
  - @vk12-floor: 42 on ubuntu-26.04-lavapipe, 1 on lavapipe-x86_64
  - @roadmap-2022: 2 each on amd-780m-radv, intel-irisxe-rplp-anv,
    nvidia-rtx5080-laptop and lavapipe-x86_64
  - @lunarg-desktop-baseline-2023: 2 each on amd-780m-radv,
    intel-irisxe-rplp-anv and nvidia-rtx5080-laptop
- 17 of ubuntu-26.04-swiftshader@engine, an environment with no venue.

The runtime refuses a device below its floor at creation, and the
roadmap-2022 and lunarg-desktop-baseline-2023 profiles are gone. Only
below-floor/vk12-floor stays, as the input of the floor's refusal test
alone (profiles/README.md). So no run can make these rows again, and
no reader takes them.

All 74 rows go. The 25 shards this empties are removed; shards that
were already empty stay. The refusal stores held none of these rows,
and the MoltenVK store holds none.

store.rs's refusal-row test named two of the deleted slots as literals
(env@engine@vk12-floor, env@engine@roadmap-2022). Its rows now sit in
slots of committed profiles (env@engine@runtime-floor,
env@engine@lavapipe). The test reads only that the ids differ and that
each row round-trips.

Verified: cargo fmt; no committed observation names vk12-floor,
roadmap-2022, lunarg-desktop-baseline-2023 or swiftshader (git grep
over corpus/observations). The compile gate follows as a potluck job.
2026-11-20 22:15:53 -08:00
Anees Iqbal 8b7dac7c83 Fix forward of 79d95a2887: the MoltenVK rows of the robustness-off slots go too, and empty shards stay
79d95a2887 dropped the robustness-off slots' rows from the Vulkan
stores alone. The MoltenVK stores still held 12 of them (in 9 shards),
whose census and environment name the deleted leg. Those rows go now,
and "leg":"stated" is stripped from the rest, so every committed row
reads under the new shape.

It also removed 29 shards that held no row before it, which a shard
emptied of its rows does not call for. They are back as they were. The
15 shards it emptied of their own robustness-off rows stay removed.

Verified: cargo fmt; no committed observation names "leg" or a
+robustness-off slot (git grep). The compile gate follows as a potluck
job.
2026-11-20 22:15:53 -08:00
Anees Iqbal 79d95a2887 Validation: the robustness-off leg and its slots are deleted
The ruling Q3: the validation executor runs each case in one context,
which enables every robustness feature its device states. Its second
leg (every robustness feature off, the ID@engine+robustness-off slots)
measured an encoding that metal2vulkan-runtime never runs, since the
runtime's floor fixes the robustness it enables. The tier table keeps
both of its compiles: they are translator coverage of what the runtime
ships, so coverage::Leg stays as the tier table's type alone.

Deleted:
- the executor's leg: corpus-vulkan's and corpus-moltenvk's
  --robustness-off, the device worker's leg, engine_slot's leg (an engine
  slot is ID@engine or ID@engine@P; an ID@engine+robustness-off is no
  engine slot), the enable lists' leg (engine_list enables what the
  description states), and the leg in a row's environment and census
  (ExecutedCensus.leg, environment.robustness.leg) with its validation;
- the batch's legs: corpus-vulkan-batch takes no --leg. Its passes are
  Pass::Engine and Pass::Metal, so a done-list line names "engine" where
  it named "stated", and a log is CASE.engine.txt. Its report lines carry
  no leg= field, and batch-slowest names pass=engine;
- the authored compile census's robustness-off profiles: a profile is
  its committed stem (ProfileStem, which was ProfileLeg); a label with a
  "+" names no profile. corpus/authored-compile.tsv loses its 9
  +robustness-off columns mechanically. Every other cell stays, and the
  reader takes the new layout in this commit. The rows are re-blessed
  at the next named pin. the_committed_expectations_parse holds the file
  to what a bless renders. No test is expected to read red until the
  bless, since no kept cell changed (unaudited until development's census
  runs);
- C3's legs: a venue lists no legs and has one slot (c3-venues.json
  drops its legs fields). c3-reviewed.json drops the 12 observations
  recorded in robustness-off slots;
- the committed rows of the +robustness-off slots: 193 rows and
  refusals out of corpus/observations, which empties and removes 44
  shards. "leg":"stated" is stripped from the remaining rows' census and
  environment;
- scripts/qualify-public-cases' second run per case, and
  scripts/rerecord-venue's --leg; docs/VALIDATION.md's robustness legs.

corpus-triage's usage, corpus-status' --c3 help and the census's file
comment say "profile" where they said "profile-leg".

Verified: cargo fmt. The compile gate follows as a potluck job.
2026-11-20 22:15:02 -08:00
Anees Iqbal 8e42292284 The runtime guard pins the arena's runtime sources
The arena changes four runtime inputs (memory/arena.rs, device/mechanism.rs, lower/dispatch.rs and
bind/plan/compute.rs), with RUNTIME_VERSION 2549 -> 2550 in its first commit. The hash is the
build script's form over its 93 inputs, computed by a script that reproduces the committed
e8062520 at the base c2bbfed628; validation's the_runtime_sources_are_the_committed_ones checks
it in the gate.

Verified for the series (privarena's gate, on the lane's tree whose cherry-pick onto c2bbfed628 this is):
fmt and clippy 0 (m3-max-61992); clippy --cfg m2v_gpu and --cfg m2v_cpu_icd 0, rt nextest 153/153
(62015); workspace rustdoc -D warnings 0 (61977, 61992); rt suite on lavapipe 522/522 (62038);
metal2vulkan nextest 3325 of 3333 (62046), the 8 being development's own bless-due reds by name (the old
render key, the engine printout, golden_hashes, the inventory, llvm_as parts 3, 4, 5 and 8);
the_runtime_sources_are_the_committed_ones (62044). Device legs at the test's final form: the 780M (62011),
the Iris Xe (62012) and the RTX 3090 (62014) match the CPU at 28,704 B, 36 KiB and 200 KiB a thread, whole and
split. States-only play of the 36 streams on lavapipe (62066, 62075, 62076, 62082, 62091): 0 refused render
and compute states, the same state counts as the base's plays.
2026-11-20 23:02:13 -08:00
Anees Iqbal c74f940dda rt test: the arena kernel reads its thread's index from its threadgroup, so it runs in Metal's threadgroups
A kernel that reads only its position in the grid may run in workgroups of the runtime's own
shape (choose: Form::Tiled, the module's tiles, workgroups of 256 threads), and the 780M (m3-max-61993) ran the
arena kernel in 2 workgroups of 256, 2 pieces a dispatch under the test's budget where the test
expected 4 of 2 threadgroups of 64. Every answer matched. The kernel now computes its index as
its threadgroup's position times 64 plus its position in it, so it observes its threadgroups
and keeps Metal's 64, and the pieces the test expects are the ones recorded.
2026-11-20 22:56:53 -08:00
Anees Iqbal 411d5eec53 rt: the arena's block takes are counted again; an allocation at the arena's site is not a take
bce8c6166e dropped Metrics::private_arena_blocks as a duplicate of
private_arena_allocations.count. It is not one: the site counts the takes that no free range fit
(an allocation call), and a take the pool serves from a free range counts nothing there. On the
780M (job m3-max-61979) the first arena dispatch took a block from a free range, so the test read
0 takes and expected one barrier more than the dispatches recorded. private_arena_blocks is back,
counted at each take, and the test reads it; the site's doc says it counts the takes that
allocated.

Verified: rustfmt --check. The device legs follow.
2026-11-20 22:54:18 -08:00
Anees Iqbal 6938e33c60 rt test: the arena test expects the pieces its device's own budget makes
A device whose budget (a sixteenth of its largest device-local heap, within its longest block)
holds fewer slots than a dispatch of 200 KiB a thread needs splits it under its own budget too, so
the test computes the pieces it expects from Core::arena_budget, the device's or the test's,
rather than assuming one piece. The test budget's pieces are still asserted as 4, 2 and 8.
2026-11-20 22:50:37 -08:00
Anees Iqbal bce8c6166e rt: the arena's block takes are counted once, at their allocation site; a tally holds 64 metrics
The arena's two new tally metrics took the runtime past the 32 a tally's u32 mask held, and its
blocks were counted twice: Metrics::private_arena_blocks and private_arena_allocations.count
counted the same takes. private_arena_blocks is gone; the test reads
private_arena_allocations.count. Tally::counted is a u64, and Tally's Default is written out,
because [u64; N] derives it only up to 32.

Translator tests: the mechanism test's every_fact and variant cover RuntimeFact::PrivateArena
(a push constant), and the engine test reads Plan::private_bytes.

Verified: rustfmt --check. The gate follows.
2026-11-20 22:44:52 -08:00
Anees Iqbal c034220175 Private memory past the 16 KiB floor lives in the runtime's arena, one slot an invocation; a dispatch past its budget splits
A kernel whose private arrays (indexed at run time) passed the translator's 16 KiB floor was
refused as Unsupported{PrivateMemory}. The app's 780M library holds 7 such kernels (19,792 to
34,736 bytes a thread), and the Iris walk refused one at 28,704. Metal holds that memory itself.
The runtime now holds it in device memory it owns.

Translator, under the identity domains only (the default domains' binder supplies no such
memory, so they refuse as before):
- memory::plan::private_memory: a kernel with no call stack whose private bytes pass the floor
  places every alloca it indexes at run time in its private arena, and marks the arena
  ArenaLayout::device. The arena then leaves the private bytes. The kernel's own bytes decide;
  no device fact does.
- Such an arena has no Private variable. Its words are PhysicalStorageBuffer words (Aligned 4)
  at the invocation's slot. The slot is PushField::PrivateArenaAddress (a u64) plus
  i * slot_bytes, with i = ((wz*ny + wy)*nx + wx)*n + LocalInvocationIndex in 32 bits. It is
  computed once in the entry block (dispatch::KernelDecl::arena_slot, Invariant::ArenaSlot).
  RuntimeFact::PrivateArena { slot_bytes } states the slot: the arena's bytes rounded up to 16.
- A tile kernel's arena past the floor stays refused (PrivateMemory). A slot past u32 is
  LimitExceeded(PrivateArenaBytes).

Runtime (crate::arena):
- The arena is one Private pool block, never zeroed: Metal's private memory is undefined until
  the thread writes it. The device keeps a Weak to the last block. Each command buffer that
  dispatches into a block keeps it (keep_block), and a dispatch that needs no more than a block
  still kept takes it again.
- A dispatch's slots take at most 1/16 of the largest DEVICE_LOCAL heap, capped at the longest
  block, or one threadgroup's slots where those are more. A dispatch past that budget runs in
  pieces of whole threadgroups through the existing split loop, each piece's DispatchRegion
  carrying its first threadgroup. There is one split form; vkCmdDispatchBase is not used.
- A barrier (the encoder's owed barrier, so it merges with a hazard barrier) comes before each
  arena piece, except the first piece in a block the dispatch took new. Dispatches of kernels
  without an arena take no new barrier.
- An indirect dispatch of an arena kernel is Gap::IndirectPrivateArena: its counts are the
  GPU's, so the runtime can neither size the arena nor split it.
- Metrics::private_arena_dispatches, private_arena_pieces and private_arena_blocks count the
  path, and private_arena_allocations counts the block takes.
- The budget a device test splits with is Core::arena_budget's test override (cfg(test) with
  m2v_gpu or m2v_cpu_icd), never a DeviceOptions field.

Docs: docs/API.md (the field, the fact, the slot formula), the runtime README (Compute
encoders: the arena, its budget, its order, the indirect gap), docs/REFUSALS.md (regenerated),
api_signatures.tsv (blessed).
SEMANTICS_VERSION 2244 -> 2245, ARTIFACT_FORMAT_VERSION 581 -> 582, RUNTIME_VERSION 2549 -> 2550.

Tests:
- engine_private_memory's
  a_kernel_past_the_floor_keeps_its_private_memory_in_the_runtimes_memory_under_identity:
  7176, 9216 and 51,200 words on the 780M's, the Iris Xe's and an RTX 50's profiles. Each compiles,
  passes L3, pushes the address, states the fact, holds 0 private bytes and records no note.
  The default domains refuse as before.
- rt private_arena's
  every_device_holds_private_memory_past_the_floor_in_its_arena_split_or_whole: 28,704, 36,864
  and 204,800 bytes a thread, 8 groups of 64, under the device's budget (1 piece) and a test
  budget (4 and 8 pieces). Every answer matches a CPU reference. It counts 2 arena dispatches,
  their pieces, and exactly 2*pieces - (blocks taken) barriers beyond a plain command buffer's.
  Four plain dispatches take the barriers one does.

The kernel interface declares the arena's slot (Interface::private_arena, the slot bytes of
RuntimeFact::PrivateArena); the compute test's interface sets it to None.
2026-11-20 22:37:06 -08:00
Anees Iqbal c2bbfed628 rt test: the stencil export test matches the translator's refusal in Error::Translation's fields
afd9686408 was written against Error::Translation's tuple form; 2c5573d598 made the variant a
struct of the error and the functions, so the device-cfg test no longer compiled under --cfg
m2v_gpu or m2v_cpu_icd. It now matches the refusal in the error field and ignores the functions.
2026-11-20 22:50:36 -08:00
Anees Iqbal df0ed4188e rt: the blit options test compares aspect bits; the ledger follows the plane copies
7ba1cdbf30's suite (m3-max-61836, msi) did not compile the host test: ash's
ImageAspectFlags has no Debug, so assert_eq! of a (flags, bytes) pair fails. The test
compares the flags' bits.

The lavapipe conformance run of that suite (the conformance binary built) shows what the
options copies answer now. Its ledger rows follow:
- buffer-depth-samples-d16-54-4, -s8-54-4 and -s8-part-4 (every venue) refuse the copy
  into the multisample texture as Gap::TextureBytes at step 1, no longer Unavailable;
  the -54-2 rows of the RX 550, the 780M, the RX 7900 XTX, NVIDIA and the Iris Xe take the
  same answer (expected: the same multisample refusal; lavapipe refuses 2 samples first).
- texture-fills-260 refuses the upload into Depth32Float_Stencil8's float depth
  (Gap::FloatDepthUpload) at step 0.
- texture-fills-261 copies X32_Stencil8's stencil plane at step 0 and stops at
  fillTexture:level:slice:region:bytes:length: (Unavailable) at step 1.
No row of MTLBlitOptionDepthFromDepthStencil or StencilFromDepthStencil is left.
CONFORMANCE-COVERAGE.md regenerated.

The same run also lists 10 argb8-targets-* rows divergent at case/notices
(metal2vulkan-degrade-rotated-blend-rounding) on llvmpipe. They come from development's
own rotated-blend notes, not from this change.
2026-11-20 22:20:00 -08:00
Anees Iqbal 7ba1cdbf30 rt: a blit copy between a buffer and a texture takes MTLBlitOption's plane options
copyFromBuffer:...:options: and copyFromTexture:...:toBuffer:...:options: are
BlitCommandEncoder::copy_from_buffer_with_options and
copy_from_texture_to_buffer_with_options, with a public BlitOption (None,
DepthFromDepthStencil, StencilFromDepthStencil). A plane option copies the aspect it
names, one vkCmdCopyBufferToImage or vkCmdCopyImageToBuffer region of that aspect, where
the pixel format has it: the depth or the stencil of a combined format, and the depth of
Depth16Unorm or the stencil of Stencil8 too, which Metal takes (the conformance crate's
buffer-depth-samples rows put the option to Metal on those formats). The forms without
an option are those of None. The unit is texture.rs's copy_unit of the named aspect, so a
copy into a 32-bit float depth is Gap::FloatDepthUpload as Depth32Float's is, and a
multisample texture stays Gap::TextureBytes; a plane option of a format without its
aspect is Gap::TextureBytes. MTLBlitOptionRowLinearPVRTC is not offered: the runtime
makes no PVRTC texture, and the conformance side keeps it unavailable.

The private buffer_copy takes the direction and the option as one Way, which keeps it
under clippy's argument count without an expect.

Docs: the rt README's blit lines, Gap::TextureBytes's doc, REFUSALS.md (regenerated),
the metal-coverage map (the two options selectors now name the options methods) and
METAL-COVERAGE.md, the public signature table (6 records added, none moved).

Tests: tests/blit_options.rs. On the host, each option's aspect and unit bytes in both
directions, and each refusal. Under a device cfg, a pass clears a Depth32Float_Stencil8
texture to depth 0.25 and stencil 0x5a, a stencil region goes in from a buffer, and both
planes come back out (the region with 0x5a around it, 0.25 at every texel);
Depth16Unorm's depth and Stencil8's stencil go in and come back out bit for bit.
2026-11-20 22:11:29 -08:00
Anees Iqbal 83bde8268f docs: under the identity domains, constexpr samplers a lane chooses among are a switch, not a refusal
API.md still listed "an array of samplers" among the forms the identity domains refuse, which
the previous commit made a switch over the candidates. The refusal list drops it, and the sampler
array paragraph says the identity domains always take the switch, each candidate sampled
through the constexpr sampler the consumer pushes (their stages bind no set-0 sampler).

Docs only.
2026-11-20 22:35:58 -08:00
Anees Iqbal ec246889cb rt test: an argument buffer's texture sampled through a table of constexpr samplers answers Metal's texels
argument_sampling's
every_device_samples_an_argument_buffers_texture_through_a_table_of_constexpr_samplers runs
engine/sampler_table's sampler_table_held through the runtime on every device of the cfg's
kind. Each thread samples a 4 by 1 texture held in an argument buffer through samplers[which[i]],
a program-scope table of four constexpr nearest samplers read at an index only the run knows. The
test compares each of the 20 texels with Metal's answer as measured on an Apple M3 Max by
metal2vulkan-conformance/probes/sampler_table.m. Before the previous commit, every device that
indexes a sampler array non-uniformly refused the state ("an array of samplers"). Under the
identity domains it is now the switch over the four candidates.

Also reflows the comment in identity_refusal that the previous commit left past 100 columns.
2026-11-20 22:23:34 -08:00
Anees Iqbal 5cd5de678f Translator: under the identity domains, constexpr samplers a lane chooses among are a switch over them
An argument buffer's texture sampled through a sampler the run picks among two or more
constexpr samplers with consecutive handles took select_heap_array's form: one sampling
through a set-0 array of the candidates' immutable samplers. The identity domains have no
set-0 array; their constexpr sampler is the set-1 sampler array's element at its pushed index
(PushField::ConstexprSampler). So every device that indexes a sampler array non-uniformly
refused the function as Unsupported{IdentityDomains} "an array of samplers", and the runtime
translates every state under the identity domains.

select_heap_array is an optimisation of the switch over the candidates. Under the identity
domains it now declines, and the switch stays: one arm per candidate, each a heap sampling
through that candidate's pushed index, a form the identity domains already lower (the
profiles without non-uniform sampler indexing took it before). identity_refusal's "an array of
samplers" arm can no longer be reached and is deleted, along with the runtime README's
known-gap line for it.

SEMANTICS_VERSION 2243 -> 2244: the output changes for these functions, from a refusal to a
module.

Test: engine_identity's
an_argument_buffer_texture_through_chosen_constexpr_samplers_is_a_switch_over_them (it was
..._is_refused_naming_it) compiles the chosen-sampler kernel under the identity domains on
every profile, passes L3 and pushes one ConstexprSampler per candidate.
2026-11-20 22:23:33 -08:00
Anees Iqbal afd9686408 rt: a fragment function's stencil output is the device's own where it lists the export
A fragment function's `[[stencil]]` output is the fragment's stencil reference, which Metal's
stencil test and its Replace operations take (Metal's feature set tables give stencil feedback to
the Apple5 family and later and to Metal 3 and Metal 4). rt enabled VK_EXT_shader_stencil_export
on no device, so the translator refused every such function (`StencilExport`): under the
identity domains its pixel-interlock form is never chosen (lower::fragment::fetch::interlock_forms).

floor: VK_EXT_shader_stencil_export joins OPTIONAL_EXTENSIONS, enabled where the device lists it,
and its name reaches the translator's profile (shader_extension), whose fragment stage then
writes `FragStencilRefEXT`, the one form there. A device that does not list it keeps the typed
refusal, naming StencilExport: no answer chooses a second form.

Venues (the supported device extension list of each vulkaninfo dump, read as JSON): RADV on the
RX 7900 XTX, every 780M and the RX 550, ANV on the Iris Xe, lavapipe, KosmicKrisp on the M3 Max
and the UHD 630's Windows driver list it (m3-max-48727 to 48731, 48736, 48737 and 61508); NVIDIA's
620.70.06 on the RTX 2080 and RTX 3090 and 615.71.09 on the RTX 5080 Laptop do not (48727, 48729,
48731).

Docs: the runtime README's extension table, the render pipeline states' refusal line, and a
known gap for a device without the export. REFUSALS regenerated: no change. The public signature
table holds floor::OPTIONAL_EXTENSIONS' value, which gains the extension; no signature moved.

Ledger: stencil-output and stencil-output-loaded move from every venue to NVIDIA, where they
still refuse naming StencilExport. pass-sequence-aspect-actions keeps that row on NVIDIA and,
where the export is listed, refuses one step later as a state with DepthStencilFormats: rows for
llvmpipe and RADV (verified) and for Iris(R) Xe, UHD Graphics 630 and Apple M3 Max (expected
from their extension lists). CONFORMANCE-COVERAGE.md regenerated (7692 ledger rows).

Test: tests::stencil_export on every device of the cfg's kind: where the device lists the
extension, Device::extensions names it, the translator's profile has it, and a draw of
stx_stencil_by_pixel under a Replace depth-stencil state stores each pixel's output's low 8 bits
(two of every three outputs carry higher bits) in the Stencil8 attachment; elsewhere the state is
refused naming StencilExport. floor's an_optional_extension_is_enabled_where_listed and the
README's table test take the list as it is.

Evidence, at 6e1004de4d and 149a5296e7 (earlier forms of this commit):
- The 16 public cases (valexec2's E/F/G proof m3-max-61598): before, at f3418eacb9 on lavapipe
  (m3-max-61725), not_supported naming StencilExport; after, at 6e1004de4d, 16/16 match on
  runtime-render (m3-max-61732).
- Conformance on lavapipe at 149a5296e7 (m3-max-61812, ms01): every stencil row as the ledger
  says; its one other line, blend-interaction-format-srgb8 divergent on LLVM 23.1.4, is that
  lavapipe's blend and no stencil case. At 6e1004de4d: RTX 3090 (m3-max-61739) exactly the
  ledger's NVIDIA rows; RX 7900 XTX (m3-max-61740) the three rows as this ledger states them.
- The device test at 149a5296e7: lavapipe passes (61812); RX 7900 XTX, 64 pixels stored their
  output (m3-max-61859); RTX 3090, refused naming StencilExport (m3-max-61860).
2026-11-20 22:41:02 -08:00
Anees Iqbal 5f5d3ea455 rt test: the declared-copies draw test counts the copy in and back around its declared write
What: every_device_copies_a_texture_over_a_buffer_a_draw_declares now reads Metrics::over_copies
around the declared write too: one copy in at the draw (after the command buffer's fill), and at
least one more, the copy back, once the command buffer completes; it prints the count.

Why: the bytes in the buffer alone do not name the path; the counter shows the copies the
declaration caused ran (asked for by main for the evidence).
2026-11-20 22:25:11 -08:00
Anees Iqbal 8cb8faca88 rt: a render encoder's use_resource declarations join the copies of textures over a buffer in an image of their own
What: RenderCommandEncoder::use_resource now lends the texture (as the compute encoder's does)
and keeps each declared resource once, with the union of its declared accesses, its texture or
its buffer's span (render_encoder.rs Declarations). Every later draw of the encoder reaches the
declarations as it reaches its bound slots: slots() chains the declared textures, and the
declared buffers where buffers are asked, into the reached set that overs_owed takes before the
draw and overs_after takes after it; the per-draw overs condition also holds while a declared
texture is over a buffer in an image of its own (Declarations::copied, counted as the tables'
copied are). A declared write of a Shared buffer or of a texture the host reads (host_reads) now
sets the draw's host fact, so the segment's end barrier reaches the host, as the compute
encoder's declared_shared_write does. The unstored-write format moves into Declarations unchanged.

Why: a draw that reached such a texture only through an argument buffer or a resource ID took no
copy in before it (reading an image older than the buffer's bytes) and no copy back after it (the
buffer stale for the host and for later commands), a wrong answer; the compute encoder already
chains its declarations (encoder.rs Accesses::overs).

Test: every_device_copies_a_texture_over_a_buffer_a_draw_declares (copy_over.rs, device cfgs),
over the helper's texture one alignment past the device's own pitch, which asserts the image of
its own (copied_over) on every device, lavapipe included. After a fill, a draw before the
declaration copies nothing; after use_resource(READ) the next draw, which binds nothing, copies
it in once and the draw after copies nothing. After a fill of 0x11 and use_resource(WRITE), a
draw whose fragment function writes (1, 0, 1, 1) to texel (0, 0) through an argument buffer's
texture2d<float, write> leaves [255, 0, 255, 255] and then 0x11 in the buffer's first row once
the command buffer completes. Without the chaining the declared draw copies nothing and the
buffer keeps the fill. storage_element.rs's ARGUMENT_FRAGMENT and place_id are shared for it.
README: the render encoder's use_resource entry says what a declaration reaches.
2026-11-20 22:25:11 -08:00
Anees Iqbal 59e7b27df1 rt: Error::Translation's functions is a boxed slice, keeping the runtime's Err under clippy's large-error bound
What: `functions` is Box<[String]> rather than Vec<String>; the sites that build a nameless
Translation (rt's Error::translation, conformance's Failure::of_rt, validation's make_kernel and
replay tests) take Box::default(), and the two name tests compare the slice.

Why: with a Vec the Translation variant reached 128 bytes and clippy::result_large_err failed
every function returning rt's Error (job m3-max-61807: clippy rc=101 in all three
configurations, "the largest variant contains at least 128 bytes"); a boxed slice is 8 bytes
smaller and holds the same names. Consumer sites that build one write `functions: Box::default()`.

Verified: 61807 ran the previous commit's suites green (host rc=0, lavapipe rc=0, the two name
tests among them); this commit's clippy, suites and lavapipe run are in its own job.
2026-11-20 22:25:11 -08:00
Anees Iqbal 2c5573d598 rt: a refused pipeline state's Error::Translation names its functions
What: Error::Translation is now Error::Translation { error, functions }. new_compute_pipeline_state
and new_render_pipeline_state fill `functions` at their public entry with each Function stage's own
name in its library (FunctionInfo::name), in stage order (the vertex function before the fragment
function), and the Display prints them: "the translator made no pipeline of a, b: ...". A compiled
stage has no name; a sampler state, a device and a dispatch's late kernel variant name none, and
then the text is as before. It is a diagnostic for the program's log, documented as the text of
the NSError Metal's failed creation gives; no lowering or decision reads it.

Why: the consumer logged only the first refusal of each kind, which hid 6 of one 3D modelling
app's 8 refused kernels; with the names it logs every refused create.

How: the existing creation bodies moved to private compute_pipeline_state and
render_pipeline_state, whose translator errors name no function (Error::translation, for map_err),
and the public entries map them through Error::of_stages. The one-token map_err edits are in
pipeline.rs, render.rs, sampler.rs:371 and device.rs:1290 and 1294.

Same commit: 10 rt test patterns; validation's candidate/platform/runtime.rs (2),
candidate/tests/engine_compute.rs, replay/new_runtime/mod.rs and replay/new_runtime/tests.rs (3);
conformance's rt_side.rs, rt_side/states.rs and case.rs. Conformance's Failure::of_rt records the
error's text without the names (they are the case's own functions), so the 484 answers in
known-gaps-rt.tsv stay as they are. The rt README's compute and render state entries say what
`functions` holds; REFUSALS.md and api_signatures.tsv are regenerated (one changed signature).

Consumer break to follow: reims-vgpu builds or matches rt::Error::Translation(..) at 17 sites,
all in crates/reims-vgpu-vulkan/src/rt_platform/: unbuilt.rs (7), diag.rs (5), library.rs (3),
pipeline.rs (1), argument.rs (1). Each becomes Translation { error, .. } in a match, or
Translation { error, functions: Vec::new() } where it builds one.

Tests (device cfgs): every_device_names_the_function_of_a_refused_compute_state (translate.rs):
a compute state of the vertex function colored_vertex is Error::Translation with functions
["colored_vertex"], and its text starts "the translator made no pipeline of colored_vertex: ".
every_device_refuses_the_patch_draws_it_does_not_build (patch.rs) now also holds the
control-point index type's Tessellation refusal to functions ["tess_triangle_points",
"tess_fragment"] and to the text that names them in that order. Without the entry mapping both
fail on an empty `functions`.
2026-11-20 22:25:11 -08:00
Anees Iqbal 627379eb19 rt test: the stage-histogram test asserts the starting calibration once its completions are in
What: every_device_counts_each_command_buffer_once_in_every_stage_histogram asserted
`calibrations >= 1` on the metrics it read before its command buffers; it now asserts it on the
metrics read after the three completions.

Why: the device's first calibration is read by the completion thread as it starts
(complete.rs, `run`: `Calibration::read` before its loop), and nothing the test did before
`before` waits for that thread to have run: settled() waits for the block maker, not for it. On
a loaded node the thread had not run yet and the assertion failed (job m3-max-61782, lavapipe on
msi-laptop, command.rs:2033). Each `finished` waits for a completion the completion thread saw,
which it sees only after that first read, and the read is counted whether or not the call
succeeds, so after three completions the count holds at least one on every device.

Verified: its job runs the test on lavapipe; the race is timing-dependent, so no run shows the
old form failing on demand.
2026-11-20 22:14:54 -08:00
Anees Iqbal 046853cc1e Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-20 22:10:05 -08:00
Anees Iqbal ab8277a560 Fix forward of 6ef64ae3ee: the raster-state test's depth bias clamp refusal is below the floor
6ef64ae3ee made `depthBiasClamp` a floor feature and the runtime-floor profile states it, so
metal::state's encoder_raster_state_needs_its_features, which expected the floor to refuse a
clamped depth bias, failed on development (suites m3-max-61762 at 36e763e80e). The floor now
maps the clamp (enable, constant 1.0, clamp 0.5, slope 2.0), and the refusal naming
DepthBiasClamp is asserted on runtime-floor without the feature, through a new committed_without
helper beside committed.

Test-only. Verified: m3-max-61817 at f05815ae66 (this change on e149088bd0): metal::state's 6 tests
pass, encoder_raster_state_needs_its_features among them; clippy -p metal2vulkan --all-targets
--all-features -D warnings 0.
2026-11-20 22:09:33 -08:00
Anees Iqbal 62b3e5a250 rt: the render encoder's use_resource, and a draw after a declared write of a texture with no storage element is Gap::StorageElement
What: RenderCommandEncoder::use_resource is useResource:usage:stages:, its plural and their
deprecated forms without stages. The command buffer keeps the buffer or the texture until it
retires and nothing is recorded: every resource is resident to every function, and the pass's
barriers already order its draws. A usage that writes a texture (or a view of one) made for
shader writes with no storage element marks the encoder, and every later draw whose vertex or
fragment function may reach a texture through its storage image beyond its slots
(PipelineInterface::unbound_storage_textures: an argument buffer's write or read_write texture, a
resource ID) is Gap::StorageElement with no slot, as the compute encoder's dispatch already is.
Before this, such a draw ran and Vulkan dropped the writes Metal makes. The declaration
invalidates the encoder's held draw facts, so a draw of an unchanged state and bindings after it
is checked again.

Also: the three redundant explicit links in new_render_pipeline_state's docs (private rustdoc
-D warnings, from 3653240b57) are plain intra-doc links; Refusal::OtherDevice's doc names the
render encoder's calls; the README's storage-element known gap no longer waits for the render
encoder's useResource:, and the render encoder's section describes use_resource; coverage.tsv
marks the four MTLRenderCommandEncoder useResource rows implemented; REFUSALS.md,
METAL-COVERAGE.md, CONFORMANCE-COVERAGE.md and api_signatures.tsv regenerated.

Test: every_device_refuses_a_draw_after_a_declared_write_of_a_texture_with_no_storage_element
(storage_element.rs, device cfgs): an owned fragment function writes an argument buffer's
texture2d<float, write>; for RGBA8Unorm, RGBA8Unorm_sRGB, BGRA8Unorm_sRGB, A8Unorm and an sRGB
view of an RGBA8Unorm texture, a draw before the declaration draws, the same draw after
use_resource(WRITE) is Gap::StorageElement { slot: None, pixel_format } exactly where the texture
has no storage element, and a colored_fragment draw after the declaration draws; the fragment
function's write through its resource ID lands (1, 0, 1, 1). Without the Facts::find check the
refused cases draw and the test panics.
2026-11-20 22:08:11 -08:00
Anees Iqbal bc69c32292 Stage io: Metal's own centre varyings, interpolation, vertex fetch and alpha coverage go
DriverDeviation::MetalCenterVaryings, MetalInterpolation, MetalNormalizedVertexFetch and
MetalAlphaCoverage were never taken, and neither were their VkProperty twins and codec tags.
Device::from_queries enables no Metal* property, and no committed profile carries one. The forms
that only they reached go with them:
- Centre varyings. A multisampled fragment function no longer reads its centre varyings as they
  are as their pixel form. The pixel form is InterpolateAtOffset at offset 0 where the device has
  it, and graphics' link check needs it, as on every real device. StageIoPlan's
  center_varyings_by_device and its requirement go.
- Interpolation: a smooth varying records DeviceInterpolation on every profile.
  StageIoPlan::interpolation_by_metal and its requirement go.
- Normalized vertex fetch: a fixed-function normalized attribute records DeviceVertexConversion on
  every profile. The measured form goes, along with vertex::rounds_twice_to_half, which only it
  read.
- Alpha coverage: a pipeline that covers by alpha records DeviceAlphaCoverage on every profile.
- With no measured property left, vertex::FixedFunctionNotes goes: fixed_function_notes and
  graphics::coverage_notes return their notes. Linked::vertex_properties and fragment_properties
  go, and so do their requirements in compile::api.

Rule 1: no note stops being raised. DeviceInterpolation, DeviceVertexConversion and
DeviceAlphaCoverage were withheld only on a profile that took one of these deviations, so on no
real device. Each is now raised wherever its answer is the device's, on every profile. A centre
varying took no note: its read as it is was exact on such a device, and it now takes the
InterpolateAtOffset form or link's refusal, as on every real device. The catalogue loses no entry,
and the notes' docs in artifact.rs lose their deviation clauses.

Validation: no validation file names these deviations.

Tests: the asserts that no module or pipeline requires one of these properties go:
engine_fragment's interpolation test, engine_vertex_variants' fixed-function conversion test and
engine_alpha_coverage's.

SEMANTICS_VERSION 2243 and ARTIFACT_FORMAT_VERSION 581 are placeholders that main renumbers.
SEMANTICS: the profile's fingerprint changes form. ARTIFACT: the codec loses four VkProperty tags.
RUNTIME_VERSION stays, because the pinned sources' edits remove forms no profile reached.
runtime-sources.sha256 takes the new hash, and api_signatures is blessed.

Consumer check (consumer-uses.sh, consumer development a414607f95, 62 refs): MetalCenterVaryings,
MetalNormalizedVertexFetch and MetalAlphaCoverage have 0 hits in code. MetalInterpolation has 0
hits on development, whose answer.rs does not name it. It is named in
crates/reims-vgpu-vulkan/src/answer.rs on 35 of the consumer's steelbrain/* branches younger than a
day.

Verified: m3-max-61492 (homelab-gem10-1): fmt, clippy (all features, --cfg m2v_gpu, --cfg
m2v_cpu_icd) and Rustdoc green at the old base (m3-max-61489 before it failed on four unused imports
and a test's leftover property read, removed).

Rebased onto development d10a14d5af: the SEMANTICS placeholder is one above its 2235 in stack order
(ARTIFACT_FORMAT_VERSION is already above its 574). The checks above ran at the old base acc706ca47;
the rebased stack's tip is checked by m3-max-61756 (msi-laptop), at the stack rebased on d6d56b8a7c
(tip 5c74fad38d, whose diff from its base is this stack's diff from d10a14d5af): fmt, clippy (all
features, --cfg m2v_gpu, --cfg m2v_cpu_icd) and Rustdoc green; nextest of metal2vulkan,
metal2vulkan-validation, metal2vulkan-conformance and metal2vulkan-runtime ran 5877 tests, 5870
passed. Of the 7 failures, the old render descriptor key's test is unpinned; golden_hashes and
engine inventory parts 4, 5, 7 and 8 are bless due (the profiles' fingerprints changed); and
metal::state's encoder_raster_state_needs_its_features fails the same way at development d10a14d5af
itself (m3-max-61802, where runtime-floor gained depthBiasClamp in a529fb658e), as inventory parts
3, 4, 5 and 8 do there. The stack as rebased on 72e1754218 (tip 090d544208: the same product
changes, without the test-only push sweep fix) played 36 distinct streams over 61 runs on five nodes
with 0 refused (player m3-max-61537; plays m3-max-61548, 61549, 61550, 61559 and 61569).
2026-11-20 22:07:19 -08:00
Anees Iqbal 2eb94c3045 Texture stores: the stores measured to be Metal's go
DriverDeviation::MetalHalfStorageWrites, MetalHalfStorageNans, MetalHalfTexelWrites,
MetalNormStorageWrites, MetalSmallFloatNans, MetalDepth16Stores and MetalDepth16BiasedStores were
never taken, and neither were their VkProperty twins and codec tags. Device::from_queries enables
no Metal* property, and no committed profile carries one. The forms that only they reached go with
them:
- A float write to a half-float storage image: its rounding and NaN are the device's, noted
  (DeviceColorConversion, DeviceNanEncoding), on every profile. half_storage_facts loses its two
  property arms, and a packed small float image's NaN loses its property arm.
- A half texel's NaN (half_write_nans): every float channel's stored NaN is the device's, noted
  outright or under the bound format's or the heap's families. The Sixteen and Small kinds and
  NAN_FAMILIES' deviations go, so the table is the four family bits.
- A normalized write (norm_storage_facts): every write that may reach a normalized format records
  DeviceColorConversion. The measured form, with its 1-bit alpha exception, goes, along with
  metal::format::one_bit_alpha and one_bit_storage, which only it read. Its shape and form
  arguments go too.
- A fragment's float output blended in the shader into a 16-bit float attachment: the store's
  rounding is the device's, noted. color_write's reliance goes.
- TexturePlan::storage_properties and StageIoPlan::color_properties, which held only these
  properties, go with their requirements in compile.rs.
- The depth16 deviations read no module. Only their docs and the depth bias doc's clause go: the
  runtime announces unorm-depth-rounding and unorm-depth-bias as before.

Rule 1: no note stops being raised. DeviceColorConversion and DeviceNanEncoding were withheld only
on a profile that took one of these deviations, so on no real device, and they are now raised
wherever such a store's answer is the device's. The catalogue loses no entry. Its
DeviceColorConversion and DeviceNanEncoding docs in artifact.rs lose their deviation clauses.

Validation: no validation file names these deviations.

Tests: the asserts that no module requires one of these properties go, along with the
measured-profile arms: engine_texture's half texel write, engine_fetch_blend16_narrow,
engine_handles' heap write and heap texel write (its float families are the 16-bit and packed
small float ones), engine_extended_range's half-float slots and heap half write, and
engine_cross_class' integer writes.

SEMANTICS_VERSION 2242 and ARTIFACT_FORMAT_VERSION 580 are placeholders that main renumbers.
SEMANTICS: the profile's fingerprint changes form. ARTIFACT: the codec loses seven VkProperty tags.
RUNTIME_VERSION stays, because the pinned sources' edits remove forms no profile reached.
runtime-sources.sha256 takes the new hash, and api_signatures is blessed.

Consumer check (consumer-uses.sh, consumer development a414607f95, 63 refs):
MetalHalfStorageWrites, MetalHalfStorageNans, MetalHalfTexelWrites, MetalNormStorageWrites and
MetalSmallFloatNans have 0 hits in code. MetalDepth16Stores and MetalDepth16BiasedStores have 0 hits
on development, whose answer.rs names neither. They are named in
crates/reims-vgpu-vulkan/src/answer.rs on 36 of the consumer's steelbrain/* branches younger than a
day.

Verified: m3-max-61479 (homelab-gem10-1): fmt, clippy (all features, --cfg m2v_gpu, --cfg
m2v_cpu_icd) and Rustdoc green at the old base (m3-max-61473 before it failed on four unused
imports, removed).

Rebased onto development d10a14d5af: the SEMANTICS placeholder is one above its 2235 in stack order
(ARTIFACT_FORMAT_VERSION is already above its 574). The checks above ran at the old base acc706ca47;
the rebased stack's tip is checked by m3-max-61756 (msi-laptop), at the stack rebased on d6d56b8a7c
(tip 5c74fad38d, whose diff from its base is this stack's diff from d10a14d5af): fmt, clippy (all
features, --cfg m2v_gpu, --cfg m2v_cpu_icd) and Rustdoc green; nextest of metal2vulkan,
metal2vulkan-validation, metal2vulkan-conformance and metal2vulkan-runtime ran 5877 tests, 5870
passed. Of the 7 failures, the old render descriptor key's test is unpinned; golden_hashes and
engine inventory parts 4, 5, 7 and 8 are bless due (the profiles' fingerprints changed); and
metal::state's encoder_raster_state_needs_its_features fails the same way at development d10a14d5af
itself (m3-max-61802, where runtime-floor gained depthBiasClamp in a529fb658e), as inventory parts
3, 4, 5 and 8 do there. The stack as rebased on 72e1754218 (tip 090d544208: the same product
changes, without the test-only push sweep fix) played 36 distinct streams over 61 runs on five nodes
with 0 refused (player m3-max-61537; plays m3-max-61548, 61549, 61550, 61559 and 61569).
2026-11-20 22:07:19 -08:00
Anees Iqbal a134775713 Simd: Metal's own lockstep, fragment and vertex simdgroups, and full quads go
DriverDeviation::SimdgroupLockstep, MetalFragmentSimdgroups, MetalVertexSimdgroups and
MetalFullQuads were never taken, and neither were their VkProperty twins and codec tags.
Device::from_queries enables no Metal* property, and no committed profile carries one. The forms
that only they reached go with them:
- Lockstep. Kernel ordering no longer leaves out a barrier that only emulated simdgroups make
  exact on a device that runs a simdgroup in lockstep. This removes OrderKey's device bit and the
  Decision's count, air::Lockstep::device in metal2vulkan-air, SimdPlan::device_lockstep, the
  census name barrier.lockstep.device (simd::DEVICE_LOCKSTEP) and the module's
  VkProperty::SimdgroupLockstep requirement. Every such place takes its barrier and tier as on
  every real device.
- Fragment simdgroups. SimdPlan::metal_lane and its requirement go. A fragment's
  [[thread_index_in_simdgroup]] is the device's grouping's lane on every profile, and the SimdWidth
  refusal no longer offers VkProperty::MetalFragmentSimdgroups as an alternative: it needs the
  32-lane width alone, as subgroup::tier's own width refusal does. docs/REFUSALS.md's row and the
  fixture inventory's 24 refusal cells on the eight gsm2_fragment_lanes rows change with it.
- Vertex simdgroups. The prefix lane goes: SimdPlan::prefix_lane, its Private word and entry hook
  (simd::emit_entry), and SubgroupRequirement::metal_vertex_simdgroups with its swap of
  SubgroupStage(Vertex). A vertex function's simdgroup operations need the stage listed, as on
  every real device.
- Full quads. SimdPlan::metal_full_quads and its requirement go. A fragment whose group operations
  count the helpers needs shaderQuadControl, as on every real device.

Rule 1: no note stops being raised. FragmentSimdgroupGrouping was withheld only on a
MetalFragmentSimdgroups profile, so on no real device, and it is now raised wherever the
function's answer reads the simdgroup's members, on every profile. Its catalogue entry already
said "on every device", and its doc in artifact.rs now says so too. The other three forms carried
no note. Their inputs now take a barrier, a refusal or the device's grouping, as on every real
device. The catalogue loses no entry.

Validation: c3.rs's FragmentSubgroupUnderTwoQuads doc clause becomes "every device takes that
note, so the gap's answer is always announced". That is the one validation file that named one of
these deviations. It used the deviation only to explain why the gap's answer is always announced,
because the allowance code never reads the deviation. Nothing else in c3.rs changes. The fixture
README's gsm2_fragment_lanes row drops the Metal lane and the gone driver_deviations lane, and its
gsm2_simd_products and gsm2_vertex_votes_shifts rows drop MoltenVK's measured vertex classes.

Tests: the asserts that no module requires one of these properties, or counts
barrier.lockstep.device, go with them. This covers engine_simd_lockstep's two emulated-tier
tests, its no-barrier lists and LOCKSTEP_NAMES, engine_simd's fragment-lane test (whose narrow
refusal now needs the width alone), and engine_matmul2d's tier assert, which held on every profile
once no profile had the property. Also going: device/tests/subgroup.rs'
a_measured_vertex_stage_states_its_fact_in_place_of_the_stage and the requirement literals' field.
engine_fragment's simd_after_discard takes quad control alone.

SEMANTICS_VERSION 2241 and ARTIFACT_FORMAT_VERSION 579 are placeholders that main renumbers.
SEMANTICS: the profile's fingerprint, the SimdWidth refusal's needs and the census of the same
input change form. ARTIFACT: the codec loses four VkProperty tags and the requirement's field.
RUNTIME_VERSION stays, because the pinned sources' edits remove forms and fields no profile
reached. runtime-sources.sha256 takes the new hash, and api_signatures is blessed.

Consumer check (consumer-uses.sh, consumer development a414607f95, 62 refs): SimdgroupLockstep,
MetalFragmentSimdgroups, MetalFullQuads, metal_vertex_simdgroups and DEVICE_LOCKSTEP have 0 hits
in code. MetalVertexSimdgroups has 0 hits on development. It is used in
crates/reims-vgpu-vulkan/src/gpu/encode_render/tests/metal_tests.rs on 36 of the consumer's
steelbrain/* branches younger than a day, a file its development does not have.
air::Lockstep::device: the consumer's development names no `lockstep` at all.

Verified: m3-max-61467 (homelab-gem10-1): fmt, clippy (all features, --cfg m2v_gpu, --cfg
m2v_cpu_icd) and Rustdoc green at the old base (m3-max-61463 before it failed on four unused test
imports, removed).

Rebased onto development d10a14d5af: the SEMANTICS placeholder is one above its 2235 in stack order
(ARTIFACT_FORMAT_VERSION is already above its 574). The checks above ran at the old base acc706ca47;
the rebased stack's tip is checked by m3-max-61756 (msi-laptop), at the stack rebased on d6d56b8a7c
(tip 5c74fad38d, whose diff from its base is this stack's diff from d10a14d5af): fmt, clippy (all
features, --cfg m2v_gpu, --cfg m2v_cpu_icd) and Rustdoc green; nextest of metal2vulkan,
metal2vulkan-validation, metal2vulkan-conformance and metal2vulkan-runtime ran 5877 tests, 5870
passed. Of the 7 failures, the old render descriptor key's test is unpinned; golden_hashes and
engine inventory parts 4, 5, 7 and 8 are bless due (the profiles' fingerprints changed); and
metal::state's encoder_raster_state_needs_its_features fails the same way at development d10a14d5af
itself (m3-max-61802, where runtime-floor gained depthBiasClamp in a529fb658e), as inventory parts
3, 4, 5 and 8 do there. The stack as rebased on 72e1754218 (tip 090d544208: the same product
changes, without the test-only push sweep fix) played 36 distinct streams over 61 runs on five nodes
with 0 refused (player m3-max-61537; plays m3-max-61548, 61549, 61550, 61559 and 61569).
2026-11-20 22:07:19 -08:00