Commit Graph
157 Commits
Author SHA1 Message Date
Anees Iqbal 0ce2f39b71 Translator: the resident core deleted; every device compiles the one form, and the tests run it
Every device now compiles the identity domains, the one form: a kernel's
buffer arguments are bound as storage buffers of set 0 where the device
binds them (DeviceProfile::binds_kernel_buffers) and are reached at their
device addresses elsewhere, as every other stage's are; vertex attributes
are fetched by fixed-function vertex input; textures and samplers are
elements of the identity arrays of set 1, named by their resource IDs.
What the one form does not lower is a typed refusal,
Unsupported{IdentityDomains, NotImplemented} with the IdentityCause the
previous commit names.

Deleted, with everything only they reached:
- the device policy (device/policy.rs) that chose the resident-table
  domains, and the resident root table, handle table and their facts;
- the heap raw reads (lower/sampler/heap_raw.rs, lower/texture/heap_raw.rs),
  sampler footprints, bind/texel_parts.rs and bind/status.rs;
- the lockstep orders' barrier tiers, which no order key adds now
  (OrderKey::of orders nothing).

Tests: 274 tests that only the resident-table policy compiled (development's
DevicePolicy::RESIDENT_TABLES, which only tests built) are deleted, among
them 15 whole files (argument tables, cross-class, device replay, dynamic
roots, two extended-range files, image shapes, mesh barriers, profile F,
separate samplers, sparse unmapped, tile, wide, sweep and the footprint
tests); each deletion's reason is listed with the READY. The others are
ported to what the one form compiles and names today: census names,
push fields, refusals with their causes, and run values. A new interpreter
harness (tests/identity_harness.rs) binds a dispatch's buffers at device
addresses and its textures as identity-array elements. Census naming is
unchanged. The validation tests that read compiled modules (coverage,
companions, the authored compile census, specialization) assert the one
form's present strings. The extended-range levels and volume tests, whose
mip filters development built under the resident tables, become two tests
of the one form's answer, which is development's default policy's: a 2D or
3D sample of an extended-range slot texture is refused, TextureState
(lower::texture::identity_class holds no class for it); a padded form's 3D
sample stays the lowering's NotImplemented(Format). Development's new
thread-local test binds through the one form's harness, and its
handle-web test (every_handle_web_an_instruction_observes_is_refused)
compiles on the default profile.

SEMANTICS_VERSION 2355 and ARTIFACT_FORMAT_VERSION 607 (cached
translations and artifacts change). docs/REFUSALS.md is regenerated and
runtime-sources.sha256 is pinned at this tree.

Verified at the stack's tip, which differs from this commit only by the
five commits after it; the jobs and their results are named in the READY.
2026-12-03 09:15:33 -08:00
Anees Iqbal ed55748644 Docs: the runtime README, API.md, REPLAY-STREAM.md and VALIDATION.md state each measurement by its card and driver, not by our job id
The planner widened the job-id rule from the published crates' rustdoc to the four prose docs a
reader takes measurements from. Each lab job id (m3-max-NNNN, and the bare job numbers beside
them) and each commit sha comes out; the ids stay in the commit messages that already carry them.
A measurement keeps the card, driver and OS its sentence names. Where an id was the only basis a
sentence named, the sentence now says what was measured and on what:

- the runtime README's identity-domains paragraph cited five plays of recorded streams; it now
  states what the states-only plays of the 26 kept replay streams on lavapipe show: each makes
  every pipeline state its stream makes, and none of their render or compute states is refused,
  a refusal under the identity domains among them (the plays of jobs m3-max-83458, -83494, -83695,
  -83889 and -83954, each printing refused 0);
- the probe lists name the cards ("probes on the RTX 3090, the Iris Xe, lavapipe and the RX 7900
  XTX"; "probes on a Radeon Pro 5300M and a UHD Graphics 630, both macOS 26.7.1");
- sentences that compared runs by id compare them by order ("failed in one run and passed in two
  others"), and "the same job" is "the same run";
- "rt at <sha>" and "players built from <sha>" become what that build was ("a build of the runtime
  that copied a texture over any import"), or go where the card and driver already say it;
- VALIDATION.md's harness count reads "the harness on lavapipe".

Two README tables lose their Job column (the import-cost table and the guest-buffers table). The
edited paragraphs are rewrapped at 100 columns; a token diff against the parent shows only the
ids, the shas, the two columns and the rewordings above.

submit.rs's three citations of two probe commits (06860a3848 and b15b306d2f) become "measured
with a probe build of the runtime" (and, for the split probe, "that timed each command buffer");
the IN_FLIGHT and infos comments are rewrapped at 100 columns.

So it does not grow back, scripts/api-docs first fails when the four docs name a job id
(`m3-max-NNNN`, or `job NNNN`); CONTRIBUTING.md, API.md's description of the script and ci.yml's
comment on its step say so.

docs/CONFORMANCE-COVERAGE.md is unchanged: its generator has no job column. Its 1772 lines with an
id are all in its last section, The ledger, which quotes the last field of known-gaps-rt.tsv; the
ids are in the ledger's own sentences, which the ruling keeps out.

Not widened, per the ruling: the ledger, known-gaps-rt.tsv, results.py, test comments and the
unpublished crates. The OS is not added to measurements whose sentence named a card and driver
but no OS.

Verified on the CPU with no device, job m3-max-84430 at this commit's tree: cargo fmt --check 0;
the workspace's rustdoc with -D warnings 0; scripts/api-docs 0, and 1 with a job id planted in
docs/VALIDATION.md, naming the planted line (the tree clean after its restore); the refusal
surface's --check 0; the 13 tests that read these docs passed (feature_enables, the floor, the
accepted differences, the precision-note catalogue, the consumer's objects and the guide's
example). Before the commit, no line of the four docs matched the check's pattern, and rustfmt
--check passed on submit.rs.
2026-12-03 09:10:35 -08:00
Anees Iqbal bac1ab1bd9 Docs: metal-measured covers Metal's validation stop; the bound form's evidence is the real cards
What: the `metal-measured` basis (refusal_surface.py's vocabulary, and
`RefusalBasis::MetalMeasured`'s doc, which states it for the API) now
says that Metal's API validation stopping the call counts: documented
Metal then defines no answer to it, whatever plain Metal does without
the validation. docs/REFUSALS.md is regenerated with it.
docs/VALIDATION.md's device-test part gains one sentence: the bound form
of a compute function's buffer arguments has its evidence in the device
tests on real cards whose query takes it (each test's `M2V-FORM` line,
`tests::pool_reach`'s assertion of the form the query chose), and CI's
lavapipe legs take the address form, since lavapipe's
`maxStorageBufferRange` of 128 MiB is below the 2 GiB and 15 bytes the
query needs there.

Why: the definition said "Metal itself refuses the input", while
runtime refusals declare `metal-measured` on the strength of Metal's
validation layer stopping the call (in error.rs, among them
IndexedPatchDrawWithoutIndexType, PatchIndexBufferOffset,
ViewportNotFinite and StencilAttachment), and the
conformance allowances say a validation stop "is not Metal refusing it"
for their own verdict. The two answer different questions; the
definition now says which one the basis answers. The lavapipe sentence
records that CI's lavapipe legs never run the bound form, so a reader
of a green lavapipe leg does not take it as that form's evidence.

The numbers: job m3-max-84123 (lavapipe, release, three runs a
workload) printed `bound_dispatches_per_run` 0 for all 48 harness
workloads, and `address_dispatches_per_run` above 0 for the 43 that
dispatch. lavapipe's limits are those of the committed lavapipe
profiles (maxStorageBufferRange 134217728, minStorageBufferOffsetAlignment
16, so the query needs 2^31 + 15).

Verified: refusal_surface.py --check passes, and the regenerated
basis.rs is unchanged; runtime-sources.sha256 unchanged (error/mod.rs is
not an input: 44066e69...). Rustdoc in the docs job the READY names.
2026-12-03 08:41:16 -08:00
Anees Iqbal 98435ae812 Validation: the engine candidate runs a kernel case's stage inputs through the runtime
What: a kernel case's stage inputs of a fixed stride, and its dispatch's
stage-in region, now run on the engine candidate as the Metal oracle runs
them (executor_contract::stage_inputs, the derivation both executors
share):
- compute_case takes the checked entry's AIR-layer interface and maps
  each input's data to its own buffer at the slot its location takes;
- ComputeCase carries the stage-input descriptor, the region (the
  dispatch's, or the grid's from the origin) and each slot's location;
- the run through the runtime makes its state with that descriptor, sets
  the region before the dispatch, and guards a stage input's data as its
  OutOfBoundsResource::AttributeBuffer target (guards::buffer_resource);
- the authored compile census compiles the kernel under it
  (PipelineRequest::Kernel::stage_input, variants::compile_kernel).

ToolingRequirement::KernelStageInput ("kernel_stage_input") becomes
DynamicStageInStride ("dynamic_stage_in_stride"): it now fires only for
an input of a dynamic stride. The runtime refuses that layout (Gap::StageIn
of DynamicStride), since its compute encoder has no
setBuffer:offset:attributeStride:atIndex:. Docs say the same:
docs/VALIDATION.md, the requirement's, case_requirements' and
compute_case's. A neighbouring line now says the implicit imageblock is
the runtime's limit, where it said explicit; the code already said so.

Why: the runtime has fetched stage inputs at every step function since
a916e61185 and sets the region (set_stage_in_region), but the candidate
built its state without the descriptor and set no region. So twelve
authored cases stayed Metal-only, the twelve the authored compile census
holds as not_supported{tooling_requirement:kernel_stage_input}.

Also: AUTHORED_COMPILE_CENSUS_VERSION 9 -> 10. Its table is re-blessed
on development. ENGINE_EXECUTOR_ABI unchanged: every case this lets run
was refused before, which its doc says needs no bump.

Verified here: cargo fmt; signatures --check. Tests:
engine_case_families_follow_the_case_literals (red at the commit
before) and stage_inputs_map_onto_their_slots_descriptor_and_region.
Clippy, rustdoc, the validation suite and the cases' runs on a device go
in the jobs the lane's report names.
2026-12-03 07:26:52 -08:00
Anees Iqbal 2549c339c6 CI: the runtime's device tests again on lavapipe at 128-bit vectors, with a Mesa shader cache of their own
What: a Linux step after the CPU ICD step runs the runtime's device tests from that step's archive
with LP_NATIVE_VECTOR_WIDTH=128 (lavapipe's subgroups of 4, the width arm64 lavapipe runs at) and
MESA_SHADER_CACHE_DIR set to a directory of the leg's own in the workspace. It prints vulkaninfo's
device name and subgroup sizes first and fails unless they show 128 bits and subgroups of 4, so a
green step shows the width ran. scripts/lavapipe-image's nextest command takes --write and --env as
run does, so the leg's cache directory and variables reach the container. scripts/linux-gate-ci
gets the same step, as docs/VALIDATION.md asks of every Linux step. AGENTS.md's CI line and
VALIDATION.md's note on the width name the leg and the cache rule. Nothing in product code reads
either variable.

Why: the planner wants a stand-in for a device whose SIMD group is 4 wide (tile GPUs are a target).
The lab's 128-bit runs failed because of llvmpipe's disk cache, not our lowering. llvmpipe keys its
texture functions (lp_texture_handle.c) and its cache id (lp_screen.c) without
lp_native_vector_width (Mesa 26.2.4), so a cache that 256-bit runs filled gave a 128-bit shader an
8-wide texture function. A cache of the leg's own cannot collide with the 256-bit one.

Verified on lavapipe (Mesa 26.2.4, LLVM 23.1.1, 128 bits, subgroups 4), at aeb0ca9560, the
runtime's whole cpu_icd suite:
- shared default cache: 989 tests run: 887 passed, 102 failed, 4 skipped (job m3-max-83853);
- the cache off: 989 tests run: 989 passed (2 slow), 4 skipped (job m3-max-83888);
- gdb on two of the crashes stops at the same JIT store, vmovaps of a ymm register, the 4th of
  four plus a byte at 0x80: an 8-wide texel struct written into a 4-wide caller (job m3-max-83878).
The step itself ran in the lab from ci.yml's step text, in the pinned lavapipe image (Mesa
26.2.4-arch1.1, LLVM 23.1.1): deviceName = llvmpipe (LLVM 23.1.1, 128 bits), subgroupSize 4 (min
and max 4); 764 runtime device tests listed; Summary 762 tests run: 762 passed, 231 skipped; job
exit 0 (job m3-max-83928, on the RTX 5080 Laptop machine's lavapipe). scripts/linux-gate-ci's
new step passed bash -n only; it has not run end to end. No Rust changed, so clippy, Rustdoc and
the suites have the inputs they had.
2026-12-03 07:03:08 -08:00
Anees Iqbal 4b328ca9e2 Validation: a fragment function's render-target words are fed by the colour it returns
What: the word scan (check::output_words) now follows a fragment case's render target to the
colour its entry returns for that attachment, as it already followed a kernel's output buffer to
its stores. Before, every render-target word was fed by Family::Unknown, so every recorded note
reached every word of every fragment case by fall-back.

How:
- The scan records a fragment entry's returned value by field (Stores::returned): the
  families of each lane of each field, joined over its returns. Where a return or a
  air.discard_fragment sits in a block that does not post-dominate the entry, every lane is also
  fed by every branch condition, as a conditional store is.
- A render target's words (render_target_words): each channel of a texel takes the families of
  the lane of the returned colour it holds (every lane where the colour has fewer lanes than the
  format has channels), with those of the entry's other live outputs that decide whether or how
  the write lands: a depth, a sample mask, a stencil reference, the second blend source. The
  facts repeat every texel (every word for a texel under four bytes); the word's lanes still come
  from the target's format. A target with no live colour from the entry (an imageblock writes
  it), an attachment index that is not a constant, a vertex case's observed render target, and a
  returned value the scan does not follow keep the fall-back.
- air.quad_is_helper_thread and air.simd_is_helper_thread feed Family::Group: whether a thread is
  a helper is its place in its quad, which FragmentSimdgroupGrouping and QuadsSplitByClipping
  concern. They fed Family::Unknown before.

Tests (check::output_words::tests): a_render_targets_words_take_the_returned_colours_operations
(the public case unclamped-and-clamped-lod-of-a-texture-selected-per-quad: red and green fed by
the texture queries and the position, blue and alpha by nothing, so a texture note reaches the
first two words of a texel and NativeDot none) and
a_helper_query_and_a_discard_feed_a_render_targets_words (helper queries and quad ballots feed
Group alone; a discard the position decides adds the position and its arithmetic). Both read
every word as Unknown without the change.

ENGINE_EXECUTOR_ABI is v216: rows record different word facts for fragment render targets, and
how their differing words are judged changed.

Verified (at 33873ab651, this commit's tree):
- Gate: fmt, clippy with --workspace --all-targets --all-features -D warnings plain, under
  --cfg m2v_gpu and under --cfg m2v_cpu_icd, and rustdoc -D warnings, all exit 0 (job
  m3-max-83339). Validation suite: 1339 passed, 3 skipped (job m3-max-83340); in the same job the
  two new tests pass, and both fail with output_words.rs and words.rs put back to the parent.
- The public cases (1,168), noted / matched only within bounds / mismatch cases (batch-words),
  before at 31b2964425 and after:
  - lavapipe (x86): 156 / 27 / 10 before (job m3-max-83318) and after (job m3-max-83341); every
    row keeps its outcome and gap; 15 rows lose their fall-back words. Cases with a word on the
    fall-back: 571 to 488; with a differing one: 37 to 22.
  - AMD Radeon 780M (RADV PHOENIX, Mesa 26.2.6): 171 / 24 / 16 before (job m3-max-83332), 170 /
    24 / 17 after (job m3-max-83385). Every mismatch is held by a gap, before (21) and after (22):
    no new mismatch. One row moves: three-color-inputs-tag-attachment (c261f487), from a noted
    difference to a mismatch held as ordered_fetch_within_draw. Its target is the r32_uint tag,
    tag * 5 + as_type<uint>(color.x) of the attachments it fetches: no half conversion feeds it,
    so NativeHalfConversion, which reached its 16 differing words only by fall-back, no longer
    excuses them; UnorderedFetchWithinDraw reaches them. Cases with a word on the fall-back: 605
    to 515; with a differing one: 58 to 33.

Landed with ENGINE_EXECUTOR_ABI vulkan-engine-v217 (renumbered above development's v216, the half-arithmetic family); docs/VALIDATION.md merged by hand with that change's half family wording. runtime-sources.sha256 unchanged (a92fe0a8).
2026-12-03 04:36:37 -08:00
Anees Iqbal 9211eb3c10 Translator: half +, -, *, / and fma on the 16-bit instructions record NativeHalfConversion
Under the 16-bit float controls, a half +, -, * or / and a half fused multiply-add run on the
device's 16-bit instructions, between exact conversions. By the Vulkan spec their results are
Metal's. A driver's compiler may still compute them in float and leave them unrounded. Intel's
Windows driver 101.2145 on a UHD Graphics 630 does:

- A standalone tree of three 16-bit OpFAdds, or Fmas of a product, each decorated NoContraction
  under all three 16-bit controls, ran on 4,096 invocations. 2,284 sums and 4,080 products
  matched neither the half tree nor the float tree rounded once (job m3-max-83092).
- The Iris Xe under Mesa ANV 26.2.6 gave the half tree on every invocation (job m3-max-83093).
- In the runtime's quad test on the UHD, 112 of the 1,536 compared halves are the float chain
  rounded once at the store (job m3-max-82918).

Per the planner's ruling, the operation carries the static note on every device, with no device
check. narrow::computes_half_arithmetic looks in the emitted module for a 16-bit OpFAdd, OpFSub,
OpFMul, OpVectorTimesScalar or OpFDiv, or a GLSL.std.450 Fma. Where it finds one, the pipeline
records NativeHalfConversion, beside the conversion pair's existing cases. A Sqrt alone records
nothing, and neither does the simdgroup half tree's ClusteredReduce.

The note's reach in validation narrows to half arithmetic. Until now it reached every word fed by
any float family. The AIR word scan now feeds a new family, HalfArithmetic, beside the
operation's own family, from these operations:
- an fadd, fsub, fmul, fdiv, frem or fneg with a half result;
- a float cast whose result or operand is a half;
- a call of a modelled family whose result or an argument is a half.
NativeHalfConversion reaches only that family. A half word that only float arithmetic fed,
through a move, is no longer reached. The note stays unbounded at the word, now on the
comparison's stay-unbounded list with its reason. A driver may leave the chain unrounded and
round it once at the store, and with cancellation the two answers differ by more than the stored
value's ulps (40 codes measured on the UHD). How far rests on the operands, which a word does
not carry.

Docs:
- The note's API.md catalogue entry and its PrecisionNote doc said those operations "take no such
  rounding". They now say the operations record the note, and give the UHD 630 measurement beside
  NVIDIA's fold and RADV's fusion.
- The DeviceHalfDenormals entry points to it.
- VALIDATION.md names the half family among those the word scan reads.

Tests:
- engine_native_half: the controlled-conversion test's sum kernel now records the note, as every
  kernel there does.
- engine_float_call_notes sets the module-level note aside for 16-bit arithmetic, as it does for
  the conversion pair.
- half_simd_reductions accepts, where the quad pipeline records the note, a quad word whose
  every half is Metal's or the float operations rounded once. The model is the new devtools
  quads_once.
- In validation:
  - the scan's packed-halves test expects HalfArithmetic on the half word alone;
  - a words test shows the note reaching a half word only when half arithmetic feeds it;
  - the reach row is pinned.

SEMANTICS_VERSION 2340 -> 2341 (precision notes added).
ENGINE_EXECUTOR_ABI vulkan-engine-v215 -> v216 (the word scan feeds HalfArithmetic, and the
note's reach narrows to it).

Golden hashes: no cell moves. The cells hash the final SPIR-V, which the note does not touch.
Job m3-max-83293 (Linux) ran golden_hashes_match_the_table twice: at this change, and with
compile.rs and cache/mod.rs at f42e61aa84. Both failed with the same 2 changed-cell lines, 0
lines differing between them: development's table is due its own bless. The fixtures that need
metal-as were skipped on Linux.

runtime-sources.sha256 is unchanged: no edited file is a fingerprint input.

Note-bounds figures (noted / matched within bounds / mismatches over the 1,168 public cases),
each arm built in one job, at 702916d9d3 and at this change on it (6edabebff2):
- lavapipe (Mesa 26.2.4, LLVM 23.1.1; job m3-max-83272): 151 / 27 / 15 before and after;
- Radeon 780M (RADV PHOENIX; job m3-max-83273): 166 / 24 / 21 before and after.
Every case's outcome and bounded line is the same in both arms, so no row is new. Only the per-note
word attribution moves: NativeHalfConversion's noted words fall from 3,267 to 1,168 on lavapipe and
from 3,558 to 1,276 on the 780M, as other notes reaching those words now take them.

Verified, at the probe db2bceb3f6, whose tree is this commit's (gate job m3-max-83293):
- the four red tests pass here and three fail with compile.rs at f42e61aa84 (EXIT=100);
- STEP clippy_plain EXIT=0, clippy_gpu EXIT=0, clippy_cpu EXIT=0;
- doc EXIT=0, privdoc EXIT=0;
- the translator's and AIR's suites minus the bless-due tables: EXIT=0;
- on lavapipe (host Mesa 26.2.6):
  - runtime: 983 passed, 4 skipped; half_simd_reductions 0 differ in all three pipelines;
  - validation: 1338 passed, 3 skipped, the runtime-sources guard among them.
- The conformance replay in the pinned lavapipe image (CI's venue, LLVM 23.1.1), at f42e61aa84
  and at this change (job m3-max-83337): 0 ledger drift in both arms, 4661 rows as expected.
  On the gate job's host lavapipe (Mesa 26.2.6, LLVM 23.1.4) its replay printed 12 drift lines,
  the bicubic-texel-classes rows among them. That run has no base arm.

The device legs of the half test:
- UHD Graphics 630, Intel's Windows driver 101.2145, at 6edabebff2 (this change on 702916d9d3;
  job m3-max-83288): every_device_sums_and_multiplies_half_simdgroups_as_metal passed.
  - The quad pipeline records NativeHalfConversion. 0 of 768 words differ from Metal's, and 96
    more are the float result rounded once.
  - The simd and masked pipelines: 0 differ.
- Apple M3 Max, KosmicKrisp (Mesa 26.3.1), at db2bceb3f6 (archive m3-max-83294, run
  m3-max-83297): passed. 0 words differ in each pipeline and none takes the rounded-once
  admission.

Landed with SEMANTICS_VERSION 2342 (renumbered above development's 2341); runtime-sources.sha256 recomputed on development, unchanged (a92fe0a8). States-only plays at the change (job 83345): gb-3090-r2 render 10643 and compute 15299 made, 0 refused; windrag-780m-b4 render 8972 and compute 225 made, 0 refused, equal to pin R.
2026-12-03 04:14:29 -08:00
Anees Iqbal f42e61aa84 Docs: the helper-thread words' four mechanisms, and what a split quad's helper query answers
The read of the ten cases held as helper_thread_words (lavapipe, job 83263; Radeon 780M, jobs
83264 and 83267) explained 454 of their 455 differing words by four mechanisms: Apple's partial
quads, lavapipe's clip seam, RADV's lane order and x86 lavapipe's 8-lane subgroup. The docs said
otherwise in two places:

- QuadsSplitByClipping said each run of a split quad combines fewer active lanes than Metal's.
  Each piece's run keeps all four lanes; what differs is the helper query, which names the other
  piece's covered pixels as helpers where Metal's quad, shaded once, names none. The note's doc
  comment, its API.md catalogue entry and the validation gap's doc now say that.
- FragmentSimdgroupGrouping gains the fill past a subgroup under 32 lanes: it reads an inactive
  lane, which MSL 4.1 section 6.10.2 leaves undefined, and the device reads the calling lane in its
  place (lower::simd's PartialFragment read).

docs/VALIDATION.md's verdict section names the four mechanisms and what lavapipe and the 780M do
under each, where the next reader of a held case looks. The gap's doc in c3.rs no longer says the
cause is unread.

Docs and doc comments only. pin-compute.py over the tree gives the committed runtime-sources
fingerprint (artifact.rs is not one of its inputs), so no re-pin. cargo fmt --all is clean.
2026-12-03 03:48:23 -08:00
Anees Iqbal 702916d9d3 Validation: helper-thread words and ordered fetch are answer gaps a row's words decide
FragmentSimdgroupGrouping, QuadsSplitByClipping and
UnorderedFetchWithinDraw only record a device behaviour now: none of
them excuses a word. The cases whose differing words they reach turned
from noted differences into mismatches, and nothing held them open, so
a round's public leg would read them as new mismatches. Two answer
gaps now hold them open. Both are decided by structure (the note and
the words its operations reach), never by case id:

- HelperThreadWords (helper_thread_words): every unexcused word is
  reached by FragmentSimdgroupGrouping, or every one by
  QuadsSplitByClipping.
- OrderedFetchWithinDraw (ordered_fetch_within_draw): every unexcused
  word is reached by UnorderedFetchWithinDraw.

How:
- For each only-recorded note, the word judge counts the unexcused
  words that note reaches (Judgement::recorded).
- AnswerGap::held_by_words picks the gap one of whose notes reaches
  every unexcused word of a mismatch, where both outputs have one
  length. The engine's difference_status calls it for a mismatching
  verdict, and the batch-run line names the gap (held_open_by=).
- Every device has both gaps, since why the device's words differ is
  not read yet. The reviewed list refuses an entry under either gap.
- A row's content check accepts such a gap only on differing bytes from
  a run that recorded one of its notes, and status_holds re-derives the
  gap from the row's words.
- C3 names a word gap as a mismatch's reason after a deferral and after
  a listed gap.
- docs/VALIDATION.md states both gaps.

ENGINE_EXECUTOR_ABI stays vulkan-engine-v215, above development's v214.

The three figures, public cases (1,168): noted cases / cases that
match only within bounds / mismatches, then how many mismatches an
answer gap holds and how many are new.
- lavapipe (Mesa 26.2.4 image):
  - before, development 965e707277, job m3-max-83220: 188 / 0 / 5;
    5 held, 0 new.
  - after, job m3-max-83166: 151 / 27 / 15; 15 held (5
    clipped_primitive_split, 10 helper_thread_words), 0 new.
- Radeon 780M (RADV PHOENIX, Mesa 26.2.6, the device pinned alone):
  - before, development 22861fde72, jobs m3-max-82940 and
    m3-max-82966: 206 / 0 / 5; 5 held, 0 new.
  - after, job m3-max-83177: 166 / 24 / 21; 21 held (5
    clipped_primitive_split, 8 helper_thread_words, 8
    ordered_fetch_within_draw), 0 new.

The after runs ran this commit's library code. Only a C3 test changed
after them.

Verified (tests at this tree):
- gate A, m3-max-83232: fmt check, clippy plain, --cfg m2v_gpu and
  --cfg m2v_cpu_icd, and rustdoc each exit 0.
- gate B, m3-max-83236: the validation suite exits 0, 1337 passed,
  3 skipped. Each red check exits 100 with its fix reverted: the
  engine's word-gap hold, the judge's recorded-note count, the
  denormal boundary, the note reach, the recorded rule-5 notes and the
  recorded review notes.
2026-12-03 03:27:51 -08:00
Anees Iqbal e31bc61172 Validation: a precision note excuses only the words its operations feed, within its bound
What: a candidate's output is judged against Metal's one 32-bit word at a time
(observation_contract::words). An equal word matches. A differing word is excused only by a
recorded note that reaches it: a note with a bound makes a word within it a match, a note with
no bound makes it a noted word, and a word no reaching note excuses is a mismatch.

- Reach is read from the case's AIR (check::output_words): for each output word, the float
  lanes it holds and the operation families whose results feed it, followed byte by byte
  through bitcasts, lane moves and the zext/shl/or that pack two halves. A store placed at
  A * thread_position_in_grid + B bytes gives each thread's words their own facts. A note of the
  module that writes the output reaches the words its operations feed; a note of another module
  reaches every word, and so does every note of a word the scan cannot follow (a load of memory
  the entry writes, a call outside the intrinsic families).
- Bounds a word can carry are checked there, and a word within one matches: DeviceDenormals
  only where Metal's and the device's lanes both lie at or below the smallest normal (2^-126,
  2^-14 for half), of one sign unless one is a zero; NativeNanEncoding only two NaNs of the
  lane's format (it reaches every float lane: a half read from its bits is no operation);
  HalfTexelConversion its recorded one half ulp, or +-65504 beside the infinity; the lane
  tables and the reassociation bound as before.
- NativeFma, NativeDot, NativeMix and NativeDivision keep no value bound (each states its bound
  over the operands, which a word does not carry) and reach only the words their operations
  feed. The fixture knows its inputs, so a per-case bound from the operands is a later form.
- SimdgroupAccessOrder reaches only a word another thread of the kernel may write: one a store
  the scan cannot place in its own thread's bytes writes.
- Rows record the output's word facts (census output_words). The batch report prints, per case
  and in total, the words matched exactly, within each note's bound and only noted, by note,
  the unexcused words, and the cases with a word on the fall-back.
- DeviceDenormals's rustdoc states Metal's measured answer per operation: it flushes before
  rounding on some (a product, fma, dot and mix just below 2^-126 answer a zero) and keeps a
  denormal on others (sin, tan, asin, sinh, asinh, atanh of a denormal), from the public cases
  float-products-flushed-before-rounding and nan-model-float-denormals-per-operation. Its
  recording rule already covers plain multiplies; no rule changed.

ENGINE_EXECUTOR_ABI is v215: how a match is decided changed and rows record word facts.

Why: a noted difference was excused whole by any recorded note, so a note that could not cause
a word's difference (a division's note beside a product, an access-order note on a kernel whose
threads write disjoint words) hid it, and a bounded note never matched.

Verified on lavapipe (Mesa 26.2.4, the lavapipe image), the 1,168 public cases, job
m3-max-82854 (this tree with the next commit's doc text) against m3-max-82667 at b3d7464945: match 746 -> 773, noted_difference
188 -> 161, mismatch 5 -> 5 (each held open by clipped_primitive_split, as before); words
2,859,015 exact, 30,212 within a bound, 352,820 noted, 0 unexcused. Of the 188 cases noted
before, 34 have an output word on the fall-back (26 every word) and 32 a differing one.
Tests: the validation suite at an earlier tree, m3-max-82839 (1,331 passed, 3 failed; the three
are fixed here), and the touched modules at the same tree as m3-max-82854, m3-max-82855 (136
passed).
2026-12-03 03:27:51 -08:00
Anees Iqbal b3d7464945 Validation: a threadgroup target is checked nowhere, so its case is refused before it runs
What: executor_contract::out_of_bounds::containment() reports a threadgroup target as the arena
unchecked (Check::Unchecked), on every profile and under either domains. out_of_bounds_run then
refuses the case before anything is made, as not_supported{uncontained:unchecked threadgroup},
as it refuses a loaded pointer under the identity domains. The read rule's in-shader arm no
longer names the arena. The module docs, the Unchecked variant, ContainmentForm::Threadgroup,
the coverage note on which accesses the encodings govern, and docs/VALIDATION.md say so.
ENGINE_EXECUTOR_ABI moves to vulkan-engine-v214: the executor records a refusal for a case it
ran before.

Why: since 990328afe1 no profile checks a threadgroup access (lower::access::local::contained;
docs/API.md, "Threadgroup memory": one past the memory is undefined, as in Metal; the runtime
README states it too). The contract still reported the arena as checked in the shader, so the
candidate ran the only authored case with a threadgroup target, tg-twice (7efae163,
loads-and-stores-past-a-threadgroup-allocation), and read what the device held past the
allocation. On the Radeon 780M (RADV, Mesa 26.2.6) job m3-max-82582 ran it 10 times at
f606e43b30 and got 10 different output hashes: word 6, a load of tg[40], which no thread
writes, held a different value each run. The kernel's SimdgroupAccessOrder note made the failed
zero rule a NotedDifference. Vulkan does not define an access past a Workgroup array either, so
no part of that run is evidence.

What else moves: no other authored case declares a threadgroup target (all case shards
searched for "form":"threadgroup": one hit), so only tg-twice moves from noted_difference to a
refusal. The case, its AIR and its Metal row are unchanged. No classifier input changes
(executor_contract/out_of_bounds.rs, coverage.rs and case/out_of_bounds.rs are not in
build.rs's classifier list), and the authored compile census compiles the case as before
(case_compile reads no containment), so neither census version moves.

Verified: see the green job named with this commit's READY.
2026-12-03 00:30:04 -08:00
Anees Iqbal 530fb4ea4c Validation: the runtime route refuses no patch draw through index buffers, which no case makes
The engine candidate's runtime route required a patch draw to name no patch
or control-point index buffer, and refused one that did as
executor_not_implemented. No case reaches that refusal: the case mapping
(graphics::patch_draw) names neither buffer for every patch draw, the case
schema has no field for them, and the AIR states nothing about a draw's
index buffers. The conformance suite's tessellation-patch-indices case
compares drawIndexedPatches and patch index buffers against Metal.

The route now takes every patch draw, its refusal message and
VALIDATION.md's sentence drop the clause, and the routing test drops its
patch draw through a patch index buffer. The runtime platform's draw keeps
its own check of the translator's DrawCall fields, which fails a draw that
names an index buffer visibly.
2026-12-02 17:26:54 -08:00
Anees Iqbal 8209b0d83b Harness: two churn rows make and release every kind of their group in each of 200 iterations, their gauges read at 100, 200 and the drop
The thirteen gauge kinds no replay judges and no harness workload recorded now each have a loop,
grouped as the planner ranked them. `churn_all_day` (OwnRow::ChurnAllDay) makes, uses and releases
in each iteration: a host memory import with a buffer over it; an exported block with a buffer
over it; a video surface of each decoder route the device exports (a dma-buf at the VA-API
layout, the host's opaque handle at NVIDIA's), as the replay player makes them, with a view of
each plane at an index, its buffer in place, and plane 0 kept past the surface's release; the
runtime device tests' plane stand-in surface (two RGBA8Unorm planes of the opaque handle) whose
plane 0 a pass renders beside another colour attachment; two render pipeline states; and a
Private target and a target over a Shared buffer, each drawn into, then read through a texture
after a memory barrier. `churn_rest` (OwnRow::ChurnRest) makes a compute state of one of 40
contents in turn (past the 32 stage entries kept), a draw under a Counting visibility mode into 4
samples resolved into a texture over a Shared buffer, a texture over an exported block read by a
blit, and an indirect command buffer.

Each row reads the device's gauges once it settles (no release waiting, no command buffer
unretired, two reads 20 ms apart equal) after the 100th and the 200th iterations, and once more
after its device dropped (own::run, through the counters that outlive it), and the command prints
them as `M2V-MATRIX gauge harness-<runtime>/<row>/<gauge>@100|@200|@drop`: the harness's gauges
and the eleven kinds they left out (imports, exports, surface imports and buffers, plane
stand-ins, shadows, stage entries, resolve images, textures copied over, occlusion pools,
indirect command buffers). The matrix judges them as every gauge. A kind the device does not
make is left out with its reason on the row's lines; the first line gives each of the group's
kinds live in the first iteration before its release. No kind needed a consumer-side object: the
host import's memory is the row's own, as in the runtime's import tests.

The device tests churn_all_day_holds_every_gauge_still_and_frees_all_at_the_drop and
churn_rest_holds_every_gauge_still_and_frees_all_at_the_drop hold the matrix's rule on the
report.
2026-12-02 14:24:07 -08:00
Anees Iqbal d9054b5164 Validation: a play's gauge records are the runtime's objects past the play's own, of each kind the program makes one at a time
A play's frames 100 and 200 are not one loop's iterations: the program makes and releases
objects between them (glbench-3090-r4 holds 62 textures at frame 100 and 690 at 200), so a
runtime gauge held flat there judged the program. The matrix's records of a play are now,
for buffers, textures, samplers and events, the runtime's live objects of the kind less the
play's own (`KIND_excess`): the stream's live objects the backend made, and the backend's own
that stand for them (two-copy Managed buffers' CPU copies and the released ones a commit still
copies, the asides, the guest RAM scratches; the planes' shapes, one texture a plane and shape
that the plane's surface textures and views are views of; the video and exported surfaces'
planes). The settled end lines at frames 100 and 200 carry the play's count of each kind as
KIND_held. An excess below zero is written as it is, which results.py takes for no count.
The runtime's other kinds follow the program's objects and work, not one object each: they are
not replay records (the harness's loops hold those its workloads reach), and every kind stays
held at zero at the device's drop.

Verified: in the hand-over.
2026-12-02 14:24:06 -08:00
Anees Iqbal f4eb47d792 Validation: a play's gauges at frames 100 and 200 go out as the matrix's records, every kind on its end lines
What:
- The runtime backend's end lines (`Backend::live`) carry every count of an object kind the
  runtime keeps live: samplers, LOD clamp variants, level elements, kernel variants and entries,
  render contents, attachment views, descriptor slots, device samplers, shadows, resolve images,
  plane stand-ins, buffer set pools, surface buffers, indirect command buffers, releases waiting
  and handles out join them, and the pipeline cache's bytes.
- At the ends of frames 100 and 200 (GAUGE_FRAMES) the player reads them once they hold still
  (Backend::settled_live): the runtime backend reads them every 10 ms until no release waits and
  two reads in a row agree on every recorded kind, for at most 2 s, a wait no frame's time holds.
  What the program released goes on the runtime's block-maker and reaper threads after the work
  before it retired, so a read straight after the frame's waits could differ between two plays.
- command-replay prints, where the play ended frame 200 and skipped nothing by then,
  `M2V-MATRIX gauge replay-rt/STEM/GAUGE@100` and `@200` for each kind of GAUGED (gauge_records).
  scripts/matrix/results.py judges them as it judges the harness's: equal at 100 and 200, blocks
  no higher at 200.
- Left out, and why: handles_out (1 while the play holds the device), releases_waiting (lowered by
  the block-maker thread whenever it runs), private_units (a layout of memory that follows the
  bytes the program holds), and every byte and age gauge, which follows the program's content and
  the pool's idle clock: the pipeline cache's data (bound 128 MiB), the translator's entries'
  bytes (bound 64 MiB), the staging bytes, the pool's allocated, idle, reserved, reused, taken and
  block bytes, and the shadows', resolve images' and stand-ins' bytes, whose counts are recorded.

Why: the matrix's leak rule (live gauges per resource kind flat between iterations 100 and 200)
reached only the harness's compute workloads. The kinds only draws and passes make (render
contents, attachment views, shadows, resolve images, stand-ins, the samplers draws reach) had no
such check, and a play's end lines lacked 17 of the kinds.

Docs: REPLAY-STREAM.md section 10 (the end line's gauges, the settled read, the records),
VALIDATION.md's gauge row, command-replay's module doc.

Tests: replay::tests the_player_settles_the_gauges_at_frames_100_and_200_alone and
the_gauge_records_are_the_counted_kinds_at_frames_100_and_200; replay::rt_replay
the_end_lines_carry_every_gauge_the_gauge_records_carry (device); test_results.py
test_a_plays_gauges_at_frames_100_and_200_are_held_flat_as_the_harness_s.

Verified: in the hand-over.
2026-12-02 14:24:06 -08:00
Anees Iqbal cbd5423458 Replay device tests: the layer guard is LayerOn, apart from the profiles layer's Layered; the test device constant is the device tests' hosts' 2026-12-02 05:39:49 -08:00
Anees Iqbal 909739e23f Replay device tests: every device a test opens runs under the validation layer, as VALIDATION.md says
VALIDATION.md's GPU-leg row says the replay player's device tests (replay::rt_replay) run under
the validation layer, but only the exported-surface test enabled it: the jobs put the layer on the
loader's path and nothing in the validation crate turned it on. Each test's pipeline cache
directory (ScratchCache), which every rt_replay test holds longer than its devices, now puts the
layer over the process's instances through candidate::Layered (the candidate runs' helper, which
validated now uses too): rt_device asserts the device lists the layer as an active tool, and the
cache's drop fails the test on any message the layer logged. The exported-surface test no longer
wraps itself. rt_replay, and places' device test that shares its helpers, are Linux's and macOS's,
where the candidate's platform gives the layer.

Cost (job m3-max-78137 at edc3bfa01b, lavapipe on msi, LP_NUM_THREADS=1): ID:rt's device filter
94.9 s; replay::rt_replay alone 1.4 s bare, 1.5 s with the layer enabled through the same
variables, no layer message. Unverified here: the run with this commit follows.
2026-12-02 05:39:49 -08:00
Anees Iqbal 8006d54fbb Runtime tests: six more Managed-form tests run in both forms
The tests of upload, import, spill, sites, gpu_span and resolve that read a Managed buffer's form
(Device::has_unified_memory, or a Managed buffer they make) ran each device in its own form only,
so lavapipe and the integrated cards never took their two-copy arm. Each now runs through
tests::command::on_device::each_device_in_both_forms, which runs a one-copy device once more
through the two-copy view:

- upload: every_device_counts_and_times_its_own_command_buffers
- import: every_device_releases_an_import_under_a_managed_buffer_dropped_before_any_commit
- spill: every_device_spills_private_memory_out_of_device_memory
- gpu_span: every_device_leaves_a_copy_in_out_of_the_gpu_span_it_goes_ahead_of
- resolve: every_device_resolves_a_loaded_pass_into_a_shader_read_texture_over_a_buffer
- sites: every_device_counts_each_allocation_site_apart, through the new
  each_device_in_both_forms_with, which opens both runs with the test's own options
  (MakerTest::Fail here); each_device_in_both_forms is it with the default options.

docs/VALIDATION.md names the six modules among those that run both forms. Test-only: no product
source changes. Verification (lavapipe two-copy runs counted per test, lint) is in the landing
line.
2026-11-26 16:59:51 -08:00
Anees Iqbal 0cd1618247 Runtime tests: the two-copy view runs a Managed buffer's device-copy form on one-copy devices
No device in CI kept a device copy of a Managed buffer: lavapipe is a CPU device, so
Core::unified_memory() (rule 2's unified-memory form, decided by Vulkan's device type alone) is
true there, and every device test of the two-copy form returned at its unified-memory check or
took the one-copy arm. every_device_synchronizes_a_texture_over_a_managed_buffer passed vacuously
on lavapipe while the runtime recorded nothing for that synchronize on discrete cards (fixed in
d0f117f2a8). The integrated lab cards take the same one-copy arm.

DeviceOptions gains a test-only field beside `memory`, under the same
cfg(all(test, any(m2v_gpu, m2v_cpu_icd))): `two_copies`. Device::open reads it, under that gate
alone, where it decides `unified_memory`: where true the device keeps a device copy of every
Managed buffer whatever its device type, and Device::has_unified_memory answers false, as on a
discrete GPU; its Vulkan device, memory types and every other answer are its own. No product
build carries the field or its read, and tests/one_path.rs is untouched.

tests::command::on_device::each_device_in_both_forms runs `body` on each device in its own form
and, where the device keeps one copy, once more through the view (the run's name ends in
", two copies"). The tests a Managed buffer's form decides take it: those of tests::managed that
make a Managed buffer (not the two Managed-texture tests, nor the Shared variant of the
two-queue read), the three of tests::copy_over that read the form, two of tests::blit
(buffer-to-buffer, synchronize of a Managed buffer) and tests::over's texture held in place. So
the plain m2v_cpu_icd and m2v_gpu suites run the two-copy form on lavapipe and on the integrated
cards; a discrete card runs as before. docs/VALIDATION.md says so.

Verification: the jobs on lavapipe (the synchronize test failing with blit.rs and texture.rs at
e9f09c9a92 and passing here, and the device suite), the RTX 5080 and the Radeon 780M follow in the
lane's report.
2026-11-26 16:59:51 -08:00
Anees Iqbal f6aa8dbdf1 Runtime: a dma-buf import is refused where the Shared type is not host-coherent
What: the dma-buf rule (import.rs, dma_buf_type) now takes the device's Shared
coherence, keyed by the query that already decides it (the Shared type's
HOST_COHERENT flag; the device holds a coherence state exactly where it lacks
it). On a device that holds one, every dma-buf is refused with the new
Limit::ImportCoherence { handle }, whatever the fd's query offers, before any
allocation: Device::import_dma_buf and Device::import_dma_bufs (each fd's rule;
the sparse buffer is destroyed, as for Limit::ImportType). Basis: device. The
pointer import (import_host_memory) is unchanged, so the consumer's fallback
imports those pages by pointer. No new route: the refusal sits inside the
existing rule.

Why: on a Meteor Lake GPU under Mesa's Intel driver and the i915 kernel driver
(no LLC), the fd's query offers type 0 (device-local, host-visible,
host-coherent, write-combined) first, so the rule took the import, and the
runtime never flushes an import because its type is host-coherent. That flag
speaks only for mappings Vulkan makes; the consumer writes the pages through
its own cached mapping. In Linux v7.3, i915_gem_prime_import
(drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c:281-337) makes the object with
i915_gem_object_alloc (kmem_cache_zalloc, gem/i915_gem_object.c) and never calls
i915_gem_object_set_cache_coherency, so pat_index 0 and cache_coherent 0; the
only CPU-cache work is one wbinvd_on_all_cpus at get_pages where !HAS_LLC &&
!IS_DG1 (i915_gem_dmabuf.c:249-261, whose comment says only DG1 "still snoops
transactions even with CACHE_NONE"); on MTL PAT 0 is WB with no coherency. So
the GPU reads DRAM without the guest's lines still in the CPU cache: text and
images missing. The pointer import (userptr, I915_CACHE_LLC, PAT 3) snoops.
No Vulkan query says whether a driver's GPU mapping of a foreign dma-buf sees
the CPU's caches, so the Shared type's flag is a proxy that errs to the safe
side: where it refuses, the pointer route is coherent by its type's flag.

Docs: import.rs's header and both dma-buf calls' doc comments; coherence.rs on
imports; the runtime README's Shared memory's coherence ("Imported blocks take
no call"), Imported blocks (the rule, the proxy and its limit) and its known
gaps; docs/VALIDATION.md on the shared view; docs/REFUSALS.md regenerated; the
api_signatures table blessed (one variant added).

Tests: a_dma_buf_is_refused_where_the_shared_type_is_not_host_coherent (pure,
over Meteor Lake's i915 type list and the Iris Xe's);
every_device_under_the_view_refuses_a_dma_buf_and_imports_host_memory (device,
through the refused device's view); the existing dma-buf device tests take the
new refusal. Verified at this commit: cargo fmt only; the build, the pure
tests and the device run are in the jobs the lane reports.
2026-11-26 11:51:26 -08:00
Anees Iqbal 6db36df158 Tests: the refused device's memory view has three doors, and a device opens through it only by the floor's choice
What: cached_types_incoherent moves from tests/mod.rs into tests::command::on_device and is no
longer crate-visible. The tests reach it through three doors alone:
- each_device_under_the_view, the one way a test opens a device through the view; the floor's
  choice over the viewed types decides the arm, and a refused make is asserted and printed;
- viewed, which returns a device's memory properties read through the view (the coherence test's
  read of the types a device under m2v_shared_view reads); it takes and returns a value, so it is
  no DeviceOptions::memory;
- suite_view, compiled only under m2v_shared_view, the suite-wide hook in Device::new that gives
  every device the view where the test gives none.
The doc mentions of the old path (coherence.rs, floor.rs, the settle test, docs/VALIDATION.md)
name the new one.

Why: the planner's ask after the second red of this class today. kkview (cb3d913139) fixed two
view tests that opened KosmicKrisp through the view raw, and the settle test (f78d45b9e0) was a
third, landed beside that fix. With the view private, a new test cannot pass it to
DeviceOptions::memory in the device cfgs; it has to take each_device_under_the_view. The
m2v_shared_view hook stays a door of its own because that cfg runs the whole unchanged suite
through the view on cards the floor opens under it (docs/VALIDATION.md), which no per-test helper
gives. Test only; the runtime does not change.
2026-11-25 16:54:02 -08:00
Anees Iqbal e6df09cddd Docs: under m2v_shared_view a card that offers imports only cached types refuses every import
What: VALIDATION.md's m2v_shared_view entry gains the planner's sentence: under the view a card
whose host-pointer and dma-buf queries offer only its cached types refuses every import; run it
with the import families filtered.

Why: on the RX 7900 XTX (RADV) the host-pointer query offers type 5 alone (0x20) and the dma-buf
query types 5 and 10 (0x420); the view leaves neither coherent, so import.rs's rules refuse
every import there: 17 tests of the view's suite failed on that alone (job m3-max-73943). The
planner's ruling keeps the view and import.rs unchanged and filters those tests in the leg's
command line.

Verified: docs only.
2026-11-25 14:24:29 -08:00
Anees Iqbal 6c1eb0e77c Runtime tests: m2v_shared_view runs the device suite through the refused device's view
What: a test-only cfg, m2v_shared_view, declared in metal2vulkan-runtime's check-cfg list beside
m2v_gpu_hazards and added to docs/VALIDATION.md's cfg table. Under it, Device::open gives every
device the tests make with no memory view of its own the refused device's view through the
landed seam: options.memory.or(Some(crate::tests::cached_types_incoherent)), which takes
HOST_COHERENT from every host-visible, host-coherent, host-cached type. A test that sets its own
view keeps it. The existing device suite then runs, unchanged, with Shared in a cached type that
reads not coherent, so it runs Shared memory's flushes and invalidates on memory that is coherent
in fact, which Vulkan allows. tests::coherence's every-device test asserts, under the cfg, that
every device builds the coherence state, and prints the Shared type and the calls.

Why: the planner's condition for A-narrow's proof on lab cards, which have no cached type that is
not coherent: a test that sets the option, no second suite, no env var.

Verified: not yet run (cargo fmt only).
2026-11-25 14:24:29 -08:00
Anees Iqbal db3a88526b Validation: the stencil rule's Counting clause has nothing to read in the case schema
The runtime's BitDraws rule refuses a draw through a [[stencil]] output drawn by bits in two
places: a face whose compare is other than Always and Never (DrawDepthStencil::
stencil_reference_face reads it), and, where the state replaces a stencil bit, a draw inside a
Counting visibility result's segment. The second needs a visibility result mode, and the case
schema has no way to state one:

- crates/metal2vulkan-validation/src/case.rs:19-21, AuthoredCase: #[serde(deny_unknown_fields)],
  and none of its fields is a visibility result mode, offset or buffer;
- src/case.rs:1819-1821, Draw (primitive, vertex_start, vertex_count, instance_count,
  index_buffer, base_vertex, base_instance): deny_unknown_fields, no visibility field;
- src/case.rs:1388-1390, DepthStencilResource, and src/case.rs:1406-1408,
  DepthStencilStateLiteral: deny_unknown_fields, no visibility field;
- neither executor sets a mode or gives its pass a visibility result buffer: no "visibility" in
  src/metal/ or src/candidate/ (grep -rni visibility), and runtime_render.rs's Targets::pass
  (line 661) builds the pass from its attachments, array length and default size alone.

A manifest naming such a field is refused at parse, so no case's draw is in a segment and the
classifier carries no clause for it. When the schema grows a visibility result mode, the clause
belongs beside the compare rule, with its own classification test. The doc comment of
stencil_reference_face and docs/VALIDATION.md now say this instead of "a case sets no mode".

Verified at this commit: cargo fmt; doc comment and docs only, no code changed.
2026-11-25 13:24:41 -08:00
Anees Iqbal 5517e2df1b Validation: a stencil output whose test it decides needs VK_EXT_shader_stencil_export on a device without it
What: the engine's render route through the runtime now reads, from the case's own structure, the
draws the runtime refuses on a device without VK_EXT_shader_stencil_export, and records them as the
device's refusal (NotSupported::NotEnabled, not_supported{not_enabled}, class device) naming the
extension, the face and its compare function, instead of drawing them and failing on the runtime's
Gap::Draw { kind: StencilOutput }.

- RenderCase::stencil_output: the case's own fragment function writes a live [[stencil]] output,
  read from its AIR outputs' roles (executor_contract::depth_stencil_test), false for a vertex case.
- DrawDepthStencil::stencil_reference_face (executor_contract/depth_stencil.rs): the first face
  whose stencil test the output decides. It is the runtime's rule, depth_stencil::BitDraws::of, on
  the same Vulkan state (metal::state::depth_stencil_state of the same descriptor): None where the
  stencil test is off; otherwise a face whose compare op is other than ALWAYS and NEVER, whatever
  its operations and masks (BitDraws::of returns None before it reads the replaced bits).
- runtime_render::run: once the state is made, a case with a stencil output, on a device whose
  translator profile lacks fragment.stencil_export (the bit the translator chose the bit-draws form
  by), under a state with such a face, is NotEnabled. After the make, so the product's own refusals
  at creation (a colour beside the output: StencilExport) keep their records.

The runtime's second refusal, a draw that replaces a bit inside a Counting visibility segment,
meets no authored case: the case schema and the executor set no visibility result mode, so no
draw is in a segment. The doc comment and docs/VALIDATION.md say so.

Why this form and not the runtime limit: a ToolingRequirement with Limit::Runtime stops the engine
on every device, and lavapipe, RADV and ANV list the extension and run and match these cases. The
refusal holds only on a device without the extension, which is what a device's NotEnabled records.
Before the stencil form (5a722b5c3f) such a case was the device's refusal on NVIDIA too, through the
translator's StencilExport. Round 733b14ed24's RTX 3090 public leg failed 14 such cases
(stencil-output-reference-* and stencil-output-at-*-rate-*: "the runtime refused a case its
structure classifies as one it runs (Draw { kind: StencilOutput })").

Versions: none move. The authoring-capability census classifies by ToolingRequirement, which this
does not touch, so no census or index version. ENGINE_EXECUTOR_ABI stays: on a device with the
extension nothing changes, and on one without it every case this refuses failed at the base with
no row and no refusal recorded, so no recorded row observes the change (engine.rs's rule for a
bump).

Tests: runtime_render's a_stencil_output_needs_the_extension_where_it_decides_its_test, on the
committed profiles nvidia-rtx5080-laptop (no extension) and gate-lavapipe (the extension): every
pair of the eight compare functions on the two faces under Keep and Replace, 120 refused naming
the face and its function, the 8 of Always and Never drawn; a function with no stencil output and
a device with the extension draw every state. The graphics mapping tests assert stencil_output for
fragment_depth_stencil and its absence for fragment_varying_color. Without this change the case
reaches the runtime's draw and fails, as on the 3090.

Verified at this commit: cargo fmt only. The jobs that check it (the validation suite, the 3090
public leg, lavapipe's public leg) report to the orchestrator.
2026-11-25 13:24:41 -08:00
Anees Iqbal d16eb39e8f Tests: METAL2VULKAN_TEST_UNVALIDATED=1 runs rt's device tests without the validation layer, and says so
Every rt device test opens its instance through tests/validation.rs instance(), which fails
unless each device lists an active VK_LAYER_KHRONOS_validation. A Windows machine whose only
Vulkan pieces are its GPU driver and the loader it ships therefore cannot run the device suite at
all, and a machine of that kind is the only place some drivers are ever covered (AMD's
proprietary Windows driver: the lab has no AMD card under Windows).

The setting is test-only and off unless its value is 1; product code and the lab's runs, which
never set it, are unchanged. Under it, instance() enables nothing and checks the opposite: every
device lists no validation tool, so a run that says it is unvalidated is. No layer writes a log,
so the guard checks none. Each test process writes "M2V-UNVALIDATED unvalidated run: ..." once to
its standard error, past libtest's capture of a passing test's output, so the run's output says
it whatever passes. The test of the layer's log itself
(every_device_logs_a_deliberately_invalid_call_once) skips: without the layer its call is only
invalid.

The new device test the_setting_runs_the_device_tests_without_the_layer_and_says_so runs the
test binary's unvalidated_child in a process of its own under the setting, with VK_INSTANCE_LAYERS
and VK_LOADER_LAYERS_ENABLE removed, and requires it to pass and to print the line. Without this
change the child opens a validated instance (the layer is on VK_LAYER_PATH in every lab job) and
prints no such line, so the test fails; on a machine without the layer the child fails outright.

Docs: the setting in tests/validation.rs's module doc, docs/VALIDATION.md (the layer section),
CONTRIBUTING.md, and env_vars.rs's module doc, which now says the test suites' own
METAL2VULKAN_TEST_* variables are not in REGISTRY.
2026-11-23 20:27:07 -08:00
Anees Iqbal 58148264f8 Conformance: compute-imageblock-sizes, one encoder's dispatches before any imageblock size and at two it sets
A compute step for setImageblockWidth:height: on both sides, and a case that runs
a4_imageblock_extent three times in one encoder: before the encoder sets a size (one
thread, Metal's 1 by 1), then at 4 by 2 and at 4 by 4, each one threadgroup of the
imageblock's extent, into a guarded slot each. The case's test holds Metal's recorded
answer equal to the fixture's own at each extent.

The runtime README states the size as a specialization: each size a kernel runs at is
one VkPipeline made at prepare_dispatch or at the dispatch, a first-use wait, where Metal
changes the size with no compile (m3-max-69983); prepare_dispatch and dispatch_variant
take the size. REPLAY-STREAM and VALIDATION say the player and the engine candidate set
it; the ledger row for the state's imageblock length drops the dispatch refusal.

The recording follows in its own commit (taken on the M3).
2026-11-23 00:09:50 -08:00
Anees Iqbal 28e2b0e6ca Validation: a kernel case's visible-function tables run through the runtime
The runtime candidate makes each table the case binds of the pipeline
state (newVisibleFunctionTableWithDescriptor: of its size, each authored
entry set to the handle of its linked function made with the case's
constants, as the Metal oracle sets it) and binds it at its buffer index.
ToolingRequirement::KernelFunctionTable, which held such cases to Metal
alone, is retired; a render stage's table stays the runtime's limit
(RenderFunctionTable). ENGINE_EXECUTOR_ABI does not move: no recorded row
ran a kernel table case (they were refused).

The runtime README states the device answer, the encoder's bind, the
state's handles and tables, and the known gaps (a table's 64 KiB block, a
consumer-compiled kernel's handles, an argument buffer's table). The
coverage table marks the compute items implemented; METAL-COVERAGE.md and
CONFORMANCE-COVERAGE.md are regenerated. Adds the owned linked module
visible_table_ops.metal, whose companions scripts/regen-air-fixtures
writes on the Mac.

Verified: the lane's jobs.
2026-11-22 22:11:29 -08:00
Anees Iqbal a7dd2e846e Translator: the binder's plan goes, with everything only it reaches, and the TexelRows and YCbCrInPlace forms
The runtime never made a plan (it binds each draw and dispatch by the pipeline's interface), and
since the census digests each pipeline's content alone (two commits back) nothing in the tree calls
one. What only the plan reached goes with it:

- bind: BindState, BindShape and their shapes, BindingPlan and its instantiation
  (DispatchCommands, DrawCommands, push, descriptor and root-table templates and writes),
  plan.rs and plan/ (compute, resources, slots), instantiate.rs, resident.rs, the neutral
  resources' plan side, the heap's member planning and table bytes, the mesh arguments pass
  (MeshArguments, MeshArgumentsForm, fold_object_grid, metal_object_grid), ExecutionStatus and
  StatusBits as public items, TextureShape::Buffer, IndirectRef with the four indirect call
  variants (Dispatch::ThreadgroupsIndirect, DrawCall::Indirect, PatchesIndirect,
  MeshThreadgroupsIndirect) and IndexBufferRef::fetch_end. Dispatch, DrawCall and IndexBufferRef
  stay: validation states its cases' calls with them.
- error::BindError leaves the public surface; a crate-private BindError of three variants stays
  as the error of the heap's view derivation, which lower::texture::slot's storage-read check
  reads (bind::heap::tier_read_gaps). That check keeps only the storage view's format: the
  sampled-view branch and ImageViewDesc were reached by the plan alone.
- vk::DrawCommand, the plan's draw output.
- pipeline: ComputePipeline::plan, RenderPipeline::plan; cache: VariantKey::covers and
  large_buffer_form.
- The TexelRows form (bind::texel_rows, LoweringInputs::texel_rows, RuntimeFact and PushField
  TexelRows) and the YCbCrInPlace form (bind::ycbcr_in_place, lower/sampler/in_place.rs,
  LoweringInputs::ycbcr_in_place and ycbcr_planes_sampled, RuntimeFact and PushField
  YCbCrInPlace, PrecisionNote FloatSampleFilter and HalfSampleFilter, Routine::Quad). Only the
  binder set those inputs.
- The tests of the deleted items, and the plan halves of mixed tests. Of 6810 tests (`#[test]`
  functions in the workspace) 309 leave and 11 come in their place: the lowering halves of mixed
  tests, kept without the plan (the heap layout, the stage-in stride and region facts, the
  emulated-simdgroup and bicubic facts, the iris-xe storage classes), and the kept tests of the two
  renamed files. 50 others are edited to drop a plan half or a deleted item (the api_surface round
  trips; the simd_emulated, extended-range, recursion, dynamic-root, handles, heap-storage-read
  and mesh lowering cases). 6512 remain. engine_graphics_binder.rs and engine_heap_binder.rs keep
  one and two tests and are renamed engine_unattached_colors.rs and engine_heap_groups.rs.
- The runtime guard test's list of files the runtime inputs reach without being inputs drops the
  seven no input reaches since the cut: cache/digest.rs, lower/simd/divergent.rs,
  lower/simd/workgroup.rs, pipeline/artifact.rs, pipeline/layout.rs, pipeline/stage_io.rs and
  pipeline/vertex.rs; three of its reasons that named the plan or the binder say what reaches the file now.

559 public items leave (api_signatures.tsv: 55 structs, 26 enums, 140 variants, 245 fields,
52 methods, 24 associated constants, 7 constants, 5 functions, 5 impls). Consumer search, the
consumer's development at 92ffbed817, `git grep -w NAME` of each of the 112 removed names: 0 hits
for 105; the others are the consumer's own items: TessellationFactors 4 (its
Bound::TessellationFactors), YCbCrMatrix 3 (its own string and doc), texel_rows 2 (its own fn),
ThreadgroupsIndirect 6 (its own Dispatch enums and rt::Dispatch::Indirect), DrawIndexed 1 (a doc
naming MTLIndirectCommandType values), covers 109 and plan 105 (generic words; the `.covers(`
calls are its Extent's, the `.plan(` calls its video encoder's rate.plan). Its one import of
metal2vulkan::bind is the argument-buffer layout types, which stay.

The forms' audit. A texture over a buffer: the runtime's
tests::over::every_device_holds_a_texture_over_a_buffer_in_place. A two-plane YCbCr sample: no
runtime test; the runtime makes no texture of a two-plane YCbCr format (Gap::TextureFormat, the
runtime README's "A format is made where the translator's format table maps it" row), the
conformance cases ycbcr_gathers and ycbcr_textures record Metal's answers, and
known-gaps-rt.tsv lists the runtime's refusals (ycbcr-gathers-*, ycbcr-texel-reads-420v).

Versions:
- RUNTIME_VERSION 2550: it covers plan instantiation and the binder's run-time data. Nothing calls
  those since step 2: the runtime never used the binder, and the own-context executor is gone. A
  run of an unchanged artifact does nothing different, so the guard hash (runtime-sources.sha256)
  moves alone, and the RUNTIME_VERSION doc is rewritten to name what it still covers.
- SEMANTICS_VERSION 2273: no output changes for any input that still exists. The TexelRows and
  YCbCrInPlace forms, their facts, push fields and the two notes were reachable only through
  LoweringInputs::ycbcr_in_place, ycbcr_planes_sampled and texel_rows. Only the binder set those;
  the runtime sets none. The function key appended each of them only when set, so every surviving
  key hashes the same bytes. Two type declarations stay where they were, so module words do not
  move: bool in the bicubic types, uvec4 in the bicubic routines. Byte-identical modules are
  expected, not verified here; the 252-row hash probe is the check.
- ARTIFACT_FORMAT_VERSION 591: the codec tags enum variants by name. The removed RuntimeFact,
  PushField and PrecisionNote variants leave their tags unused, which cache/mod.rs's rule says
  needs no bump: an old entry holding one fails to decode, which is a miss. No codec_struct field
  is removed. That is why SamplerDesc.ycbcr stays.

The guard hash (crates/metal2vulkan-validation/runtime-sources.sha256) moves for the bind/
sources this deletes and edits and for vk/draw.rs, which leaves its list. No run of an unchanged
artifact changes: what stays in bind/ computes what it did (the heap's tier check takes the same
storage format; its removed sampled branch had no caller).

Docs: docs/API.md (section 5 is the interface; the binding and plan sections go), README.md,
docs/ARCHITECTURE.md, docs/HOWTO.md, docs/VALIDATION.md, the runtime README's DrawInput and
identity-domain rows, docs/REFUSALS.md (regenerated; the binder's section goes),
api_reference.md, api_signatures.tsv (blessed: removals only), tests/api_surface.rs, the
signatures floor (5000), the bind modules' own docs, and the public field docs of PushField,
RuntimeFact and SpecKey that named BindState, BindShape or BindingPlan. AGENTS.md: the project
table names pipelines and their interfaces, not binding plans; its "core lives in" line stays
true (bind/ still holds what the lowering reads).

Verified on 31692939d4, this commit's tree (steelbrain/cutbinder-probe-6): job m3-max-68107,
fmt, signatures, refusal surface, clippy -D warnings (workspace plain, --cfg m2v_gpu,
--cfg m2v_cpu_icd; the translator with no feature and with each alone; the AIR crate alone),
workspace Rustdoc -D warnings, each crate's private intra-doc links at 0, api-docs; job
m3-max-68109, the product, validation and conformance suites, doctests, and on lavapipe the
validation and runtime suites under --cfg m2v_cpu_icd, the conformance replay and the public
cases' qualification.
2026-11-22 10:15:34 -08:00
Anees Iqbal cd5d336782 Validation: the own-context executor goes; a case runs through the runtime or is refused before it runs
After the profiles layer moved onto the runtime route, kernel rows went through the runtime, and the
layered cases moved too, nothing called validation's own Vulkan executor. This deletes it:
candidate/platform's compute, render (and its multisampled half), plan_resources, buffers and
multisample modules, the own-context device's clamped-layer, extended-dynamic-state, restriction
and environment machinery, the engine's compile_case / compile_render(_case) / compute_request
plumbing, the bind refusal and status verdict it read, the synthetic guest addresses, the attempt's
creation ceiling, and coverage's module census of its own compiles. corpus-pipeline's Vulkan
context for its render rows, and the runtime probe's, stay.

A render case the runtime route does not draw (a depth/stencil attachment of both aspects, a patch
draw through a patch or control-point index buffer, an out-of-bounds target other than an attribute
buffer) is refused not_supported{executor_not_implemented} before it runs, as run_prepared already
did once the gates were gone. The comments and docs/VALIDATION.md that compared with the own
context now say what the runtime route does.

Test-only items move beside their tests: Mechanism's label into the out-of-bounds tests,
Containment::of_compile, its label, Declared and ExecutionClass::of_description into the tier
table. The linked-functions integration test compiles through kernel_request, as the census does.

Deleted tests and what covers their Metal claim:
- a_kernel_runs_with_its_linked_visible_functions: a_kernel_runs_through_the_runtime_with_its_
  linked_visible_functions (engine_compute.rs), kept.
- a_draw_restarts_exactly_its_strips_within_its_class: the conformance case
  primitive_type_crossings compares strip restart with Metal.
- a_combined_depth_stencil_format_moves_both_aspects_together, a_draw_covers_the_whole_target,
  a_guarded_buffer_counts_each_changed_guard_byte, a_target_is_bound_for_its_fetch_form,
  every_state_a_render_pipeline_makes_dynamic_is_recorded,
  multisample_initializers_are_vulkan_legal_for_each_component_class,
  addressed_allocations_take_metal_addresses, the_status_starts_zero_and_stops_non_evidence,
  the_clamped_layer_warning_fails_no_row_of_a_clamped_store_alone,
  a_context_has_the_extended_dynamic_states_where_the_product_reads_them,
  a_store_runs_through_the_binder_under_the_validation_layer,
  a_tessellation_pipeline_census_is_its_functions: the deleted executor's own mechanics, no Metal
  answer of their own.

metal2vulkan-validation is not published, so no consumer can reach a deleted item:
git grep -n -E 'metal2vulkan[-_]validation' development -- '*.rs' '*.toml' in the consumer's
checkout at a11528a7e2: 0 hits.

Verified: cargo check of the validation crate, all targets and features, plain, --cfg m2v_gpu and
--cfg m2v_cpu_icd, clean (m3-max-67506, on the probe branch's identical diff); the dead-code pass
against the base finds only items whose users are macOS-only or tests the binder's deletion takes.
The compile job and the suites follow on this commit.

(cherry picked from commit 5808aaa769e3f44b1bd76dea486b2b150b15e92b)
2026-11-22 07:37:14 -08:00
Anees Iqbal 9675b50e75 Validation: corpus-pipeline makes every kernel row on one runtime device per sweep
At f11d6455e0 each kernel row opened its own runtime instance and device
under the validation layer. A sweep of about 900 kernel rows made about
900 instances and devices. Each instance's layer also opened its own log
file and kept it open after the instance was destroyed: one file
descriptor a row (the 3090, job 67374: 5 descriptors to 24 over 20 rows).
The form the 1b brief asks for is one runtime device of the sweep's kind,
with each row's ComputePipelineState and its dispatch made on it.

candidate::RuntimeKernels is that device:
- open makes the instance (restricted where the process is) and the
  device. The validation layer's variables are set only while the instance
  is made (runtime::under_validation_variables), and the layer logs to the
  process's one log for the device's life;
- accept makes one row's state and encodes its dispatch, as before. The
  row's messages are what the log gained during the row, so a message
  still makes that row INVALID_USAGE;
- finish drops the device and waits for its teardown. A message logged
  at the teardown fails the sweep.
A message logged while the device opens stops the sweep before any row,
because no row on that device would be evidence.

corpus-pipeline opens it at the sweep's first kernel row, so a render-only
sweep opens none, and finishes it after the last row. Render rows keep
their own context.

runtime::opened is split into made_device and torn_down for the held
device; the per-row executors keep opened. create_runtime_kernel is
removed. The device tests make two kernel rows on one device.
2026-11-22 06:05:20 -08:00
Anees Iqbal 71f93243d9 Validation: an L4 kernel row is made through the runtime, its pipeline state and one encoded dispatch
corpus-pipeline asked the driver for a kernel row's compute pipeline at
the region the binder planned for one representative dispatch
(acceptance::dispatch), and tallied the binder's answer (BIND_REFUSED,
BIND_ERROR). That is not the pipeline a guest's kernel gets. A kernel row
is now made as a guest's kernel is made (platform::runtime_acceptance):
- the row's AIR becomes a runtime library, and its function is
  specialized with the row's function-constant values;
- one ComputePipelineState is made on the sweep's device, restricted to
  --profiles-layer's profile where one is given;
- one dispatch of one threadgroup of the state's thread execution width
  (or its maxTotalThreadsPerThreadgroup where that is fewer) is encoded
  into a command buffer that is dropped uncommitted, so the runtime picks
  the module that threadgroup runs on, asks the driver for its pipeline,
  and nothing executes.

The verdicts:
- The creation time is the runtime's own count of it
  (pipeline_creation_nanos).
- A message from the validation layer is INVALID_USAGE.
- A Vulkan error is REFUSED.
- The runtime's typed refusal (the translator's, a known gap, a limit) is
  RUNTIME_REFUSED, counted.
- A kernel the runtime runs as Metal's without effects, and makes no
  pipeline for, is NO_EFFECT, counted.

The row still compiles in its compile worker first, for its words, its
outcome, --compile-only and --keep-modules. The make runs in the sweep's
process, held to the per-attempt ceilings (runtime::within_ceilings).

Removed:
- acceptance::dispatch (plan_compute_row, ComputeCreation, NoCreation,
  BinderAnswer);
- RowCompile::Binder and UnmodelledKind::Dispatch;
- the tally's bind_refused and bind_errors, and the detail's
  imageblock=WxH;
- the own context's compute arm of create_acceptance_pipeline, which now
  takes a render pipeline, with its region test.
The summary line's bind_refused= and bind_errors= become
runtime_refused= and no_effect=.

What is lost: L4 kernel acceptance on Mesa's drm-shim drivers (RADV, ANV
and NVK), which stood for hardware we do not own. The runtime does not
open those devices, so the rung runs on lavapipe and the real cards
only. NVK is lost entirely: the shim was its only venue, and it never
ran here.

Committed rows removed: none. No L4 row is committed. Counted by
environment over corpus/observations/vulkan and observations/refusals at
bcc88a43cf, there are 55 rows in 6 environments (the 780M, Iris Xe,
RTX 5080 Laptop twice, lavapipe twice), and none is from a drm-shim
environment.
2026-11-22 06:05:19 -08:00
Anees Iqbal 48d7ded3aa Validation: the authored compile census compiles as the runtime does, through no binding plan's variant
The census compiled each case's pipeline through the binder's variant route: a kernel under the
key its plan, and its plan's dispatch_variant, asked for (BindingPlan::variant), a draw through
compile_render_variant, a mesh draw through compile_mesh_variant, each with the storage-format
loop. It now compiles through the translator's public pipeline API the way the runtime does:

- a kernel through the new PipelineRequest::Kernel, compile_kernel: its plain module, or its
  emulated-simdgroups variant (LoweringInputs::kernel_variant) where the dispatch's threadgroup
  is not a multiple of a LocalSizeConstraint the plain module states, the runtime encoder's
  rule (encoder::decide);
- a draw with no shape (Device::compile_render_pipeline);
- a mesh draw through Device::compile_mesh_pipeline. The census was MeshDraw's only builder, so
  its shape field and compile_mesh_for_shape go.

The own-context executor (a profiles-layer run, a render case off the runtime) keeps its
requests (BoundCompute, a draw with its shape) under the resident-table domains, where its plan
asks for variants the runtime route does not compile.

The artifact still digests the plan of the compiled pipeline for the run's bind shape, as the
own-context executor records it (artifact::CaseArtifact::record).

Why: on the probe branch (m3-max-66743, 9 profiles, 20,997 cells), the only variant field the
plan ever set was emulated_simdgroups. Yet the census's old route kept the plain module for 33
kernel cases (174 cells on the six real-GPU profiles) whose threadgroups (1, 4, 8, 16, 40 or 42
threads) are no multiple of the plain module's LocalSizeConstraint { multiple: 32 }. The binder
refuses to plan each of them under the runtime's identity domains, so the old route's variant
step never ran. Every one of the 33 observes its threadgroup partition, so the runtime's whole
module is the plain one and its encoder runs the emulated-simdgroups module for those
dispatches. The new route compiles exactly that module (route probe 8468646957, census
m3-max-66936, every cell compiled: the 174 differ only in stage, dependencies and requirements).
So the census's cells for those 33 described a module no guest gets.

AUTHORED_COMPILE_CENSUS_VERSION 7 -> 8: the compiles a cell is made of changed route.

Verified:
- compile m3-max-66813 and suites m3-max-66814 at the lane's base a9c1a7d012: product 3880,
  validation 1335, conformance 1025, doctests, all green.
- the 33 cases through the runtime (executor runtime-compute, validation layer with
  synchronization validation) against the M3 Max's Metal rows (apple-m3-max-macos27.0.1):
  Radeon 780M 33/33 match (m3-max-66869, 66931), RTX 5080 33/33 (m3-max-66871, 66933), Iris Xe
  RPL-P 21/21 (m3-max-66870, 66932); 0 mismatch, 0 refusal. Not run on the Mac's Vulkan:
  validation runs no Vulkan candidate on macOS.
- that those runs took the emulated module is shown by code, not by a count: encoder::decide
  either runs it or refuses with Gap::PartialSimdgroups, and none refused.
- the census table is re-blessed at the next pin.
2026-11-22 02:35:39 -08:00
Anees Iqbal 5d143de078 Validation: a difference under precision notes is a noted difference, counted apart
A candidate row whose bytes differ from Metal's under a comparison class unbounded by
precision notes was recorded Mismatch, so the public lavapipe batch counted 186 mismatches of
which 185 carry a note that can explain a difference, and a new mismatch would hide among
them. Such a row now records CandidateStatus::NotedDifference: never a match, never accepted,
and saying no more than that the row differs and its notes can explain a difference. It is
counted in its own column: the batch outcome and class noted_difference (batch-report,
batch-family, batch-scope, batch-summary), the evidence state noted_difference in
corpus-status. Mismatch stays for an exact class, a difference past a bounded table, and an
out-of-bounds target that escaped.

The owner's decision of 2026-10-06 stays: a case the C3 reviewed list holds under an answer
gap its structure meets (AnswerGap::met_by) keeps Mismatch, and the row names the gap in a new
field, held_open_by, which the executor's verdict line and the batch-run line print.
ReviewedList::holding_open is that rule, shared by C3's report (with the venue's device) and
the executor (candidate::engine::difference_status, with the case's structure alone: the
runtime path has no profile to ask which devices have the gap, so a listed case's difference
is a mismatch on every device, which hides none). C3 reads a noted difference as a mismatch,
so its verdicts do not change; the fast-math regrouping reading keys on "differs" instead of
"Mismatch".

The row contract enforces the vocabulary: a noted difference needs differing bytes, an
unbounded class and no escaped target, and no held_open_by; a mismatch that could be noted
needs held_open_by. comparison.rs's contract sentence now reads that a difference is never a
match: under notes it is a noted difference (unless an answer gap holds its case open), else a
mismatch.

Executor ABI vulkan-engine-v211 -> v212 (the recorded status changed): every recorded
candidate row is stale until rerun. Bless due on development: the authored compile census,
which keys on the executor ABI.

Tests: the row vocabulary (observation), classify and the report's column and held_open_by
line, install of a noted row (vulkan_batch), and difference_status over every committed C3
answer-gap entry (each stays Mismatch naming its gap) and a public case the list does not hold
(a noted difference).

Verified: not at commit time; the compile job and the validation suite run on this sha.

Verified with the two commits after it (the suite fixes and the ff55fa41 case fix), at their
tip 611f45a559 on development 6cf6ee19d0: compile job m3-max-65814 (fmt, clippy plain /
--cfg m2v_gpu / --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, signatures, refusal surface;
its golden and render-key reds are the bless due at SEMANTICS 2267, as on development);
validation suite m3-max-65815, 1,334 of 1,334. Public cases on lavapipe, both arms in one job
(m3-max-65816): development 721 match / 186 mismatch / 268 not supported / 0 failed; this change
722 match / 5 mismatch / 180 noted difference / 268 not supported / 0 failed. 180 cases moved
from mismatch to noted difference and one to match; the 5 left are the cases the owner's 10-06
answer gap (clipped_primitive_split) holds open, each naming it in held_open_by.
2026-11-21 20:47:10 -08:00
Anees Iqbal 35fe287776 Validation: a sample count the runtime makes no texture of is the device's not_enabled
A kernel case through the runtime that binds a multisampled texture of a sample
count the device's image format query lacks failed with free text ("texture 0:
a sample count of 2 is not among the device's (0xd)"): runtime_error took the
runtime's Limit::TextureSamples as any other error. The executor's own context
refuses the same texture typed (NotEnabled, from the same query), and the run
through the runtime already records a pixel format it makes no image of so.
Now Limit::TextureSamples is NotEnabled too, naming the texture, so the case
records a typed refusal on a device without the count and runs where the device
has it. On llvmpipe (sample counts 1, 4 and 8) that is the two public cases
3cadd32e61a4 (four-multisample-reads-at-two-samples) and 505599ae1551
(size-queries-of-multisampled-buffer-and-depth-cube-textures), which failed
before (job m3-max-65594).

- runtime: runtime_error maps Limit::TextureSamples to NotEnabled.
- engine_textures: a_sample_count_the_device_lacks_is_refused_as_not_enabled
  (was ..._before_any_image) runs the case on each run, the own context and,
  on Linux, through the runtime, and asserts NotEnabled naming texture 1 and
  its 2 samples on both (the runtime arm failed with free text without this).
- docs/VALIDATION.md: says so.

These cases recorded no row before, so no recorded row observes the change; it
rides vulkan-engine-v211, the bump of the parent commit.

Verified before this commit: the two failures, on llvmpipe (Mesa 26.2.4) at
af97fa1bee, job m3-max-65594. Verified after: m3-max-65626 (the compile
steps, all exit 0); m3-max-65628 (validation 1332/1333, device run 1442/1443; the test passes,
and fails at 2673e16ab6's runtime.rs with Failed("texture 1: a sample count of 2 is not among
the device's (0xd)")); the one red the opened-chains pin. llvmpipe batch m3-max-65646, this
commit against 2a3cc1cf47: 721 match / 186 mismatch / 268 refusal / 0 failure against
708 / 186 / 266 / 15; exactly 15 cases change (13 failed -> match, 2 failed ->
not_supported{not_enabled}).
2026-11-21 20:00:44 -08:00
Anees Iqbal 81eb5e3826 Validation: a texture-buffer out-of-bounds target through the runtime lies between guards
The run of a kernel case through the runtime made each texture buffer over an
unguarded buffer (Placed::new), so a target of the texel buffer form recorded
no guard count (escaped and past_end None). out_of_bounds::guarded() names
every such target guarded, so matches() failed contained_in_guard and called
equal bytes a Mismatch, which validate_content then refused as contradicting
the equal hashes. Since texture buffers moved to the runtime (ed4f8976a5),
13 public kernel.out_of_bounds cases failed that way on llvmpipe: 0c1792037bb5
162c788b0db2 20b771ceffbb 2776f96c4392 2c9a0ea83995 2d15a85c73a3 474c4e027c5e
53cfa43e915a 53a21d7a2200 a536f99088e1 b16354f4aa9e cde612c13d95 fa187d1aef74.
No row was stored for any of them, and no stored row's status contradicts its
hashes: 0 of the 42 committed Vulkan rows, 0 of the 894 the public batch
recorded (job m3-max-65594; its two Match rows of unequal bytes differ only in
declared handle-array reads, which the ResidentTexels rule allows).

- runtime_textures: a bound texture buffer that is a guarded target is made
  over Placed::within at its declared reach (guards::texel_guard_reach), and
  Bound keeps that buffer (texel_guards) so the run reads its guard back.
- runtime: the run's guard counts take each such texture buffer's, under
  OutOfBoundsResource::Texture.
- runtime_render: a draw passes no targets (a draw with a contained target is
  not drawn through the runtime).
- engine_compute: a_texture_buffer_accessed_past_its_end_is_contained_through_the_runtime
  runs ob1_texel_buffer with both texture buffers declared texel_buffer
  targets, as the committed case does, and asserts escaped and past_end
  Some(0) on each (None without this change).
- ENGINE_EXECUTOR_ABI vulkan-engine-v211.
- docs/VALIDATION.md: the buffer a texture-buffer target is made over is
  guarded too.

The gap that let it through: the lavapipe device shards run synthetic cases,
and the one texture-buffer-through-the-runtime test declared no target; no
check runs corpus-vulkan over the public cases (CI qualifies three).

Verified before this commit: the read, on llvmpipe (Mesa 26.2.4) at
af97fa1bee, job m3-max-65594. Verified after: m3-max-65618 (fmt, clippy plain, --cfg m2v_gpu and
--cfg m2v_cpu_icd, workspace Rustdoc -D warnings, api-docs, refusal-surface --check); m3-max-65619
(validation 1332/1333 and the lavapipe device run 1442/1443; the new
a_texture_buffer_accessed_past_its_end_is_contained_through_the_runtime passes, and fails on
2a3cc1cf47's product files with (escaped, past_end) = (None, None)); the one red in both is the
opened-chains pin, blessed on development since 0631f3432a. llvmpipe batch m3-max-65622 over the
1,175 public cases: 721 match / 186 mismatch / 266 refusal / 2 failure, the 13 failed -> match
and nothing else changed. The cause commit is ed4f8976a5 (texture buffers moved to the runtime,
their guards never placed).
2026-11-21 20:00:44 -08:00
Anees Iqbal 38104834d4 validation: indirect_indexed_draws names the runtime's command shape the executor does not map
What: one requirement row, ToolingRequirement::IndirectIndexedDraws ("indirect_indexed_draws"),
stops the engine's candidate. It is this crate's gap (Limit::Tooling). Its structural check in
executor_contract::case_requirements matches an indirect command buffer of the one shape the
runtime builds, which no runtime-limit row names: render commands of indexed draws alone that
inherit the pipeline state and bind their own buffers, with no command the host encodes. Every
other command buffer already carries indirect_compute_commands, indirect_draw_types,
indirect_command_inheritance or host_encoded_indirect_commands, and a pipeline state in an
argument buffer carries argument_buffer_pipeline_state.

The free-text NotImplemented in candidate::engine::compute_case and graphics::stage_resources
("an indirect command buffer or a pipeline state in an argument buffer") is deleted. Both run
after require_case_families, which now refuses every such case typed, so a case of the
runtime's shape meets NotSupported::Requirements({indirect_indexed_draws}). Since the row is a
tooling gap, the checker's evidence_gap also takes no case of it ("engine_candidate:
indirect_indexed_draws (the candidate is stopped)").

The contract sentence of replay_observes_commands said both executors execute a case's
commands after its producer. It now says the Metal oracle does and the engine's candidate
executes none, naming the row. The same claim in unsupported_observation_requirements is
corrected the same way, and so are compute_case's doc (it no longer lists command buffers and
pipeline states among what it runs) and docs/VALIDATION.md (the runtime's form carries the row,
no longer executor_not_implemented).

Why: one vocabulary. The runtime-built shape was the only indirect command buffer the
vocabulary did not name: it met a free-text refusal.

Not built: mapping the runtime's shape through the runtime's indirect command buffer. Its
trigger is a guest count. No guest reaches an indirect command buffer today, because the
consumer refuses the creation. The row's doc records the trigger.

Versions: the classifier's analyzer_version goes from structural-triage-v85 to v86 (the
meaning of a replayed module's case changes: only the Metal oracle executes it). requirement.rs
and executor_contract.rs are classifier inputs, so the key changes with them too. The
executor ABI does not move: no committed case reaches the deleted arms.

Expected census moves, at the next named pin, not run here: none.
- Authoring-capability census: the row comes from a case's literals alone, never from a
  source's structure, so no census row carries it. The full reclassify that the version bump
  forces should give the same counts.
- Authored compile census: none of the 29 command buffers in the committed cases has the
  runtime's shape (all 25 cases with one already carry a runtime-limit row, see
  committed_command_buffer_and_pipeline_state_cases_refuse_by_their_requirements), so no cell
  moves.

Tests: requirement::the_runtime_s_indirect_command_shape_stops_the_candidate_as_a_tooling_gap,
and case::tests::indirect_commands::the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate.
The second checks that the shape carries the row alone, that the checker names it as an
evidence gap, and that compute_case refuses it typed. It also checks that leaving the shape
(buffers inherited, or draws of primitives) carries the runtime-limit row instead.

Verified: m3-max-65550 (these two commits on the pre-enables base 7e080082cf): fmt,
signatures, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings
green, validation 1333/1333; m3-max-65585 at 9e3e484a8a on af97fa1bee: the same compile steps
green, validation 1332/1333, the one red the opened-chains pin left by the enables move.
2026-11-21 19:40:54 -08:00
Anees Iqbal a2ad41850e Validation enables what the runtime enables, from the runtime's own tables
What: one definition of the enabled set. The runtime gains one public function,
`metal2vulkan_runtime::floor::enable_set()`: every feature and extension of the
translator's vocabulary that device creation enables on some device (its ENABLED
groups' named features and its creation extensions), and `shader_enables` reads the
same iteration. Validation's `engine::runtime_enables(description)` keeps of a
description what that set holds (plus the features that have no member at the
runtime's Vulkan version and the extensions exposing kept features) and
`engine::runtime_description(stem)` reads a committed profile at the runtime's
version restricted to it. The engine context's list (`engine_list`) is that set;
NOT_ENABLED, the old executor's list, `Enables::copy`/`expose` and the unnamed
members loop are deleted. The authored-compile census, `corpus-pipeline` and
`load_device` compile for `runtime_description`.

Why: validation executed, and the census reported, forms the runtime never ships:
the ordered framebuffer fetch on lavapipe, ray query and acceleration structures
with deferred host operations, float atomic add, OpFmaKHR, buffer robustness and
others the runtime's floor tables do not enable.

Tests: a runtime test that `enable_set()` equals what `shader_enables` derives on a
device with every ENABLED feature and every creation extension; a validation test
that no committed profile's context (device and restricted) enables a member or
extension outside the set, ray query, acceleration structure and deferred host
operations named. docs/VALIDATION.md states the four places where the census's
reading differs from the runtime's own answer for a device.

ENGINE_EXECUTOR_ABI vulkan-engine-v209 -> v210.

Verification: none at this commit; its compile, suite and census jobs follow.
2026-11-21 19:23:41 -08:00
Anees Iqbal bebd518dfb validation: delete runs_through_runtime, always true for a mapped kernel case
The predicate answered true for a Threads or Threadgroups dispatch. Every kernel case the engine
maps comes from compute_case, which dispatches by threads (a case has no indirect dispatch to map),
so it was true for every case it was asked about. Its one product caller, run_on_context, now
routes every mapped kernel case through the runtime when no profiles-layer restriction is
requested, as before. The runtime run's own match still refuses any dispatch but threads or
threadgroups.

Deleted with it: the predicate's own test (a_plain_kernel_case_and_only_one_runs_through_the_runtime)
and its plain_kernel helper, which nothing else used. The doc references are rewritten
(ComputeRun::spv_sha256, runtime_fingerprint, run_on_runtime, runs_render_through_runtime,
platform::runtime, engine_textures' runs, docs/VALIDATION.md).

Search: `git grep -n runs_through_runtime` at 3d2b846caa gives 19 hits (the definition, 1 caller,
8 doc references, 9 test asserts); after, 0. The crate is unpublished, so no consumer calls it.
No version bump: routing and rows do not change for any case.

Verified: m3-max-65445 (fmt, signatures, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace
Rustdoc -D warnings, 51 engine tests) and m3-max-65449 (two public kernel cases, gated-bias-on and
one-d-array-reads-and-width-queries-at-32-and-16-bit-coordinates, Match through runtime-compute on
lavapipe).
2026-11-21 18:23:39 -08:00
Anees Iqbal 78a19891d5 docs/VALIDATION.md: a bound texture buffer runs on both executors
The authored-case requirements section still said a bound texture buffer carries texture_buffer, which
the runtime does not make. Texture buffers (817463704e) are made by the runtime, and ed4f8976a5 retired
the texture_buffer and texture_buffer_member requirements; 49eebb4d7f made the census compile the
argument-buffer member. Doc only; found by lane censustb.
2026-11-21 08:58:23 -08:00
Anees Iqbal dc03c9e1b5 Validation: delete the own context's indirect-command-buffer and pipeline-state arms
What: since 01ed696846 the engine candidate refuses every committed case with an indirect command
buffer or a pipeline state in an argument buffer before it maps the case (the five runtime-limit
requirements). This commit deletes what only those cases reached:
- platform/compute/{replay,device_replay,device_replay/generated,draw_replay}.rs: the host, device
  and draw replays.
- platform/generated_commands.rs and the context's VK_EXT_device_generated_commands loader.
- The children/registered parameters of execute_engine and execute_engine_render, and the replay
  passes in the render recording.
- engine.rs:
  - PreparedCase.templates and replay_templates, with ReplayTemplate, TemplateCase, ChildCommand
    and CompiledChild.
  - replay_variants, replay_regions, region_sizes and edge_sizes.
  - the replay requests, the run-allocation list and the resident state.
  - compile_child, record_child and replay_variant_request.
  - ComputeCase.objects and ComputeCase.command_buffers.
- graphics.rs: StageResources.objects and command_buffers, RenderCase::objects and
  command_buffers, records_ids, and replayed_draw_in_class.
- argument_buffers.rs: embed_objects, EmbeddedObjects, validate_records, records_ids and
  records_storage. field_words and synthetic_addresses take no records or objects.
- variants.rs: compile_replay_for_shape and DrawForm (the large-buffer and replay forms).
- PipelineRequest::BoundCompute.replay and VertexDraw.form.
- artifact.rs: CompileSubject (its one subject is still labelled "case"), the replay module and
  the uncovered note. case_compiles becomes case_compile: one pipeline per run.
- ToolingRequirement::ReplayedTemplateResources, which only replay_templates raised.
- plan_resources Guest.status is a buffer, not an Option: only the device replay passed none.
A case of the runtime's form (kernel-encoded indexed draws that inherit the pipeline state, no
host-encoded commands) raises no requirement. compute_case and stage_resources now refuse it, and
a pipeline state, as not implemented (executor_not_implemented), rather than drop the command
buffer from the mapping. No committed case is of that form.
Object and mesh cases have no own-context execution arm: engine/mesh.rs serves only the authored
compile census (prepare_compile), so nothing of it is deleted.

ABI: no bump. Every case the deleted code ran has been refused since v207, so no recorded row can
observe the change. The artifact digest of a compiled case is unchanged: same label, same
compile digest. The context still enables VK_EXT_device_generated_commands where supported. That
switch has no consumer now; it is the next commit's (with its ABI number).

Tests: removed the tests of the replays, the templates, the replay variants and regions, the
replay fault verdict, records validation and the replay request. The routing test now keeps an
indirect dispatch on the own context. The artifact, argument-buffer member, graphics, census and
device test call sites follow the new signatures.

Verified:
- Probe m3-max-63595 (homelab-um870-1) on 20b4721524, a tree equal to this commit's, passed:
  fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, and validation nextest
  (1332 tests).
- m3-max-63628 (homelab-um870-1) ran the own context's device tests (candidate::tests) on
  lavapipe at this commit: 54 passed.
2026-11-21 07:13:17 -08:00
Anees Iqbal 01ed696846 Validation: requirement rows for indirect command buffers and pipeline states
What: five new ToolingRequirement variants for what the runtime does not build of an indirect
command buffer, and for a pipeline state an argument buffer holds. Each one stops only the engine
candidate (Limit::Runtime), so the Metal oracle still runs and qualifies these cases.
executor_contract::case_requirements raises them from the case literals:
- indirect_compute_commands: a command buffer of compute commands.
- indirect_draw_types: a render command buffer whose descriptor allows draws other than indexed
  ones alone (non-indexed, patch, indexed patch or mesh draws).
- indirect_command_inheritance: a render command buffer that does not inherit the pipeline state,
  or that inherits buffers.
- host_encoded_indirect_commands: commands the host encodes into a command buffer.
- argument_buffer_pipeline_state: a pipeline state in an argument buffer (the runtime's pipeline
  states have no gpuResourceID).
The runtime builds kernel-encoded indexed draws that inherit the pipeline state and bind their own
buffers (Device::new_indirect_command_buffer). A case in exactly that form raises none of these.
Object and mesh cases already stop the candidate by mesh_render_pipeline
(executor_contract::mesh), so no new row is needed for them. IndirectCommandBuffer (an authoring
requirement about unobserved contents) means something else and is not reused.
ENGINE_EXECUTOR_ABI goes to vulkan-engine-v207, because these cases' recorded rows came from the
executor's own context. executor_contract is a classifier input, so triage recomputes the census.
In the authored compile census, these cases' cells become their requirement refusals; the census
is re-blessed on development.

Routed: none. No committed case is in the runtime's form:
- indexed-draws-a-kernel-and-the-host-encode has host-encoded commands (and point draws, which the
  translator refuses to encode).
- a-vertex-function-whose-only-effect-is-an-indexed-draw-runs-it inherits buffers.

The 27 committed cases with a command buffer or a pipeline state, by requirement (a case can raise
several):
- indirect_compute_commands: 12
- indirect_draw_types: 12
- host_encoded_indirect_commands: 10
- indirect_command_inheritance: 7
- argument_buffer_pipeline_state: 4

Tests:
- requirement.rs: the new variants are in ALL, stop only the candidate, and are the runtime's
  limit.
- engine_case_families_follow_the_case_literals: the runtime's form raises nothing, and each other
  form raises exactly its own requirement.
- committed_command_buffer_and_pipeline_state_cases_refuse_by_their_requirements (new): eight
  committed cases refuse at preparation, with no device, by exactly their requirements. It
  replaces five tests of the own context's replay and pipeline-state mapping, which these cases no
  longer reach.
- the_census_refuses_command_buffer_cases_by_their_requirements (new integration test): it
  replaces the census test of replay variants.
- The case-literal tests and the argument-buffer-member tests now assert the refusal, or drop the
  command buffer and pipeline state they used to map.
docs/VALIDATION.md names the five requirements.

Verified: gate m3-max-63557 (homelab-um870-1) at c38044230b, the tree of this commit: fmt, clippy
(all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc and doctests of metal2vulkan-validation
passed, and its nextest suite passed (1337 tests). Earlier runs on the same branch (m3-max-63495,
m3-max-63532) found the tests fixed above.
2026-11-21 06:58:13 -08:00
Anees Iqbal 1d79c26b7a Validation: a render case's argument buffers draw through the runtime
What: runs_render_through_runtime no longer keeps a vertex or fragment case whose function takes
an argument buffer of buffers, textures or samplers on the executor's own context, and it routes a
case that observes an argument-buffer buffer or texture. runtime_render makes each stage's
argument-buffer members the way a kernel's run makes them (platform/runtime.rs):
- each member buffer is a Shared buffer of its bytes;
- each member texture and sampler comes from runtime_textures, with the usage the function
  declares of its field (RuntimeDraw.member_usages, engine::runtime_member_usages);
- each owner holds every member's gpuAddress or gpuResourceID at its field
  (argument_buffers::owner_bytes);
- the render encoder uses each member buffer and texture for reading and writing
  (use_resource).
An argument-buffer buffer output reads back through RenderFinals.argument_buffer_buffers, and an
argument-buffer texture output reads back through runtime_textures::read_back. An argument
buffer's pipeline state or indirect command buffer still keeps the case on the own context.
ENGINE_EXECUTOR_ABI goes to vulkan-engine-v205, because these cases' recorded rows came from the
own context.

What moves: 5 committed fragment cases.
- Public (4): sixteen-overlapping-triangles-update-a-raster-ordered-argument-buffer-member,
  sparse-sample-of-an-argument-buffer-texture-returns-its-value-where-resident,
  sparse-sample-of-an-argument-buffer-texture-states-it-resident,
  sample-in-a-fragment-through-a-sampler-held-beside-its-texture-in-an-argument-buffer.
- Private (1): sample-the-slice-a-runtime-index-picks-from-an-argument-buffer-texture-array.
The other 23 render cases with argument buffers carry visible_function_table (22) or
texture_buffer (1) and run on Metal alone.

Verified on lavapipe, each case through corpus-vulkan against the committed Apple M3 Max macOS
27.0.1 row. Before: own context at b192b89fa1, m3-max-63462 (homelab-gem10-1); each stored row's
executor was engine-render. After: this tree, m3-max-63474 (homelab-um870-1); each stored row's
executor was runtime-render.
- The 4 public cases match Metal on both paths, with the same candidate output digests (ea785a60,
  ebc81c32, 67c145ea, e7e4c872).
- The private case did not run on either node, which has no local source shard for it. It is
  unverified here.

Tests:
- a_plain_draw_and_only_one_runs_through_the_runtime now routes a fragment case with an
  argument-buffer buffer and texture, observed through either. Before, it kept that case on the
  own context.
- The new device test a_fragment_samples_the_texture_an_argument_buffer_holds_through_its_sampler
  draws tail_argument_samplers' argument_sampler_fragment (m.t.sample(m.s, in.uv)) on the own
  context and through the runtime. Both give the texture's rows swapped into the 2x2 target, the
  bytes the committed Metal row holds for the same case. It passed on lavapipe in m3-max-63474.

Gate, m3-max-63474 at this tree: fmt; validation clippy with all features, with --cfg m2v_gpu
and with --cfg m2v_cpu_icd; Rustdoc; the validation suite, 1342 passed, 3 skipped; the two
lavapipe device tests above.

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).
2026-11-21 06:29:32 -08:00
Anees Iqbal e6e70666ed Validation: delete the own-context arms of the nine refused families
What: since the refusal rows (d1266e5a5a, a1a47cb9c5), compute_case and render_case refuse a
case of kernel_function_table, kernel_imageblock, texture_buffer, fragment_imageblock,
sparse_texture, kernel_acceleration_structure, kernel_stage_input, rasterization_rate_map or
dynamic_vertex_stride before anything maps it. The executor's own-context code for these
families is reached by no case, so it goes:
- function tables: engine/tables.rs, ComputeCase.function_tables, StageResources.function_tables,
  CompiledCase (the compile functions now return the pipeline), CompileFailure::Tables,
  VariantRequest, the table allocations of compute_shape, and the tables hash of
  CaseArtifact::record;
- imageblocks and tile functions: engine/imageblock.rs, ComputeCase.imageblock,
  RenderCase.imageblock, RenderOutput::Imageblock, RenderFinals.imageblock,
  variants::compile_tile_for_shape, and the tile attachments of plan_resources;
- texture buffers: texel_guard_reach, buffer_target, the texel-buffer views and guards of
  plan_resources, and texel_buffer_bytes;
- sparse textures: platform/sparse_images.rs, device::SparseImages, the sparse paths of
  create_slot_image, the tile-map emulation of executor_contract::sparse, and the executor's
  sparseBinding, sparseResidencyImage2D and sparseResidencyImage3D enables (ExecutorFeature);
- acceleration structures: platform/acceleration.rs and their plan_resources arms;
- kernel stage inputs: the stage-input fetch, stage_in_region and Fetch::of_stage_input;
- rate maps: rate_map_regions, rate_map_pass_census and the per-region draw (a draw now covers the
  whole target in one recording);
- dynamic vertex strides: VertexBuffer.dynamic, DynamicRecord::Strides and
  bind_vertex_buffers2.
runtime_texture was always true after the rows and the cube-array route, so it goes too, and
runs_through_runtime and runs_render_through_runtime take the mapped case alone.
ExecutedCensus.rate_map_pass stays (deny_unknown_fields keeps old rows parsing); every writer
sets None. Enables' Member.registry is now read by the tests alone, so it is cfg(test).

ENGINE_EXECUTOR_ABI goes to vulkan-engine-v204: every artifact digest drops the tables hash, and
the own context no longer enables the three sparse members. opened_chains.txt is re-blessed for
that: each committed profile's chain has 3 members fewer.

Tests removed with the code they held: a_kernel_calls_through_its_visible_function_table,
a_tables_words_are_its_size_and_the_handles_of_its_functions, the_cells_follow_the_reflected_master,
a_plane_must_be_a_master_member_of_its_size, cells_lay_planes_out_at_master_offsets,
the_cells_are_capped, a_guarded_texture_buffer_is_exactly_its_view,
a_texture_buffer_written_past_its_end_is_guarded, texel_buffers_read_one_view_and_write_the_other,
a_tile_map_emulation_maps_exactly_the_cases_texels,
the_new_list_enables_sparse_images_where_the_device_supports_them,
an_oracle_instance_mask_is_refused_typed, a_rate_mapped_pass_is_planned_region_by_region,
a_dynamic_vertex_layout_takes_the_bound_stride and the region and pass tests of
platform/render (now a_draw_covers_the_whole_target). The visible_table fixtures stay: the
runtime's and the conformance suite's tests use them.

No classification moves: executor_contract/out_of_bounds.rs and sparse.rs lose only functions
nothing called. The compile census's executor key moves with the ABI (bless on development).

Verified: gate m3-max-63421 (homelab-um870-1) at this tree before the bless: fmt, validation
clippy with all features, with --cfg m2v_gpu and with --cfg m2v_cpu_icd, Rustdoc, the ignored
bless_opened_chains (its file is the one committed here), and the validation suite, 1342 passed,
3 skipped. Earlier gates m3-max-63393 and m3-max-63412 listed the compile errors fixed here.
2026-11-21 06:12:04 -08:00
Anees Iqbal cf87db0fb7 Validation: a fragment case of no attachment draws through the runtime
What: runs_render_through_runtime no longer keeps a fragment case with no color target and no
depth/stencil attachment on the executor's own context. runtime_render draws it in the oracle's
pass of no attachment (metal::platform): renderTargetWidth and renderTargetHeight 1, and
defaultRasterSampleCount the case's raster samples. The runtime builds such a pass as one
dynamic rendering of no attachment, its area and samples from those three fields. The routing
function's stale comment ("the runtime makes no pass without one") goes, along with the matching
VALIDATION.md sentence. ENGINE_EXECUTOR_ABI goes to vulkan-engine-v203, because these cases'
recorded rows came from the own context.

Executor code removed: multisampled::attachmentless_support and its call in the own context's
Targets::make, the framebufferNoAttachmentsSampleCounts check of a multisampled pass without
attachments. Nothing else reaches it now. The translator already refuses such a pipeline itself
(pipeline/graphics.rs sample_count_properties: RasterSampleCount needs
FramebufferNoAttachmentsSampleCount(N)), and the own context compiles before it makes targets,
so a --profiles-layer run still refuses typed.

What moves: 16 committed cases.
- Public (15): coverage-loop-records-each-sample-at-2x and -at-4x,
  coverage-loop-sample-varying-at-2x, coverage-loop-union-of-runs-at-2x and -at-4x,
  fragment-device-and-constant-pointer-integer-differences, msl-4-1-fragment-seq-cst-atomics,
  coverage-and-pixel-center-read-by-each-run-at-4x, coverage-beside-a-sample-varying-at-2x and
  -at-4x, coverage-beside-the-pixel-center-ored-over-its-runs-at-4x,
  coverage-read-by-each-run-of-a-memory-writer-at-2x and -at-4x,
  coverage-read-by-each-sample-run-at-2x and -at-4x.
- Private (1): void-fragment-no-writes.
- The 17th attachment-less fragment case, gaussian-splat-blended-over-an-authored-imageblock,
  has an explicit imageblock and stays on the own context.

Verified on lavapipe (msi, no GPU), each case through corpus-vulkan against the committed
Apple M3 Max macOS 27.0.1 row, before at a8c2bfbfae (own context, m3-max-63297) and after at
48b14d9dc0 (this tree plus a runs-through-both-contexts edit of the engine_textures cube test that
the cube-array commit does not carry; m3-max-63285, m3-max-63306). Every run after logged through
the runtime path's own validation log; the before-run logged none. Every case gives the same
result on both paths.
- 7 match Metal: coverage-loop-union-of-runs-at-4x,
  fragment-device-and-constant-pointer-integer-differences, void-fragment-no-writes,
  msl-4-1-fragment-seq-cst-atomics, coverage-and-pixel-center-read-by-each-run-at-4x,
  coverage-beside-the-pixel-center-ored-over-its-runs-at-4x,
  coverage-read-by-each-run-of-a-memory-writer-at-4x.
- 3 differ from Metal with the same output digest on both paths (lavapipe's own 4x coverage):
  coverage-loop-records-each-sample-at-4x, coverage-beside-a-sample-varying-at-4x,
  coverage-read-by-each-sample-run-at-4x.
- 6 are refused not_supported{device_capability_missing:RasterSampleCount needs
  Property(FramebufferNoAttachmentsSampleCount(2))} on both paths. lavapipe rasterizes no 2-sample
  pass without attachments, a device gap: coverage-loop-records-each-sample-at-2x,
  coverage-loop-sample-varying-at-2x, coverage-loop-union-of-runs-at-2x,
  coverage-beside-a-sample-varying-at-2x, coverage-read-by-each-run-of-a-memory-writer-at-2x,
  coverage-read-by-each-sample-run-at-2x.

Tests: engine/tests.rs's a_plain_draw_and_only_one_runs_through_the_runtime routes a fragment
pass of no attachment at 1 and 4 samples, which it refused before. engine_render's new
a_fragment_pass_of_no_attachment_runs_each_sample_once draws the owned coverage_natural
nat_sample with no attachment at 1 and 4 samples: each sample runs once and reads its own
coverage bit on the own context, and through the runtime the words are equal (passed on lavapipe
in m3-max-63306).

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).

Landed after the nine refusal rows (v201) and the cube-array route (v202), so the bump is v203 here (v200 on the lane's branch).
2026-11-21 05:42:30 -08:00
Anees Iqbal cb6d9e8b1b Validation: a cube array texture runs through the runtime
What: engine::runtime_texture no longer keeps a cube array texture off the runtime, so a kernel
or render case binding one runs through metal2vulkan-runtime's public API like any other routed
case. runtime_textures already makes cube arrays as the oracle does: arrayLength counts cubes, and
each face slice is written with replaceRegion. A texture buffer still keeps its case on the
executor's own context. ENGINE_EXECUTOR_ABI goes to vulkan-engine-v202, because these cases'
recorded rows came from the own context.

Why: the runtime makes cube-array images and views (imageCubeArray is in its floor), so the
executor kept them on its own context only by its own choice.

What moves: 13 committed cases.
- Public (12): explicit-cube-gradient-combination-table,
  explicit-cube-gradient-component-combination-by-ratio,
  explicit-cube-gradient-component-combination-fine,
  explicit-cube-gradient-turning-points-and-threshold,
  explicit-cube-gradient-minification-threshold-per-face-and-axis,
  gradient-samples-and-comparisons-of-3d-cube-and-depth-textures,
  lod-queries-of-2d-array-3d-cube-and-depth-textures,
  anisotropic-cube-gradients-along-face-columns, anisotropic-cube-gradients-along-face-rows,
  sample-and-query-an-argument-buffer-cube-and-count-a-cube-array,
  depth-cube-and-cube-array-reads-at-32-and-16-bit-coordinates, cube-depth-and-comparison-gathers.
- Private (1): sample-the-second-probe-of-a-cube-array-whose-slices-disagree.
- The two other cases with a cube array also bind a texture buffer and stay on the own context:
  size-queries-of-multisampled-buffer-and-depth-cube-textures and its -at-four-samples.

The own context's cube-array code stays: the CubeArray arm beside Cube that makes an image
cube-compatible (plan_resources). A --profiles-layer run still reaches it, because a restricted
run keeps every case on the own context, and so do the two texture-buffer cases.

Verified on lavapipe (msi, no GPU), each case through corpus-vulkan against the committed
Apple M3 Max macOS 27.0.1 row, before at a8c2bfbfae (own context, m3-max-63297) and after at
7969eaeddd (this tree less the engine_textures revert noted below, m3-max-63281). Every run after
logged through the runtime path's own validation log (metal2vulkan-validation-runtime-PID.log);
the before-run logged none.
- 6 match Metal on both paths with the same output digest: the private case,
  explicit-cube-gradient-combination-table,
  gradient-samples-and-comparisons-of-3d-cube-and-depth-textures,
  lod-queries-of-2d-array-3d-cube-and-depth-textures, cube-depth-and-comparison-gathers,
  explicit-cube-gradient-minification-threshold-per-face-and-axis.
- 5 differ from Metal with the same output digest on both paths (lavapipe's own cube gradients):
  the explicit-cube-gradient component-combination-by-ratio, component-combination-fine and
  turning-points-and-threshold cases, and both anisotropic-cube-gradients cases.
- 2 matched Metal on the own context and are refused by the runtime's identity domains
  (Unsupported{IdentityDomains}, both forms in the runtime README's known gaps).
  sample-and-query-an-argument-buffer-cube-and-count-a-cube-array: "state of a bound texture or
  sampler beyond its resource ID (HeapNumericType ... Cube, arrayed)".
  depth-cube-and-cube-array-reads-at-32-and-16-bit-coordinates: "texture argument ... a type the
  identity arrays hold no element of, or state of the bound texture beyond its resource ID". They
  are runtime bugs, reported by name, and carry no refusal row.

Tests: engine/tests.rs's a_plain_kernel_case_and_only_one_runs_through_the_runtime routes a cube
array texture, which it refused before. engine_textures' cube test stays on the own context: its
texture_ops cube_faces kernel reads a plain cube by face, which the runtime's identity domains
refuse on slot 0 the same way (m3-max-63306). Plain cubes already ran through the runtime.

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).

Landed after the nine refusal rows (v201), so the bump is v202 here (v199 on the lane's branch).
2026-11-21 05:42:16 -08:00
Anees Iqbal d1266e5a5a Validation: nine families the runtime does not build are refusal rows naming their requirement
The family map's first commit (the planner's GO): every committed case either runs through the
runtime or is a refusal row naming its requirement. Nine families of the cases the executor still
ran on its own context have no runtime call, or a runtime refusal at creation on every device. Each
is now a ToolingRequirement of Limit::Runtime that stops only the engine's candidate and keeps its
cases Metal-qualified. Each is raised from the case's literals in executor_contract::case_requirements,
by the template of SeparateDepthStencil and RenderFunctionTable, so no census row carries one:
- kernel_function_table (303 cases): no setVisibleFunctionTable:atBufferIndex:; the make is
  Gap::KernelInput of Slot, held by rt's device test
  kernel_input::a_visible_function_table_kernel_is_refused_as_a_slot;
- kernel_imageblock (51, every tile-pass case among them): no setImageblockWidth:height:; the make
  is Gap::KernelInput of RuntimeFact ImageblockSize (rt's
  an_explicit_imageblock_kernel_is_refused_as_its_named_runtime_fact); no tile function is built;
- texture_buffer (28): new_texture refuses one (Gap::TextureBuffer), held both ways by
  engine_compute::a_texture_buffer_is_refused_where_a_2d_texture_is_made;
- fragment_imageblock (21): refused at creation on every device (Imageblocks, NotImplemented);
- sparse_texture (15): the texture descriptor has no sparse form;
- rasterization_rate_map (12: 8 render-pass maps, 4 kernel cases whose buffers hold map data):
  rt makes no rate map and its pass takes none;
- kernel_acceleration_structure (10): rt makes no acceleration structure and binds neither it nor
  an intersection-function table;
- kernel_stage_input (9): Gap::KernelInput of StageIn (rt's a_stage_in_kernel_is_refused_as_stage_in);
- dynamic_vertex_stride (1): setVertexBuffer:offset:attributeStride:atIndex: is not built.
The nine raise on 450 committed cases with no overlap. No case is deleted.
ToolingRequirement::qualifies_on_metal is now exactly Limit::Runtime (it listed the same eight).

The compile census (authored-compile.tsv) is due a bless here: every cell of the 450 cases moves to
its requirement. All read `compiled` today except 6 texture_buffer cases already
`ulong_texture_atomic` (now `ulong_texture_atomic,texture_buffer`) and 6 kernel_acceleration_structure
cells that read RayTracing device_capability_missing. 4 ICB cases replay a template of these
families, which compute_case/render_case now refuse before the replay check: their
`replayed_template_resources` becomes the template's family:
a-kernel-encodes-the-stage-in-regions-of-its-dispatches and
host-encoded-stage-in-regions-and-attribute-strides-of-executed-commands (kernel_stage_input),
a-kernel-encodes-the-imageblock-sizes-of-its-dispatches (kernel_imageblock),
host-encoded-vertex-attribute-strides-of-executed-draws (dynamic_vertex_stride).
The authoring-capabilities census is untouched: Limit::Runtime rows close without a candidate, and
executor_contract.rs is a classifier input, so cached triage recomputes.

Tests that mapped these families through the own context now meet the refusal. They are rewritten
to assert it: the requirement and case-literal tests, the_case_maps_onto_the_binder_or_names_the_gap,
references_link_and_function_tables_are_typed_gaps, the sparse and rate-map case tests, and the
public argument-buffer case, which now selects the cases with no requirement. Or they are removed
with the mapping they held: stage inputs, acceleration structures, the tile pass, fragment
imageblock cells, the public stage-input, ray, tile and fragment-imageblock cases, the kernel
table's integration case, and the dynamic-stride device test. The device-worker test's case is
now single-thread-store-constant: its acceleration-structure case is refused before the digest
check it holds. The own-context arms these families used are deleted in the next commit.

Owed answer: of the cases that route today, 0 render into one combined depth-stencil texture
using both aspects. The case files hold only Depth32Float textures, the 5 both-aspect attachments
carry separate_depth_stencil, and the route takes one aspect.

Verified: probe at a0f86a2efc, job m3-max-63255, listed the 16 tests the requirements failed. All
16 are fixed in m3-max-63274: fmt, validation clippy plain and --cfg m2v_cpu_icd, Rustdoc, and the
validation suite, 1352 passed. This commit is that tree on a8c2bfbfae.
2026-11-21 05:29:40 -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 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 b0e351ffbc Validation: multisampled passes and textures run through the runtime
Family H of the executor's move onto metal2vulkan-runtime: a render
case of more samples (raster_sample_count), and any case binding a
multisampled texture, now runs on the runtime's public API, filled and
read back as executor_contract::multisample states for both executors.

Metal uploads and copies no multisampled texture, and neither does the
runtime. So runtime_multisample fills each slice with one draw of the
owned sample_fill fixture (fixtures/public/engine/sample_fill.metal,
compiled by scripts/regen-air-fixtures), whose fragment runs once per
sample (sample_id) and writes that sample's texel from a buffer: a
color texel through an unsigned-integer view of its texel size (the
texture made with PixelFormatView usage), so its bits cross
unconverted, a Depth32Float one as depth(any) under an always-passing
depth test that writes (a depth outside [0, 1] refused as
depth_outside_unit_range, as runtime_depth refuses it). A multisampled
stencil aspect holds one value in every sample (uniform_stencil), which
the case's pass clears it to. After the draw a dispatch of the
fixture's sample_read kernels reads every sample, one threadgroup each,
as whole words in the attachment layout (unpack_words), unresolved,
as the oracle's sample_readback does.

runtime_textures makes a multisampled texture Private (Metal keeps none
Shared), for rendering and, if color, for views of another format, and
fills it by those draws. runtime_render makes each attachment of a
multisampled pass a Private Type2DMultisample texture of the pass's
samples, with a texture index for its read's view, and reads every
sample back for the comparison. engine::runtime_texture no longer keeps
a multisampled texture off the runtime, and
runs_render_through_runtime takes any sample count. An attachment of
both aspects still carries separate_depth_stencil.

What moves: of the committed cases, 49 multisampled passes (all
public; 2 with both aspects keep the requirement) and 8 cases with a
multisampled input texture (7 public kernel cases, 1 private fragment
case).

ENGINE_EXECUTOR_ABI to vulkan-engine-v197. The new owned fixture adds
rows to the golden tables, re-blessed on development.

Tests: engine/tests.rs routes a multisampled pass, multisampled depth
and stencil attachments and a kernel's multisampled texture through
the runtime; engine_render.rs's
each_sample_of_a_multisampled_target_holds_its_own_invocation draws
sample_rate_mask_in into 4 samples and checks each sample's index, on
Linux through the runtime too, bytes equal to the executor's own;
engine_textures.rs's depth_and_multisampled_textures_read_their_authored_texels
runs through the runtime on Linux. Built and run in the lane's compile
job (ids sent with the sha); not yet built when committed.
2026-11-20 21:59:48 -08:00