The runtime's side announces only the codes of the precision notes its states, textures and
sampler states carry. shared-in-system-memory is not one: it was the deleted runtime's notice
for a Shared buffer on a device without unified memory. Every case that read an answer back
through a Shared buffer declared it, so the declaration held on no run.
What goes:
- the declaration in every case, and the prose and measurements that justified it;
- the allowances methods left returning nothing (the trait's default stands), and the helpers
that only carried the declaration: replay::shared_memory_notice, fresh-contents' copy of it,
mesh_draws::mesh_notice_allowances, buffer-tails' and buffer-textures' allowances,
render-depth-stencil-state's pass_notices, blit-encoder-commands' NOTICES and its notices
field, sparse-mappings' reaches_a_shared_buffer, format-footprints' shared_texture_buffers,
and the entries of sample-positions' and visibility's notice lists;
- the SharedInSystemMemory kind, its ALL entry and its code;
- compressed-moves' prose about notices of the deleted runtime (staged-texture-copy,
shadowed-texture);
- imports that only the removed code used;
- docs/FAST-PATHS.md's sentence on the declaration, and coverage.py's count of the helper.
The prose a removed paragraph shared with other notices is kept for those notices. Tests that
counted a case's declarations count what is left; that includes depth-resolve-pairs,
stencil-resolve-pairs and pass-attachment-pairs, whose counts the previous commit left at the
deleted kinds'. A new test, every_kind_is_a_catalogued_precision_note, holds every kind to an
entry of docs/API.md section 9; it fails on any kind no precision note announces.
Verified: cargo fmt --all. The gate runs once over this range.
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.
The cutover deletes the old runtime: crates/metal2vulkan-runtime and its workspace member go.
Nothing in the workspace depends on it any more: the harness and conformance lost their old arms,
and validation dropped its dependency in its own commit.
Adapted in this commit, so no gate reads the deleted tree:
- CI and scripts/linux-gate-ci: the crate's per-feature clippy group, its `-p` in the Windows
clippy and the test step, and its private-doc-links row go. Packaging needs no edit: the
workspace's published crates are now metal2vulkan and metal2vulkan-air.
- The published-crates test lists those two; devtools' carried trees and the five nextest groups
of the old crate's tests go.
- scripts/api-signatures: the crate leaves CRATES, FLOORS and the header, its self-test trees name
rt (read by the same rules), and the table is re-blessed (the old crate's 4555 rows go);
api_signatures.rs pins the three crates left.
- scripts/refusal-surface: the old crate's tree and its sections go (RuntimeGap, AppleOnly,
Problem and the problem enums it forwards to), with their 87 reach rows, the `--delegations`
verb and the test that counted the old Problem's delegations; docs/REFUSALS.md is regenerated.
The basis check now holds rt's refusal enums alone, which it already required.
- scripts/api-cost-coverage goes: it measured only the old crate's surface.
- feature_vocabulary.rs: the old crate's two enable tables go; the Khronos and validation tables
stay held to the vocabulary.
- The conformance coverage generator's by-hand roots read rt instead of the old crate, and
docs/CONFORMANCE-COVERAGE.md is regenerated (MTLResourceOptions' row, which only the old crate
modelled, gives way to rt's MTLCommandBufferError).
- scripts/matrix: the harness times the new runtime alone (`--runtime new`), so the rules that
judged it against the old one go: the new-over-old budget with its floors (floors.tsv,
gpu-floors.tsv), ceilings, card variance and status table (status.tsv), the frozen arm, the
base spread and the timing once more it set off, the re-timed pairs, the five creation rounds
and the old runtime's parked tests and records. A harness row's time is judged as a cross-GPU
outlier, with its alone runs as before, and the frame and burst rows by their stored
instruction counts; the creation rows run once, in their own process. docs/VALIDATION.md's
matrix section says these rules.
Checked locally (python, no build): signatures.py --check and --selftest, refusal_surface.py
--check, --selftest and --missing-basis, coverage.py --check and --selftest, and scripts/matrix's
49 tests pass. The compile gate (fmt, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Windows
clippy for gnullvm and msvc, workspace Rustdoc, packaging, the touched crates' suites on the host
and on lavapipe) runs on this sha as potluck jobs that the landing note names.
The cutover deletes metal2vulkan-runtime, so the conformance suite stops depending on it.
What goes: the old runtime's side (runtime_side.rs, runtime_work.rs, states.rs) and its runs in
run.rs, report.rs and the command; the cost verb, the timing-coverage verb, `times`' leg of ours,
the `--rt`, `--default-policy`, `--leg`, `--call` and `--cold-shaders` flags; the four split
binaries that drove the old runtime directly; coverage.rs; and the old side's ledger,
known-gaps.tsv. The harness half of the cutover landed separately.
What stays: rt_side is the only runtime side, and `conformance replay` runs it (CI's
`replay --cpu` now replays rt on lavapipe). Its ledger, known-gaps-rt.tsv, is the one ledger, with
the rows it held; a call rt_side does not answer yet stays Failure::unavailable on it, as before.
The cases keep every allowance: the old runtime's Degradation kinds become the suite's own codes
(degradation.rs, the same `metal2vulkan-degrade-<kind>` codes), and the old runtime's Metal value
enums the cases state become the suite's own (values.rs). The old side's descriptor helpers that
rt_side and its tests used move to rt_side/fields.rs. Recordings keep their `costs` and our times
as data; `deny_unknown_fields` still reads them.
The coverage generator reads rt_side alone, and docs/CONFORMANCE-COVERAGE.md is regenerated.
The README describes the suite as it now is.
Checked: coverage.py --check and --selftest locally. The compile gate (fmt, clippy plain,
--cfg m2v_gpu, --cfg m2v_cpu_icd and for aarch64-apple-darwin, workspace Rustdoc, the suite on the
host and on lavapipe, and the lavapipe replay) runs on this sha as potluck jobs that the landing
note names.
The running-signal case now loosens two sites with Loosening::AnyOf on rt's
run, so the derived counts move: 11 SDK items move from 'no case reaching it
loosens anything' to 'loosens some site', and the tolerances grow from 15 to
17. The generator mapped each Justification constructor to its variant except
new_runtime_accepted, and that is the first one a case module names. It now
maps it to NewRuntimeAccepted.
Verified: the_conformance_coverage_document_is_what_the_sources_derive failed
in m3-max-52651 before this commit. coverage.py --selftest passes.
A facts call running said nothing of which of its fields were compared, so a field the new
runtime's side refuses read as covered beside its call. The coverage document gains a section
that counts each facts type answering field by field (a struct with a crate::case::Field field)
by field: its fields, the ones a side may refuse, the leaf each records at (read from the type's
node), and the new runtime's ledger rows that refuse each at that leaf, of the cases whose module
calls a Side method answering the type. A Field whose node records it at no leaf this can read
stops the generator.
The six pipeline descriptor cases' label rows (pipeline-descriptor-* and compute-descriptor-*,
every venue: the consumer's own, label) go into known-gaps-rt.tsv. Their binaryArchives rows wait
for memory2's every-stream count of binary archives, which their head will cite.
Verified at this commit: coverage.py --check passes on the regenerated document; the build, the
suites and the lavapipe replays run in the lane's check job.
The planner's ruling on the twelve old-side RADV rows f1aa961e34 added: the frozen old runtime
takes no new ledger row, so the case's notice-justified bound is scoped to the new runtime and the
old runtime's side keeps what it had, which was no bound.
A new justification, Justification::NewRuntimeNotice (Justification::new_runtime_notice), holds
on metal2vulkan-rt's run as a degrade notice does, where the run announced it; on the old
runtime's run it holds nowhere and faults nothing (Unjustified::OldRuntime, which faults_the_case
excludes beside VenueCompresses), so the site compares as if the case loosened nothing. The venue
says which side ran (Venue::new_runtime: true on the rt side, false on the old runtime's and on
Metal's), and replay hands it to the comparison (Offered::on_new_runtime). compare's check that a
named justification exists treats it as it treats a notice.
The ten BC1 to BC5 decode cases loosen each round's texels by NewRuntimeNotice
(compressed-texel-decode). known-gaps.tsv is the ledger as it was before ae452ee883: the twelve
RADV rows go, and the 89 BC rows that commit's series removed (lavapipe 44, the RTX 5080 Laptop
40, RADV BC4 and BC5 5) and their comment are back, since the old runtime's sites differ again
as they did.
docs/API.md: the catalogue says the cases' bound is the new runtime's alone.
scripts/conformance-coverage: the justification vocabulary reads new_runtime_notice;
docs/CONFORMANCE-COVERAGE.md regenerated.
Test: tests::a_notice_scoped_to_the_new_runtime_leaves_the_old_runtimes_site_its_one_row (the old
runtime's site is its one divergence, unfired for OldRuntime; rt's announced; rt without the
notice faults).
RenderPassDescriptor gains visibility_result_type (MTLVisibilityResultType: Reset, the default
and today's behaviour, and Accumulate). Under Accumulate no query result is copied over its
offset's word: every query of an offset, the first one too, is copied into the upload region the
continuations already use, and the crate-owned combine takes them into the word as the buffer
holds it. The combine already loaded the destination word as its accumulator, so Accumulate is
the first query becoming one more source. A `Boolean` word ORs the device's results in; a
`Counting` word is summed in through a new table mode of the combine, into the word's low 32 bits
alone, wrapping there, its high 32 bits kept (ContinuedResult::low_half / in_low_half). That last
part is what the M3 Max answered when recorded: 0xffff_fff8 plus 16 samples writes 8, and
0xffff_ffff_ffff_fff8 plus 16 writes 0xffff_ffff_0000_0008. A plain 64-bit sum was divergent there.
An offset set with no draw after it keeps its word, because a query with no draw adds 0. Where a
no-copy buffer's bytes start off a multiple of 8, so the results land in an upload region, the
words are now copied into that region before the combine (Landing::inward). Reset records exactly
what it did before.
Conformance: RenderPass gains visibility_type (typed()), and words() appends it only where it is
not Reset, so existing fingerprints read as before. Both sides set it. There are four new
visibility cases, recorded on the M3 Max (macOS 27.0.1): visibility-counting-accumulate (two
command buffers; words 100/5/7/0xffff_fff8/u64::MAX-7), visibility-counting-accumulate-one-command-buffer
(two passes in one command buffer, read once), visibility-counting-accumulate-revisit, and
visibility-boolean-accumulate (words 0/2/3 under covering and non-covering draws, an offset set
with no draw, then a second command buffer). The family's acts key states the type, and a joined
shape adds a command-buffer input. Cost and timing records for the new cases are not written here.
Lane tests (runtime_lane): accumulated_counts_add_to_the_words,
accumulated_booleans_or_into_the_words, and
host_bytes::accumulated_visibility_results_land_where_their_bytes_lie. Unit tests: the combine's
accumulated_counts_are_summed_into_the_low_half, its plan's table mode, and the type's raw values.
Coverage: coverage.tsv marks MTLRenderPassDescriptor.visibilityResultType implemented (its unused
"visibility" group is removed), and METAL-COVERAGE.md is regenerated. MTLVisibilityResultType joins
the enum table, so metal_enumerators.tsv and CONFORMANCE-COVERAGE.md are regenerated. The API
signatures are re-blessed. REFUSALS.md is regenerated: VisibilityResultType::from_raw is one more
UndefinedValue site. The regeneration also picks up two bind/graphics.rs sites the committed file
was missing. The degrade docs (landed results, Boolean) state Accumulate.
Verified on the M3 Max under MoltenVK 1.4.2:
- The 52 visibility-touching lane tests pass: visibility, host_bytes, depth_never, amplified_draws,
degrade_notices and the framebuffer_fetch split pass.
- The visibility family's replay is all announced (no divergence), after the low-half change.
- Negative control with Accumulate forced to Reset: all three Accumulate lane tests fail, and all
four new cases replay divergent.
- Negative control with no inward copy: the landing test fails at 4 bytes past a page (2 read 0,
100 read 16).
- Before the low-half change, visibility-counting-accumulate replayed divergent at words 3 and 4.
- The combine's low-half test fails on the interpreter without the high-half select ([8, 1] for
[8, 0]).
clippy (plain and --cfg m2v_gpu), rustdoc and scripts/api-docs are clean.
SEMANTICS_VERSION: no translated shader changes, but the owned combine module's words do
(main's call). RUNTIME_VERSION and the runtime-sources pin are not touched here.
(cherry picked from commit 1c172968ad6492cebcae2a568fc99e90565d4d11)
(cherry picked from commit 9f47ebcf006920f7561a16a77f77e422de7201c1)
A Core Image kernel library (metal -fcikernel, metallib -cikernel) is a
metallib of file type 1 whose kernels (!air.ci) are listed as function
TYPE 5 over one shared module. The container refused the file type
(Unsupported LibraryKind(1)), so newLibraryWithData: failed where Metal
succeeds; the consumer's graphics-kext lane hit it on Core Image's own
helper library in a macOS 26 guest, so every Core Image path stopped
there.
What Metal answers, measured with kernels written from scratch on an M3
Max under macOS 27.0.1 (probe programs over Metal's API and objc's message
log of a CIColorKernel render):
- newLibraryWithData: takes it as MTLLibraryTypeExecutable; functionNames
is empty; the private externFunctionNames lists the kernels in the
reverse of the table's order (libraries of two and four kernels);
- newFunctionWithName:, newFunctionWithDescriptor: and the private
newExternFunctionWithName: make each kernel with functionType 4 (no SDK
enumerator; its description prints "Unknown"); newExternFunctionWithName:
answers as newFunctionWithName: for any library, a kernel of an
executable one included, and nil for a missing name;
- a compute pipeline made from an extern function fails ("Function tint
was not found in the module");
- Core Image fetches each kernel and its own helpers with
newExternFunctionWithName: and links them on the CPU, in Metal.framework's
base device class, into an ordinary executable library holding one
kernel, ciKernelMain, of which it builds a plain compute pipeline.
So now:
- container: file type 1 is read (executable; its functions may share one
bitcode range, hashed once, as a dynamic library's); TYPE 5 is the new
FunctionStage::Extern, no stage: the ABI cross-check refuses it as a
mismatch, Library::Function compiles it as no entry (EntryNotFound,
available 0). Unobserved file types stay LibraryKind refusals.
- FunctionType gains the private enumerator Extern = 4
(regen-metal-enums PRIVATE); reflection maps Extern to it.
- runtime Library: function_names leaves extern functions out;
extern_function_names (reverse table order) and
new_extern_function_with_name are new.
ciKernelMain itself was refused next: Lowering(Arith) at its first
load, `load [4 x <4 x float>], ptr addrspace(2)`, a whole array loaded
from the constant buffer and passed by value to a helper. Lowering reads
and writes buffer and threadgroup memory a scalar or vector at a time.
The new canon pass `aggregates` (after SCCP, beside the other expansions)
replaces each non-volatile, non-atomic load or store of a pointer-free
array or struct in device, constant or threadgroup memory by its members'
accesses in layout order (a getelementptr i8 at the member's distance, the
access's alignment lowered to what the distance allows, joined by
insertvalue or split by extractvalue), at most 256 members, 8 deep.
Thread memory, pointer-holding aggregates (handles), volatile accesses
and larger types stay whole as before. The same-type pointer bitcast
beside the load was never the problem (verified alone).
Public surface: metal2vulkan-air FunctionStage::Extern; metal2vulkan
FunctionStage::Extern and FunctionType::Extern; runtime
Library::extern_function_names and new_extern_function_with_name
(api_signatures blessed: 5 added, none changed or removed). devtools
gains core_image_metallib. The metal-enum generation now records the
macOS 27.2 SDK (the host's Xcode); no SDK value changed, only Extern was
added. LibraryKind's doc and reach note name what it refuses now.
No cache version moves: file type 1 and aggregate accesses outside thread
memory were refused before, so no key reached them, and
golden_hashes_match_the_table passes unchanged (every public fixture
assembled: this Mac's Xcode 27.2 now has its Metal toolchain). The
runtime-sources pin moves (runtime library.rs): re-pinned here to
23766690fd75227c5333e976bfc1fdfafa6ff78f43e0c5ba8fa5183574cd9371.
Verified (M3 Max, macOS 27.0.1):
- Metal versus this tree's runtime on MoltenVK: Core Image's linked
ciKernelMain for a tint color kernel and for a sampler kernel (both
from-scratch CI kernels; the linked libraries captured from Metal in
scratch and deleted after), same constant buffer, source texture and
sampler, 4x4 RGBA32Float target: byte-identical texels, the early-out
column untouched on both. The parent tree answers FALLBACK (Lowering
Arith) for both. Release CLI: 0.01-0.03 s, 11 MiB each.
- Release CLI, parent vs this tree, largest public fixtures
(hfb_filter_bank render pair, tns_mm_flags), three runs each:
0.12-0.13 s vs 0.12-0.16 s and 0.05-0.06 s vs 0.04-0.05 s, 27 MiB both
(runs beside a test suite; the same within noise).
- New tests: canon aggregates (split loads, stores with nested arrays and
lowered alignments, threadgroup; volatile, pointer-holding and
300-element aggregates stay whole), an engine test running a
ciKernelMain-shaped kernel on the CPU interpreter on three profiles,
core_image_libraries (container types, stages, shared hash, functionType
4, EntryNotFound), and a runtime device test on MoltenVK (names, extern
names, both lookups, pipeline refusal, an executable library's kernel
through the extern lookup). Negative controls: the split and execution
tests fail with the pass disabled; the library tests fail with file
type 1 refused.
- cargo nextest -p metal2vulkan -p metal2vulkan-air -p metal2vulkan-runtime
-p metal2vulkan-devtools --all-features: 4927 passed (golden hashes and
the metal-as fixture parts included); -p metal2vulkan-validation
-p metal2vulkan-conformance: 2369, all passed after the re-pin; doctests
ok; clippy --workspace --all-targets --all-features -D warnings and the
runtime's under --cfg m2v_gpu: clean; rustdoc -D warnings and
scripts/api-docs: clean; REFUSALS, METAL-COVERAGE and
CONFORMANCE-COVERAGE re-derived (MTLFunctionTypeExtern is listed as not
yet compared by a conformance case). Not run: a corpus translation
census, and the device suites beyond the new runtime test.
The steps this packet landed as, in order:
- Read the selectors the suite's Metal leg sends by hand
- Type the receivers the suite's Metal leg binds by pattern
- Read the receiver, the chain and the closure the leg actually writes
- Say what still costs an unresolved call site
- Re-bless the golden tables after the extension vocabulary grew
Content: the tree of `development` at 1116f3a6d0, unchanged.
The steps this packet landed as, in order:
- Say so when a conformance-coverage module is run as a command
- Order the TOOLCHAIN fixture lines by byte value, not by the host's locale
Content: the tree of `development` at b5a0b1378b, unchanged.
The steps this packet landed as, in order:
- Flag what moves between runs of one replay selection
- Read a leg function handed to a combinator as an edge
Content: the tree of `development` at f3069fdc8e, unchanged.
The steps this packet landed as, in order:
- Hold the venue memory notice in one place, beside notice_allowance
- Declare the discrete-card memory notice in eleven families that named none
- Declare the discrete-card memory notice in eight families that already named others
- Declare the discrete-card memory notice in sixteen more families
- Declare the notices a non-Metal driver provokes in the rest of the a-l shard
Content: the tree of `development` at 1df59f5add, unchanged.
The steps this packet landed as, in order:
- Declare the crossings two pass families already hold
Content: the tree of `development` at a4805b6ba1, unchanged.
The steps this packet landed as, in order:
- Re-derive the generated documents at the landing tip
Content: the tree of `development` at fc6bb53c97, unchanged.
The steps this packet landed as, in order:
- Re-derive the generated documents at the landing tip
Content: the tree of `development` at 2c1636399f, unchanged.
The steps this packet landed as, in order:
- Measure compressionType, and say why no case states it
Content: the tree of `development` at 2eb1d1baf1, unchanged.
The steps this packet landed as, in order:
- Credit a container's own row, and state what no binding can reach
- Stop dropping call edges, and read a class message broken after `::`
- Report a site name held twice, instead of pairing the two by luck
- Give the hand-declared Metal enums an SDK denominator
- Read a braced `use`, which named values this axis counted nowhere
- Separate what Metal answered from what a case named a site
- State the two floors as what they are, not as what they were
Content: the tree of `development` at 15adea8261, unchanged.
The steps this packet landed as, in order:
- Wrap the option-space axis's two overlong lines
- Blank a source for the hand-modelled scan only where a match needs it
- Remove the self-test's trees when it is done with them
- Say that a sweep by ordinal states no value by name
- Record why an ordinal-stated value must not be resolved by field name
- Re-derive the generated documents at the landing tip
Content: the tree of `development` at 9e1c5a54d5, unchanged.
The steps this packet landed as, in order:
- Say why a called selector can be missing from the coverage map
Content: the tree of `development` at eed0293b78, unchanged.
The steps this packet landed as, in order:
- Compare what a compute and a drawing pipeline state say about themselves
- Stop the coverage derivation dropping a Metal-leg function whose signature holds a semicolon, and type three receivers it could not
Content: the tree of `development` at 35b3d026d4, unchanged.
The steps this packet landed as, in order:
- Take Metal's answer for the argument-encoder and function-binding cases
- Name the receiver that reads a texture an argument buffer holds, and cut what nothing calls
- Declare the three notices the sampling cases announce on a software renderer
- Keep the argument-encoder module's docs inside what rustdoc will publish
Content: the tree of `development` at ae72eece5c, unchanged.
The steps this packet landed as, in order:
- Give AstcDecode its first check against Metal rather than against itself
- Inventory what the conformance suite verifies, not what we implement
- Leave no bytecode cache beside the coverage script
- Group the conformance inventory by SDK header as well as by container
Content: the tree of `development` at 0375c9b833, unchanged.