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.
docs/CONFORMANCE-COVERAGE.md quotes known-gaps-rt.tsv's reasons and names each family's
justification kinds. 8fd1a5f35f changed the reasons and 57af29bde9 folded NewRuntimeNotice and
NewRuntimeAccepted into Degradation and AcceptedDifference, so the document is regenerated
(python3 -I scripts/conformance-coverage/coverage.py). Job m3-max-58840 found it stale
(conformance_coverage and the coverage check); every other step of that job was green.
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 fast switch to metal2vulkan-rt marked missing every runtime row whose old counterpart rt
does not hold under the same name. rt's and the translator's Rustdoc answer more of them:
- 28 runtime rows are implemented: the 9-argument texture and buffer-to-texture copies and the
options form with no option, `enqueue`, `commandBufferWithUnretainedReferences` (the same call
as `commandBuffer`), every `withRange:` setter of both encoders (a loop of the single setter),
`useResources:count:usage:` and `useHeaps:count:`, both encoders' memory barriers,
`newBufferWithBytesNoCopy` (Device::import_host_memory and a buffer in its block),
`MTLCreateSystemDefaultDevice` (Device::new), `MTLCopyAllDevices`
(Instance::physical_devices), a texture's `storageMode` through its descriptor, and
`renderPassDescriptor` (RenderPassDescriptor's Default);
- 23 translator rows are implemented: MTLLibrary and MTLFunction by the translator's Library
and Function (from_metallib, function, functions, library_type, install_name, properties,
function_constants_dictionary, reflection), and MTLFunctionDescriptor by FunctionDescriptor;
- maxBufferLength and a texture descriptor's resourceOptions are the consumer's;
- 53 missing rows take their own size and note: encoder calls (S for loops of existing calls and
store action options, M for stride binds and indirect draws, L for vertex amplification),
render pass fields, a texture buffer's descriptor and alignment, function options;
- refusals are named by rt's types: Gap::IndirectCommandBuffers, Gap::KernelInput and
Gap::DrawInput for function tables, RenderPipelineKind::VertexAmplification and Tessellation,
RenderPassKind::TextureType and NoAttachment, Gap::TextureBuffer;
- 629 notes no longer name the old runtime's items (RuntimeGap's variants, FeatureRow's rows,
its compiled_reflection, function_handle, allocated_size, new_library_with_source and
BlitOption).
coverage.py's group names follow (buffers, encoder calls, command buffer options, function
options). docs/METAL-COVERAGE.md and docs/CONFORMANCE-COVERAGE.md regenerated: implemented
593, missing 1118, out of scope 424.
Verified: every implemented row resolves by the test's own rules in its crate's sources (a
script run of them: runtime 237, translator 356, none missing); every `Type::name` a note names
is held by rt or the translator (14 checked; the same check over the table before this commit
finds 26 it does not hold). The compile job is named in the hand-off.
The old runtime is being deleted, and the coverage map's 649 runtime rows named its items. Every
runtime row now names metal2vulkan-rt's counterpart or none:
- 180 rows whose counterpart rt holds under the same name keep it;
- 29 take rt's name for it: DeviceProperties fields that are Device methods, the heap placements
that are Device::new_heap_buffer and Device::new_heap_texture, the lod-clamp and stencil
setters, the dispatch type taken by CommandBuffer::compute_command_encoder, and a texture's
getters through Texture::descriptor;
- 73 are out of scope as rt's README gives them to its consumer: labels, MTLHeap and its
descriptor, MTLBinaryArchive and every descriptor's binaryArchives, a resource's options, a
texture's parent and shareable getters, a library's and a function's device;
- 367 are missing, each with a group, a size and a note: indirect command buffers (71), function
tables, handles and dynamic libraries (38), mesh (33) and tile (26) pipelines and their calls,
encoder calls (59), argument encoders (24), libraries and functions as runtime objects (25),
and smaller groups. Their sizes are the group's, to be refined.
coverage.py names metal2vulkan-rt as the runtime and gains the new groups;
metal_coverage.rs reads crates/metal2vulkan-rt/src. docs/METAL-COVERAGE.md and
docs/CONFORMANCE-COVERAGE.md regenerated from the table (implemented 542, missing 1171, out of
scope 422).
Verified: every implemented runtime row resolves in rt's sources by the test's own rules (a
script run of them over the tree: 209 of 209); the compile job is named in the hand-off.
docs/CONFORMANCE-COVERAGE.md lists the ledger rows, so it is regenerated with the case's
35 old-runtime rows. The old runtime's sRGB rows say "the static notes ... and
srgb-texel-decode".
Verified: scripts/conformance-coverage/coverage.py --check reports the document as derived;
m3-max-57864 at 23dcb71cd6 failed only the coverage test this fixes, and its lavapipe
replays of both runtimes read the ledger rows clean (exit 0).
A case of our own MSL that reads its constants the way the consumer's two refused records do:
engine/fc_ushort3_half3 (our MSL, compiled by scripts/regen-air-fixtures on the M3) declares two
ushort3 function constants and reads each through as_type<half3>, which the compiler folds into
a <3 x half> load of the constant's <3 x i16> global (the regenerated .ll holds exactly that
load), so the translator holds both in the constant blob. Thread t stores, as floats, lane t % 3
of each, their half sum and t; the values (1.0, 2.5, -0.75 and 0.5, 4.0, 1.25) have exact sums.
The suite gains the call that makes such a pipeline: Side::compute_pipeline_with_constants
(newFunctionWithName:constantValues:error:, then newComputePipelineStateWithFunction:error:), on
the Metal side, the new runtime's side (FunctionDescriptor.constants), the old runtime's side and
the watching wrapper. The Metal side's constant setter pads each value's packed bytes with zeros,
so a setter that reads a vector type's aligned size reads zeros past the packed lanes.
Metal's recording (the M3, macOS 27.0.1 26A434, `conformance record` with three runs and the
validated leg, then `times --runs 8 --write`) stores the program's floats for every thread,
which metal_stores_the_programs_floats holds. The engine fixture inventory gains the fixture's two
rows, ok on every profile (blessed on the M3).
The case is named among those authored after the last whole-set cost --write, whose next
run pays its cost record, and docs/CONFORMANCE-COVERAGE.md is regenerated for it. The golden
table gains the fixture's cells on development, where the tables are blessed.
Verified: see the check job named in the landing.
docs/CONFORMANCE-COVERAGE.md derives each case module's tolerances from the Allowance::new calls
in its own text, so the helper in texture_query.rs left the four heap modules reading 'every
field' while they loosen both numbers of every answer on the new runtime. Each module now names
the allowance itself (the same path, loosening and justification); texture_query keeps the entry's
slug, DEVICE_OWN_SIZES, with the rule in its doc. The document is regenerated: the four heap
modules, pass_sequence_actions and astc_textures each read one more tolerance, 26 in all.
A fetch from a target made for shader writes and from one of unknown usage answers as the fetch
from a target made for shader reads, on both runtimes: the same three texel sites a code apart,
with the same counts on each card. Each ledger takes the read case's rows for its venues, reason
text unchanged (the device's conversion into an 8-bit unorm attachment it also fetches). The
coverage document counts the twelve rows the old runtime's ledger gains.
Verified: see the check job named in the landing.
Regenerated by the coverage tool at the cases' commit with their recordings: two more committed
recordings, fetch_ordered's six cases, and the case lists of the items they drive.
Verified: m3-max-56114 (msi) regenerated it, then conformance-host 1090 of 1090 passed, the
coverage document test among them; clippy of the conformance crate 0.
pass_sequence_actions crosses a store with the next pass's load over a single-sampled attachment;
this case asks the crossing it leaves open: whether the samples
MTLStoreActionStoreAndMultisampleResolve keeps are the samples the next pass loads. Each cell
runs two passes over an 8 by 8 RGBA16Float attachment of four samples: pass A clears it and draws
into each 2 by 2 cell under a sample mask of the cell's index, then stores and resolves into
resolve A (or, in the control cell, only stores); pass B loads it, draws into cell 0 under a
mask of its own and stores and resolves into resolve B. A kernel reads every sample after pass
B, and blits read resolve A and resolve B. The sample mask, not the device's sample positions,
decides which samples a draw writes, and every value is exact in half. A side that resolved in
the pass and dropped the samples answers every resolve right and every later load wrong.
Recorded on the M3 Max, macOS 27.0.1 (26A434), by `conformance record` in job m3-max-55692,
eight runs alike, and timed there by `conformance times --runs 8 --write`. Named among the cases
after the last cost run. CONFORMANCE-COVERAGE.md regenerated (job m3-max-55697: the conformance
crate's clippy clean and its host suite 1090 of 1090).
python3 scripts/conformance-coverage/coverage.py at ddf7a8ccd2 (job
m3-max-55493 on msi, which then ran the conformance crate's suite on
lavapipe against this document: 1087 tests run, 1087 passed; clippy
-D warnings and rustdoc -D warnings of the crate clean). One more case
module and recording, one more module that loosens a measured value (the
long-of-infinity elements).
Recorded on the M3 Max, macOS 27.0.1 (26A434), by `conformance record` in job m3-max-54229, three
runs each. Metal's side makes the same surface for these cases as for the VA-API ones, and each
recording's outcomes equal its VA-API twin's. CONFORMANCE-COVERAGE.md regenerated.
Recorded and timed on the M3 in job m3-max-54332 at 0cd13ee9f9 (record, then times --runs 8
--write, both legs, 8 rounds; Metal's validation ran the case). The coverage document is
regenerated.
Metal on the M3 Max (macOS 27.0.1, job m3-max-53825, three runs, one
outcome) answers metal2vulkan_devtools::threadgroup_start::answer in each
of the six dispatches: no word of the declared array or of the
[[threadgroup(0)]] region read nonzero before the program wrote it, in
the later threadgroups of 2048 of 16 KiB and in the second dispatch;
every pattern read back (0xffa00000); its SIMD groups of 32 in thread
order. docs/API.md states that answer, the engine fixtures' README lists
tgz_reads, and CONFORMANCE-COVERAGE.md is regenerated.
Recorded and timed on the M3 (53768 at 280632f1bd: record, then times --runs 8 --write; Metal's
validation ran every case). Each of the 1,200 recorded samples is the colour its way cleared at the
level and slice under it, which every_recorded_sample_is_the_colour_its_way_cleared now holds. The
coverage document is regenerated.
Verified: built and tested in the jobs the landing message names.
The planner's ruling: one new object of the consumer's own, the eight MTLResource getters
metal2vulkan-rt keeps none of (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions,
heap, heapOffset, isAliasable). Its text says who answers each and from what: an echo of what the
program gave at the make, each default resolved by the consumer, or the consumer's own object
(the device, the heap, its placement and its record of makeAliasable). It says nothing of what
Metal answers. rt's README names it in what the consumer implements. If rt ever answers one of the
eight, that getter is split out as storageMode is in the commit before.
The 17 sites of resource-aliasing, resource-labels and resource-own-getters where the rt side
answered resource_facts Unavailable take one row each, naming which of the getters the case reads
there and that storageMode compares at the storage-mode site beside it. The three cases are
re-recorded on the M3 (53582 at 40ff1a0a10): each recording gains its storage-mode sites and
nothing else changes. The coverage document is regenerated.
Verified: built and tested in the jobs the landing message names.
The six cases recorded by m3-max-53501 at e9205c330c (macOS 27.0.1, three runs each, Metal's API
validation layer on in the validated leg, which ran clean): every texel getBytes: and the blit read
back is the byte replaceRegion: wrote, over each surface's plane. A test holds the recordings to
that. The conformance coverage document regenerated for the new recordings.
A new family, surface_textures: BGRA8Unorm over a 'BGRA' surface, RGBA16Float over 'RGhA', and
R8Unorm and RG8Unorm over a '420v' surface's two planes, R16Unorm and RG16Unorm over an 'x420'
surface's. Each case makes the texture with newTextureWithDescriptor:iosurface:plane:, writes
every texel with replaceRegion:, and reads them back with getBytes: and with a blit into a Shared
buffer. The suite's existing surface cases are all Apple-private forms (framebuffer-only rotated
targets, and Metal's two-plane YCbCr formats); these are the form a consumer's surfaces take,
textures of ordinary formats over one plane. The x420 planes take the 16-bit formats, whose texel
is the plane's element.
The sides: Side::surface_texture. Metal's side lays the surface as the case states and reads it
back before a texture lies over it (metal_surface's single-plane surface may now state its
OSType). The old runtime's side takes a buffer standing for the surface, as the runtime takes an
IOSurface. The new runtime's side makes an exported surface of the planes
(Device::new_exported_surface), in the first of a dma-buf, an opaque fd and an NT handle the
device exports, at VA-API's 256-byte multiples; the case's texture is its plane's. The rt replay
prints each case's surfaces_in_place and surfaces_copied, the evidence of the form a venue took.
The rt side's other surface answers name what it lacks: a rotated target's setRotation: (or
setFramebufferOnly: at rotation 0), and a two-plane YCbCr texture over a surface's plane.
Verified: built and tested in the jobs the landing message names; the cases are recorded on the
M3 in a later commit.
Check m3-max-53356 at 73b58c77fc (msi):
- clippy 0, and the attachment-note tests 0;
- the conformance crate's tests 1 failure of 1075: the_conformance_coverage_document_is_what_the_sources_derive.
The DontCare rows' texel declarations (73b58c77fc) are a new module that loosens a measured value:
the document's tally reads 16 modules and 18 tolerances where the sources derive 17 and 19. Its
buffer_target_clears row now names the NewRuntimeAccepted tolerance.
Regenerated with python3 -I scripts/conformance-coverage/coverage.py at c2deff73b7. Only those
three lines change.
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.
fence_orders now loosens one site (case/order/y/words-written on the
new runtime's run, NewRuntimeAccepted), which the coverage document
counts: the_conformance_coverage_document_is_what_the_sources_derive
failed without it (job m3-max-52556). The case names the variant, as
the table lists justifications by variant.
Verified: in the jobs named in the landing's report.
Metal's answers (an Apple M3 Max, macOS 27.0.1 build 26A434, three runs, job m3-max-51921, record
and times in one job): pipeline-facts-render-multisampled-direct answers imageblockSampleLength
12 and imageblockMemoryLengthForDimensions: 1536 at [8, 4, 3], as the multisampled case with
indirect-command support does, and supportIndirectCommandBuffers false. The old runtime replayed
both on the M3 (MoltenVK) exact in the same job. rt's README line on the rule's measurements names
the twin. docs/CONFORMANCE-COVERAGE.md regenerated.
Verified: job m3-max-51921 (BUILD_CONFORMANCE=0, RECORD=0, TIMES=0, REPLAY_OLD=0, both cases exact on
the M3). The new runtime's comparison is the next check job.
Metal's answers (an Apple M3 Max, macOS 27.0.1 build 26A434, three runs each, job m3-max-51875,
record and times in one job):
- pipeline-facts-render-narrow-attachments, R8Unorm then RG16Float: imageblockSampleLength 6
and imageblockMemoryLengthForDimensions: 192 at [8, 4, 3]. RG16Float sits at byte 2, its
component's alignment, which is the rule metal::format::color_record holds ([(0, 1), (2, 4)]);
packing tight would answer 5, aligning every texel wider than a byte to 4 would answer 8.
- pipeline-facts-render-depth-stencil, RGBA8Unorm then RGBA16Float with Depth32Float_Stencil8 as
depth and stencil: 12 and 384, the same as the two colors without it, so depth and stencil take
no room.
The old runtime replayed both on the M3 (MoltenVK) exact in the same job.
The case comments and rt's README line on the rule's measurements state the two values.
known-gaps-rt.tsv gains each case's five rows on every venue that pipeline-facts-render-plain
already holds: device and label (the consumer's own) and the three tile getters (the libs census).
docs/CONFORMANCE-COVERAGE.md regenerated.
Verified: job m3-max-51875 (BUILD_CONFORMANCE=0, RECORD=0, TIMES=0, REPLAY_OLD=0, both cases exact on
the M3). The new runtime's comparison is the next check job.
compute_pipeline_facts and render_pipeline_facts were left at the Side default on the rt side,
so the two pipeline-facts cases whose state rt makes (pipeline-facts-compute-plain and
pipeline-facts-render-plain) refused the whole facts call. Both now answer through the state:
- compute: staticThreadgroupMemoryLength, supportIndirectCommandBuffers (false on every state rt
makes), imageblockMemoryLengthForDimensions: and requiredThreadsPerThreadgroup, the last two
getters present landed in 90792a2bfa;
- render: imageblockSampleLength, imageblockMemoryLengthForDimensions: and
supportIndirectCommandBuffers.
label and device are the consumer's own (rt keeps neither on a state), and a drawing state's
three tile getters (maxTotalThreadsPerThreadgroup, a tile threadgroup's, per Metal's
documentation of the render state's getter, threadgroupSizeMatchesTileSize and
requiredThreadsPerTileThreadgroup) are not rt's, as rt makes no tile render state (the
planner's ruling). Each is a refused Field, so the state's other getters compare.
imageblockMemoryLengthForDimensions: of a compute state is a Field too, as rt answers it with a
typed error for a kernel whose imageblock it does not measure.
Rows: 7, every venue: label and device of both cases (the consumer's own), and the three tile
fields of the render case, in words (rt's README names the tile getters it lacks). The rt
README's tile getter list gains maxTotalThreadsPerThreadgroup. The coverage document gains the
two facts types' field rows.
The other four cases are refused at the making as before (indirect command buffers, and the
kernel that reaches an imageblock).
Verified: coverage.py writes the document; build, tests and the lavapipe replay of both sides
follow in the check job.
The new runtime's side refuses two fields of these facts: the device relation of a library and
a function (the consumer's own, device), at 24 cases' case/facts/device, and a function's options
(memory2's libs census 11-19, m3-max-51379..51431: every function descriptor of the 17 streams
has options 0), at 22 cases' case/facts/options. Each row is one m3-max-51389 replay on lavapipe
listed as unlisted, every other field of these cases comparing exactly there; the facts reach no
device, so the rows hold on every venue. The coverage document counts them by field.
Verified at this commit: the rows are those m3-max-51389's rt lavapipe replay lists (46, site and
answer as listed); coverage.py --check.
reims keeps binary archives in its guest bundle: the device's MTLBinaryArchive holds only each
added function's lookup key, serializing and loading use the bundle's own file format, and no
message reaches the host, so neither runtime is ever asked. The planner ruled them the consumer's
own (ConsumerObject::BinaryArchive, "MTLBinaryArchive, binaryArchives", named in rt's README).
Rows on every venue: the six pipeline descriptor cases' binaryArchives field, which the new
runtime's side refuses, and the six binary-archive cases' archive programs (case/program), which
it leaves at the trait's default. The dynamic-library cases and library-from-data share the
archive program and are not archives, so they keep no row.
Verified at this commit: cargo fmt and coverage.py --check; the ledger and the replay run in the
lane's check job.
RtSide left function_facts, function_facts_from_descriptor and library_facts at the trait's
default, so 24 cases ended refused on rt (15, 7 and 2 on the earlier whole-set run). The
runtime's library is the translator's and a function is the translator's function of it, so the
side reads each getter as a consumer holding them does: the library's functions a program makes by
name (a Core Image kernel library's extern functions left out, by the translator's own stage), its
type and install name; a function's reflected properties and constants dictionary, through
Function::properties, or Function::specialized_properties for a function made with constant
values, whose dictionary the translator states is empty, as Metal answers it. The old runtime's
side shares the attribute and constant-value helpers, which move into function_facts.
FunctionFacts takes options and the device relation as Fields, and LibraryFacts the device
relation. The runtime keeps no device on a library or a function, so device is the consumer's
own, as the planner ruled (ConsumerObject::Device, named in rt's README); a function keeps no
MTLFunctionOptions, so options is refused, its rows waiting on memory2's every-stream count of
function options. Failure derives Eq, so every facts type keeps its Eq.
Verified at this commit: cargo fmt only and coverage.py --check; the build, the suites and the
lavapipe replays run in the lane's check job, whose replay names the device rows' sites.
RtSide left Side::shared_event_rises at the trait's default, so shared-event-rising-value ended
refused on rt. The probe's host sets, GPU signals and bounded host waits are the runtime's shared
event's, made as the old runtime's side makes them; the runtime keeps no label, so EventRise's
label becomes a Field the side refuses (the consumer's own, label), with its every-venue row, and
the coverage document counts EventRise by field.
Verified at this commit: cargo fmt only and coverage.py --check; the build, the suites and the
lavapipe replays run in the lane's check job.
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.
What: under the identity domains (the new runtime's profile) the translator no longer inserts the
barriers that make Apple's SIMD-group lockstep explicit (`lockstep::order`): `OrderKey::of` is
`None` there and `ordered_entry` takes the specialized entry as it is. The resident-table domains
(the old runtime's) keep the order until the cutover. With no lockstep barrier on the new
runtime's path, its one-row machinery is dead and deleted: `Compiled::rows`, `pipeline::one_row`,
`encoder::Module::Rows`, `keeps_rows` and `choose`'s `rows`, the `OneRow` and `RowLockstep` arms,
and the translator's `CompiledFunction::runs_lockstep_barriers_in_rows` with
`KernelFacts::lockstep_in_rows` (the API signature table; the version numbers rise in the
branch's last commit).
Why: documented Metal orders the threads of a SIMD-group only through barriers and atomics; the
Metal Shading Language calls two of them that conflict between barriers a data race. The order was
an emulation of undocumented Apple-GPU behaviour (owner's rule 1). Its barriers made 1,443 of 5,368
distinct kernels of the recorded streams observe their threadgroup partition, every pair of them
unproven, and they stopped partial-threadgroup dispatches the variant cannot run (rt's frame-320 and
frame-335 refusals of the 30-wide kernels). docs/API.md's accepted differences gain one entry, the
conformance case `simdgroup_lockstep` leaves its output words unchecked against it, and
CONFORMANCE-COVERAGE.md and REFUSALS.md are regenerated.
Tests: the identity-profile one-row test becomes `the_identity_domains_order_no_lockstep_pair`
(barriers under the default domains, none under the identity domains, the partial variant in
tiles); the harness's cells test keeps the old domains' one-row facts and adds the identity
domains' none; rt's one-row tests and the row-lockstep tree test go, and `row_cells` runs every grid
on its tiles' pipeline made with the state.
Verified: cargo fmt; coverage.py and refusal_surface.py regenerated. Clippy and the suites run on
the check job named when the branch is handed over.
Metal's answers (an Apple M3 Max, macOS 27.0.1, job m3-max-51288, record and
times in one job): every word stays as it was in both passes, the pass with no
mode and the pass with Disabled at both words, under Reset (0xaa bytes) and
under Accumulate ([100, 7]), as the lane table in cases/visibility.rs states.
docs/CONFORMANCE-COVERAGE.md regenerated.
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.
Metal's answer on all 14 sites is the stride model: each row at its offset plus the row index
times the stride, the bytes between and after the rows 0xcd. docs/CONFORMANCE-COVERAGE.md
regenerated (scripts/conformance-coverage/coverage.py).
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).
The old runtime holds DriverFact::ColorBlockDecodeIsMetals for the RX 7900 XTX and the Radeon
780M, so it announces no compressed-texel-decode there, and the decode cases' bound, justified by
that notice alone, justifies nothing: each of the twelve sRGB sites now differs twice, as the
device's sRGB decode (the row already listed) and as the case's loosening that nothing
justified. m3-max-50924's old-side XTX leg named the twelve; each gets its row beside the site's.
rt notes every block-compressed texture, so it announces the notice there and the sites are
announced (the same leg's rt side).
docs/CONFORMANCE-COVERAGE.md regenerated.
m3-max-50899's suites named three things of ee0827889e.
fresh_contents' a_row_loosens_the_notices_site_and_a_private_texture_s_fresh_site counted a
texture row's allowances without the compressed-texel-decode declaration its block-compressed
rows now make: it counts it, and holds that only those rows make it.
The old runtime's catalogue test holds an entry's Cost to the words the kind announces, before
whatever more it says: the measured bounds go after the announced cost (the RTX 2080's, and ANV's
and the UHD 630's BC3 alpha 2/255 and BC4/BC5 1.4/255, signed 0.0134, each BC4/BC5 texel within
0.0001 of the specification's exact decode), and the cost is the old runtime's again.
docs/CONFORMANCE-COVERAGE.md regenerated: 89 ledger rows fewer.
Verified: the bcref decode of the per-element dumps (the 2080, the Iris Xe and the UHD 630).
Expected: the suites green on msi with this commit.
A read, sample or gather of a BC texel on metal2vulkan-rt is the device's decode of the texture's
own blocks, where Metal interpolates a block's endpoints with 6-bit weights. rt carried no note of
it, so the ten BC1 to BC5 decode cases read divergent on every Linux venue with no notice behind
them. The old runtime announces the same difference as compressed-texel-decode, gated by driver
facts; rt decides by the format class alone, on every device, RADV included.
- PrecisionNote::CompressedTexelDecode in the translator's public enum (codec, and
ARTIFACT_FORMAT_VERSION 544; fast_paths' "elsewhere" list; validation allows it unbounded).
No pipeline stage records it, so no translation changes.
- Texture::precision_note: Some(CompressedTexelDecode) for a texture or view whose own pixel
format has a block extent (metal::format::block_extent: BC1 to BC7, ASTC, ETC2, EAC, PVRTC;
rt makes the last four only where the device holds the format), None otherwise, as
DepthStencilState::precision_note is shaped. Device test: a BC1, BC7, ETC2 and ASTC 4x4
texture (where the device makes it) and its sRGB view carry the note; RGBA8Unorm and its sRGB
view carry none.
- The old runtime's Degradation::from_precision_note maps the note to its existing
compressed-texel-decode kind (one arm, which the exhaustive match requires).
- The conformance rt side announces the note of every texture it makes (one keep_texture helper,
makes_texture, and the work runner's made resources).
- compressed-texel-decode leaves the suite's native notes: its catalogue entry states bounds, and
a native note loosens nothing. The ten BC decode cases declare it and loosen each round's
texels by the catalogue's largest bound for the family on any driver (BC1/BC2 4/255, BC3
6/255, BC4/BC5 7.4/255, signed 0.065; an sRGB form the sRGB decode's largest step over
4/255). The other families that make a compressed texture declare it at the notices site
alone: the BC moves and views, ASTC, ETC2/EAC, the read-write tier tables and the usage
table of the descriptor pairs.
- docs/API.md's catalogue entry covers both runtimes; rt's README states the note;
api_signatures and CONFORMANCE-COVERAGE regenerated.
The suite's tessellation cases read the tessellator's domain points with
rasterization off; none renders a patch. This case draws the owned fixture
tess_rendered_patches (a triangle patch of three control points fetched per
patch control point, a colour fetched per patch and passed flat) into an
8 by 8 RGBA8Unorm target under a recorded stream's patch-draw state
(fractionalOdd up to 64, factors per patch, counter-clockwise), with the
factors 8 bytes into their buffer. Two passes: `drawn` draws patches 0 and 1
(patch 1's zero edge factor culls it), then patch 3 alone from patch start 3;
`back-culled` culls back faces and draws all four, where patch 3 is patch 2
mirrored. Every texel is 0 or 255 per channel and no slanted edge meets a
texel centre, so the answer is exact whatever the tessellator's inner
points.
Recorded on the M3 Max (macOS 27.0.1) in job m3-max-49694, with its times;
a test holds the recorded texels to the module's description of Metal's
answer. The case lands without a cost record: a cost record is a whole-set
measurement, and `cost --alone` folds into one that does not exist yet.
docs/CONFORMANCE-COVERAGE.md regenerated.
Record mode (job m3-max-46378 at 37f73671dd, an Apple M3 Max, macOS 27.0.1 26A434) took the case's
Metal answer: plain Metal ran the pass with no error. Every instance fetched element
base + (iid - base) / rate, its count starting at the draw's base instance:
- rate 2 from base instance 0: elements 0, 0, 1, 1 (words 0x10, 0x10, 0x11, 0x11);
- rate 2 from base instance 5: 5, 5, 6, 6 (a count from instance 0 would read 2, 3, 3, 4);
- rate 3 from base instance 0: 0, 0, 0, 1;
- rate 3 from base instance 5: 5, 5, 5, 6 (from instance 0: 1, 2, 2, 2).
That is Vulkan's divisor, firstInstance + (instanceIndex - firstInstance) / divisor.
conformance times --runs 8 --write (same job) wrote both legs' figures: within the 10x margin, the
margin reported unjudged (the instrument's floor read 17.77 instrument costs on Metal's leg). The same
job's replay on the M3 Max (the old runtime over MoltenVK) reads exact.
docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py).
Record mode (job m3-max-45736 at f5172d90a3, an Apple M3 Max, macOS 27.0.1 26A434) took the case's
two Metal facts:
- Plain Metal ran the pass, Completed with no error, over 3 runs folded into one outcome. Every slot a
draw's vertex and instance sums reach holds the attribute buffer's first word, 0x10, with its sum,
and the one slot they do not reach stays 0xEE..: from vertex 0 slots 0-2 (0x10, 0..2); indices 1-2
at base instance 1 slots 2, 3, 0 (0x10, 2..4); vertex start 2^30 and base instance 2^30 slots 0-2
(0x10, 2^30..2^30+2). So Metal's constant step reads the first element whatever the vertex start,
the instance and the base instance, past the buffer's end included.
- Metal's API validation let the case run.
conformance times --runs 8 --write (same job) wrote both legs' figures: within the 10x margin, the
margin reported unjudged (the instrument's floor read 19.59 instrument costs on Metal's leg).
The same job's replay on the M3 Max (the old runtime over MoltenVK) reads exact.
docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py; --check passes).
Record mode (job m3-max-44847 at 09c51a35ef, an Apple M3 Max, macOS 27.0.1) took the case's two
Metal facts:
- Plain Metal ran the pass: every step answered Ok, and the command buffer is Completed with no
error, over 3 runs folded into one outcome.
- Metal's API validation stopped it at the pass: "Compute Function(vwp_words): the offset into the
buffer src that is bound at Buffer index 0 must be a multiple of 4 but was set to 2.", and the
same for dst at index 1.
docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py): 167 case
modules, 1,282 recordings.
Verified: the recording's facts as listed (read from the file); coverage.py --check passes.
6f5bd20321 removed the 16-bit `half` color output form on every device. That moved Device::new's
output, which the old runtime builds on: 111 golden cells on each RADV, ANV and MoltenVK profile
(5c47b9c867 -> bfe63b5097). The form comes back for Device::new alone, as a profile fact:
ProfileFacts::half_outputs is HalfOutputs::Sixteen in Device::new's facts (ROWS) and
HalfOutputs::Widened in Device::from_queries' (EVERY). Under Sixteen a `half` color output is
declared with 16-bit `float` lanes where the profile enables storageInputOutput16 and
shaderFloat16, as before 6f5bd20321. storageInputOutput16 is not one of the queries rule 2 lets
choose a second form, so the new runtime keeps one 32-bit form for every stage output. The fact
renders into no ROWS fingerprint, so Device::new's profile keys do not move.
- lower::stage_io: plan::half_variable (now reading the fact and the enabled feature),
IoObject::User::half, the 16-bit store and io_elem's width are back. StageIo::half_outputs and
the link contract's 16-bit lanes are back.
- The HalfOutputPrecision and HalfOutputFastMathBlend note texts, docs/API.md's degrade
catalogue, docs/FAST-PATHS.md and the half-output-blends case say what they said for the old
path, each scoped to Device::new, with Device::from_queries handing every device the `float`.
- known-gaps.tsv: the 52 MoltenVK rows for the M3 Max's half-output-blends-r16f, -rg16f and
-rgba16f go, as before 6f5bd20321: with the 16-bit output MoltenVK stored Metal's codes there.
docs/CONFORMANCE-COVERAGE.md is regenerated (3,783 -> 3,731 ledger rows).
- The Iris Xe's 62 half-output rows (6769c2eaaf) were measured with the 32-bit form on ANV, which
gets the 16-bit form again under Device:🆕 they are owed a re-run with it.
- SEMANTICS_VERSION 2157 (the 111 cells per profile change under unchanged keys) and
ARTIFACT_FORMAT_VERSION 530 (the artifact codec has StageIo::half_outputs again).
- The engine_stage_io test is back. It also checks that the profile from Device::from_queries is
HalfOutputs::Widened and keeps the output 32-bit on MoltenVK, RADV and lavapipe, with no
StorageInputOutput16.
Verified at 8e0e199a12 on 00ca405504, whose tree is this commit's but for SEMANTICS_VERSION (2156
there; development took it meanwhile) and development's later commits (03a3741772 and the
harness's), which touch none of this commit's files:
- msi 41897: golden_hashes_match_the_table with every difference listed, compared with the
tables at 5c47b9c867 and bfe63b5097. All 504 stage-io cells on the .ll rows that Linux compares
(56 on each of the 4 RADV, 4 ANV and MoltenVK profiles) are back at their 5c47b9c867 values,
none elsewhere. On ANV and MoltenVK those are the only cells that moved (280, under unchanged
keys). The RADV and NVIDIA columns are stale under profile fingerprints that development's
e0f567a8bc moved back before this commit (12,705 cells, the table not yet blessed for it); in
them only the stage-io cells above and 185 cells on each of nvidia-rtx50-linux and
nvidia-rtx5080-laptop (e0f567a8bc's NVIDIA restore) moved. No ROWS fingerprint moved with
this commit. The 55 stage-io cells per profile on .air.ll rows need metal-as and wait for the
M3 bless.
- msi 41813: clippy -p metal2vulkan --all-targets --all-features -D warnings, rustdoc
-D warnings, nextest -p metal2vulkan -p metal2vulkan-conformance in full: 4,719 of 4,722 pass.
The failures: golden_hashes_match_the_table, for the bless above;
the_public_signatures_are_the_committed_table, development's degradations! row, fixed since by
489bc24c4e; the_authored_4096_step_kernel_compiles_inside_the_budget, which passed alone on
the same build (41862) and is not in this commit's scope.
- msi 41814: clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd.
The six half-output blend cases differ from Metal on the RTX 3090 (59 sites) and on the Iris Xe
under ANV (62 sites). The ledger had no rows for either venue, so the conformance replay failed
there. Every site is the device's own blend, which the native-arithmetic contract makes the
answer, so each gets a row: 59 scoped `NVIDIA GeForce RTX 3090`, with answers equal to the
RTX 5080 Laptop's rows (no venue pattern covers those two without the RTX 2080, which no run
here measured), and 62 scoped `Iris(R) Xe`. docs/CONFORMANCE-COVERAGE.md is re-derived for them.
How the sites were shown to be the device's blend, by a measurement build (not committed) that
read every stored code back and set it beside plain float models of the blend:
- The `one-zero`, `min` and `max` sites store the source or the destination through the
attachment alone, and store Metal's codes on both devices, so both operands reach the blend
exact.
- RTX 3090 (NVIDIA 620.70.06): the exact blend rounded once to the attachment's precision gives
98.0% of the 16-bit words and 98.7% of the 32-bit ones. Into a 16-bit target the blend colour is
truncated to `half`; the runtime hands vkCmdSetBlendConstants Metal's float colour unchanged, so
the truncation is the device's. Every word that differs from Metal's is within 1.01 ulps of
that model at the largest operand's magnitude. A -0 + +0 sum stores -0, which is the 32768 and
2147483648 of the zero-1msa and sas-1msa rows.
- Iris Xe (Mesa 26.2.6): the float blend truncated toward zero into a 16-bit target gives 97.6% of
those words. The exact blend rounded to nearest gives every 32-bit word.
- On both devices every differing word is within two ulps of Metal's at the largest operand's
magnitude. That is inside the bound of the `half-output-fast-math-blend` precision note (three
half ulps, two float ulps). The note is announced on both devices: the cases' allowance for it
fired on all six cases (3090: 12 of 12 allowances fired; Iris: 6 of 12, the six silent ones are
shared-in-system-memory, which an integrated GPU does not announce).
Verified:
- conformance replay of the six cases exits 0, each run holding one GPU: ms01 RTX 3090
m3-max-41210, ms01 Iris Xe m3-max-41211, um870 RTX 3090 m3-max-41218.
- cargo nextest run -p metal2vulkan-conformance --all-features: 1043 passed (m3-max-41208).
The first run, before the document was re-derived, failed only
the_conformance_coverage_document_is_what_the_sources_derive (m3-max-41199).
- Measurements: m3-max-41151, 41171 and 41176 (um870 3090), 41174 (ms01 3090), 41175 (Iris).
These ran at tree 9326ca7fd8, which this commit's tree equals.
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.
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.