Commit Graph
9577 Commits
Author SHA1 Message Date
Anees Iqbal c5ad0e23cd Runtime README: pool_reach's run on the M3 Max under KosmicKrisp in the bound form
The test that reads and writes before and past a buffer between two neighbours of one block ran on
the M3 Max under KosmicKrisp 26.3.1 in the bound form and found zero and no write (job
m3-max-75048, under the validation layer, 20 dispatches bound and none at their addresses).

Verified: the job's output; docs only.
2026-11-26 05:04:55 -08:00
Anees Iqbal 761fe5c6e1 Runtime tests and conformance: each device test and each conformance pass print their dispatches by form
A landing that names which suites ran the bound form on a card reads it from the run: each device
test prints its device's bound and address dispatch counts at its teardown (M2V-FORM), and each
conformance replay pass prints the pass's (buffer forms on DEVICE). Nothing in a verdict reads them.

Verified: fmt; built and run in the next device-suite jobs.
2026-11-26 05:04:55 -08:00
Anees Iqbal 78149d56ef Runtime: the floor's public docs name no private item, and pool_reach's dispatches take a named type
rustdoc -D warnings refused OPTIONAL_EXTENSIONS's and pipeline_robustness's links to the crate-private
PIPELINE_ROBUSTNESS, and clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd refused pool_reach's
dispatch table type as too complex (job m3-max-75057). The links go; the table's thread reaches are
a type of their own.

Verified: fmt; clippy and rustdoc rerun in the next gate job.
2026-11-26 05:04:55 -08:00
Anees Iqbal 42d3996845 Validation: robust buffer access 2's storage granule is a minimum a profile without the extension states none of
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.
2026-11-26 05:04:55 -08:00
Anees Iqbal b9b456b15a AGENTS.md: rule 2's twelfth form and rule 3's clause in the planner's words
Rule 2's bound-buffers item now reads 'a device with' the pipeline-robustness feature (the
runtime enables the feature, a device does not), names 'a compute function's' buffer arguments in
place of 'a kernel's', and drops the commas around 'by structure'. Rule 3's clause says which
replaces which: for a compute function's buffer arguments, bound buffers where rule 2's query
takes them. The text is the planner's fourth round, wrapped to the file's width.

Verified: docs only; no line of the edited paragraphs passes 100 columns.
2026-11-26 05:04:55 -08:00
Anees Iqbal 3ed7d424cf AGENTS.md: rule 2's twelfth query-chosen form, bound buffers, and rule 3's clause for them
The owner's authorization of 11-26 (brief 'bound'): rule 2 counts twelve forms, the twelfth bound
buffers, stated as its query (the pipeline-robustness feature, robustBufferAccess2 and
robustBufferAccessUpdateAfterBind, then the limits its layout reaches) with the address form and
the check that stays by structure as known gaps; rule 3's direct addresses take a kernel's bound
buffers in their place where that query takes them. Worded by bound buffers, not by descriptor
type.
2026-11-26 05:04:55 -08:00
Anees Iqbal 6f4d604d68 Validation: the opened chains blessed with the pipeline-robustness member
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).
2026-11-26 05:04:55 -08:00
Anees Iqbal b443508375 Runtime, translator docs and validation: the bound form's contract, its README floor entry, and the suites' pins
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.
2026-11-26 05:04:54 -08:00
Anees Iqbal 50fb0b45c9 Runtime tests: the device tests' kernel interface names its set-0 views
The compute tests' Interface helper had no views field; the device-test build did not compile
(m3-max-75034).
2026-11-26 05:04:54 -08:00
Anees Iqbal babb94cf0c Runtime tests: a kernel's reaches outside its buffer stay off its neighbours in one block
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.
2026-11-26 05:04:54 -08:00
Anees Iqbal b81d9b1484 Fixtures: pool_reach, a kernel that reads and writes at given word indices of a buffer
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.
2026-11-26 05:04:54 -08:00
Anees Iqbal d40132494b Validation: the enable table's structure list holds forty-five, with pipeline robustness
Structure::EXTENSIONS gained PipelineRobustness without its length; the validation crate did not
build (m3-max-75031).
2026-11-26 05:04:54 -08:00
Anees Iqbal d1ca4bbb26 Translator tests: the bound-buffer test names the crate's own Vulkan types
engine_bound_buffers compared a descriptor's type with ash's DescriptorType; the interface holds
the crate's own (crate::vk). Found by the translator suite's build (m3-max-75017).
2026-11-26 05:04:54 -08:00
Anees Iqbal dd71dbc775 Translator and validation: a bound kernel requires pipeline robustness, and its views are contained by robust buffer access 2
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.
2026-11-26 05:04:54 -08:00
Anees Iqbal cf270fa34e Harness and replay player: count dispatches by the form their kernel reaches its buffers in
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.
2026-11-26 05:04:54 -08:00
Anees Iqbal 7cb5beafe5 Translator tests: a kernel's buffers through set-0 views on the profiles that bind them
The identity profiles the word-phase tests share keep the address form by stripping the
pipeline-robustness feature; bound_identity_profiles keeps it, and engine_bound_buffers checks
the bound form on every committed profile that answers the query (lavapipe does not): two
storage views of set 0 at pushed bind offsets, no device-address access, the slot alignments
stated, and a word-bound slot keeping its address held to 4.
2026-11-26 05:04:53 -08:00
Anees Iqbal a98dafc3b4 Translator: the identity domains admit a bound kernel's set-0 storage buffers
identity_refusal refused any descriptor, so the bound form's storage views were
Unsupported{IdentityDomains} (copy_words on the Iris Xe, job m3-max-75013). Under
AccessPlan::robust_views it admits one storage buffer for each storage-view slot and no other
descriptor.

Verified: the rerun follows.
2026-11-26 05:04:53 -08:00
Anees Iqbal ecd7d8deba Translator: the identity domains admit a kernel's bound storage views and their bind offsets
identity_refusal refused every pushed SlotBindOffset and every non-device-address slot, so each
kernel on a profile that binds its buffers was Unsupported{IdentityDomains} (the harness's
copy_words on the Iris Xe, job m3-max-75010; 22 identity tests on the committed profiles, job
m3-max-75008). Under AccessPlan::robust_views it admits both.

Verified: the rerun follows.
2026-11-26 05:04:53 -08:00
Anees Iqbal f733cd614f Translator, runtime and validation: the pipeline-robustness feature in every member table, the surface tables blessed
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.
2026-11-26 05:04:53 -08:00
Anees Iqbal 078b15cada Translator and runtime: every limit set 0's storage buffers reach is part of the bound form's query
The bound form's query states the features, then the limits its layout reaches: the
translator's binds_kernel_buffers adds maxPerStageDescriptorUpdateAfterBindStorageBuffers,
maxDescriptorSetStorageBuffers, maxDescriptorSetUpdateAfterBindStorageBuffers and
maxPerStageResources (each holding the 31 storage buffers) beside maxPerStageDescriptorStorageBuffers
and maxStorageBufferRange; Limits gains the two update-after-bind storage-buffer limits. The last
limit the layout reaches, maxPerStageUpdateAfterBindResources, counts the runtime's set 1 beside
the 31, which the translator does not size: the runtime enables pipelineRobustness only where it
holds the compute stage's set-1 descriptors and the 31 (floor::kernel_buffers_fit).

Verified: nothing yet; builds follow.
2026-11-26 05:04:53 -08:00
Anees Iqbal b20fb4a89d Translator tests: the mechanism table covers RuntimeFact::RobustStorageBuffers
Its pipeline state, the consumer's VkPipelineRobustnessCreateInfo. Clippy of the workspace's
tests stopped at the two exhaustive matches (job m3-max-75002, a CPU build).
2026-11-26 05:04:53 -08:00
Anees Iqbal c2fc914a3e Translator and runtime: a kernel's buffer arguments as set-0 storage buffers under robust buffer access 2
The twelfth form a Vulkan query chooses. Under the identity domains, on a device that answers
five queries (DeviceProfile::binds_kernel_buffers: pipelineRobustness enabled,
robustBufferAccess2 supported and not enabled, robustBufferAccessUpdateAfterBind,
maxPerStageDescriptorStorageBuffers >= 31, and maxStorageBufferRange holding a 2 GiB buffer with
the max(minStorageBufferOffsetAlignment, 16) - 1 bytes a descriptor starts before it), a kernel
reaches each buffer argument through its storage view, a storage buffer of set 0 bound over its
buffer, in place of its device address with each run-time-offset access checked in the shader.
The pipeline's robust buffer access 2 (VkPipelineRobustnessCreateInfo, storageBuffers) contains
the view: a load or store of a view is not checked in the shader; an atomic is, against the
view's array length (RBA2 leaves an out-of-bounds atomic's result undefined). A slot a wide
pointer, a typed atomic or the stage-in fetch reaches, and one the dispatch binds below its
argument's alignment (word_bound_buffers), keeps its device address; render stages keep theirs.

Translator: VK_EXT_pipeline_robustness and its feature, robustBufferAccess2 and
robustBufferAccessUpdateAfterBind and robustStorageBufferAccessSizeAlignment in Limits,
RuntimeFact::RobustStorageBuffers (Mechanism::PipelineState), the bound slot's
AddressAlignment fact so the runtime checks its address, DeviceProfile::buffer_base_alignment;
SEMANTICS_VERSION, ARTIFACT_FORMAT_VERSION and RUNTIME_VERSION bumped.

Runtime: the optional extension and feature in the floor; set 0's layout of 31 compute storage
buffers where the profile binds (one pipeline layout); every kernel pipeline made with the
robustness there, the stage helper's too; Interface::views and FieldValue::BindOffset; each
dispatch's descriptors (a buffer over its own bytes from its first byte rounded down to the
base alignment, a set_bytes copy over its bytes at the ring's alignment, nothing bound a null
descriptor), bound from a set the command buffer wrote last where they begin it, else from the
next set of its pools (crate::bound, mirroring the occlusion pools: 256 sets a pool, 16 kept
free); the ring's writes at the buffer base alignment; Metrics bound_dispatches,
address_dispatches, buffer_sets_written, buffer_sets_held and Gauges buffer_set_pools.

Verified: nothing yet; the first build follows on this branch.
2026-11-26 05:04:53 -08:00
Anees Iqbal da7577de03 Runtime README: a compute buffer argument's checked address access, against a native build's bound buffer
A known gap of pipeline states: a compute function's buffer argument is reached at its device
address with its non-constant accesses checked in the shader, where a native Vulkan program binds
the buffer and the device's range check applies. The entry gives the price as our kernel's GPU time
over a native Vulkan build of the same kernel (a particle kernel, two convolutions), what a build
that bound the arguments under robust buffer access 2 ran them at, and why buffers are not bound:
a descriptor set per dispatch lost GPU time on the Iris Xe's recorded streams and on dependent
dispatch chains on the Radeon cards, and a table of descriptors indexed by a pushed word moves the
range check into the shader on the Iris Xe's driver. The Iris Xe's convolution and copy gap at
equal shape did not move when the buffers were bound, so it is not this gap's.

Every figure was read again from its job's log before it was written: particle kernel jobs
m3-max-74926 (Radeon 780M), 74927 (RX 7900 XTX), 74928 (Iris Xe), 74929 (RTX 3090); convolutions
m3-max-74957, 74959, 74960; Iris Xe at equal shape m3-max-75079; the bound build m3-max-75061 to
75064; descriptor set per dispatch m3-max-75119, 75120 (dispatch chain) and m3-max-75124, 75128,
75132 (Iris Xe streams). The table's form is from Mesa 26.2.6's ANV source, not run.

Docs only: no Rust or Cargo input changes, and the README is not included in any crate's rustdoc.
2026-11-26 04:57:42 -08:00
Anees Iqbal c6518caf3b Runtime: an unbound write's barrier after its dispatch, and an arena dispatch kept in the hazard sets
What: two dispatch-barrier ordering fixes, and nothing else.
- A dispatch in a serial encoder that writes through an address outside its resources owes its
  barrier once it is recorded (ComputeCommandEncoder::dispatch, after the record), so the next
  command pays it after the dispatch. dispatch_hazards owed it before the record, and the
  dispatch's own record_dispatch paid it, before the dispatch: two barriers before it and none
  after.
- A dispatch over a Private arena puts what it touches back in the hazard sets after its pieces
  (mark_dispatch, split out of dispatch_hazards): the barriers before its later pieces started
  the sets again and dropped the marks the dispatch made, so a later dependent dispatch got no
  barrier.

Why: both left a dependent dispatch without the barrier Metal orders it by. The barrier before
an unbound-writing dispatch was redundant with its own hazard check (a write outside its
resources after anything touched already takes one), so moving it adds none: a dispatch that
writes outside its resources takes one barrier before it where it conflicts, and its next
command pays the one after it. Re-marking an arena dispatch leaves exactly its own marks after
its last piece's barrier, so no barrier is added for commands before it. The runtime README's
arena paragraph says so.

Verified: the two tests of the commit before fail at it on lavapipe, job m3-max-74991
(compute.rs:760, the unbound source [0,0,0,0,0,1,0,0,0] against the write dependency
[1,0,0,0,0,0,0,0,0]; private_arena.rs:288, write dependency 0 against 1). The gate on this
commit follows.
2026-11-26 01:12:49 -08:00
Anees Iqbal 1af01940f6 Runtime tests: the barrier after an unbound write, and after an arena dispatch's pieces
What: two device tests of a dispatch barrier that 5b260257e0 places wrong.
- every_device_records_an_unbound_write_s_barrier_after_it: in a serial encoder, a dispatch
  that writes outside its resources, then one that reads and writes the buffer it wrote. The
  barrier between them counts as the second's dependency on the write
  (dispatch_after_write_barriers 1, every other source 0), and the segment's end is the only
  other barrier.
- every_device_orders_a_dispatch_after_an_arena_dispatch_s_pieces: in a serial encoder, an
  arena dispatch of 7176 words split into four pieces, then plain over the same buffer. plain
  takes a barrier for its dependency on the arena dispatch's write
  (dispatch_after_write_barriers 1).

Why: two ordering bugs read in the code. An unbound write's owed barrier is paid by the same
dispatch's record, before that dispatch, and starts the hazard sets again, so the dispatch
after it gets no barrier. The barrier before an arena dispatch's later piece starts the sets
again too, which drops the marks the dispatch made, so a later dependent dispatch gets no
barrier. Lavapipe runs dispatches one after another, so the values cannot show a missing
barrier; the counts by source show which dispatch paid it.

Verified: nothing in this commit; both are expected to fail at this commit on lavapipe, and
the fix follows in the next.
2026-11-26 01:10:52 -08:00
Anees Iqbal 5b260257e0 Runtime and replay player: count each dispatch barrier in one source, and print the device's buffer alignment
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.
2026-11-26 00:54:46 -08:00
Anees Iqbal 0b7d408201 Runtime and replay player: count barriers by cause, the guest's blits and buffer binds, and over-copy bytes by frame
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.
2026-11-25 23:55:46 -08:00
Anees Iqbal 8c3bffc079 Runtime: count over-copy bytes by the buffer's memory class, and the renderings an encoder ends and begins again
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.
2026-11-25 23:24:36 -08:00
Anees Iqbal 1af54e162d Conformance and runtime README: the UHD 630's rows for the read-write and sRGB storage cases
What: the known-gaps ledger's 14 rows for Intel's Windows driver 101.2145 on the UHD Graphics 630
in srgb-storage-writes, read-write-tier-held and read-write-tier-round-trip-float, which that venue
had not run before. Two entries in the runtime README's known gaps of textures. Coverage
regenerated. No product code.

- srgb-storage-writes RGBA8Unorm_sRGB fpv_srgb_write/dispatch, refused: the driver makes no
  extended image for an 8-bit sRGB texture made for shader writes, so there is no UNORM twin and
  the write at a slot is Gap::StorageElement (Absent). README entry: the image format query rt
  makes for the extended image (R8G8B8A8_SRGB, optimal, MUTABLE_FORMAT | EXTENDED_USAGE, the format
  list with R8G8B8A8_UNORM, the plain usage with STORAGE) answers no. That is read from
  tests::storage_element's every_device_writes_an_srgb_texture_through_its_unorm_view, which
  asserts the image is extended exactly where that query takes it and passed there (m3-max-74877),
  and from the case (m3-max-74873). Not probed apart; the README says the resolve usage's part
  was not asked.
- read-write-tier-held RGBA8/BGRA8 sRGB stored-bytes and texels: the same cause through the
  argument buffer, in the A8Unorm "*" rows' words (an undeclared write to a texture with no
  storage element is dropped; the read answers zeros).
- BGR10A2Unorm (held stored-bytes and texels, round-trip refused) and A8Unorm (round-trip
  refused): no storage image by the device's format queries, in the NVIDIA, llvmpipe and RX 550
  rows' words (vulkaninfo of that card lists no STORAGE_IMAGE bit for A2R10G10B10).
- R8Unorm tier2, RG8Unorm beyond and RGBA8Unorm tier2 texels, one ulp: rule 1, the reciprocal
  product, in llvmpipe's words.
- BGRA8Unorm beyond texels (held 256 elements, round-trip 1,024): the driver lists
  VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT for B8G8R8A8_UNORM while
  shaderStorageImageReadWithoutFormat is false; rt follows the per-format bit on every device
  (VUID-vkCmdDispatch-OpTypeImage-07028), and the reads differed from Metal's (the largest
  difference is what a read of zero gives). BGRA8Unorm is outside Metal's read-write tiers. A
  known gap at rung 4 by the planner's ruling, with a README entry; not reproduced outside the
  runtime.

Verified: every row is one of the 14 lines conformance leg m3-max-74873 printed as unlisted
(Windows UHD 630, pin d9b644bae7), with its venue, verdict, site and answer copied from them. The
ledger's read on that venue is verified at its next Windows conformance leg.
2026-11-25 21:29:20 -08:00
Anees Iqbal 4cb149c918 Runtime tests: the stored-slot refusal test keys on the texture's twin, the device's own answer
every_device_refuses_a_stored_slot_bound_to_a_texture_with_no_storage_element decided whether an
RGBA8Unorm_sRGB texture's write is stored from R8G8B8A8_UNORM's format features alone. The
runtime stores it through the UNORM twin only where its image format query also makes the image
extended for the twin, and Intel's Windows driver 101.2145 on the UHD 630 makes no such image,
so the test expected a store the runtime refuses there (StorageElement, Absent). It now reads the
texture's own answer (Texture::encodes, the plan's twin), as tests::srgb_twin does.

Verified: the failure it fixes is win:rt at pin d9b644bae7, job m3-max-74877 (758/759, this test
the one failure: "rrp_sw_write_f, written through the twin true: Err(Unsupported(StorageElement
{ .. case: Absent .. }))"). The fix itself runs in development's checks after this commit and on
the UHD 630 at the next Windows leg.
2026-11-25 21:28:52 -08:00
Anees Iqbal d9b644bae7 Conformance: Metal's recording of vector-word-phases-vec16-4-8, taken on the M3 Max
Recorded on an Apple M3 Max, macOS 27.0.1 (26A434), by `conformance record` and
`conformance times --runs 8 --write` in job m3-max-74565 (build m3-max-74559), three runs, one
outcome. Plain Metal ran the pass to completion; its API validation stopped it ("Compute
Function(vwp_vec16): the offset into the buffer a that is bound at Buffer index 0 must be a
multiple of 16 but was set to 4", and the same for b at 8), which the recording keeps as its
validated fact. The case's tests hold plain Metal's four buffers equal to answer_at (every
access at its own address) and the validated words to those two messages.

docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py).

(cherry picked from commit 944d20922983e7932a591b6c3d0e1090dc5f3300)
2026-11-25 19:17:03 -08:00
Anees Iqbal 52f65d1418 Conformance: vector-word-phases-vec16-4-8, vwp_vec16's float4 buffers bound 4 and 8 bytes past a multiple of 16
What: a fifth vector-word-phases case, vwp_words's buffers at 0 and vwp_vec16's float4 arguments
(alignment 16) at 4 and 8 (devtools VEC16_AT_WORDS), every buffer read back whole and held to
answer_at, every access at its own address. Its known-gaps row is its siblings' (dispatchType,
the consumer's own). The phase cases' inputs are unchanged, so their recordings stand.

Why: the runtime now runs such a bind (the translator holds an argument of 8- or 16-byte
alignment to a multiple of 4); this case records plain Metal's answer for it and compares the
runtime's byte for byte. Metal's API validation refuses the bind ("must be a multiple of 16"),
which the recording keeps as its validated fact. Metal's recording follows in its own commit.

(cherry picked from commit e3993b67c876216d6c45726245170df45087be42)
2026-11-25 19:17:03 -08:00
Anees Iqbal b42ef61b9b Runtime: a buffer bound at a multiple of 4 below its argument's alignment runs the state's variant that holds it to 4
What: a dispatch's alignment check (check_alignments) no longer refuses a buffer whose argument's
alignment is 8 or 16 (mask past 3) bound at a multiple of 4 below it: it answers the mask of those
slots, bit i slot i. A non-empty mask picks the state's variant (PipelineInner::variant, srgbwrite's
sRGB variant generalised to both masks): Compiled::of lowers the state's function with those slots
in LoweringInputs::word_bound_buffers, kept in the device's bounded map of contents under
KernelKey's new words mask (1,024 entries), held by the command buffer that dispatched it. The
dispatch then checks the variant's own alignments strictly, so a buffer a 64-bit atomic may reach,
which the variant holds to 8, is refused off a multiple of 8. A kernel the consumer compiled has no
variant: its own module's strict check refuses the bind as before. One bit per slot: a second class
(8 at a multiple of 8) would need a second mask in the key and the input.

Still refused: an address off a multiple of 4 (off 2 for an alignment of 2), a 64-bit atomic's
buffer off a multiple of 8, every draw's (render_encoder keeps the strict check_alignment: the
draw side would need the render path's variant key), and a consumer-compiled kernel's.
Refusal::BufferOffsetAlignment's doc says so; its message and `alignment` now name the alignment
the function holds the address to, as the variant's 8 for a 16-aligned argument is not the
argument's. The buffer-bind-off-alignment ledger row carries the new message;
docs/CONFORMANCE-COVERAGE.md regenerated (unchanged); REFUSALS.md regenerated (unchanged: its row
takes the doc's first words).

Why: a guest's system texture-decode kernel (library db82b13f114fbeef #0) binds buffer 0 at offset
1871700 (4 mod 16) under a 16-byte argument alignment and met the refusal 60 and 72 times in two
sessions; plain Metal runs it with each element at its own address. Only such a dispatch runs the
variant: an empty mask keeps the state's key, hash and module.

Tests (not yet run): translate.rs every_device_places_each_vector_access_at_its_own_address runs
vwp_vec16 at VEC16_AT_WORDS too, holds Metal's words, and asserts a variant lowered exactly at the
runs off a multiple of 16; every_device_keeps_a_word_bound_variant_in_the_bounded_map_of_contents
(cap 2: one variant a mask, kept, the map at its cap, a forgotten one lowered again);
an_argument_bound_off_its_alignment_is_refused binds vwp_vec16 2 and 3 bytes off (alignment 16).
compute.rs's for_test kernel still refuses all 17 binds (no variant to lower).

Docs: the runtime README's compute-encoder rule and a known gap of pipeline states (the relaxed
form, with the unconditional build's 3090 constant_* rows), docs/API.md sections 1 and 10.
2026-11-25 19:17:03 -08:00
Anees Iqbal ab18b5cdcf Translator: LoweringInputs::word_bound_buffers holds a buffer bound at a multiple of 4 below its alignment to what its accesses need
What: a new lowering input, the buffer slots a dispatch binds where the address is a multiple of 4
and not of the argument's alignment (8 or 16). Under the identity domains such a device-address
slot states RuntimeFact::AddressAlignment as its argument's alignment up to what its accesses
need: 4 for words and wider units, 8 where a 64-bit atomic reaches it, and 8 for every such slot
of a function whose 64-bit atomic goes through a wide pointer (AccessPlan::wide_atomics64). The
slot's direct accesses claim no more Aligned than the address is held to: AccessPlan::aligned now
maps each slot to that alignment, psb::Reach::Direct carries it, and whole_place declares the
proven multiple of 8 or 16 up to it. A slot of alignment 4 or less is unchanged by the set.

Why: a guest's system texture-decode kernel binds a 16-aligned argument's buffer at an offset that
is 4 mod 16 (1871700), and the runtime refused it (Refusal::BufferOffsetAlignment). Plain Metal
reaches each element of such a bind at its own address (an Apple M3 Max, macOS 27.0.1,
probes/misaligned_buffer_binds.m). The unconditional form (steelbrain/offsetalign, 8ed59d496e) cost
the 3090's constant_* rows 99-122 us -> 234-252 us (job 74651), so the relaxed form is a variant
only a dispatch bound so compiles.

The empty set leaves everything as it is: the key appends the set only when non-empty, the base's
held alignment is the argument's, which is at least every proven offset alignment of its leaves
(MemoryPlan::proven_align takes the base's twos), so min(proven, held) is the proven one, and
note_reach's 8 for a 64-bit atomic is read only as reach.min(4) outside the set. No
SEMANTICS_VERSION bump: no existing input's translation changes.

Tests (not yet run): engine_word_phases a_word_bound_variant_claims_and_states_4 (vwp_vec16 claims
and states 4 under the set, vwp_words's words unchanged by it) and
vec16_answers_metal_bound_at_a_multiple_of_4 (the CPU interpreter, VEC16_AT_WORDS: the variant
answers Metal's words, the plain module traps on its Aligned 16); engine_access_offsets
a_word_bound_slot_is_held_to_what_its_accesses_need (plain 8/16 both ways; under the set 8/4, and
8/8 through a wide 64-bit atomic). devtools: VEC16_AT_WORDS and answer_at, from 8ed59d496e.
api_signatures.tsv blessed (one field).
2026-11-25 19:17:03 -08:00
Anees Iqbal 158f4a7c38 Runtime README: a udmabuf over a large folio's pages is imported only on Linux 7.2 or later
The Imported blocks section now says that on Linux 6.11 to 7.1 a udmabuf made over the pages of a
large folio is malformed (one entry a 4 KiB page at an offset past that page's size), and that the
AMD kernel driver's import of it then binds other pages than the buffer's; Linux 7.2 fixes it. So a
consumer hands import_dma_buf or import_dma_bufs such a udmabuf only on Linux 7.2 or later, and the
runtime, which reads no kernel version, does not check it. No code changes.

Basis: read in the kernel's drivers/dma-buf/udmabuf.c at v6.18, v7.1 and v7.2, drm_prime.c and
amdgpu_ttm.c at v6.18, and the fixing commit 5bf888673e0d. Not reproducible in the lab, whose
kernels carry the fix.

Verified: docs only; the workspace Rustdoc check runs on development after this commit.
2026-11-25 19:15:54 -08:00
Anees Iqbal 4fadeef846 Conformance: the ledger's 8-bit sRGB rows after the twin form
What, from the whole replay at 5bcb3c3253 on four venues (Iris Xe m3-max-74599, RX 7900 XTX
m3-max-74606, um870's RTX 3090 m3-max-74604, lavapipe in the quick check m3-max-74595):

- read-write-tier-held's BGRA8Unorm_sRGB and RGBA8Unorm_sRGB stored-bytes rows (venue *) go: the
  undeclared argument-buffer writes now land in the twin, unencoded, and the case's colours encode
  to the codes that store, so the bytes match Metal's on every venue run.
- Its two texels rows (venue *) become one row per venue: the read through the argument buffer's
  read_write member now answers the twin's codes as linear values where Metal decodes them (192
  elements on the Iris, the XTX and the 3090, 219 on lavapipe, the largest difference 30440712),
  and on the Iris BGRA8Unorm_sRGB's twin is B8G8R8A8_UNORM, which ANV there cannot read without a
  format (256 elements, 1055846126). The AMD rows are written for RADV from the XTX's run; the
  780M's and the RX 550's runs follow.
- read-write-tier-round-trip-float's twelve sRGB rows, one a venue, become one row a format for
  every venue: rt refuses an access::read_write slot bound to an 8-bit sRGB texture on every
  device now, with the same answer on every venue run; the old reason (the device's format
  queries) no longer holds.

srgb-storage-writes itself is announced on all four venues: the bytes equal Metal's and the one
difference is the notices site's DevicePackConversion, a native note. docs/CONFORMANCE-COVERAGE.md
regenerated.

tests::srgb_twin's map test also prints the translation time of fpv_srgb_write's state and of
its sRGB variant, for the release-mode measurement.

Verified: the replays named above; the ledger as edited is verified by the next round.
2026-11-25 18:23:38 -08:00
Anees Iqbal 5bcb3c3253 Conformance: srgb-storage-writes' Metal recording, from the M3 Max
What: conformance record and times --runs 8 --write srgb-storage-writes on the Apple M3 Max,
macOS 27.0.1 (26A434), job m3-max-74594 at 121122cd7f; the recording copied out of its
workspace. docs/CONFORMANCE-COVERAGE.md regenerated (the case module now holds 1 case, its Metal
leg reaching 39 items).

What Metal stored, read off the recording: in every one of the four sweeps (RGBA8Unorm_sRGB and
BGRA8Unorm_sRGB, float and half) each row-0 texel holds codes (i, 255 - i, (i * 37) & 255, i) in
the format's channel order, 0 mismatches of 256; row 1's values past either end clamp to 0 and
255 before the encode, alpha linear.
2026-11-25 18:14:40 -08:00
Anees Iqbal 121122cd7f Runtime: the view's root is the viewed texture's Arc, and the variants' map test skips a device without twins
The check m3-max-74574 at 71388e89d7 failed to compile texture.rs:4396 (E0308): a view's root
was taken as &TextureInner where the viewed texture is held as &Arc<TextureInner>. Both arms now
borrow the Arc. tests::srgb_twin's map test now asks the textures themselves whether they have
their twins' storage views, and skips a device whose do not, as the encode test asserts that
answer against the device's features; its half bits are parenthesized.

Verified: the next quick check.
2026-11-25 18:13:16 -08:00
Anees Iqbal 71388e89d7 Conformance: srgb-storage-writes, what access::write stores into an 8-bit sRGB texture
What: a case over the owned fixture fpv_srgb_storage's fpv_srgb_write and fpv_srgb_write_half,
each writing a 256 by 2 RGBA8Unorm_sRGB texture and a BGRA8Unorm_sRGB one from buffer 0 and
recording the texture's bytes, one code a channel. The values are the linear values each code
decodes to (every code in red, green and blue, each in its own order, alpha i / 255), and row 1
starts with values past either end, which Metal clamps. A unit test checks each value encodes
within a hundredth of a code of its code in float and a twentieth through its half, so no side's
encode meets a value between two codes. half_bits is extended_range_targets'.

Why: Metal promises write access to both formats on every device (8.7.7: the write encodes,
alpha linear); the runtime now stores them through the UNORM twin with the encode in the
kernel. read_write is not in any read-write tier for an sRGB format, so the case writes only.

Verified: not yet run; the recording on the M3 follows. docs/CONFORMANCE-COVERAGE.md
regenerated.
2026-11-25 18:09:09 -08:00
Anees Iqbal 41f82346dd Runtime: an 8-bit sRGB texture is stored through its UNORM twin, and a kernel's write there encodes
What: an 8-bit sRGB texture made for shader writes, whose image is extended for its unorm
sibling, has that twin's storage view for its storage element (Plan::twin, TextureInner::twin;
a view of one lists the twin from its image). stores() takes no sRGB format on any device, so
MoltenVK's native sRGB storage view goes and the form is one on every device. A dispatch whose
kernel writes, and does not read, a texture slot bound to such a texture runs the state's sRGB
variant (PipelineInner::srgb_variant): the state's function lowered with those slots in
LoweringInputs::srgb_storage, kept in the device's map of contents under KernelKey's new srgb
mask (bounded by its 1,024 entries), and held by the command buffer that dispatched it
(Kept<Arc<Compiled>>), as no state holds it. Every other use stays Gap::StorageElement: a
read_write slot, a draw's slot, and a declared write beyond the slots (unstored() still names the
texture). ComputePipelineState::precision_notes carries DevicePackConversion for a function
kernel that writes a texture slot it does not read: the note is fixed at creation and never
decided at dispatch. A unorm view of such a texture still counts in extended_view_dispatches.

Why: a guest's OS kernel writes a write-only BGRA8Unorm_sRGB texture hundreds of times a
session and met Gap::StorageElement on every device without native sRGB storage, which is every
Linux device the runtime runs on. Dispatch only: the draw side would need the render path's
variant key, not a small share.

Known gap, in the README: a write that reaches such a texture through an argument buffer or a
resource ID with no use_resource declaring it now lands unencoded in the twin (each channel's
linear code), where it was dropped, and a storage read there answers the codes as linear values.
The format such a write reaches is unknown when its function compiles, so nothing encodes it. A
typed refusal of that write is not reachable at the same cost: nothing the runtime is told names
the textures an undeclared argument reaches, and refusing by declared reads or by bindings would
refuse programs Metal runs. A declared write stays refused.

Tests: tests::srgb_twin (new) writes RGBA8Unorm_sRGB and BGRA8Unorm_sRGB through the twin with
fpv_srgb_write and its half form and checks every code against the MSL encode within one, and
fills the kernel map past a cap of 2 with the variants' keys; tests::storage_element now
expects the write slot to dispatch where the twin stores and the read_write slot refused on
every device.

Verified: not yet built; the lane's quick check and device runs follow.
2026-11-25 18:09:02 -08:00
Anees Iqbal b6a57f7958 Translator: LoweringInputs::srgb_storage writes an 8-bit sRGB texture through its UNORM twin
What: a new LoweringInputs field, srgb_storage, names texture slots whose texture is an 8-bit sRGB
texture held for storage through its UNORM twin's view. Such a slot, where storage_images names
no choice for it and its image class is float, declares its storage image without a format, of
class SrgbEncode: a write encodes red, green and blue by the MSL transfer (8.7.7) through the
device's conversion and keeps alpha linear, recording PrecisionNote::DevicePackConversion, and a
read decodes. A device that cannot write or read storage without a format refuses it as
Feature::Format. Under the identity domains the slot's element is the storage array's element of
its declaration's class, as an Unknown-format storage slot of class SrgbEncode now is.

Why: a guest dispatch writes a write-only BGRA8Unorm_sRGB storage texture hundreds of times a
session, and no device the runtime runs on stores an sRGB format; the runtime refused it
(Gap::StorageElement). The runtime's kernels compile from LoweringInputs, not VariantKey, so the
resident-table domain's srgb_textures and storage_images (another meaning) are not reused.

The compile key appends srgb_storage only when it is non-empty, so no existing key moves and no
version is bumped; with the field empty nothing a translation emits changes.

Verified: not yet built; the lane's quick check and suites run next. api_signatures.tsv is
blessed (one record) and docs/REFUSALS.md regenerated (one Feature::Format site more).
2026-11-25 18:08:49 -08:00
Anees Iqbal fe382b5f70 Census at f69c237c91: the authored compile census's outcomes are unchanged after the dead variants' deletion; 666 artifact digests move
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.
2026-11-25 17:27:06 -08:00
Anees Iqbal f69c237c91 Validation: the runtime guard's hash for the deleted one-row and unit-axes facts
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.
2026-11-25 17:16:50 -08:00
Anees Iqbal 85e34d3080 Translator: delete the pulled-vertex-buffer variant
VariantKey::pulled_vertex_buffers had no product setter: every product path
builds VariantKey::new(), so the layouts it named were always empty and its
form (item 7 of pipeline::link::vertex: pull the remaining fixed-function
attributes of the named layouts) ran only under tests.

Deleted with it: RenderLinkInputs::pulled_vertex_buffers (set only from the
key), VertexInputState::variant_pulled (the layouts item 7 moved) and its
codec field, resolve()'s variant argument and the variant arguments of
vertex_fetch_projection_for and vertex_input_state. The de-indexed and
private list forms and a pipeline made for indirect command buffers keep
pulling every attribute (now item 7).

Tests: the pulled form of engine_identity_render's from_queries test (now
from_queries_pulls_the_de_indexed_form_s_layouts_at_their_pushed_strides,
which keeps the de-indexed and private list forms), and the
icb_render_stride_template case of the replay refusal test, which existed for
the pulled variant (icb_render_replay_template and icb_replay_template stay).

Keys and bytes: a render pipeline's PipelineKey hashes the derived Debug of
RenderLinkInputs, so every render PipelineKey changes once (the runtime keeps
it in memory only: its kernel map keys by queried_render_descriptor_key and
its directory by function and content keys). VertexInputState's encoding
loses a field: covered by ARTIFACT_FORMAT_VERSION 598 (previous commit).

Consumer search: consumer-uses.sh at the consumer's 19b32575f: 0 code hits
for pulled_vertex_buffers, variant_pulled, RenderLinkInputs,
VertexInputState, VariantKey. In-tree grep after the change: no
pulled_vertex_buffers or variant_pulled.

Checked by the lane tip's jobs, named in the lane report.
2026-11-25 17:16:50 -08:00
Anees Iqbal aa2b0fc670 Translator: delete the one-row and unit-axes kernel variants, and the unit-axes relief
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.
2026-11-25 17:16:50 -08:00
Anees Iqbal 6db36df158 Tests: the refused device's memory view has three doors, and a device opens through it only by the floor's choice
What: cached_types_incoherent moves from tests/mod.rs into tests::command::on_device and is no
longer crate-visible. The tests reach it through three doors alone:
- each_device_under_the_view, the one way a test opens a device through the view; the floor's
  choice over the viewed types decides the arm, and a refused make is asserted and printed;
- viewed, which returns a device's memory properties read through the view (the coherence test's
  read of the types a device under m2v_shared_view reads); it takes and returns a value, so it is
  no DeviceOptions::memory;
- suite_view, compiled only under m2v_shared_view, the suite-wide hook in Device::new that gives
  every device the view where the test gives none.
The doc mentions of the old path (coherence.rs, floor.rs, the settle test, docs/VALIDATION.md)
name the new one.

Why: the planner's ask after the second red of this class today. kkview (cb3d913139) fixed two
view tests that opened KosmicKrisp through the view raw, and the settle test (f78d45b9e0) was a
third, landed beside that fix. With the view private, a new test cannot pass it to
DeviceOptions::memory in the device cfgs; it has to take each_device_under_the_view. The
m2v_shared_view hook stays a door of its own because that cfg runs the whole unchanged suite
through the view on cards the floor opens under it (docs/VALIDATION.md), which no per-test helper
gives. Test only; the runtime does not change.
2026-11-25 16:54:02 -08:00
Anees Iqbal 5f3ffaaa28 Tests: the early member's settle test takes the floor's choice over the view as its arm, on every device
What: every_device_settles_an_early_members_shared_writes_at_its_own_completion's second arm,
under m2v_gpu, opened each device through the refused device's memory view
(cached_types_incoherent) with each_device_with and panicked where the make was refused. It now
runs through each_device_under_the_view, the helper the view tests share since cb3d913139: the
floor's choice over the viewed memory properties decides the arm. Where it chooses, the device
opens through the view with the chosen types and the body runs as before. Where it refuses, the
make is refused with exactly that refusal, which is printed.

Why: round 6c43304e65-1125-1610's Mac leg (m3-max-74364, KosmicKrisp on the M3, Mesa 26.3.1) was
red on this one test, 747 of 748: "the device is below the runtime's floor: it lacks a memory type
with DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT for buffers (the device offers buffers: type 0
with DEVICE_LOCAL | HOST_VISIBLE | HOST_CACHED)". That device's one host-visible, host-cached
buffer type also holds the parameter ring, so under the view no coherent type is left for the
ring, and the floor refuses it, as it should. This is the class kkview fixed in the two view tests
(cb3d913139). The test came with the submit-thread stack, which landed beside that fix and was
never run on that venue. Test only; the runtime does not change.
2026-11-25 16:51:23 -08:00
Anees Iqbal e9484b7d03 Replay dumps: a texture the cover rule holds covered is dumped with a whole-texture cover
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.
2026-11-25 16:41:51 -08:00
Anees Iqbal f6b1adf204 Replay player: a layered pass plays as the runtime builds it, and its dump holds each slice
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.
2026-11-25 16:41:37 -08:00
Anees Iqbal 6c43304e65 Tests: the poke guard stages its hold only where the busy work is seen complete behind the gate
ce87e6bc96's gate hung the guard on lavapipe: the quick check (job m3-max-74323) and a run alone
(m3-max-74325) each timed out in a wait at 60 s, while the RX 7900 XTX passed it (m3-max-74331:
"X held with 6 seen complete behind the gate, the busy work's last 6; 1 pokes"). A probe that
printed each step and the stall reports (m3-max-74338, steelbrain/pokeguard-diag e3e2cc5345,
never landed) showed why. The GPU had finished the busy work (the progress counter at 6). The
completion thread had retired busy1 (progress 4), poked once, and was still in that round, "its
step last entered reading 1 retirees' timestamps". Y waited staged for room that only the next
round gives. Lavapipe does not return that vkGetQueryPoolResults read (no WAIT flag) while its
queue waits on the test's gate batch, a semaphore only the test signals, so the round never
ended. The runtime missed no wake: a guest cannot submit a wait ahead of its signal (the README:
the submit thread holds such a wait, its command buffer Committed). The one such wait is the
test's own gate.

The hold is now staged where the device shows it can be: after the busy work opens, the test
gives the completion thread SEEN (5 s) to see the busy work's last value. Where it does, the
round that raised it has poked already, so the group and Y go and X is held. The test asserts as
before that nothing past the busy work was seen behind the gate, X's hold, and the one poke from
X's hold to L's handler. Where it does not, the test opens the gate at once and prints "the hold
not staged" with the completion side's stall report, and asserts neither the hold nor the poke.
Lavapipe can stage it too, where one round sees the whole busy work. There is no device-kind guard.

Test only; no product change. Verified at this commit: nothing yet. The quick check, the device
runs on the RX 7900 XTX, the Iris Xe and an RTX 3090, and the red control follow in the lane's
jobs.
2026-11-25 16:09:21 -08:00