Commit Graph
1909 Commits
Author SHA1 Message Date
Anees Iqbal 6750bb3c74 validation: run plain kernel cases through the runtime's public API
The engine candidate's Vulkan executor runs a kernel case of buffers (device buffer arrays
included), threadgroup memory, function constants and linked functions, dispatched by threads
or threadgroups and observing a buffer, through metal2vulkan-runtime as a consumer runs it
(engine::runs_through_runtime decides it from the case's structure; platform::execute_runtime
runs it): Instance, the loader's first device of the kind, Device with the default options,
the library and function from the row's AIR with the case's constants and linked functions,
one compute pipeline state, one Shared buffer per binding as the oracle makes it (a bound
buffer padded to its declared size), one compute encoder, one dispatch, the bounded wait and
the readback. Only on the native backend, in the stated leg and without a profile restriction;
every other case keeps the executor's own context until its family's landing.

The device worker enables VK_LAYER_KHRONOS_validation for the run through the loader's and
the layer's variables (core and synchronization validation, every message, one log per
process); a device with no active validation tool fails the run, and so does any logged
message. The pipeline state's make is held to 500 MiB of peak live allocations
(worker::alloc::bounded: an allocation past it ends the process with exit 87 and a stderr
line) and 20 s; the driver's creation to the case's bound; every pipeline is made before the
submission (prepare_dispatch).

The row keeps what the runtime answers: the state's precision notes and the runtime
fingerprint (engine::runtime_fingerprint: the product, SEMANTICS_VERSION and the runtime
crate's sources, METAL2VULKAN_RUNTIME_CRATE_FINGERPRINT from build.rs). spv_sha256, the
status, the census module's subgroup shape, containment and artifact are absent (Option, serde
default); the index's staleness accepts the runtime fingerprint as this build's.

ReductionOrder: the comparison keeps the note's per-operation allowance. The census strategies
of a runtime row are the simdgroup float sums and products the case's AIR calls
(check::interface::float_reductions, from the entry's module and each linked module), under
the names the translator's strategy census gives them, so ComparisonClass::derive bounds the
same operations with the same reorder table as before; a note no such operation explains
(a simdgroup matrix's) stays unbounded, as before.

ENGINE_EXECUTOR_ABI v185: rows of these cases record another environment and census.
2026-11-20 13:39:18 -08:00
Anees Iqbal 88a5a8d641 matrix: the golden table and the runtime without the old-runtime wording
The golden hash table compiles through Device::from_queries (docs/
VALIDATION.md already says so), not Device::new, so the matrix's
comments and its problem message say that. The gate keeps its behaviour
under its own name: results.golden_table_moved (was old_path_moved),
GOLDEN_FIX (was OLD_PATH_FIX), and the leg's problem "GOLDEN TABLE
MOVED" (was "OLD PATH MOVED"), with VALIDATION.md's line and the test
following. The "new runtime" of results.py's and instructions.tsv's
comments is now the runtime.

Unchanged, because readers depend on them: the exemption phrase
"old-runtime regression fix" (matched in the subjects of commits since
the table's last bless), and the record keys harness-new/,
harness-new-warm/, harness-gpu-new/ and harness-alone/<row>/<pair>/new,
which the harness prints from its --runtime value and which the 60
stored notes under refs/notes/matrix hold: a base's records are compared
key by key, so renamed keys would compare nothing against every stored
base.
2026-11-20 13:10:00 -08:00
Anees Iqbal 7be3a0326b Restore ArgumentBufferLayout::from_descriptors: the consumer's newArgumentEncoderWithArguments: layout
The orphan pass (f5faf44098 and its WIP follow-ups) deleted
ArgumentBufferLayout::from_descriptors as unused in this workspace. It is the
published crate's answer for Metal's newArgumentEncoderWithArguments:, and the
consumer calls it for the guest's MTLArgumentDescriptors: its argument encoder
writes at those offsets. Function::argument_buffer_layout covers only
newArgumentEncoderWithBufferIndex:. A use outside this tree is still a use.

Restored as it was at f5faf44098^: the function, its two helpers (metal_align,
type_size_align), the module docs' descriptor rule, the bind root's line,
API.md's line, and its Metal-measured tests in src/tests/argument_buffers.rs
(the order given, arrays, MSL sizes, constant-block alignment, the refusals, an
index two descriptors claim). api_signatures.tsv regained its row.

from_buffer_binding (newArgumentEncoderWithBufferBinding:) stays deleted unless
the consumer's own compile shows a call.
2026-11-20 12:14:11 -08:00
Anees Iqbal 82abe62334 Fix forward: the API signature table and REFUSALS.md at the dead-variant batch's landing over the orphans
The dead-variant batch (cutxlate-dw) and the translator orphans (cutcheck) deleted items on both
sides: the orphans removed CompensatedViewport, is_permanent_for and the ViewportCompensation
path; the batch removed the offset-0 class (ZERO_OFFSET_CLASS, ZERO_OFFSET_TOLD,
storage_view_buffers), Needs::DriverDefect and the dead DriverWorkaround variants. The landing's
rebase kept both deletions, so the generated tables are regenerated from the merged sources:
scripts/api-signatures/signatures.py --bless and scripts/refusal-surface/refusal_surface.py.

Verified: both scripts ran on the merged tree; the table holds no ZERO_OFFSET row.
2026-11-20 11:59:14 -08:00
Anees Iqbal 8252854871 SEMANTICS 2208 for the dead driver variants; the runtime pin, REFUSALS.md and api_signatures follow
SEMANTICS_VERSION 2208: the batch changes what a module holds on devices that took the deleted
variants (the clipping notes and the denormals note on every device, one serializer form, a
constant slot's storage view, the half rounding bound) and no longer defers discards or guards
helper branches anywhere.

runtime-sources.sha256 moves without a RUNTIME_VERSION bump: the binder's edits in the batch drop
forms no plan reaches (the uniform texel view's class, the offset-0 class no consumer set, the
mesh limit's always-zero staged bytes), so it binds every plan it can be handed as before.

REFUSALS.md and api_signatures.tsv are regenerated (signatures.py --bless, refusal_surface.py).

Verified: nothing yet; the gate follows.
2026-11-20 11:58:40 -08:00
Anees Iqbal 201fcfe1f0 The offset-0 class goes: no storage view declares RangeAtBindOffset since its workaround went
PushReadsLengthenThreadPayload was the only reason a storage view declared
SpecKey::RangeAtBindOffset, and lower::access now declares it for a uniform view alone. What told
offset 0 apart for such a view had no reader left: StageTable::zero_offset_views,
bind::ZERO_OFFSET_CLASS and ZERO_OFFSET_TOLD, PipelineInterface::storage_view_buffers, and the
storage arms of range_at_bind_offset. No crate of ours or the consumer's names them (the runtime
never set zero_offset_views). They go, with the test of the storage form, the offset class test's
offset-0 half, the validation executor's line that set every slot's bit, and the API guide's
paragraph. range_at_bind_offset answers false for a storage view: it reads at its residual.

Verified: nothing yet; the gate follows.
2026-11-20 11:58:28 -08:00
Anees Iqbal 3656f31676 DriverWorkaround keeps the two answers every device takes; the driver-defect refusal goes
DriverWorkaround held 26 variants; Device::from_queries takes only ClippedCoverageNotMetals and
TessellatorNotMetals, on every device, and the batch's earlier commits removed every reader of
the other 24. They go, and the enum's docs now say what it is: a device answer that no Vulkan
query tells apart, noted on every device.

Needs::DriverDefect and Unsupported::driver_defect named a DriverWorkaround measured on a
driver's identity. No site constructs it any more; they go, with their arms in the permanence
match, the validation engine's outcome map and its key test, the conformance verdict's device
gap, the error tests and the refusal surface script.

Docs that named deleted variants are rewritten to what the code does now: the f32 denormals in
an entry that declares the 16-bit float controls are the device's own on every device; the stage
bound is the one bound a kernel's plan is held under; the uniform view is a Uniform block (the
texel form went with ExternalUniformReadsSkipACache); the Intel venues' note no longer claims the
RPL-P's profile takes a workaround.

Verified: nothing yet; the gate follows.
2026-11-20 11:57:41 -08:00
Anees Iqbal fda94462c8 Fragment, mesh, memory: the dead driver variants' readers go
Since the fact tables went, Device::from_queries gives every device the same two workarounds
(ClippedCoverageNotMetals, TessellatorNotMetals), so every reader of another variant tested a
fact no profile carries. Deleted with their now unreachable forms, each changing what no device
emits:

- EarlyTestsDropMultisampledImageWrites (MoltenVK on Apple's GPU): the framebuffer fetch's
  per-sample refusal and its 'dropped' arm (fetch.rs), the imageblock's late-tests form and its
  two refusals (imageblock.rs, ImageblockPlan::late_tests), the input shadow's arm. The device
  test every_device_keeps_an_early_tests_fragments_texture_writes_at_four_samples (runtime,
  lost_writes) holds the defect's shape on every device.
- MemoryWritingFragmentsRunPerSample (MoltenVK): CoverageLoop::DriverRunsPerSample, the coverage
  plan's driver_runs and writes, its refusal, link's sample-shading exception, the codec tag and
  engine_coverage_loop's per_sample_defect. Held by
  every_device_runs_a_memory_writing_fragment_once_per_covered_sample.
- BothBarycentricFormsRejected: the stage interface's refusal of a second barycentric form.
- MeshIndexComponentStoresMisplaced (lavapipe before Mesa 26.2, below the floor): the staged
  index words, their declaration, stores, write-back and workgroup bytes
  (stage_workgroup_limit's staged argument).
- BufferAtomicsUncontained (SwiftShader, below the floor): contain::atomic_encoding and
  DeviceProfile::checks_atomics_in_shader, which validation's out-of-bounds contract read; an
  atomic is contained as every other access is.
- DiscardDropsSimdgroupStores (MoltenVK on Apple's GPU, SPIRV-Cross's optnone helpers): the
  deferred discards (discard.rs late_discards, Reach::FLOAT, the census name
  fragment.discard.deferred), spirv::helper_branches whole (its guard, fences and census
  entries), and the notes DiscardDropsSimdgroupStores and HelperBranchDropsSimdgroupStores with
  their codec tags, conformance degradations, validation allowances, API.md entries and the
  engine_fragment test of the uniform branch. The rch_helper_* fixtures stay, compiled as written
  everywhere, their README rows saying so. Held by
  every_device_keeps_the_texture_writes_beside_a_discard_after_a_texture_sample.

The three runtime device tests are in tests::lost_writes, passing on lavapipe (m3-max-59701).
2026-11-20 11:57:12 -08:00
Anees Iqbal 912bf785ce Simdgroups: the vertex grouping note goes, with its fact's reader
The planner's ruling: no VertexSimdgroupGrouping. lower/simd recorded it for a vertex function's
simdgroup or quad operation where the stage takes no required subgroup size and the profile
carried DriverWorkaround::VertexGroupingNotApples (ANV's 8-vertex interleaved subgroups); no
profile carries that variant since the fact tables went, so it was recorded nowhere. The note,
its reader (regroups_vertices), its codec tag, its conformance degradation and code, its
validation allowance, deferral and bound text, API.md's catalogue entry and the engine_simd and
c3 tests that named it go.

The public surface moves with this commit and the batch's earlier ones: the api_signatures table
(regenerated by signatures.py) drops PrecisionNote::VertexSimdgroupGrouping (the translator's
and the runtime's re-export), Feature::PixelCoverage and Feature::CentroidVarying (link's split
refusal), and DescriptorView::UniformTexel (the views' rung 1); REFUSALS.md (regenerated) drops
the two features, and the reach table their rows.
2026-11-20 11:56:55 -08:00
Anees Iqbal 5f425db68f Half rounding: no form keyed on a folded conversion pair; the note's bound is the floor's worst
quantize_form took the controlled conversion pair (QuantizeForm::Controlled) under the 16-bit
float controls except on a profile carrying DriverWorkaround::HalfConversionPairFolded (NVIDIA's
driver folds the pair even under the controls), which took QuantizeForm::Converted. No profile
carries that variant since the fact tables went, so every device with the controls already takes
the pair, and the planner's ruling is rung 4 with no quantize form for it: the pair stays the
one form, and PrecisionNote::NativeHalfConversion, recorded on every device that rounds through
it, states the worst a floor device does, which its doc already lists: no rounding at all (the
RTX 3090's drop of the pair, lavapipe's), its differences compounding and a value past the half's
range staying finite until a half store narrows it. Validation's allowance for the note is
Unbounded and the conformance suite loosens no value by it (NATIVE_NOTES declares the notice
alone), so both already follow that bound.

The readers' docs (narrow.rs, compile.rs, half_hold.rs, arith/mod.rs, blend.rs, artifact.rs,
API.md, HOWTO.md, engine_native_half's expected form) drop the two variants' names
(HalfConversionPairFolded, and HalfConversionFusedWithArithmetic, docs only) and say what the
drivers do in plain words. No module changes on any from_queries device.
2026-11-20 11:56:39 -08:00
Anees Iqbal daa7287637 Fragment: the clipping notes on every device; link's split-pixel refusal goes
QuadsSplitByClipping is recorded on every device, by the function's structure alone: a fragment
function that runs a quad or simdgroup operation over its active lanes (counts_active_lanes)
records it, with no fact test. A device may shade a triangle it clips as several triangles, and no
Vulkan query tells such a device apart; the note's doc and API.md's catalogue say so and link no
workaround.

Link's split_pixel_fragments refused, in a pipeline of more than one sample, a pixel-rate
fragment function that reads [[sample_mask]] (Unsupported{PixelCoverage}) or a centroid varying
(Unsupported{CentroidVarying}) where the profile carried
DriverWorkaround::ClippedTrianglesSplitPixelFragments. Since the fact tables went, no profile
carries that variant (Device::from_queries gives only ClippedCoverageNotMetals and
TessellatorNotMetals), so the refusal never fired: deleting it changes what no device emits. The
function, its module doc and the two Feature variants only it named go.

ClippedCoverageSplit now also covers the centroid arm: a fragment function compiled for a
multisampled pipeline that reads a centroid float varying and runs once per pixel (no sample
index, sample-qualified varying or memory write) records it where ClippedCoverageNotMetals holds
(every from_queries device): its centroid is the whole coverage's where Metal's may be a piece's.
One that runs per sample reads the varying at its own sample, which no split moves.

Tests:
- engine_fragment's a_fragment_group_operation_records_the_clipping_split_on_every_device: on
  every committed from_queries profile, fragment_discard_msl22's discard_simd (simd_sum) records
  QuadsSplitByClipping and discard_terminate does not.
- engine_coverage_loop's a_multisampled_centroid_reader_at_the_pixel_announces_the_split:
  air_2_1_front_end's a21_blit_fs (a centroid uv) records ClippedCoverageSplit at 4 samples and
  not at 1; multisample_centroid_at_sample (per sample) records nothing at 4.
Validation's c3 and two conformance comments say the note is on every device.
2026-11-20 11:56:15 -08:00
Anees Iqbal 4bc57a20e3 WIP orphans: ResidentPart, the harness's simdgroups assert, and the docs that named deleted items 2026-11-20 11:54:24 -08:00
Anees Iqbal 92ce7950fc Docs: "the runtime", not "the new runtime"
There is one runtime, so the prose of the harness, validation, devtools,
the translator's lockstep module, .config/nextest.toml and the refusal
surface and conformance coverage generators says "the runtime"
(scratch newrt.py: a word replacement, identifiers such as new_runtime
and NewRuntime untouched). docs/REFUSALS.md and
docs/CONFORMANCE-COVERAGE.md are regenerated from the edited scripts.

Four harness passages said the runtime makes no heap and no texture
over a buffer, and has no Managed mode. The runtime has all three
(Device::new_heap_buffer and heap textures, Buffer::new_texture,
Device::new_managed_buffer); the harness's own backend refuses the two
texture sources. They now say the harness makes neither on the runtime,
and the Managed note names Device::new_managed_buffer. The refusal
strings keep the words the harness's described test matches ("makes no
heap", "makes no texture over a buffer").

Left: three fixture comments (.metal under validation's public
fixtures, whose text keys the golden tables and the committed AIR) and
scripts/matrix, whose keys (harness-new) carry the same naming.

Verified locally: the refusal surface, Metal coverage, conformance
coverage and API signature checks pass.
2026-11-20 11:52:56 -08:00
Anees Iqbal 233fae4b20 Docs: the translator's Device comes from Device::from_queries
The translator's Device has one constructor, Device::from_queries; the
Device::new its docs named is gone. Each mention in the translator's
comments and in docs/VALIDATION.md now names from_queries.

Three passages contrasted the two constructors over a `half` color
output: under Device::new a device enabling storageInputOutput16
received it as a 16-bit `half` (StageIo::half_outputs). The stage plan
declares no output 16-bit (lower/stage_io/plan.rs: `let half = false`),
so every device receives the output widened to `float`, as docs/API.md
section 9 already says. The stage_io docs and the two blend precision
notes in pipeline/artifact.rs say so, and the M3 Max measurements of the
16-bit form, which no device now takes, are gone from those notes.

VALIDATION.md's golden-table paragraph named the old runtime's path; it
now says the table compiles through Device::from_queries.

Comments and docs only; rewrapped paragraphs move only line breaks.
2026-11-20 11:52:56 -08:00
Anees Iqbal 089072932f Re-derive docs/CONFORMANCE-COVERAGE.md: mesh_commands loosens nothing
The conformance coverage check of 8977049e3f (job m3-max-59750) found the
generated document stale: mesh_commands no longer loosens its unordered
attachment, so the counts of modules and tolerances fall by one and the
module's row reads "every field". Regenerated with
scripts/conformance-coverage/coverage.py; nothing else moved.
2026-11-20 11:52:56 -08:00
Anees Iqbal 7f8320758e rt README: a pointer the guest supplies is used as given, a known gap
A known gap beside the no-isolation and device-loss entries: a pointer
loaded from memory or made from an integer, null included, is a device
address used as given, with no binding bounding its accesses. One that
names no live buffer is undefined in Metal; here it reads or writes what
the device holds there, or faults, and a fault ends as the device ends
it, up to a device loss every guest process shares. What is bounded is a
buffer argument's access at a run-time offset (a load outside reads
zero, a store does nothing); a constant-offset access is not checked.

docs/API.md's identity-domain paragraph says the same of such a pointer,
so the default policy's "containment and isolation on" is not read as
holding under the runtime's domains.

Checked against the code: the runtime takes PointerDomain::Identity
(runtime device.rs translator()) with the default Contained containment
and isolation On; under identity a loaded pointer's accesses carry no
bounds (lower/access/mod.rs psb_contained, false under identity;
dynamic.rs base_with and wide_at, where only bounds select a sink) and
count no miss (dynamic.rs plan_misses); a slot access at a non-constant
offset is checked (mod.rs note_variable, identity_contained) and one at
a constant offset is not; outside, a load reads ZeroAddress and a store
or atomic runs nothing (emit.rs prepare).

Docs only.
2026-11-20 11:52:56 -08:00
Anees Iqbal 2e72020cb7 conformance: name the accepted differences section 10 now holds
The section 10 rewrite deleted three entries the conformance suite reads
at test time. Each comes back in what the runtime does now, and the cases
name them:

- "A barrier over the render targets orders what it names, as a Mac2
  GPU's does" keeps its lead-in (pass_start_reads' MAC2_BARRIER), split
  back out of the merged attachment-read bullet.
- "A draw that reads its own pass's color attachment with no barrier
  reads, at the pass's first such draw, what the load and the draws
  before it rendered" is the no-barrier entry; DRAWN_WITHOUT_BARRIER
  names its slug, and the module docs cite the runtime's README instead
  of the deleted fence.rs, snapshot and attached-read copy paths.
- "The runtime answers as a Mac that keeps no texture compressed"
  replaces the device-class entry; replay's WITHOUT_COMPRESSION names it,
  and the docs of it, Allowance and Venue::lossless_compression drop the
  deleted DeviceProperties::lossless_compression and WorkCounts names.

mesh_commands loosened its unordered-draws attachment by an entry for
the runtime's mesh emulation, which is gone: the runtime builds no mesh
pipeline (its README, known gaps of render pipeline states). The case
now loosens nothing, and its docs say so. The two document-reading tests
take kept entries: one lead-in that wraps and a one-line control.

Verified: a scratch check of every slug the conformance sources name
against section 10 finds only case and site names. The gate runs on the
range.
2026-11-20 11:52:56 -08:00
Anees Iqbal d678983c47 API.md section 10: the accepted differences the runtime has
Section 10 was mostly the deleted runtime's accepted differences. Each bullet was checked
against the code: 111 of its 150 blocks go, 2 are rewritten, and the rest are kept with their
stale names fixed.

Gone, because the runtime has no such feature or now refuses what the bullet described: indexed
draws past their buffer (refused), mesh and object grids, the pipeline pool and general forms,
binary archives and dynamic libraries, the old resource ID allocator and its placements and
counts, indirect command buffers, blit copies across formats and short rows (refused), commits as
failed, GPU hang and fault codes, the Mac class a device presented, Metal's own heap answer and
the old heap rules, sparse and tiled textures, texels past a buffer (refused), textures over
IOSurface planes of other shapes, the row-padding device check, the imageblock length, mesh
pipelines, process exit with a live device (supported on no device), and the converted formats
the runtime does not make (two-plane YCbCr, padded 10-bit, copies-only).

Rewritten: a nil, stale or forged resource ID reads the null element (zeros, the default
sampler); a draw that reads its own pass's attachment reads what the runtime ordered before it,
with the Macs' disagreeing answers kept (two bullets became one). Fixed in kept bullets: the
runtime does not refuse an unspecialized function's state (it makes it); the required
threadgroup size bullet loses tile states and a deleted refusal; the Managed copies follow the
device-copy rule; README section names and "new runtime" wording.

The translator-side bullets (function constants, linked functions, conversions, inline assembly,
kernels) are kept, each checked in the code it describes. Notes with file:line kept outside the
tree.
2026-11-20 11:52:56 -08:00
Anees Iqbal 8f96185b17 API.md section 9: each note as every device now records it
Every device profile comes from Device::from_queries (DeviceProfile::of is crate-private), which
takes no measured driver deviation, no measured Metal property and only two workarounds,
ClippedCoverageNotMetals and TessellatorNotMetals, on every device. Section 9 still described the
measured routes: "not on a driver whose ... (DriverFact::...)", "but on a profile that takes
DriverDeviation::...", "**Exempt:** ...", and MoltenVK's own sampler, functions and NaNs.

- DriverFact, MacClass, HalfChainPolicy, YCbCrInPlacePolicy and WorkCounts mentions go: none
  exists.
- A note whose only exception was a measured deviation is now stated as recorded on every device:
  the resolve, snorm and shared-exponent tile stores, depth denormals, device transcendentals and
  denormals, interpolation, fragment simdgroups, alpha coverage, looped sample outputs, device
  sampling, texel and vertex conversion, the native maths notes, half and NaN conversion, pack
  conversion, colour conversion, sRGB decode, cube gradients and half texels.
- A note whose condition is only a workaround, deviation or property no profile takes now says
  it is recorded by no device: QuadsSplitByClipping, VertexSimdgroupGrouping, ComputedSampleDepth
  (the multisampled in-shader depth test is not implemented there),
  DiscardDropsSimdgroupStores, HelperBranchDropsSimdgroupStores, NotMipmappedAnisotropicFilter.
- CappedLodBias names SamplerUse::lod_bias, which a consumer sets; the runtime sets it nowhere.
- Measured device bounds and behaviour (MoltenVK, RADV, ANV, NVIDIA, lavapipe figures) stay.

Each gate checked in the code it names; notes with file:line kept outside the tree. Edited
bullets rewrapped to 100 columns. No test reads docs/API.md. Verified by: git grep of every
backticked Rust path left in section 9 against the code (only Metal's own names remain unmatched).
2026-11-20 11:52:56 -08:00
Anees Iqbal 66e8f70882 replay player: the m2v.privateBytes snapshot path goes; the unsnapshotted count stays
What, deleted:
- Backend::snapshots, and its answers on the runtime backend (false) and the tests' mock;
- Player::without_snapshots and the player's snapshots flag, and command-replay's
  --snapshots yes|no option; the device line is now `device NAME runtime rt`;
- the split around a named dispatch (split, blit_between, the player's own objects and the
  open-encoder tracking it needed), the snapshot compare, Snapshot, Around and sized;
- Report's private, splits and split_executed, with the `private ...` and `split N executed`
  lines, and PrivateBytes with its re-export; the covered and receivers lines lose their
  always-zero snapshot range counts;
- Covers::meets, which only the split used.

Kept: the records are still read ahead, with the same check of their form and that each names
an earlier call. Each dispatch they name plays as the program made it and counts on the
`unsnapshotted` line.

Tests: the split test goes. The two no-snapshot tests become one that checks the named
dispatch plays as recorded and is counted, and one that checks a record naming no earlier call
stops the play. The covered and receivers tests take the new line text.

Docs: REPLAY-STREAM.md drops the option, the snapshot wording, the `private` line and the bytes
before as a write path, and says what the player does with the records now.

Why: the runtime backend is the only one left, and it answered snapshots() false, so on every
play the split, the compare and their report fields could not be reached. Only the mock reached
them.

How verified: the lane's compile gate with the validation suite on lavapipe.
2026-11-20 11:18:04 -08:00
Anees Iqbal c48ad2340c rt: a copy within one subresource of one image: regions apart in GENERAL, the same region none
A guest's Mac walk (58383, then m3-max-59593) met Gap::TextureCopy 1,904 times, two RGBA8Unorm
256x256 2D textures, 29x1x1 texels at level 0 and slice 0. On KosmicKrisp every RGBA8Unorm
texture is R8G8B8A8_UNORM (its optimal tiling has every feature form() asks), so the format
condition cannot fire there; the one left is one subresource of one image: a texture view shares
its parent's image and id, so a copy between a texture and its view, or two views of one
texture, at one level and slice was refused, as a texture into itself was.

- blit: within one level and slice of one image, regions apart copy with one vkCmdCopyImage, the
  subresource in GENERAL (VUID-vkCmdCopyImage-srcImage-09460, -pRegions-00124): one barrier
  moves it there and one home, three barriers as any copy. The same region copies nothing and
  records no command, every texel already its own. Overlapping regions, which Metal leaves
  undefined (Apple's copy(from:sourceSlice:...) page: "Copying data to overlapping regions
  within the same texture may result in unexpected behavior."), stay Gap::TextureCopy.
- texture: a copy's barrier home from GENERAL makes its writes available.
- Gap::TextureCopy's doc and basis, docs/REFUSALS.md, the runtime README and the
  copy_from_texture doc say so.
- tests (blit): the rules (two slices, regions apart along each axis, the same region, three
  overlaps); on every device, a texture's region into another of its level and slice, from its
  view and from itself, lands exactly, everything around kept, one submission and three
  barriers; the same region records nothing and keeps every byte; overlapping regions are the
  gap.
2026-11-20 11:13:47 -08:00
Anees Iqbal 52f8ecc80d Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.

Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
2026-11-20 11:13:03 -08:00
Anees Iqbal e15d067fe0 rt: a texture view the image's own Vulkan format holds is made without PixelFormatView usage
A guest's Mac walk (58383) met Refusal::TextureViewFormat once: an A8Unorm view of an R8Unorm
texture made without PixelFormatView usage. Metal's validation layer stops such a view ("texture
usage (0x01) doesn't specify MTLTextureUsagePixelFormatView (0x10)"), and plain Metal makes it,
a blit out of it reading the texture's bytes (probe texture_view_rules.m, an Apple M3 Max under
macOS 27.0.1, jobs m3-max-43677 and m3-max-59523: R32Uint, RGBA8Uint, BGRA8Unorm and
BGRA8Unorm_sRGB of RGBA8Unorm; A8Unorm, R8Snorm and R8Uint of R8Unorm; R16Unorm of RG8Unorm).

- texture: without PixelFormatView usage, a view of a format Metal views the texture as with
  that usage (views_with_usage) is made where the view's Vulkan format is the image's own and only
  its component mapping differs, as plain Metal makes it: A8Unorm over R8Unorm is R8_UNORM with
  red read as alpha on every device (rt never exposes A8_UNORM). A view that needs another Vulkan
  format stays Refusal::TextureViewFormat: making every image mutable for it would cost every
  texture (rule 3).
- error: TextureViewFormat's doc and basis say so, with the probe's pairs; docs/REFUSALS.md
  regenerated. The runtime README records the divergence from Metal's validation in one sentence,
  of the form of the scissor and tessellation-factor-offset precedents.
- tests (view): on every device, an A8Unorm view of an R8Unorm texture of ShaderRead usage
  alone is made, and a draw sampling it (sampled_fragment into RGBA8Unorm) reads each texel's red
  byte as alpha, (0, 0, 0, r), exactly; an R8Uint view of it, another Vulkan format, is still
  refused, as is the R32Uint view of RGBA8Unorm without the flag. draw's CONSTEXPR is shared.
2026-11-20 11:12:35 -08:00
Anees Iqbal 4f4c67b0af conformance: the rt ledger's point-viewport-coverage rows; a point's clipping is the device's own
With draws of points built (12c621779d), the case's 295 rows refused as "a draw with Points is
not built" no longer hold. The conformance replay on lavapipe (job m3-max-59624, um870, LLVM
23.1.4) reads 249 of them as Metal's and 46 as different:

- 44 rows (viewports 0, 2 and 3 along x, 4 and 5 along y, offsets 0.5 to 1.5): Metal covers one
  pixel whose centre lies on or past the viewport's edge, lavapipe covers none;
- 2 rows (viewport 0 at x -1.5000001, viewport 2 at x +1.5000001): Metal culls the point, its
  centre past 1.5 w; lavapipe culls no point at the clip volume and covers the pixel.

Metal states no clipping rule for a point (MTLPrimitiveType.point; the MSL specification's
[[point_size]]), so per rule 1 the guard band and the edge coverage Metal shows are not
emulated: a point near the viewport's edge or the clip volume is clipped or culled by the
device's own rule (pointClippingBehavior and the driver's handling of the viewport). That is an
accepted difference, in docs/API.md section 10 and the runtime README's point paragraph, and the
46 rows carry it, on llvmpipe. Other venues' rows come from the matrix.

Verified: the replay's own printed rows (conf.out of m3-max-59624) are the rows written, venue
narrowed to llvmpipe; the ledger drops 295 and adds 46.
2026-11-20 11:12:35 -08:00
Anees Iqbal b975f6ddf7 rt: draws of points, through a point-class pipeline, with largePoints on the floor
A draw of points was Gap::Draw (DrawKind::Points) on every device; a guest's Mac walk met it
324 times. It now draws.

- render: a content keeps a point-class VkPipeline beside its line-class one, made with the
  state where the descriptor names the point class (inputPrimitiveTopology), else at the first
  draw of points, a first-use wait (Metrics::first_use_point_waits, FirstUse::Points). The
  vertex module writes PointSize (the function's [[point_size]], at most Metal's 511, or 1.0).
- render_encoder: Metal rasterizes a point of a function without [[point_size]] only under the
  point class; under another it rasterizes nothing and runs the vertex function, so such a draw
  records an empty scissor and the next draw the encoder's again. Points take no depth bias, as
  lines do not.
- floor: largePoints is required, so a written size draws (without it a device draws only 1.0).
  rt's floor is Vulkan 1.3; Vulkan 1.4 lists largePoints among the features it requires
  (vkspec 1.4.366, 55.1 Feature Requirements) and the committed roadmap-2022 profile holds it.
  Every card we run reports it, from vulkaninfo today (device, job, pointSizeRange):
  KosmicKrisp 26.3.1 on the M3 Max m3-max-59492 [1, 511]; RX 550 RADV POLARIS12 59525 [0, 8191.88];
  780M RADV PHOENIX 59525, 59527, 59528 [0, 8191.88]; RX 7900 XTX RADV NAVI31 59527 [0, 8191.88];
  RTX 2080 NVIDIA 620.70.06 59527 [1, 2047.94]; RTX 3090 NVIDIA 620.70.06 59528, 59526
  [1, 2047.94]; Iris Xe RPL-P ANV 59526 [0.125, 255.875]; RTX 5080 Laptop NVIDIA 615.71.09 59529
  [1, 2047.94]; UHD 630 Intel's Windows driver 59532 [0.125, 255.875]; lavapipe 59525..59529
  [0, 256]. The README's floor list says so.
- DrawKind::Points is deleted; docs/REFUSALS.md and the API signature table regenerated.
- tests: on every device, points of [[point_size]] 4 cover their 4 by 4 pixels, the point
  pipeline made once at the first draw of points; a point-class state makes it with the state
  and draws a function without a size 1 pixel wide; under no class such points rasterize
  nothing and a triangle after them draws; a vertex function that stores runs for a draw of
  points as for triangles; floor: largePoints missing is named. The replay player's draw of
  points plays.
2026-11-20 11:12:35 -08:00
Anees Iqbal c120b74608 replay player: a noted buffer's address in written bytes moves with the buffer
What: once the stream notes a buffer escaped (m2v.bufferEscaped), the player no longer stops at a
written word whose value lies in that buffer's recorded range (PlayError::NotedWord, now deleted).
It moves the word with AddressMap::move_noted to AddressMap::relocated(value), the address the play
gave the innermost live range the value lies in plus the same offset, the same move an address
argument gets. This happens after the census counts and before the bytes reach the backend, on
all five write paths:
- set*Bytes data;
- a copied buffer's contents;
- m2v.write;
- the m2v.copyFromGuestRam pieces;
- the m2v.privateBytes bytes before a dispatch.
A new stream count, noted_words, counts the words moved. The census counts are still taken from
the bytes as the stream holds them.

Why: the runtime backend makes objects where it has room, so a pointer the program wrote into
memory held the recorded address and pointed at nothing in the play. The stop ended every replay
of a stream whose buffers escape (one of reims's plays stopped at frame 216). Every live range has
the address the backend made its object at; a make without one already stops at the make. So
every noted word can be placed, and the stop has no case left. A pointer into memory no live
range holds cannot be told from data and plays as recorded, as before. This runs on every
backend and device; nothing is keyed by identity.

Docs: REPLAY-STREAM.md section 5 (written words and the escape note) and section 10 (the stream
counts and the addresses line), VALIDATION.md, and command-replay's addresses line, which gains
noted_words.

Tests:
- Unit (mock backend), a_word_into_a_buffer_noted_escaped_moves_with_it. After the note, a word
  in an m2v.write and a word in setBytes data each move to the mock's base plus their offset,
  and are counted as noted. The same word written before the note, and a word into a buffer with
  no note, play as written.
- lavapipe, a_noted_buffer_s_address_in_written_bytes_moves_and_a_kernel_follows_it. A block at a
  recorded address holds a data buffer noted escaped (kind 0) and a buffer whose written word is
  the data buffer's recorded address plus 16. The fixture kernel ab_address (out[i] = held.p[i])
  follows the moved word, and out holds the data words from the fifth on, exactly.
- Negative: the two tests on development's tip without the move. The play stops with NotedWord.

How verified: the lane's compile gate with the validation suite on lavapipe, and the negative job.
2026-11-20 10:50:42 -08:00
Anees Iqbal be2c5d567e Fragment: the multisampled in-shader depth test is one typed gap on every device, Feature::MultisampledShaderDepthTest
The planner's ruling. A fragment function that runs its draw's depth test itself at more than one
sample, without returning its depth, needs each sample's depth. The two forms that gave it were
keyed on measured facts (VkProperty::SampleFragCoordDepth on RADV, CenterFragCoordDepth on
MoltenVK) that no query produces, so development already refused it on every device, as
Unsupported(FramebufferFetch, NotImplemented) at the depth attachment, which a play cannot count
apart from framebuffer fetch's own refusals. It is now its own kind.

- error/mod.rs: Feature::MultisampledShaderDepthTest.
- lower/fragment/depth_test.rs: depth_test_form refuses with it; the module docs say why.
- docs/REFUSALS.md regenerated with its reach row (--check passes); api_signatures.tsv blessed
  (it also takes the extrapolation commit's removal of DriverWorkaround::PerspectiveReadsExtrapolated).
- Tests: engine_fragment's per-sample depth and stencil-before-depth refusals, and
  engine_fragment_imageblock's multisampled tested write, assert the new kind at the depth
  attachment.

The forms keyed on the two never-produced properties, and the window-depth varying that feeds the
computed one, go with the other never-produced vocabulary.
2026-11-20 10:36:12 -08:00
Anees Iqbal b86c98460a Precision note: a perspective read at a sample or an offset records ExtrapolatedInterpolation on every device
The planner's ruling (the note YES). The note was recorded only on a driver with
DriverWorkaround::PerspectiveReadsExtrapolated, which nothing sets since the driver-fact tables
went: RADV answers such a read with the pixel center's value extrapolated along the quad's coarse
derivatives, and no device query says which devices do, so every module that reads a perspective
input at a sample or an offset (an interpolant's interpolate_at_sample or interpolate_at_offset,
or a coverage loop's sample-qualified varying) records it, on every device.

- lower/stage_io/plan.rs: note_extrapolated_read records the note unconditionally.
- device/profile.rs: DriverWorkaround::PerspectiveReadsExtrapolated deleted (nothing reads it).
- Docs: PrecisionNote::ExtrapolatedInterpolation, API.md's catalogue entry, the interpolate and
  coverage module docs.
- Tests: engine_pull_model, every function that reads its perspective interpolant at a sample or
  an offset records the note on every committed profile and no other does; engine_coverage_loop,
  every looping function's module records it.

SEMANTICS_VERSION is bumped once at the end of this follow-up batch; the runtime sources' pin
follows device/profile.rs in the commit after.
2026-11-20 10:35:57 -08:00
Anees Iqbal 56d93ffbc7 Validation: a texture buffer an argument buffer holds stops only the candidate (texture_buffer_member)
The authoring-capability census counted six rows under texture_buffer_literal, a requirement in
the authoring set, so it stopped the Metal oracle as well as the candidate. The schema does
express these texture buffers: an argument-buffer texture or a texture-array element takes
`texture_type: buffer`, and the oracle makes one through make_texture (a
MTLTextureTypeTextureBuffer view of its bytes) and binds it with setTexture:atIndex:. The oracle
stop was stale tooling.

The candidate's stop is the product's limit. The binder's planned heap makes no texture buffer a
member, so a handle naming one misses, and the runtime makes no texture buffer at all
(Gap::TextureBuffer).

What changes:
- The requirement is renamed texture_buffer_member and stops engine_candidate only.
- It qualifies on Metal, as mesh_render_pipeline does: the checker admits its cases with Metal
  alone, and the candidate refuses them, typed.
- The analyzer version is now structural-triage-v84, because classification output changes.
- The runtime's TextureBuffer basis, and the README's mesh known gap, now say that no replay stream
  or live session has used either, and that harvested guest functions declare them. REFUSALS.md
  is regenerated.

Both families stay unresolved in the census. The candidate cannot run them, and each is a tooling
gap (Limit::Tooling).

Verified: the build, clippy and the tests run in the jobs the landing note names.
2026-11-20 10:33:28 -08:00
Anees Iqbal 58beab6630 REPLAY-STREAM: the player as it plays now, on the runtime alone
The player's one backend is the runtime's (replay/new_runtime, through
rt_replay, from command-replay play). The doc still described a second
backend over the deleted runtime and every rule where the two parted:

- Section 5's recorded-address placement (pins, heaps split by their
  buffers and textures, PlayError::Unpinned) is deleted; the backend
  places each object where the runtime has room and moves the address
  arguments. The resource-ID rule says the runtime's own placement.
- Section 9's heap note on the old player goes.
- Section 10: one copy rule for Managed buffers, one announced-bytes
  rule, no old backend refusal list; the snapshot procedure is replaced
  by what the backend does (it takes none, so each named dispatch plays
  as it is, on the unsnapshotted line) and the split line goes with it;
  the executed counts are the runtime's metrics (Device::counters, as
  new_runtime's counters() reads them); the tiled-texture stand-in and
  the video-surface pages no longer name the old forms; the report's
  device line reads 'runtime rt', and its pinned line and the old
  runtime's gauges and covers go.
- 'the new runtime' and 'either runtime' read 'the runtime'; two plays
  compare across devices or commits.

Not built; docs only. The gate for the whole pass follows.
2026-11-20 10:27:18 -08:00
Anees Iqbal ae946adea7 Docs: the deleted switches, codes, fact rows and FAST-PATHS links go
With the old paths deleted, DevicePolicy holds the two domains,
containment and isolation, the translator reads no driver identity, and
docs/FAST-PATHS.md is gone. API.md sections 1 to 8 and 10 said
otherwise:

- The policy section's switch bullets (YCbCr in-place, half chains, batch
  order, render lowering, pipeline waits, wide lines, extended-range
  blits, queue sharing and turns, unstored DontCare loads) and
  exact_answers() are deleted.
- The measured-driver section said rows keyed on driver identity decide
  answers; Device::from_queries reads none, so it now says the device's
  own answer is taken and noted. The deleted runtime's host-page,
  Managed-copy, shadow and bit-20 prose that followed it is deleted.
- Section 10's heap-answer and DontCare-policy bullets are deleted, and
  its DriverFact clauses with them.
- The notice codes no live Degradation names (shader-resolve,
  word-resolve, zeroed-index-fetch, released-command-state,
  surface-texels-tail and the rest) are dropped from sections 1 to 8
  and 10.
- 'the new runtime' reads 'the runtime'.
- Every FAST-PATHS.md link outside AGENTS.md is dropped: API.md, the
  translator's bind, lower and metal docs, a validation mesh case, a
  conformance case and probe. AGENTS.md's three go to the owner as text.

Not built yet; the gate for the whole pass follows.
2026-11-20 10:27:18 -08:00
Anees Iqbal fce83ac2cf Docs: what the runtime does now, where a line named the deleted one
The rename gave metal2vulkan-runtime to the new runtime, so every line
written while the name meant the deleted runtime read as a claim about
the live one. Each was read against the new runtime's code:

- The precision notes no longer say the runtime announces a kind or a
  code of its own (it announces none; the conformance suite maps notes to
  codes), nor what a device Device::new made records (only
  Device::from_queries remains). The notes the runtime carries stay:
  DepthStencilState::precision_note, RenderCommandEncoder::DEPTH_BIAS_NOTE,
  BlitCommandEncoder::GENERATE_MIPMAPS_NOTE,
  RenderPassDescriptor::precision_note, Texture::precision_note.
- An inert kernel's dispatch: the runtime records it like any other.
- API.md: the runtime takes no unit-axes variant, and runs a
  partition-oblivious kernel's every direct dispatch in its tiles (from
  the runtime's pipeline module docs).
- The translator's profile docs: no runtime announces mesh draws, reads
  YCbCr in-place facts, keeps a bind-offset key or runs a view check.
- An aliased-import defect: the runtime has no use_host_ram.
- derive.rs: no runtime reads the allocation limits.
- texel_rows.metal names the test that runs it now (aliased_encoders).
- docs/RUNTIME-PORTING.md is deleted with its README row: 216 of its
  351 runtime items no longer exist, and each runtime item's rustdoc
  names its Metal counterpart.
- CHANGELOG 0.2.0: no fast-path switches, announced codes or
  queue-switch check.

Not built yet; the gate for the whole pass follows.
2026-11-20 10:27:17 -08:00
Anees Iqbal f3b9e0253a Pull-model interpolation: a sample or offset read where the quad may have left is one typed gap on every device
The planner's ruling. interpolant_reads refused a read at a sample or an offset outside the
fragment function's first block, or after a discard in it, only on a driver with
DriverWorkaround::InterpolationNeedsTheWholeQuad, which nothing sets since the driver-fact tables
went: development lowered the shape on every device, RADV included, whose InterpolateAtSample and
InterpolateAtOffset read garbage where the quad's other invocations have left.

- lower/stage_io/plan.rs: the structural test stays as it was (Sample or Offset, past the first
  block or after a discard in it) and refuses on every device, as its own kind:
  Unsupported::not_implemented(Feature::DivergentInterpolation), so a play counts it apart from
  PullModelInterpolation's select, phi and store refusals.
- error/mod.rs: Feature::DivergentInterpolation; PullModelInterpolation's doc points at it.
- device/profile.rs: DriverWorkaround::InterpolationNeedsTheWholeQuad deleted.
- The coverage loop's rung-1 form, beside it: lower/fragment/coverage.rs read the fact nothing
  set, so development read a looping function's sample-qualified varyings inside the loop on
  every device, where the helper invocations of a partly covered quad have left. The entry now
  reads each such varying at every sample a pipeline of the device may have before the loop, on
  every device (samples_before_loop, stage_io::read_at_every_sample).
- SEMANTICS_VERSION 2205.
- docs/REFUSALS.md regenerated (scripts/refusal-surface, with the new reach row); --check passes.
- Tests:
  - rt's every_device_refuses_interpolation_where_the_quad_may_have_left (lavapipe): a sample
    read in a branch, an offset read in a branch and reads after a discard in the first block
    are refused, Unsupported(DivergentInterpolation), NotImplemented; the same reads in the first
    block, and before a later discard, are made and draw the colour.
  - engine_pull_model: pm_offset_after_discard (reads past the first block) is refused on every
    committed profile at 1 and 4 samples, before what its reads need is asked.
  - engine_coverage_loop: a looping function's sample-qualified varying is read at every sample
    by constant index from 0, a power of two of them and at least the pipeline's samples, and at
    no computed sample.
2026-11-20 09:53:17 -08:00
Anees Iqbal 23d6572c18 Push placement: a post-tessellation vertex function's window starts past the control stage's range
A tessellation render pipeline whose vertex and fragment functions' push fields filled the
floor's 256 bytes was refused at link ("unsupported: Tessellation; needs AnyOf: Limit
MaxPushConstantsSize, required 260, available 256"): link places the synthesized control stage's
push range (8 to 24 bytes) at the first free offset beside the two functions' ranges, and since
the tail placement (0cd2ad765d: each stage's push ends with its tail, 24 bytes above its other
fields) the pair's ranges can end within 8 bytes of 256. Metal makes the pipeline, and the device
lacks nothing.

The form, one on every device: a post-tessellation vertex function's window is [24, 248) instead
of [0, 248), so the control stage's range, at most control::PUSH_BYTES (24) in either form, is
placed at 0, and the fields the pair cannot push spill into their parameter blocks, the form a
function's fields past its window already take. The tail and its 24-byte hole are unchanged. A
fragment function behind such a vertex function that pushes nothing starts at 24 too.

- lower/push.rs: window(Vertex, base) starts at base; TESSELLATION_BASE (= control::PUSH_BYTES);
  base(cx), the start of a function's fields (24 for a post-tessellation vertex function, else
  LoweringInputs::push_base); fragment_base(), the vertex function's push end or its window's
  start, used by CompiledFunction::fragment_push_base, compile::vertex_push_end and link's
  check_push_base.
- select and access place and census the fields from push::base.
- SEMANTICS_VERSION 2204 (a post-tessellation vertex function's and its fragment function's
  placements move).
- Tests: push.rs pins the vertex window from either start, and that the control stage's range in
  every form (bound and address, each factor step, scale on and off) fits below 24 and a
  fragment base behind an empty post-tessellation placement is 24. rt's
  every_device_draws_patches_whose_fragment_fills_the_push_range: a patch state behind fragment
  functions of 4, 8, 12 and 16 buffers is made, pushes the factors' address at 0, and draws its
  patches with every buffer's bits; the widest pair's fields end past 248.
- Docs: API.md section 5, the rt README's push range, PushPlacement::push_range,
  LoweringInputs::push_base, CompiledFunction::fragment_push_base, the tessellation link docs.

The line band's evaluation stage (16 bytes, WideLines) and the fan-out probe's geometry stage (4
bytes, RasterizationRateMap) are still placed by tessellation::push_offset beside the pair's
ranges and refused where those fill the floor: the same shape, not changed here.
2026-11-20 09:30:12 -08:00
Anees Iqbal a247f905e1 Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.

Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
2026-11-20 09:14:58 -08:00
Anees Iqbal 28b20187d4 CONFORMANCE-COVERAGE.md: regenerated over the declarations left
Regenerated with scripts/conformance-coverage/coverage.py after the shared-in-system-memory
declarations went: 43 modules declare a notice where 142 did.

Verified: the script wrote the file; its --check runs in the range's gate.
2026-11-20 09:14:20 -08:00
Anees Iqbal a7320ad3f9 Conformance: no case declares a notice the runtime never announces
The runtime's side announces only the codes of the precision notes its states, textures and
sampler states carry (Degradation::from_precision_note). 66 Degradation kinds had no precision
note behind them: they were the deleted runtime's notices. A case that named one declared a
notice nothing can announce, and a value it loosened by one stayed loosened on no run.

What goes:
- every declaration of those 66 kinds, in 70 case files and the native-note set (six of its
  members were among them: float-tininess-after-rounding, unorm-depth-rounding,
  signed-depth-test, ycbcr-filter-not-exact, device-line-ties, device-subpixel-snap);
- the value tolerances justified by one: astc's and etc's compact-twin bounds
  (decoded-texel-precision), visibility's Boolean words (device-boolean-visibility),
  rotated-planes' unreached rotation-4 bands (rotated-load-tiles), sample-fills' wide depth
  digest (drawn-depth-copy), texture-fills' 32-bit float depth digests and fresh-contents'
  Depth32Float fresh site (restricted-depth-upload, fresh-pattern-zeroed);
- the replay helpers staged_records_notice, interlocked_split_notice and
  set_past_layout_notice, and every call of them;
- the 66 variants, their ALL entries and their codes;
- what only they used: the mesh pass notice list, the sparse notice lists, the GPU-time list,
  the buffer-blits and sparse-mappings rows' notices fields, buffer-target-clears' kept_image,
  buffer-texture-blits' copies_shared_bytes and its two tests, render-draw-forms'
  bounds-pass helpers, rotated-planes' band_is_reached and surface::stored_at,
  rotated-targets' reads_destination_alpha_in_color, visibility's boolean_words, and the
  module prose that described those notices.

The one backed kind whose name was not its note's, ImplementationDefinedReconvergence, is now
DeviceReconvergence with the code metal2vulkan-degrade-device-reconvergence, the note's kebab
name, and docs/API.md section 9 gains its entry. shared-in-system-memory stays for the next
commit. The tests that used a deleted kind as a stand-in use a backed one. Every case keeps
its shared-in-system-memory declaration; tests that count a case's declarations count what is
left. pass_start_reads no longer cites the deleted cost::the_creation_prediction.
docs/CONFORMANCE-COVERAGE.md is regenerated.

A case whose values the deleted tolerances held is now compared exactly; whether the runtime
differs there shows on the venues' replays.

Verified: cargo fmt --all. The gate runs once over this and the following commits.
2026-11-20 09:13:39 -08:00
Anees Iqbal a4540b3913 Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.

Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
2026-11-20 09:10:37 -08:00
Anees Iqbal 9a1c8fe6dc metal2vulkan-rt takes the runtime's name: metal2vulkan-runtime, published
The cutover's last mechanical step. The old runtime is deleted, so its name is free: the crate
moves to crates/metal2vulkan-runtime, its package is metal2vulkan-runtime and its library
metal2vulkan_runtime, and every reference in the tree follows (sources, tests, scripts, CI,
generated tables and docs).

It is now a published crate, as AGENTS.md said it would be once it took the name: version 0.2.0
with the other two, the translator pinned exactly (=0.2.0, as the translator pins the AIR front
end), documentation, keywords and categories, and copies of the repository's four license files,
which the published-crates test now holds equal to the root's for three crates. CI packages it
with the others. Prose that said it was unpublished, or counted two published crates, says three.

AGENTS.md: facts only. The crate table row, the published-crates and version sentences, and the
paragraph on the old runtime, whose name the runtime now carries (listed for the owner).

Made by one script run on this tip. Verified by the job
named in the landing note.
2026-11-20 09:10:02 -08:00
Anees Iqbal 51be813915 Translator cutover: the device checks' modules go (bind::view_check, bind::check_draw)
Only the old runtime's device checks ran them: its view check, which measured the two view cost
facts into the description's measured set, and its check of render targets in place over host
pages. The signature table and api_surface drop them; API.md drops the measured set.
2026-11-20 09:08:21 -08:00
Anees Iqbal 97b5c1b65b Translator cutover: SEMANTICS_VERSION 2202; the API signature table and REFUSALS.md regenerated
The profile and the lowering of every device made through the removed constructor change, and
the removed switches' outputs go: the version bump misses every cached artifact. The signature
table drops the removed public items (blessed by scripts/api-signatures/signatures.py, source
only); REFUSALS.md loses the stage bound's defect site and the absent read's device refusal.
2026-11-20 09:08:21 -08:00
Anees Iqbal 77a66a19bf Translator cutover: API.md and the workaround docs name the one profile; unused test items go 2026-11-20 09:08:20 -08:00
Anees Iqbal aaa3213887 Translator cutover: first trial-compile fixes (imports, the half pair, push tests, removed routes) 2026-11-20 09:08:20 -08:00
Anees Iqbal 0b94d919d9 Translator: the DevicePolicy switches, the driver-fact tables and Device::new go; Device::from_queries is the one constructor
Work in progress of the cutover's translator lane: the policy keeps the pointer and handle
domains, containment and isolation; the profile is derived from Vulkan queries alone; the
measured description set, the per-identity function storage table and the fact pairs of the
profile go with docs/FAST-PATHS.md and tests::fast_paths. Not yet compiled.
2026-11-20 09:08:20 -08:00
Anees Iqbal b100185a2d Re-derive the generated documents at the landing tip
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.

Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
2026-11-20 09:07:17 -08:00
Anees Iqbal 4730af16e7 rt: a command buffer waiting for a shared event's value is Scheduled as it is submitted
What: the status hold for shared-event waits is deleted:
- hold(), Pending::held and QueueInner::held;
- the completion thread's held list and due();
- EventState::holds and its host-set wake, EventInner::shared;
- the hold_completions test seam, which only the deleted test used.
A command buffer whose wait's signal is submitted is now scheduled as its last segment joins a
submission, its scheduled handlers run then, as for a plain event's wait. A presenting one is
scheduled after vkQueueSubmit2, as for any other. Its queue's later command buffers are no
longer held behind it. Waits on a value that neither the host has set nor a submitted signal
promises stay host-held by the submit thread, as before: every queue submits to one VkQueue,
and a wait submitted ahead of its signal would hold the signal too (vkspec 8432; 6.6, 8985).
Metrics::event_holds counts those.

Why: the hold rested on an M3 recording (event-wait-behind-a-running-signal), not on documented
Metal. MTLCommandBuffer.h:47-48 describes Scheduled as "All dependencies have been resolved and
the command buffer has been scheduled for execution", and :405-406 describes
encodeWaitForEvent:value: as a command that "pauses execution of this command buffer until the
specified event reaches a given value". So execution pauses after scheduling. On the RTX 2080
walk, after the walk's clock correction, the hold lasted p50 5 ms and p90 9 ms per interval, in
command-buffer counts; the 33.6 ms read earlier as the hold was the submit stage, before that
correction.

What the deletion removes, in the walk's terms: a command buffer's kernel start is its commit,
raised to its queue's previous command buffer's scheduling where that is later, and its kernel
end is its scheduling. So a held command buffer's late scheduling also delayed the scheduling
of every later one on its queue. The deletion removes the held command buffers, and that chain
behind each one, from the span before staging. What is left there is the submit thread's own
pace: its passes over other groups, their calls and queue locks.

Scope of the claim:
- It changes nothing about GPU order or when a waiter completes: the wait still goes to the
  driver with its submission, as before.
- It changes when the guest's threads and handlers see Scheduled: a frame loop waiting on
  Scheduled no longer makes one GPU-to-host round trip per link.
- Its effect on presents per second is not known until the walk at the pin.

Docs: CommandBufferStatus::Scheduled, add_scheduled_handler, Device::new_shared_event, the
runtime README's submission and handler paragraphs (quoting both header lines so the hold is not
brought back from a recording), and docs/API.md's accepted differences. The conformance case
event-wait-behind-a-running-signal declares the shared-event row's status and handlers loosened
on the runtime by that entry, and its test checks that a status other than Committed or
Scheduled is still a row.

How verified: the lane's lavapipe gate on this series' tip tree, and the negative job for the
two tests of the commit before (FAIL there, PASS at the tip).
2026-11-20 09:06:48 -08:00
Anees Iqbal 98895eb6d2 rt: Gap::KernelInput names what the kernel reads, a KernelInputKind
A guest boot (arm64 macOS 15) met one Gap::KernelInput refusal at
newComputePipelineStateWithDescriptor:options:reflection:error:. The refusal said no more than
"the kernel reads an input the compute encoder does not supply yet", so it could not be ranked
by its cause.

Gap::KernelInput is now KernelInput { kind: KernelInputKind }. Its text ends with the kind, and
the kind is decided at the site that finds it:
- interface()'s six checks of the translator's pipeline: PointerTranslation,
  HandleTranslation, CommandBuffers, StageIn, DescriptorSet (a set that is not the device's),
  StageFlags (flags other than full or varying subgroups);
- its later checks: RuntimeFact (a fact the encoder does not name), Slot, PushField,
  ConstexprSampler, ArgumentBlock, PushBytes, Specialization, Workgroup;
- Kernel::new's entry point with a NUL byte: EntryPoint.
A variant that samples a constexpr sampler its module does not, and a constexpr use whose
sampler the translator cannot state, are ConstexprSampler.

interface() returns the kind itself, and Kernel::new returns an Unmade (the kind, or
vkCreateShaderModule's result). So a variant's lowering keeps the kind in
Lowered::Unsupplied(kind), and nothing has to tell a module's failure from a refusal by a
wildcard. Each variant's doc comment names its Metal counterpart.

docs/REFUSALS.md is regenerated and api_signatures.tsv is blessed. Its one changed line is
Gap::KernelInput, now a struct variant: a breaking change to rt's public surface, which is
meant.
2026-11-20 08:47:42 -08:00
Anees Iqbal 3cdca62567 identity domains: a loaded or converted pointer is the device address it holds, no root table
rt answers MTLArgumentBuffersTier2 and refused the tier's basic buffer member: a kernel reading
two buffers through an argument buffer's pointer members, and one reading a buffer through a
gpuAddress the CPU wrote into a constant buffer, were both "Unsupported{IdentityDomains} (an
encoder value the function reads as RootTableAddress)". A pointer loaded from memory or made
from an integer is a wide pointer, which the resident-table domain resolves by searching the
root table's resident set; the identity domains push no root table, so the gate refused it.

Under the identity domains a pointer is the device address of the byte it names, so a wide
pointer there is (0, a, 0, 0) for address a, the form of a miss of an empty table: a loaded word
or an inttoptr operand is the pointer itself, with no search, a wide buffer parameter is its
slot's address (SlotGuestBase with the bias added back), its Metal address is `at`, and its
accesses are at host + at = a, unchecked and uncounted (a stored address is used as it is; there
is no resident set to miss). Nothing pushes RootTableAddress or ExecutionStatusAddress for it.
An escaping slot root stays static there, as on Profile F, which has no root entries either: a
slot pointer converted to an integer or stored through a static destination is SlotGuestBase
plus its displacement, and the slot's run-time accesses keep their SlotBounds check.

The same gate lifts the texture behind an argument buffer's pointer member (ab_tier2's
ab_indexed) and a kernel that converts a slot pointer to an integer. A slot pointer stored
through a loaded pointer or into an open pointer cell stays refused, as on Profile F
(Unsupported{Lowering(Access)}). Every branch is under the identity domains: the default
domains' modules are unchanged. SEMANTICS_VERSION 2202: these refusals become modules.

Tests: engine_identity_pointers (ab_sum, ab_address, ab_slot_address and ab_indexed on every
committed profile Device::from_queries derives under the identity domains: no RootTableAddress,
no ExecutionStatusAddress and no descriptor, L3, and on the CPU interpreter with buffers above
4 GiB and offset addresses, the words the addresses name, the slot's Metal address and the
increment, and the slot checked against its bounds); rt's argument_tier device tests sum through
two pointer members, read through a CPU-written gpuAddress, answer a converted slot pointer as
its gpuAddress plus its offsets, and read the textures behind a pointer member, each exactly. The
two translator tests and the device test that asserted these refusals go. Run by the lane's
compile gate (fmt, clippy plain, m2v_gpu and m2v_cpu_icd, workspace Rustdoc, the translator's
and rt's suites on lavapipe); job ids in the landing note.

Docs: rt's README says the condition in one sentence (the stored word must be a buffer's
gpu_address plus an offset inside it, and a buffer not placed at the address its guest asked
for has another gpu_address) and drops the three refusal bullets; docs/API.md sections 1 and 5
and PointerDomain::Identity say what the identity domains lower now. docs/REFUSALS.md
regenerates unchanged.
2026-11-20 08:35:00 -08:00
Anees Iqbal 1b6a802908 Conformance: the rt ledger's bicubic rows on LLVM 23.1.4 lavapipe, the coverage document regenerated
The lane's compile job m3-max-59010 ran on um870, whose lavapipe is llvmpipe (LLVM 23.1.4,
256 bits). Its conformance replay --cpu failed on six unlisted bicubic-texel-classes sites:
mixed, r8unorm, rgba16float, rgba16unorm, rgba8snorm and rgba8unorm, each /sampled. The ledger
held those sites only for LLVM 23.1.1, the venue of msi's lavapipe. The 115 other rows for the
23.1.4 venue were all held.

On 23.1.4 five of the sites give the RTX 3090's answer and rgba8unorm gives 23.1.1's. Each goes
in as a "llvmpipe (LLVM 23.1.4, 256 bits)" row after its twin, with the twin's note, which names
no device.

docs/CONFORMANCE-COVERAGE.md counts and lists the ledger's rows. It is regenerated
(scripts/conformance-coverage/coverage.py) for this commit's rows and the 164 rows of the three
before it, 7457 rows to 7627. The same job's conformance suite failed
the_conformance_coverage_document_is_what_the_sources_derive on those three commits.

Verified: m3-max-59010 listed these six gaps and no row as no longer held. Each gap's answer
equals its twin's.
2026-11-20 08:12:19 -08:00
Anees Iqbal 53f3e522e9 API.md: section 9 is the catalogue of the precision notes rt carries
Section 9 was the deleted runtime's notice catalogue: its message sink, announce_each,
lowering_refuses, DegradeNotice, exactness(), degraded_objects and the METAL2VULKAN_LOG_*, DUMP,
QUEUE_TIMES, PENDING_AUDIT and ENCODER_* diagnostics, none of which rt has.

- The intro now states rt's model as its code has it. Each note is fixed per operation (module,
  pixel format, descriptor or state) and given through six accessors: ComputePipelineState and
  RenderPipelineState::precision_notes, Texture, SamplerState, DepthStencilState and
  RenderPassDescriptor::precision_note. Two constants carry notes too:
  BlitCommandEncoder::GENERATE_MIPMAPS_NOTE and RenderCommandEncoder::DEPTH_BIAS_NOTE. A note
  is never fatal, and rt prints and sends none (its non-test sources hold no eprintln, log or
  sink); the consumer reads them.
- The 87 entries whose code a PrecisionNote variant backs stay. Their text no longer names the
  deleted runtime (compressed-texel-decode, bicubic-filter-arithmetic,
  swizzled-opaque-black-border). Their trigger is rt's where the deleted runtime's stood beside
  it (device-filtered-mipmaps, shared-exponent-kept, compressed-texel-decode). They no longer
  say when a deleted runtime announced the note, and they drop the blit, fill and clear parts
  that only that runtime noted (shared-exponent-kept, device-nan-encoding,
  device-color-conversion, device-pack-conversion). Their driver-fact text is left for the
  translator-switch commit.
- The 165 entries no note backs go: 59 performance, 104 precision and 2 validity kinds of the
  deleted runtime.
- Section 8's last paragraph names metal2vulkan_rt::Error, REFUSALS.md and rt's README. The
  guide's opening line and README's row say precision notes.

tests::fast_paths reads the catalogue only for the codes of its ledger notes, all PrecisionNote
codes, which stay. Section 10 still names some deleted codes; that is a follow-up.
2026-11-20 08:01:21 -08:00