The round's device legs run every rt_replay test on every card, so the
OpenCL-mode test also plays where the device binds a kernel's buffers
(the twelfth form). It now asks the device's own answer,
device.translator().profile().binds_kernel_buffers(), the query the
runtime makes the form from, and asserts one bound dispatch and no
address dispatch where it binds them, else one address dispatch and no
bound one; it prints the form as "REPLAY opencl-mode form ..." for the
round's log. play_then is split so a test can make the device first
(play_on) and ask it before the play.
Lavapipe takes the address form; the check job at this tip runs it.
compare-dumps said which word of a buffer differed first outside every
cover, but not what either play held there, so telling a NaN from a
rounding step or a stale word meant reading both dumps by hand. A
Difference now carries that word in each play's dump (first_values,
little-endian; a short end's bytes with zeros above them, none past a
dump's end), and its line prints them after the word's index:
"the first word W (a 0x........, b 0x........)". The stream doc says so.
The three compare tests take the values in their expected lines and
Differences, and a new unit test compares three buffers whose second
word differs in b, ends 2 bytes into it, or ends before it.
The player refused a compute descriptor whose openClMode was true, so a
stream that makes an OpenCL-mode pipeline (a guest running OpenCL C on
Metal) stopped at its first one. The runtime's descriptor carries the
mode (open_cl_mode_enabled), and the translator links the kernel for it:
the three hidden buffers ahead of the kernel's own, its buffer indices 3
on, get_global_id with the dispatch's offset. The player now gives the
stream's value to the descriptor, off where absent, and the stream doc
says so.
The previous commit's test is its check on lavapipe: red before this
commit, green with it.
A device test of the player on the runtime: a stream makes a compute
pipeline state with openClMode true from our own kernel in the shape
Apple's OpenCL compiler writes (the translator's by-value kernel:
o[get_global_id(0)] = k + s.a), binds the first hidden buffer with a
global offset of 1 and one dimension, o at 3 and k and s by setBytes at 4
and 5, and dispatches three threads. o[1..4] must read 3.75 and o[0]
keep its -1, nothing skipped.
The player refuses openClMode true today, so this test fails at this
commit (the play stops at the pipeline state); the next commit gives the
key to the pipeline descriptor.
3934 of the 6297 committed Metal rows were recorded under an ORACLE_ABI older than the
current metal-literal-resources-v49 (v18 to v48). All of them are in environments no
reference names: apple-m2-macos26.5.2, apple-m3-max-macos26.5.2, apple-m3-max-macos26.7,
local-metal and local-metal-m2. c3-references.json's one reference is the primary,
apple-m3-max-macos27.0.1. No such row matches a case's dependency, so none compares
anything. Each one also made its case's Metal state stale in corpus-status: the index's
state is stale while any row is. That flag stood on 2184 of the 2363 cases, so it could not
show a case whose current row had gone stale. The 26.7 rows went stale at 4def63989b
(2026-11-03, ORACLE_ABI v49); the older ones went stale earlier. Every one predates
fc9c99916d.
Each case keeps its one v49 row in the primary: 2359 qualified and 4 reference gaps.
Texts that named the dropped environments now name the primary, after checking that the
answers are the same there:
- the rationales of three cases (shard_023 lines 26 and 27, shard_052 line 43). Their
26.7 and 27.0.1 rows have the same output and input digests, and a rationale is not
part of a case's identity;
- the notes of the four reviewed reference gaps in cutover/c3-reviewed.json. Their 27.0.1
rows record the same GPUFamily10 reference gap.
Search for readers of a non-primary Metal environment:
`git grep -n -E 'apple-m3-max-macos26\.7|apple-m3-max-macos26\.5\.2|apple-m2-macos26\.5\.2|local-metal'`
outside corpus/observations, at 467e7441ef. Zero readers. The hits left are prose:
- c3/reference.rs:223 (an example of the id's format) and c3/reference/tests.rs:12 (the
naming function's test);
- comments that state where a measurement was made: lower/sampler/footprint.rs:6 and its
tests.rs:3, whose eight cases' 26.7 and 27.0.1 rows are equal; and
tests/engine_simd_past_n.rs:148, a probe's readings with no committed row. They stay as
written, so the translator's source fingerprint does not move for a comment.
No version bump is owed. The index clears and reloads every Metal row on each sync
(index.rs:603-608), and no versioned cache keys on them.
Verified on the same row deletion (job m3-max-75793 on the Intel ARL laptop node, at the
first form of this change, a0d54d649c):
- corpus-index and corpus-index --check rc=0 before and after;
- corpus-status over every case: 2184 metal=stale and 2 current before; 0 stale after
(12 current and 4 reference_gap listed, for their engine slots);
- public case qualification on lavapipe rc=0: 20 cases metal=current with vulkan=current,
and 1 with metal=current and vulkan=stale (a committed Vulkan row, unchanged here);
- the validation suite 1312 of 1312.
Read from the committed files (python -I): 2363 rows kept, 3934 dropped, 64 shard files.
Each of the 42 committed Vulkan rows matches a kept v49 row on the case, the input digest
and the output digest.
The census's --bless-additions at 031c37d674 adds 15 new cases, all compiled on the
table's 9 profiles. It removes no case, adds no profile and changes no existing cell
(changed_cells=0, regressions=0, failed=0). The artifacts_at line takes the product's
new fingerprint.
Verified: job m3-max-75761 on the Apple M3 Max. 2363 cases, 21267 cells,
18973 compiled and 2294 refused, 61 s wall, and the parent's peak RSS was 102 MiB.
Five authored cases over engine/fc_half_gate, one constant set each: s = 1.5 (0x3e00), +0.0,
-0.0 (0x8000), a quiet NaN (0x7e00), and s unsupplied. They were installed with
corpus-case-check and qualified on Metal on the Apple M3 Max (jobs m3-max-75725 and
m3-max-75726, three executions each).
| s | fch_gated_sample_mask (target) |
|---|---|
| 1.5 | the 0xAB fill: the mask is an output |
| +0.0 | the colour: the mask is not |
| -0.0 | the 0xAB fill: the mask is an output |
| NaN | the 0xAB fill: the mask is an output |
| unsupplied | the colour: the mask is not |
So a half predicate reads as a float one does: Metal keeps what it gates where the supplied
value's bits are non-zero, -0.0 and a NaN included, and drops it at +0.0 and where the constant
is unsupplied. The three variants whose answer is the target's fill declare no_effect, which
Metal qualification held them to. The checker records each case as partial, as it does the float
ones: its AIR layer evaluates no half predicate.
fc_half_gate is the half form of fc_float_gate, from MSL of ours compiled by
scripts/regen-air-fixtures (Metal 32023.922, SDK 27.2, precise maths). Its AIR writes the internal
half global @__metal_implicit_fc_pred_0 from air.normalize_function_constant_predicate.f16 of the
constant, declared `half (half)`, and gates the [[sample_mask]] member of the fragment
fch_gated_sample_mask's output struct by it. The function writes colour and a mask of 0 whatever
the constant is, so the render target shows the output's presence, as fc_float_gate's fragment
does: uncovered where the mask is an output, the colour where it is not.
The engine inventory gets its two rows, written as `ok` on every profile, as fc_float_gate's are.
The golden hashes and tests/air_input are left to the bless on development.
Ten authored cases over engine/fc_float_gate, one constant set each: s = 1.5, 0.0, -0.0
(0x80000000), a quiet NaN (0x7fc00000), and s unsupplied, for each of its two entries.
They were installed with corpus-case-check and qualified on Metal on the Apple M3 Max (jobs
m3-max-75712, m3-max-75714 and m3-max-75716, three executions each).
| s | fcf_gated_argument (out) | fcf_gated_sample_mask (target) |
|---|---|---|
| 1.5 | 1.25, 2.5, 3.75, 5.0 | the 0xAB fill: the mask is an output |
| 0.0 | -7.0 | the colour: the mask is not |
| -0.0 | -7.0 | the 0xAB fill: the mask is an output |
| NaN | 1.25, 2.5, 3.75, 5.0 | the 0xAB fill: the mask is an output |
| unsupplied | -7.0 | the colour: the mask is not |
So Metal keeps what the constant gates where the supplied value's bits are non-zero, -0.0 and a
NaN included, and drops it at +0.0 and where the constant is unsupplied. The kernel reads the
argument where C reads the float as true, a NaN included, and Metal binds it there.
Buffer 1 is bound in every kernel variant: the slot is declared and not required, so the cases do
not encode a presence rule. The three sample-mask variants whose answer is the target's fill
declare no_effect (outside the identity), which Metal qualification requires of an answer equal
to the initial bytes. The checker records every case as partial: its AIR layer evaluates no float
predicate (canon::static_values reads integer globals), so the argument is optional and the
output not required, which binds every variant alike.
fc_float_gate is MSL of ours compiled by scripts/regen-air-fixtures (Metal 32023.922, SDK 27.2,
precise maths). Its AIR has the shape commit 267d3163a6 reads: the internal float global
@__metal_implicit_fc_pred_0, written by the static initializer from
air.normalize_function_constant_predicate.f32 of the constant `s`, which is declared as
`float (float)`, and one predicate metadata node naming it for two uses:
- fcf_gated_argument: buffer(1) gated by `s`. The body reads gated[i] exactly where `s` is
defined and true as C reads a float (`is_function_constant_defined(s) && s`, so a NaN is true
and -0.0 false) and writes -7.0 elsewhere, so an argument dropped where the body reads it shows
as a wrong value. The definedness guard keeps the unsupplied variant a defined question: a
plain `if (s)` leaves a value use of an omitted constant, which Metal leaves undefined and the
case checker refuses.
- fcf_gated_sample_mask: the [[sample_mask]] member of a fragment's output struct gated by the
same `s`. The function writes colour and a mask of 0 whatever `s` is, so the render target
shows the presence itself (uncovered where the mask is an output, the colour where it is not),
including for the values where the kernel's body reads nothing. Neither executor records
pipeline reflection, so a kernel argument's presence alone is not observable; an output's is.
Precise maths (`// metal-fast-math: off`) so that a NaN compared with 0 is defined, not poison.
No `.air` beside the text: engine/ commits one only where a test reads Apple bitcode, and the
Metal oracle assembles the `.air.ll`.
The engine inventory gets the fixture's four rows, written as `ok` on every profile: a kernel
with no constants writes the sentinel, and a fragment whose mask is absent writes its colour.
The golden hashes and tests/air_input are left to the bless on development.
The bound-buffer form (rule 2's twelfth form) changes what every compute kernel's module holds
on a device that binds kernel buffers, and SEMANTICS_VERSION moved to 2305, so the golden hash
table's keys and the census's artifact hashes went stale. The gate at 29c40fa526 failed only
golden_hashes_match_the_table, class "bless due (stale cells only, keys changed)".
Re-blessed on the M3 Max at da7cfda87c: the engine inventory, the golden hashes and the air_input
printouts (m3-max-75238, all three exit 0; only golden_hashes.tsv changed, 1,546 rows), and the
authored compile census (m3-max-75239, exit 0). In the census, 2,357 rows before and after,
none added or removed, and no row's verdict changed: only artifact hashes and the artifacts_at
product line moved.
The granule (robustStorageBufferAccessSizeAlignment) reads 0 where VK_EXT_robustness2 is not
exposed, so the plain minimum rule named the runtime floor's 0 as beyond every device that has the
extension (job m3-max-75044: three profile tests, the Iris capture among them). The rule subgroup
size control's minimum takes, 0 states none and a value needs the device's and at least it, is now
one variant for both members (OptionalMinimum), and the direction test holds the granule's three
cases on the committed lavapipe.
Verified: fmt; the suites run in the next gate job.
Every committed profile's context chains VkPhysicalDevicePipelineRobustnessFeaturesEXT where it
lists the extension, so each of the 28 contexts' pinned chain moved (bless_opened_chains, job
m3-max-75043).
docs/API.md: section 1's bound kernel buffers (the query's features and every limit set 0's
layout reaches, the four kinds of slot that keep their address by structure), section 5's
SlotBindOffset view, and the accepted difference of a bound buffer's out-of-bounds reach: up to
15 bytes before a buffer off 16 and up to 3 past a length off 4 where
robustStorageBufferAccessSizeAlignment is 4 (none on NVIDIA), reads and writes landing in the
same process's memory, its own or shared with it by name, and past a buffer the consumer placed
by heap_buffer_size_and_align the block's padding (zero or the same device's earlier bytes,
never another device's). The runtime README: the extension row, the Bound kernel buffers floor
entry with its feature table (pool_reach's runs: Iris Xe, 780M, XTX and RTX 3090 bound, jobs
m3-max-75037..75040; the 780M under AMDVLK, which lists no VK_EXT_pipeline_robustness at the
runtime's Vulkan 1.3, in the address form, m3-max-75041/75042), the counters, and the check's
known gap. The placement comments at encoder::view and HEAP_BUFFER_ALIGNMENT.
Suite pins (m3-max-75036): the stage helper's version 3 for its robust compute chain; the
validation runtime-sources pin (RUNTIME_VERSION is already bumped in this change); the profile
subset rules for robust_buffer_access2, robust_buffer_access_update_after_bind (implications)
and robust_storage_buffer_access_size_alignment (a minimum); the enable test's device with room
for set 0's 31 storage buffers; the README floor test's pipeline-robustness feature table.
pool_reach places its target between two 256-byte neighbours of one Shared block and reads and
writes word indices inside it, before its first byte and past its end (beyond any slack), at bind
offsets 0 and 16: every read outside reads zero, every write outside lands nowhere, the
neighbours keep their fills, and the dispatch counts in the form the device takes
(bound_dispatches where the translator binds a kernel's buffers, address_dispatches elsewhere).
The fixture's companions are regen-air-fixtures' (job m3-max-75033). Built only; the device runs
follow.
The runtime's containment test places its target between two neighbours of one block and gives
it indices inside, before and past the buffer. Its companions come from regen-air-fixtures next.
A module that reaches its buffers through storage views of set 0 now requires the
pipeline-robustness feature (VkFeature::PipelineRobustness), which a pipeline needs to state its
own robustness. The out-of-bounds contract reads that requirement (ModuleFacts::robust_views):
such a kernel's views are contained by robustBufferAccess2 (Check::Robust2), their atomics by
the shader's check, both reading zero, as before for the read rule. Built only; the suites and
the authored out-of-bounds cases on a bound card follow.
The harness's matrix counts gain bound_dispatches and address_dispatches, and the replay player's
executed counters gain those two with buffer_sets_written and buffer_sets_held, so a run shows
which form its dispatches took. Built only; the harness run is the Iris read that follows.
The validation contexts' enable table (Structure::PipelineRobustness, promoted in 1.4), the
fake device of the ash query's tests, the runtime's extension name for the translator (its
description refused 'enables PipelineRobustness without exposing it' on the Iris Xe, job
m3-max-75007), the api_surface table's two constants and the signature table
(scripts/api-signatures/signatures.py --bless).
Verified: the translator suite's member-table and surface failures (job m3-max-75004) are
these; a rerun follows.
What: Metrics::dispatch_hazard_barriers is now the sum of nine sources, each such barrier in
exactly one: dispatch_after_write_barriers and dispatch_write_after_read_barriers (the
dispatch's own dependencies), then dispatch_encoder_end_barriers, dispatch_pass_end_barriers,
dispatch_indirect_barriers, dispatch_unbound_barriers, dispatch_arena_piece_barriers,
dispatch_heap_barriers and dispatch_other_barriers. The replay player prints the nine on each
frame line's executed counters and in the report's totals. The tally's bit mask is a u128 (69
metrics).
The rule for a barrier with several causes: it counts under the dispatch's own dependency where
it has one, first a write (it reads or writes a resource a command since the last barrier
wrote), then a write after a read (it writes one that was only read), both by the resource's own
id; otherwise under the first source in this order: an encoder that wrote ended; a render pass
moved nothing home (or copied a resolve into a buffer); an indirect dispatch after a write since
the last barrier that reached argument reads, whatever buffer was written; an access outside
every resource (a read after a write, a write after any access, or the barrier such a write
owes); a Private-arena piece after the first; a conflict through a heap's one id alone (an
exported surface's buffer and planes, which share one id, count here too); anything else (a
memory barrier call, a release to another API, a concurrent encoder after commands that touched
anything). An owed barrier keeps the first of its causes in that order. In a concurrent encoder
the dependency is read only where a barrier is owed, as Metal orders nothing else there. Two
buffers of one heap over the same bytes count under the heap: at buffer level they are two
resources.
How: a heap's resources are marked in the hazard sets by the heap's id, as before, and also by
their own ids in a second table of the sets that places no barrier and only tells a dependency
on the resource from a conflict through the heap's id. Building::owe takes its cause and no
longer starts the sets again; the command that pays the owed barrier does, after reading them:
Building::command clears them after paying, and dispatch_hazards takes its command buffer
without paying (current_command) and pays the owed barrier itself, counted by every cause it
has. Where barriers go is unchanged: each path that paid an owed barrier records the one
barrier it recorded before, and the sets start again at the same barriers.
Rider: Device::buffer_alignment (no Metal counterpart) returns the alignment Vulkan's memory
requirements gave the runtime's buffers, which the pool read at the device's making. The replay
player's device line prints it (`device NAME runtime rt buffer alignment N`), and the device
test prints it and checks it is a power of two. The runtime prints no line of its own at a
device's making, so a consumer's log shows it only by reading this accessor.
Why: the planner's reading of the dispatch-hazard barriers: whether the sources that are not the
guest's own dependencies reach a quarter of a frame's barriers on any stream. The buffer
alignment goes into every lab log because the ring and the zero address assume a multiple of 16
with no query behind it.
Tests: every_device_counts_each_dispatch_barrier_in_one_source checks the write after a read,
two encoders' ends (the second's dispatch reading the write before it counts as that
dependency), a render pass's end that moved nothing home, an indirect dispatch after a write of
another buffer, a read outside every resource and a memory barrier in a concurrent encoder, each
in its one source with the sources summing to the dispatch barriers;
every_device_places_barriers_at_hazards_only checks the dependent and concurrent encoders' in
the write dependency and none for independent dispatches;
every_device_orders_a_heap_s_resources_as_one checks the heap's source, and the write dependency
for one buffer of a heap used twice; the arena test checks its pieces' barriers in the arena
source; the hazard sets' unit tests check the own-id table. The signatures table is blessed (9
fields, 1 method).
Verified: nothing yet in this commit; the gate (fmt, clippy in three configurations, Rustdoc,
the runtime suite on lavapipe and the validation suite) runs on it next.
What:
- Metrics counts every barrier in one of seven causes, whose sum Metrics::barriers now is:
pass_start_barriers (a render pass's first), pass_home_barriers (the move of its attachments
home at its end), blit_barriers, dispatch_hazard_barriers (a dispatch's own, at a hazard or
paying one owed), segment_end_barriers, upload_barriers (the uploads' and Managed copy-ins'
barriers, the over copies they carry among them) and other_barriers (inside a pass, over
copies in a command buffer, heap moves ahead of a command or segment, releases). Metric::Barriers
is gone: each site that records a barrier counts its cause, and the shared helpers
(Building::barrier, alias::record, over::record_side) take the cause from their caller.
- The replay player's executed counters carry the seven, so each frame line prints them.
- The player's stream counts (the guest's, fixed by the stream) add blits, an encoder's copy,
fill, mipmap, synchronize, reset and optimize commands, and the buffer slots the set-buffer
calls set on render and on compute encoders, each split into buffer changes (another buffer
than the slot held, or its first set) and offset-only changes (replay/binds.rs).
- The runtime backend's report adds an `over copies by frame` line: over-copy bytes a frame,
mean and largest frame, by memory class (Private, Shared) and by cause (pitch, dma-buf, host
memory, every other cause as own_image), and the number of textures in an image of their own
the largest frame's calls named (new_runtime/over_frames.rs), from counters the runtime keeps.
- docs/REPLAY-STREAM.md and the runtime README name them; the signatures table blessed (7 fields).
Why: the planner's reading of round d9b644bae7's plays: whether pass-boundary and blit barriers
are half or more of a frame's barriers (the two pass forms), and whether over copies of Private
buffers reach 1 MB or 5% of a frame's copied bytes (the third form), needs the barrier split and
the over-copy split a frame, beside what the guest asked for; the guest's buffer binds per draw
and per dispatch size the descriptor work.
Tests: every_barrier_rt_records_is_counted adds a pass over a texture whose home is shader-read
and checks each cause's count against the barrier commands recorded (pass start 1, pass home 1,
blit 2, dispatch hazard 0, segment end 1, upload 6 or more, other 0);
every_device_places_barriers_at_hazards_only checks the dispatch-hazard and segment-end counts on
dependent, independent and concurrent encoders;
every_device_reads_its_attachment_through_a_texture_after_a_memory_barrier checks the causes on
the feedback-loop and the copy path; the player's
the_stream_fixes_its_calls_commits_encoders_draws_dispatches_blits_and_binds checks blits and
every bind count; over_copies_by_frame_give_the_mean_and_the_largest_frame checks the line.
What: two counters, so reach is counted rather than guessed.
- Metrics::over_copy_bytes_private and Metrics::over_copy_bytes_shared split over_copy_bytes by
the memory class the bytes shaders reach are in (MemoryClass of the buffer's block; a Managed
buffer's device copy counts in neither). OverCopy carries the class; Counters::over_copied
takes it.
- Metrics::rendering_interrupts counts each vkCmdEndRendering and new vkCmdBeginRendering inside
one render encoder (RenderCommandEncoder::interrupt, its one site): barriers, copies a draw or
a visibility result mode needs first, feedback and heap moves, an execution's count kernel.
The passes counter counts encoders and cannot show these.
- The replay player's executed counters carry the three, so every play's frame lines print them;
docs/REPLAY-STREAM.md and the runtime README name them; the signatures table blessed (3 fields).
Why: the per-frame counts of round d9b644bae7's plays put over-copy bytes at 4.87 MB a frame on
the desktop stream (5080) and 34.5% of bytes copied on the 780M recording (Iris), with no way to
tell how much lies over Private buffers, whose bytes no host write reaches; and no counter shows
how often a render encoder's rendering is cut.
Tests: each_memory_class_counts_its_copies_bytes_alone (device-free); the device test
every_device_counts_each_textures_copies_under_its_cause checks the class split for each copy
and adds a texture over a Private buffer (pitch cause on lavapipe);
every_device_reads_its_attachment_through_a_texture_after_a_memory_barrier holds the count at 2
on both the feedback-loop and the copy path.
What: corpus-triage --audit authored-compile --bless at f69c237c91 (m3-max-74463, from the check
m3-max-74462's cells). 137 case rows change, and so does the artifacts_at line, now at product
a0b0295ed473...: 666 of the table's 10,486 executed-artifact digests moved. Every cell's outcome
is unchanged: with the artifact digests stripped, the old and new tables are equal line for line.
The check read differences 0 and regressions 0 over 2348 cases on 9 profiles.
Why: the only translator change since the last bless (a26b61b3b2, at efd7dbcd4d) is the deletion of
the one-row, unit-axes and pulled-vertex-buffer variants (aa2b0fc670, 85e34d3080). Its golden
table diff on the M3 (m3-max-74453) was 0 rows removed and 0 added, so no SPIR-V module moved. The
moved digests are expected from the UnitAxes relief fact, which those commits stopped emitting and
the runtime ignored, together with ARTIFACT_FORMAT_VERSION 597 -> 598. That cause is expected, not
verified case by case.
The suites job m3-max-74443 at 64f15d57a9 failed one test,
candidate::engine::artifact::tests::the_runtime_sources_are_the_committed_ones. 6df965ee26 edits
two of the guard's inputs. No run of a given artifact changes, so only the hash moves, to the
35e965ba... that the test printed in job m3-max-74454:
- crates/metal2vulkan/src/lower/dispatch.rs loses the inserts of RuntimeFact::OneRow and
RuntimeFact::UnitAxes. They ran only when the compile's inputs had one_row or unit_axes set,
and only VariantKey's one_row and unit_axes set those, which no product code set. Every product
compile records the same facts as before.
- crates/metal2vulkan/src/device/mechanism.rs loses the Mechanism arms of those two deleted
variants. The arms of every fact a pipeline still carries are unchanged.
The runtime crate's edits are not guard inputs, and they change no run either:
- crates/metal2vulkan-runtime/src/pipeline.rs loses an arm that ignored RuntimeFact::UnitAxes,
which the translator no longer emits;
- crates/metal2vulkan-runtime/src/tests/translate.rs is test code.
RUNTIME_VERSION is unchanged. The validation suite at this tip checks the guard green.
VariantKey::one_row and VariantKey::unit_axes had no product setter: every
product path builds VariantKey::new() (the runtime's render_variant_key call,
compile_render_pipeline, compile_mesh_pipeline, render_pipeline_key, the stage
entries), and the runtime's kernel route builds its LoweringInputs through
kernel_inputs_read and kernel_variant, which set neither. Their forms ran only
under tests.
Deleted with them:
- LoweringInputs::one_row and ::unit_axes, their key tags ("one-row",
"unit-axes", appended only when set, so no product key moves);
- RuntimeFact::OneRow (emitted only under the variant) and the one-row
branches of the lockstep order (OrderKey::one_row, the cleared-rows
retain); a device's profile now fixes the whole OrderKey, so a stage entry
keeps one ordered entry (KEPT_ORDERS 2 -> 1);
- RuntimeFact::UnitAxes and its computation (divergent::unit_relief, the
relief at workgroup.rs and divergent.rs, up to seven uniformity analyses a
predicated kernel), and the unit-axes support of the uniformity analysis
(Uniformity::with_unit_axes, the `unit` parameter). Readers checked: the
runtime ignored it (pipeline.rs, `UnitAxes { axes: 0, .. } => {}`, gone);
validation, the harness and the conformance suite name it nowhere; the
CLI's --emit-meta writes every dependency generically, so the fact leaves
that JSON and nothing there reads it; docs/API.md's paragraph is rewritten.
- Tests of the variants: the one-row halves of
engine_simd_emulated (now a_row_tile_keeps_its_lockstep_barriers_and_records_row_lockstep),
engine_simd_lockstep (now ..._clears_a_tree_reduction_in_rows, which asserts
RowLockstep on the plain pipeline and its absence for the mixed guard), the
harness's cells test, and the runtime test's relief check (now
every_device_runs_a_kernel_whose_walk_diverges_by_row, which still runs the
predicated walk and checks Metal's sums).
ARTIFACT_FORMAT_VERSION 597 -> 598: the codec loses RuntimeFact::OneRow and
::UnitAxes (and, in the next commits, VertexInputState::variant_pulled).
SEMANTICS_VERSION unchanged: no product output changes under a kept key.
Consumer search: consumer-uses.sh at the consumer's 19b32575f (development
and 9 steelbrain/* refs younger than a day): 0 code hits for one_row,
unit_axes, OneRow, UnitAxes, VariantKey, LoweringInputs, RuntimeFact.
In-tree grep after the change: no one_row, unit_axes, OneRow or UnitAxes
outside unrelated locals (dispatch.rs's DeepThreadgroup `one_row` spec value,
conformance locals).
Checked by the lane tip's jobs (quick check, suites, golden diff, states-only
play), named in the lane report.
A heap texture that another placement's texture wrote over after its last write was reported by
compare-dumps as a difference: the dump loop passed no cover for a texture (dumps.rs: "always `-`
for a texture"), so the bytes Metal leaves undefined there were compared. Each texture a listed
command buffer stores or binds is now dumped, when the dump reads it (after the wait that saw
the command buffer complete, the moment a buffer's ranges are taken), with the cover 0..N, N its
dump's length, where the cover rule holds any byte of it covered (Covers::covered), and `-`
otherwise. A texture's ranges in the rule are its bytes in its heap, which the dump's parts are
not laid out as, so a covered texture is covered whole. The compare then leaves its words out
as it leaves out a covered buffer word. dumps.rs and docs/REPLAY-STREAM.md section 10 say so.
Test: the_dump_compare_leaves_out_a_covered_texture_and_reports_one_outside_every_cover (no
device; Kept reads a texture part's first word from a per-texture word where it holds one). Of
three textures placed in a heap, #5 and #6 over each other and #7 apart, two dispatches of a
state that writes slot 0 write #5 then #6, which covers #5; the second play reads #5 and #7
otherwise. #5's cover is 0..32 and its differing word is counted covered; #7, covered by
nothing, is the one difference reported.
Verified at this commit: nothing yet; the lane's jobs follow.
The player marked a pass whose renderTargetArrayLength is 2 or more as one the runtime's
descriptor does not hold (Unheld(renderTargetArrayLength)) and skipped its encoder, though
RenderPassDescriptor::render_target_array_length takes it: the runtime renders that many slices
from each attachment's slice, refuses an attachment with fewer slices (AttachmentPlace) and
answers a length past maxFramebufferLayers with Gap::RenderPass of ArrayLength. The player now
sets render_target_array_length from the recorded value (narrowed to u32 as the other counts
are) and lets the runtime decide: a gap is a skipped encoder counted by the gap, and a refusal
stays the play's error. The attachments already carry slice and resolveSlice into the
runtime's descriptor; no other field is dropped for a layered pass.
The dump's stores read a layered pass's attachment as its first slice alone. They now keep each
pass descriptor's renderTargetArrayLength from its m2v.setPass record and store that many slices
from the attachment's slice (or the resolve's), through the MTLStoreActionUnknown path too.
dumps.rs and docs/REPLAY-STREAM.md (sections 10's skipped encoders and the dump) say so.
Tests: a_layered_pass_plays_and_its_draw_renders_the_layer_it_selects (device cfg; a stream of
a 2D array of two slices, R32Uint, renderTargetArrayLength 2, cleared to 7, and rt6_layered's
triangle selecting layer 1: no encoder or draw skipped, the blit's check of both slices matches
7 then 0x101, and the dump of the command buffer holds both slices) and
a_layered_pass_s_dump_holds_each_slice_it_renders (no device; Kept: length 3 stores slices 1 to
3 of a Store attachment and 0 to 2 of an Unknown one, length 1 the slice alone).
Verified at this commit: nothing yet; the lane's lavapipe job and the quick check follow.
The runtime player refused setSamplePositions:count: on a render pass
descriptor ("not played on a render pass descriptor"), so every play of a
stream whose 2D renderer sets positions on its 4-sample pass stopped before
that pass.
It now plays the call as the runtime treats it: the runtime's descriptor has
no field for the positions and every multisample pass rasterizes at Vulkan's
standard sample locations, so nothing is set and nothing is refused. The pass
keeps the positions its last call set, and each render encoder the runtime
makes of a pass whose positions differ from Metal's defaults for the pass's
sample count (its attachments', or defaultRasterSampleCount with none) is
counted on a report line, with the first one's frame and call:
"passes at sample positions other than Metal's defaults N: rasterized at the
defaults, Vulkan's standard locations; the first at frame F, call C".
Metal's defaults are taken as Vulkan's standard locations at 1, 2 and 4
samples (the spec's Standard Sample Locations table; the runtime's floor row
standardSampleLocations and its known gap name them Metal's defaults at those
counts; the conformance rows sample-positions-default-4x/-2x). No other
count's defaults are held, so a set at any other count counts as differing;
an empty list (count 0) is the defaults.
Tests: rt_replay's sample_positions_play_and_a_pass_at_other_positions_is_counted
writes its own stream, two passes over a 4-sample target, one at the 4x
defaults and one at four others; it plays through with nothing skipped and
the line counts only the second (call 12). Without the fix the play stops
refused at call 5. new_runtime's
sample_positions_differ_from_metal_s_defaults_of_the_pass_s_count checks the
comparison (defaults, one coordinate off, reordered, fewer positions than
samples, Vulkan's 8x locations) and the line at zero, without a device.
Docs: docs/REPLAY-STREAM.md lists the call among the pass descriptor's
setters and says how the backend plays and counts it.
What: corpus/authored-compile.tsv gains case 884ad7d75a22's row (the AIR 1.8 sampling case of
f4f6fd32cf), compiled on all 9 profiles. No other row and no artifacts_at line moves: the
translator's inputs at efd7dbcd4d equal db3a88526b's.
Why: the pin at efd7dbcd4d records the census at its tip.
Verified: census job m3-max-74099 on the M3 at efd7dbcd4d: 2348 cases over 9 profiles, 21132
cells, the 9 new cells compiled, 0 failed, 1 difference (the new case), 0 regressions.
corpus-vulkan (job m3-max-73981, venue intel-irisxe-rplp-anv: Intel Iris Xe Graphics (RPL-P),
Mesa 26.2.6) runs case 884ad7d75a22 through the runtime under the validation layer: Match, the
candidate's output 7d65bff73d82 equal to Metal's bytes on the M3 under macOS 27.0.1.
corpus-metal (job m3-max-73969, Apple M3 Max, macOS 27.0.1 26A434) qualifies case 884ad7d75a22:
its three executions agree, and the 4x4 target holds (x + 1, y + 1, 4y + x, 0.5) at every pixel,
the value the case's rationale derives (checked against the recorded bytes).
The authored case over engine/air_1_8_sampling (case 884ad7d75a22, installed by
corpus-case-check --manifest --install in job m3-max-73936): a 4x4 rgba32_float target whose
pixels take their position over 4 as the coordinate, a texel center of the 4x4 rgba32_float
texture, so the nearest plain sample and the gradient sample (derivatives exactly 0.25, level 0)
read one texel, and the output (a + b) * (0.5, 0.5, 0.5, 0.25) is exact on every device. It runs
the AIR 1.8 forms an old library declares (the sample without a minimum level-of-detail clamp or
access operand, the buffer with a size and no address space, the render target with the
attachment alone) on Metal and on Vulkan.
Not yet qualified at this commit: the Metal run and the Vulkan candidate follow.
The .ll (llvm-dis 21.1.8 of the AIR) and the typed .air.ll that xcrun metal wrote for the
fixture's source (Apple metal 32023.922, macOS SDK 27.2), and its TOOLCHAIN line. Generated by
job m3-max-73924 on the M3. The module is AIR 1.8 (triple air64_v18-apple-macosx10.11.0) and
declares air.sample_texture_2d.v4f32 with 7 parameters and air.sample_texture_2d_grad.v4f32 with
7, its buffer with air.buffer_size and no air.address_space, and air.render_target with the
attachment alone.
The owned MSL source of an AIR 1.8 fixture whose fragment samples through an argument sampler,
plainly and with a gradient, reads a constant buffer and writes one render target: the forms an
AIR 1.8 library declares before AIR 2.0 (the sample without a minimum level-of-detail clamp or
access operand, the buffer with a size and no address space, the render target with the
attachment alone). Its companions follow from scripts/regen-air-fixtures on the M3.
What: corpus/authored-compile.tsv's artifacts_at line names the product at db3a88526b
(e81e0423...). No case's row moves.
Why: the pin at db3a88526b records the census at its tip. legacybc's reader (c5cedb39b3) changes
what the AIR front end accepts, and stencilclass (db3a88526b) changes validation's candidate
executor.
Verified: census job m3-max-73999 on the M3 at db3a88526b: 2347 cases over 9 profiles, 21123 cells,
19539 compiles, 18829 compiled, 2294 refused, 0 failed, 0 differences, 0 regressions.
The runtime's BitDraws rule refuses a draw through a [[stencil]] output drawn by bits in two
places: a face whose compare is other than Always and Never (DrawDepthStencil::
stencil_reference_face reads it), and, where the state replaces a stencil bit, a draw inside a
Counting visibility result's segment. The second needs a visibility result mode, and the case
schema has no way to state one:
- crates/metal2vulkan-validation/src/case.rs:19-21, AuthoredCase: #[serde(deny_unknown_fields)],
and none of its fields is a visibility result mode, offset or buffer;
- src/case.rs:1819-1821, Draw (primitive, vertex_start, vertex_count, instance_count,
index_buffer, base_vertex, base_instance): deny_unknown_fields, no visibility field;
- src/case.rs:1388-1390, DepthStencilResource, and src/case.rs:1406-1408,
DepthStencilStateLiteral: deny_unknown_fields, no visibility field;
- neither executor sets a mode or gives its pass a visibility result buffer: no "visibility" in
src/metal/ or src/candidate/ (grep -rni visibility), and runtime_render.rs's Targets::pass
(line 661) builds the pass from its attachments, array length and default size alone.
A manifest naming such a field is refused at parse, so no case's draw is in a segment and the
classifier carries no clause for it. When the schema grows a visibility result mode, the clause
belongs beside the compare rule, with its own classification test. The doc comment of
stencil_reference_face and docs/VALIDATION.md now say this instead of "a case sets no mode".
Verified at this commit: cargo fmt; doc comment and docs only, no code changed.
Fix-forward of 522914946b, whose build failed (job m3-max-73916, E0597): the array of face
references was a temporary of the method's tail expression, which outlives the local Vulkan state
it borrowed under edition 2021's drop order. The faces are Copy, so the array holds them by value;
the rule is unchanged.
Verified at this commit: cargo fmt only; the next build job compiles it.
What: the engine's render route through the runtime now reads, from the case's own structure, the
draws the runtime refuses on a device without VK_EXT_shader_stencil_export, and records them as the
device's refusal (NotSupported::NotEnabled, not_supported{not_enabled}, class device) naming the
extension, the face and its compare function, instead of drawing them and failing on the runtime's
Gap::Draw { kind: StencilOutput }.
- RenderCase::stencil_output: the case's own fragment function writes a live [[stencil]] output,
read from its AIR outputs' roles (executor_contract::depth_stencil_test), false for a vertex case.
- DrawDepthStencil::stencil_reference_face (executor_contract/depth_stencil.rs): the first face
whose stencil test the output decides. It is the runtime's rule, depth_stencil::BitDraws::of, on
the same Vulkan state (metal::state::depth_stencil_state of the same descriptor): None where the
stencil test is off; otherwise a face whose compare op is other than ALWAYS and NEVER, whatever
its operations and masks (BitDraws::of returns None before it reads the replaced bits).
- runtime_render::run: once the state is made, a case with a stencil output, on a device whose
translator profile lacks fragment.stencil_export (the bit the translator chose the bit-draws form
by), under a state with such a face, is NotEnabled. After the make, so the product's own refusals
at creation (a colour beside the output: StencilExport) keep their records.
The runtime's second refusal, a draw that replaces a bit inside a Counting visibility segment,
meets no authored case: the case schema and the executor set no visibility result mode, so no
draw is in a segment. The doc comment and docs/VALIDATION.md say so.
Why this form and not the runtime limit: a ToolingRequirement with Limit::Runtime stops the engine
on every device, and lavapipe, RADV and ANV list the extension and run and match these cases. The
refusal holds only on a device without the extension, which is what a device's NotEnabled records.
Before the stencil form (5a722b5c3f) such a case was the device's refusal on NVIDIA too, through the
translator's StencilExport. Round 733b14ed24's RTX 3090 public leg failed 14 such cases
(stencil-output-reference-* and stencil-output-at-*-rate-*: "the runtime refused a case its
structure classifies as one it runs (Draw { kind: StencilOutput })").
Versions: none move. The authoring-capability census classifies by ToolingRequirement, which this
does not touch, so no census or index version. ENGINE_EXECUTOR_ABI stays: on a device with the
extension nothing changes, and on one without it every case this refuses failed at the base with
no row and no refusal recorded, so no recorded row observes the change (engine.rs's rule for a
bump).
Tests: runtime_render's a_stencil_output_needs_the_extension_where_it_decides_its_test, on the
committed profiles nvidia-rtx5080-laptop (no extension) and gate-lavapipe (the extension): every
pair of the eight compare functions on the two faces under Keep and Replace, 120 refused naming
the face and its function, the 8 of Always and Never drawn; a function with no stencil output and
a device with the extension draw every state. The graphics mapping tests assert stencil_output for
fragment_depth_stencil and its absence for fragment_varying_color. Without this change the case
reaches the runtime's draw and fails, as on the 3090.
Verified at this commit: cargo fmt only. The jobs that check it (the validation suite, the 3090
public leg, lavapipe's public leg) report to the orchestrator.
Two validation module docs cited the design record X34, which AGENTS.md forbids:
- air/reflect/tests.rs now says only what its tests do: hold the declared interface's access and descriptor rules to
fixed expectations.
- metal/command_guard.rs no longer says a test holds it to the product's copy until X34 deletes that copy. The
product has no copy (git grep NativeCommandPolicies under crates/metal2vulkan and crates/metal2vulkan-runtime: 0 hits
at 19b5e99b9b), and no such test exists.
bind/state.rs said "the plan" for the deleted BindingPlan. It now names what decides today:
- the binder refuses a sparse texture where the module has no sparse form (Feature::SparseTexture);
- the binder checks a linear sampler's filter features;
- a cubic sampler is emulated under its pipeline variant's cubic samplers;
- a sampler shape is checked by check_sampler when vk_sampler makes it;
- a texture's view facts change the variant, specialization or views a slot binds it through.
Comments only; no code changes. bind/ is an input of validation's runtime guard, so runtime-sources.sha256 moves to
c34d72c7..., computed by a copy of build.rs's hash. The same copy reproduces 19b5e99b9b's committed 8d8c9df1...
RUNTIME_VERSION is unchanged, since no behaviour changes.
Deadbind's follow-ups, done in session on the planner's word. They are verified by the development check that follows.
The suites job m3-max-73743 at efd3aa17a1 failed one test,
candidate::engine::artifact::tests::the_runtime_sources_are_the_committed_ones: this stack edits
twelve runtime guard inputs. No run of a given artifact changes, so the hash alone moves:
- indirect_commands.rs, indirect_commands/host.rs and descriptor.rs lose only items nothing calls
(04070aeb56 names their zeros) and docs; every item a run reaches is unchanged.
- vk/structs.rs loses SamplerDesc's and SamplerKey's `ycbcr` and SamplerDesc::ycbcr, and
metal/sampler.rs its `ycbcr: None`. At 733b14ed24,
`git grep -nE '\.ycbcr([^_a-zA-Z]|$)|ycbcr: (Some|None)|SamplerDesc::ycbcr' 733b14ed24 -- 'crates/*.rs'`
shows the only `Some` was SamplerDesc::ycbcr, called only from pipeline/link.rs's
ResourceKind::YCbCrPlanes arm, which nothing constructed (60cf39099e), and the field's only read
copied it into SamplerKey. Every run's sampler had `ycbcr: None`, so its creation and its key
are the same. The artifact codec's SamplerDesc lost the field, and 60cf39099e bumped
ARTIFACT_FORMAT_VERSION for that.
- bind/ycbcr_convert.rs and bind/mod.rs lose YCbCrPlanesSampler, which nothing constructed.
bind/indirect_commands.rs's re-export list shrinks by the deleted items.
- ash_interop/convert.rs, ash_interop/query.rs, device/description.rs and device/khronos.rs
change in comments only.
The value, 8d8c9df1a81c345dc071876868d550a19e9b2fb82e69084b1d621493946e6538, comes from
build.rs's hash: its listed inputs plus bind/'s non-test sources, sorted, each hashed as its
relative path, a zero byte, its length as a little-endian u64, then its bytes. Computed the same
way at 733b14ed24, it reproduces that commit's committed
b484a6b037e2ae562f5a3c89313babecbce60262b0adbe70508e73426167dff8.
How verified: the suites check runs again at this commit.
The authored-compile census (corpus-triage --audit authored-compile --bless,
~/.cache/m2v-orch/census-job.sh on the M3, job m3-max-73690, census-exit=0) at
59480e2d48 moves 20 rows and the artifacts line, and adds or removes none: the
40 cells that were not_supported{device_capability_missing:StencilExport needs
Extension(ExtShaderStencilExport)} now compile, by the stencil output form
(5a722b5c3f: [[stencil]] drawn by bits where the extension is absent). The six
RasterSampleCount cells (FramebufferStencilSampleCount(2)) are unchanged.
A fragment function's [[stencil]] output is the reference of both faces' stencil test for its
fragment (MSL Table 5.7, 5.2.3.5). On a device without VK_EXT_shader_stencil_export it was refused
at creation (StencilExport). Under the owner's grant (rule 2's tenth form, chosen by that
extension's query alone), such a device now draws it by bits; a device with the extension is
unchanged (FragStencilRefEXT, no fact, no note, the draw issued once).
Translator: the function stores no reference; each return kills the fragment where the draw's new
push field PushField::StencilBit k is below 8 and bit k of the output's low 8 is 0, and keeps
every fragment at 8 or more (one module, no specialization). The function states
RuntimeFact::StencilBitDraws (Mechanism::PushConstant) and its fragment stage the static note
PrecisionNote::StencilOutputOverlap. Refused there, naming the extension (Unsupported
StencilExport): a function that also writes a colour (the colour would be written by every
repeat) or memory, one whose returns cannot kill (an interlocked body, a loop over its covered
samples), a mesh pipeline, and a render pipeline made for indirect command buffers. Where the
device also lacks the pixel interlock, a function writing memory in a raster order group meets
that refusal first (RasterOrderGroups). SEMANTICS_VERSION 2301 -> 2302, ARTIFACT_FORMAT_VERSION
595 -> 596 (new codec members).
Runtime (depth_stencil::BitDraws, render_encoder::draw): with w the low 8 bits of the write masks
of the faces having a Replace operation, a draw whose stencil test is on and w is not 0 is drawn
once with every fragment kept under the reference 0 (Replace zeroes w's bits, every other
operation runs once), then once per bit k of w keeping the fragments whose output holds bit k,
under the reference 255, write mask (1 << k) & mask, Replace kept and every other operation Keep,
and no depth write; where the state writes depth under a compare other than Always and Never, the
first draw writes none and a last draw writes it with stencil write masks of 0. Each draw records
only the dynamic state that differs from the last; the encoder's tests and reference are recorded
again at the next draw. Counted in Metrics::stencil_bit_draws (the draws beyond the first).
Refused at a draw, Gap::Draw of DrawKind::StencilOutput: a face compare other than Always or Never
(the output decides that test), and, where w is not 0, a draw inside a Counting visibility
segment (every draw would add its samples). A Boolean segment is drawn. Vulkan Appendix I: the
repeats change stencil reference, operations and write masks between draws of one pipeline,
which Rule 2 lists as required (write masks) and strongly suggested (stencil parameters) to be
invariant; the note records the one difference the repeats make.
The note (rule 1): fragments of one draw that overlap leave the OR of their values. Where two
fragments of one draw reach one sample under Replace, the sample stores the OR of their outputs'
low 8 bits within the write mask, where Metal stores the later fragment's value; under a depth
test that writes, each fragment's stencil operation is chosen against the depth from before the
draw. Measured on an RTX 3090 (NVIDIA 620.70.06) under the validation layer 1.4.363.0, job
m3-max-73635: two triangles of one draw outputting 0x35 then 0x4a store 0x7f on the 32 texels both
reach, where Metal stores 0x4a, and 0x35 on the 32 one reaches, in 8 bit draws; the 780M (RADV)
and the Iris Xe (ANV), which list the extension, store 0x4a with 0 bit draws.
AGENTS.md rule 2: "for nine only" becomes "for ten only", the list ending with fragment stencil
output (the planner's text, relayed by main, word for word).
Tests: the translator's engine_stencil (every committed profile: the extension or the draws by
bits, L3 both ways; refusals for colour, memory, mesh and indirect command buffers); rt's host test
of BitDraws::of; rt's device cells (stencil_export.rs): the stencil alone and the stencil with the
depth under Always and Less over a quad, exact, texels of stencil 0 among them; the overlap row;
the refusals; the route of a 4-sample Depth32Float_Stencil8 source read at sample 0 into a
single-sample target under Always/Replace 0xff and depth Always with write, beside colour 0
RGBA8 of write mask none; the codec round trip; the mechanism table.
Docs: docs/API.md (the stencil output passage and the catalogue entry
metal2vulkan-degrade-stencil-output-overlap), rt README known gap and floor row,
docs/REFUSALS.md regenerated, api_signatures blessed. The conformance degradation and the
validation allowance (unbounded) of the note. known-gaps-rt.tsv: stencil-output and
stencil-output-loaded on NVIDIA, refused at renderCommandEncoder (draw 3's back face Equal against
the output) and divergent at case/stencil as a result. runtime-sources.sha256: the guard's inputs
changed only by mechanism.rs gaining the new fact's arm, which no existing artifact states, so no
run of an existing artifact changes.
Golden rows and the engine inventory (22 cells) are re-blessed on development: 20 move from the
StencilExport refusal to a module (stx_stencil_by_pixel, stx_stencil_discard,
stx_stencil_with_depth, stx_stencil_ms_by_sample, fragment_depth_stencil on nvidia-pascal-linux,
nvidia-rtx50-linux, nvidia-rtx5080-laptop and runtime-floor), and the 2 cells
stx_stencil_in_order and stx_stencil_ms_in_order on runtime-floor move from StencilExport to
RasterOrderGroups, still refused. Why: the memory-write refusal now runs on the emitted module
(pipeline/compile.rs), after the body's own refusals, so on a profile without the pixel interlock
the raster order group these functions write memory in is refused first; at the base the plan's
entry refused every [[stencil]] output on such a device before any body was lowered.
Verified (this tree, or the rt archive of d6bd77d203 where named; the rt and translator sources
there differ from this tree in the translator's test and a doc comment alone):
- msi check, job m3-max-73648 (this tree): fmt, signatures, refusals, clippy -D warnings with all
features plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Rustdoc, the rt nextest archive and the
conformance binary built; rt's whole suite on lavapipe under the validation layer 1.4.363.0,
738 tests run: 738 passed, 3 skipped; the lavapipe leg, 7 tests run: 7 passed: export enabled,
the overlap row storing {4a}, bit draws 0 on every cell.
- RTX 3090 (NVIDIA 620.70.06, layer 1.4.363.0), job m3-max-73635 (d6bd77d203): 7 passed; the
overlap row above, bit draws 8; the stencil alone and with depth under Always and Less, 64
texels exact, bit draws [8, 8, 9]; the route exact, bit draws 8; refused a colour beside the
stencil (StencilExport), Equal and a Counting segment (DrawKind::StencilOutput), a Boolean
segment drawn. Conformance stencil-output and stencil-output-loaded: refused at
renderCommandEncoder and divergent at case/stencil (4 elements, largest difference 80), the
four known-gaps rows.
- RTX 5080 Laptop GPU (NVIDIA 615.71.09, layer 1.4.363.0), job m3-max-73652 (this tree): 7
passed; overlap {7f} where both reach, {35} where one, bit draws 8; cells exact, bit draws
[8, 8, 9]; the route exact, bit draws 8; the same refusals; conformance replay with this tree's
binary matched the four NVIDIA rows (exit 0).
- Radeon 780M (RADV, Mesa 26.2.6), job m3-max-73636 (d6bd77d203), and Iris Xe (ANV, Mesa
26.2.6), job m3-max-73650 (this tree): 7 passed each, export enabled, overlap {4a}, bit draws 0.
- States-only plays of recorded streams, base 0c9db49765 against d6bd77d203, every play in
states-only mode, made and refused equal, refused 0: lavapipe, jobs m3-max-73632 and
m3-max-73631 (two streams: render 10643 and 9014, compute 15299 and 221); the RTX 3090 with
--device-type gpu, job m3-max-73638 (two streams: render 9834 and 10643, compute 214 and
15299); the RTX 5080, job m3-max-73652 (two streams: render 9014 and 9645, compute 221 and
250). Those two carry a library holding a [[stencil]] function that no recorded pipeline state
uses; no stream on either NVIDIA node makes a [[stencil]] pipeline (job m3-max-73646 and
m3-max-73652's scan).
- Owed: the translator and validation suites of this tree (the suites of d6bd77d203, job
m3-max-73627, failed in the memory refusal's test on runtime-floor, the runtime guard's hash
and the golden and inventory cells above; this tree fixes the first two).
What: the new-runtime player forwards a colour attachment setter's `depthPlane` into the
runtime's RenderPassColorAttachmentDescriptor::depth_plane, as it forwards resolveDepthPlane, and
no longer holds the pass for a plane but 0 ("Unheld(depthPlane)", the encoder skipped). A depth
or stencil attachment's depthPlane is not played and holds nothing: Metal reads it of a 3D
texture alone (Apple's page for depthPlane, as fetched: "If the texture isn't a 3D texture, then
Metal ignores this property."), and the runtime refuses a 3D texture's depth or stencil
attachment by its type (TextureType) whatever its plane, which the player counts as any gap.
Why: since 3c52ee1cf1 the runtime takes a colour attachment's depth plane of a 3D texture, and the
player still skipped every pass that set one, and every pass that set one of a 2D texture, which
Metal with its validation layer off renders as at 0 (probe resolve_depth_planes.m, case plane3,
job m3-max-73495).
Docs: docs/REPLAY-STREAM.md and the player's module doc list what a held pass holds now (the
"a resolve texture" there was stale too: only a skipped one is held).
Test: replay::rt_replay::a_colour_attachment_s_depth_plane_plays_on_the_new_runtime (device
cfgs): a stream clears plane 0 of a 4x4x4 RGBA8Unorm 3D texture green (no plane set), its plane 2
red (depthPlane 2), and a 2D texture red at depthPlane 2; blits copy planes 0 and 2 and the 2D
texture out, and the stream's three checks (green, red, red) match; no encoder, call or object
skipped.
Verified (run tree 44b2cc80bf, on development 3c52ee1cf1; its tree is this commit's but for
development's bless 0c9db49765 of opened_chains.txt):
- msi, job m3-max-73511: fmt, clippy (no cfg, m2v_gpu, m2v_cpu_icd) and rustdoc exit 0; the
player's stream device tests (replay::rt_replay) on lavapipe (Mesa 26.2.4): 57 passed, the test
among them; metal2vulkan-validation's suite: 1305 passed, 1 failed, 3 skipped, the one failure
every_committed_profiles_context_enables_its_pinned_chain, development's own at 3c52ee1cf1
(job m3-max-73486), which 0c9db49765, this commit's base, blesses.
- Without the fix (the player's render.rs of 3c52ee1cf1, lavapipe, job m3-max-73514): the test
fails, "skipped render encoders Unheld(depthPlane) 2", and the plane-2 check differs.
3c52ee1cf1 put imageView2DOn3DImage in floor::PORTABILITY, so a device that lists
VK_KHR_portability_subset enables it. The committed MoltenVK M3 profile is such a device: its
device and restricted contexts each enable one member more (77 and 75), which moved their
pinned chains, and every_committed_profiles_context_enables_its_pinned_chain failed on
development (job m3-max-73486, the one red of that suite run). No other profile lists the
portability subset, so no other row moved.
Verified: job m3-max-73498 (msi) ran bless_opened_chains at 3c52ee1cf1; its diff is these two
rows alone, and the pinned-chain test then passed.
What: Metrics::unslotted_attachment_reads counts a draw whose functions may read beyond their slots
(Draws::reads_unbound, or an indirect command buffer's execution) while a use_resource read or a
use_heap of the encoder covers a texture that is an attachment of the pass (a target or, in a
resolving pass, a resolve) out of its home layout. The check walks at most the pass's attachments
and the encoder's declarations, allocates nothing, and runs only for such draws; use_heap now
records its blocks, and a texture answers the block of the heap its image lies in. The replay's
counts line carries the counter. The README's known gaps of render encoders say that such a read
names a descriptor whose layout differs from the image's, which Vulkan leaves undefined
(VUID-vkCmdDraw-imageLayout-00344), that the counter counts it, and that the image is back home once
the pass ends. The held-loop-reads test asserts one in each pass that reads the attachment through
its argument buffer (after a slot's read moved it to the feedback layout, and alone, in the
attachment layout) and none for the control, whose entry names a texture that is no attachment.
Why: the ruling is rung 4 of the workaround ladder. A home in the feedback layout for every colour
render target turns compression off on RADV (radv_layout_dcc_compressed and its HTILE and FMASK
counterparts), a loss on every AMD render target; VK_KHR_unified_image_layouts would be a
query-chosen tenth form. The validation layer cannot see the mismatch: core validation checks only
statically accessed elements, and GPU-assisted validation's descriptor layout check is off in the
layer's source. So the gap is recorded and the counter tells whether a guest meets it.
How verified: the job ids of fmt, clippy (plain, m2v_gpu, m2v_cpu_icd), lavapipe and the 780M's
device suite under RADV are reported to the lander.
The golden hash table and the authored compile census, blessed at the
reconvergence-mode change (1b9ea536f6) on the M3 (job m3-max-72548:
inventory, golden, printouts, opened chains and census all exit 0).
The golden table moves the cells the change moves: on Linux (72447),
1,560 of 23,698 cells differ from 0a1c4d4a64's modules in the
reconvergence modes alone (MaximallyReconvergesKHR,
SubgroupUniformControlFlowKHR and their OpExtension) and none in
anything else. On the M3 (72521), 1,262 of the 21,061 macOS-only
.air.ll cells differ in the mode alone and none otherwise. The
quad-helpers cells due since 00fb3b3846 are blessed in the same pass.
The census changes only artifact hashes and the product fingerprint:
no row changes its outcome.
quad_helpers.ll, quad_helpers.air.ll and the TOOLCHAIN line were compiled by
scripts/regen-air-fixtures (Metal 32023.922, SDK 27.2, the pinned LLVM 21). The recording is
`conformance record quad-helpers` followed by `conformance times --runs 8 --write quad-helpers`
on the reference M3 Max (macOS 27.0.1), at 326213f839, job m3-max-72398.
The inventory rows are written as gsm2_helper_threads' fragment functions read; the gate has not
checked them yet.
The owned fixture quad_helpers and the case quad-helpers. Five quad functions (quad_any and
quad_all of the helper query, quad_ballot of it, quad_is_first, quad_active_threads_mask) are
each drawn over 64 small triangles, one in each 8 by 8 cell of a 64 by 64 target, whose edges
cross quads. Three simdgroup functions (sum, min and max; and, or and xor; any, all, and the
lane counts of the ballot and the active mask) are each drawn over one triangle that covers
three pixels of a single quad, once for each quad lane the helper can take. Those are the draw's
only fragments, so the simdgroup holds that quad alone and no answer names a lane.
Each function runs its operations first, in control flow uniform over the draw, and then takes
a derivative of a value the answers feed. A helper therefore still has a gradient to compute when
the operations run, and MSL 4.1 sections 6.10.2 and 6.10.3 make it an active thread of each.
A translator test, a_fragment_simdgroup_operation_keeps_the_mode, checks that a fragment entry
with a simdgroup operation, with or without a derivative beside it, states
MaximallyReconvergesKHR on every maximal-reconvergence profile.
The fixture's companions and Metal's recording follow from the M3.