The engine candidate's Vulkan executor runs a kernel case of buffers (device buffer arrays
included), threadgroup memory, function constants and linked functions, dispatched by threads
or threadgroups and observing a buffer, through metal2vulkan-runtime as a consumer runs it
(engine::runs_through_runtime decides it from the case's structure; platform::execute_runtime
runs it): Instance, the loader's first device of the kind, Device with the default options,
the library and function from the row's AIR with the case's constants and linked functions,
one compute pipeline state, one Shared buffer per binding as the oracle makes it (a bound
buffer padded to its declared size), one compute encoder, one dispatch, the bounded wait and
the readback. Only on the native backend, in the stated leg and without a profile restriction;
every other case keeps the executor's own context until its family's landing.
The device worker enables VK_LAYER_KHRONOS_validation for the run through the loader's and
the layer's variables (core and synchronization validation, every message, one log per
process); a device with no active validation tool fails the run, and so does any logged
message. The pipeline state's make is held to 500 MiB of peak live allocations
(worker::alloc::bounded: an allocation past it ends the process with exit 87 and a stderr
line) and 20 s; the driver's creation to the case's bound; every pipeline is made before the
submission (prepare_dispatch).
The row keeps what the runtime answers: the state's precision notes and the runtime
fingerprint (engine::runtime_fingerprint: the product, SEMANTICS_VERSION and the runtime
crate's sources, METAL2VULKAN_RUNTIME_CRATE_FINGERPRINT from build.rs). spv_sha256, the
status, the census module's subgroup shape, containment and artifact are absent (Option, serde
default); the index's staleness accepts the runtime fingerprint as this build's.
ReductionOrder: the comparison keeps the note's per-operation allowance. The census strategies
of a runtime row are the simdgroup float sums and products the case's AIR calls
(check::interface::float_reductions, from the entry's module and each linked module), under
the names the translator's strategy census gives them, so ComparisonClass::derive bounds the
same operations with the same reorder table as before; a note no such operation explains
(a simdgroup matrix's) stays unbounded, as before.
ENGINE_EXECUTOR_ABI v185: rows of these cases record another environment and census.
On Windows the crate is the replay player, whose one wait is the runtime's (gpu::wait's
new_runtime), which ends only completed or timed out. The fence and Metal waits that report the
other endings (unresolved, a suspected fault, an ordinary failure) and settle(), which only they
call, are absent there; with them, the verdicts only those endings give. Found by the first
Windows clippy pass of the player (m3-max-60165: two dead-code errors in gpu/wait.rs).
On Windows, metal2vulkan-validation is the replay player alone (command-replay): the replay module,
and gpu without its Metal compile deadline. Every other module (cases, corpus and its worker,
budgets, audits, the Vulkan batch) is absent there under cfg(not(windows)), with no Windows form
of any of them. The crate's modules form one dependency cycle through the worker (gpu's compile
deadline runs its tools in the worker's process groups), so gating the worker gates every module
that reaches it; the player reaches only gpu and replay. ash, which the player and command-replay
use, becomes a dependency on every host instead of macOS and Linux only.
A kernel whose module carries a RuntimeFact the compute encoder does not supply was refused as
Gap::KernelInput { kind: KernelInputKind::RuntimeFact }, and the error did not say which fact. A
guest's boot met it once, on a system kernel's compute pipeline, with no way to tell what to build.
- The translator gives each fact a name: RuntimeFact::name, the variant's name as a &'static str,
without its fields (crates/metal2vulkan/src/pipeline/facts.rs, one arm per variant).
- KernelInputKind::RuntimeFact becomes RuntimeFact { fact: &'static str }, so the kind stays Copy
and Hash. The catch-all of the runtime's fact match fills it, which also covers an address
alignment of a slot that is not a kernel's buffer or is not a power of two. Error's Display
prints the kind, so the refusal's text carries the name.
- The runtime README's two imageblock lines say which fact the refusal names.
- api_signatures.tsv blessed (the new method, the variant's new shape); docs/REFUSALS.md
regenerated, unchanged (it names the Gap, not the kind's variants).
The consumer names neither KernelInputKind nor RuntimeFact in its code
(consumer-uses.sh KernelInputKind RuntimeFact: 0 code hits on its development 62b3227c74 and its
steelbrain/* refs of the last day), so the variant's new shape breaks nothing there.
Test: the lavapipe test of an explicit-imageblock kernel (a4_imageblock_extent) now expects
KernelInputKind::RuntimeFact { fact: "ImageblockSize" }, and its text check reads the name in the
refusal. Without the change the kind carries no name and the test does not compile.
What: the player's places (validation src/replay/new_runtime/places.rs) give a
pooled block back to the runtime (Device::release_block) once its last place is
free again, as the runtime's own blocks go back, so the runtime's idle rule frees
its allocation; a later place takes a block again. The places whose commits have
completed are now freed at each commit as well as at each take, so a stream that
stops placing buffers after a scene still gives its blocks back.
Why: the player kept every pooled block it ever took. In a lavapipe play of a GL
scene stream (glbench-780m-r2, probe job m3-max-60056) it held 141 Private blocks of
16 MiB, 2.2 GiB, for 40 live buffers after the scene closed, so a play's Private
memory gauges measured the player's pool, not the runtime.
How verified: the lavapipe test
an_emptied_pooled_block_goes_back_to_the_runtime (forty 1 MiB places take three
blocks; nothing goes back while the releases' commit is pending; the first block
goes back once its sixteen places are free, every block once all are, the runtime's
private_take_held_bytes falling with them; a later place takes a block again), in
the branch's gate job. rt_replay's device helpers are opened to the replay module
for it.
The gate on 47beec7b7a failed clippy (all three configurations) and
workspace Rustdoc in metal2vulkan-conformance:
- seven public all() docs said "in [`FORMATS`] order", an intra-doc
link to a private constant (astc_textures, compressed_decode,
compressed_moves, compressed_views, etc_textures, pvrtc_cpu_order,
pvrtc_rows); they now name it as code, unlinked;
- buffer_depth_samples' rewrapped header put "+ (x * n + s) * bpp`" at
a line's start, which Markdown reads as a list item with the rest of
the paragraph as its lazy continuation (clippy's
doc_lazy_continuation); the code span is on one line again.
The golden hash table compiles through Device::from_queries (docs/
VALIDATION.md already says so), not Device::new, so the matrix's
comments and its problem message say that. The gate keeps its behaviour
under its own name: results.golden_table_moved (was old_path_moved),
GOLDEN_FIX (was OLD_PATH_FIX), and the leg's problem "GOLDEN TABLE
MOVED" (was "OLD PATH MOVED"), with VALIDATION.md's line and the test
following. The "new runtime" of results.py's and instructions.tsv's
comments is now the runtime.
Unchanged, because readers depend on them: the exemption phrase
"old-runtime regression fix" (matched in the subjects of commits since
the table's last bless), and the record keys harness-new/,
harness-new-warm/, harness-gpu-new/ and harness-alone/<row>/<pair>/new,
which the harness prints from its --runtime value and which the 60
stored notes under refs/notes/matrix hold: a base's records are compared
key by key, so renamed keys would compare nothing against every stored
base.
line_widths' `lane` case is now `widths` (two lines and a three-vertex
strip on 16 x 16 at six widths), its function widths() and its printed
row header WIDTHS. pull_model_interpolation's `lane` case is now `forms`
(one triangle with w 1, 2 and 4 through each function of the fixture),
with its constants kFormsTriangle, kFormsSamples, kFormsOffsets and
FORMS_SIDE, its printer print_draw() and its output header "(case
forms)". Their comments no longer cite the deleted runtime's lane test.
Nothing outside the two probes names either case: git grep finds no
caller, no committed output with a "LANE" row or "(case lane)" header,
and the two files that cite pull_model_interpolation.m (the fixture
pull_model_interpolants.metal and lower/fragment/interpolate.rs) name
the probe, not the case.
Also: rgb10a2_srgb's doc named the test the_half_bits_are_the_lane_s,
renamed in the previous commit to the_half_bits_are_pinned.
denormal_word_fetches, compressed_blits, two_plane_samples,
int_attributes, half_storage_writes, fetch_ordered, extended_range_*,
sparse_tiles, buffer_depth_samples, transcript, measured, srgb_fetch,
simdgroup_lockstep, shader_stencil, mesh_barriers,
indirect_private_types, depth_texel_reads, buffer_textures,
two_plane_heap_blits, two_plane_copies, texture_buffer_fills,
sparse_heaps, norm_storage_writes, indirect_commands, heap_metal_sizes,
half_write_nans, work, rt_side, compute_pass, ycbcr_minify,
stage_in_regions, rate_maps, buffer_texture_blits, case, event_orders,
tessellation_sweeps, sparse_query, compute_heap_residency and
color_write_masks. Each lane passage is now the fact it carried: the
chip and macOS a table or rule was measured on (an Apple M4 for
buffer_depth_samples, shader_stencil, norm_storage_writes and
two_plane_copies' digests; the M3 Max under macOS 27.0.1 for
indirect_private_types and indirect_commands), what the recordings are
held to, and what is not a case and why.
Passages that gave a stale reason now say what is true:
- compressed_blits: a heap-size query record kind exists
(heap_metal_sizes); none of its descriptors is block-compressed.
- texture_buffer_fills: the over-long pattern is refused by the Metal
side before the call, not by a runtime Problem.
- two_plane_copies: a carried answer can name its chip
(MetalSource::measured_on).
- heap_metal_sizes and case.rs: the runtime has no Error::Nil or
Error::Invalid; its side answers a texture it does not make with its
typed error, recorded as the failure it is.
- mesh_barriers: the indirect object row is not refused by the runtime.
- color_write_masks named the deleted runtime_side's color_descriptor;
the field is forwarded in rt_side::fields::color_descriptor.
- fetch_ordered no longer says a case has no vocabulary for a blit into
a texture.
Five "recorded in a later commit of this batch" fallbacks now say a case
has no recording.
indirect_private_types' MEASURED_IN literal still names "the runtime
lane's indirect command buffer table": it is stored in a committed
recording, so it stays.
Renamed (tests unless noted): metals_recorded_words_are_the_pinned_texels,
metal_s_recorded_conversions_are_the_rule_s_values,
metals_recorded_codes_are_the_measured_rule,
metals_recorded_words_are_the_measured_rule (half_read_nans),
metals_recorded_halves_are_the_measured_rule,
metals_words_are_the_lockstep_model and the helpers
expected_divergent_loop and expected_until (simdgroup_lockstep),
the_rule_hashes_to_the_pinned_constant (depth_texel_reads),
the_two_bands_are_the_m4s_two_bands (ycbcr_minify),
metal_s_recorded_targets_answer_as_the_table and the constant
TABLE_ANSWERS (discard_hoist), a_levels_geometry_halves_and_stops_at_one
(fresh_contents), the_inputs_hash_to_inputs_sha (pixel_downscales),
the_coordinates_hash_to_grid_sha (pixel_samplers),
the_half_bits_are_pinned (rgb10a2_srgb),
the_probes_table_is_the_fitted_rules (wide_points), the constants
M4_STENCIL (shader_stencil), BY_TYPE_FORMAT (sparse_tiles) and
TABLE_NAMES with the variant Family::Table (texture_fills). Thread,
SIMD and channel lanes and the known-gaps ledger's waiting-on lane are
unchanged. Comments, docs, names and test panic messages only.
wide_points, texture_accesses, shared_exponent_storage,
compute_threadgroups, buffer_blits, surface_fills, format_copies,
texture_fills, snorm_tile_store, sample_fills, rotated_planes,
mesh_draws, level_sizes and tests.rs, plus stragglers a wider scan found
in chroma_pairs, compressed_decode, compressed_moves, pvrtc_cpu_order and
ycbcr_textures (a phrase wrapped across lines, "the lane this ports", "a
lane" at a line's start). Each lane passage is now the fact it carried:
the chip and macOS a rule was measured on (an Apple M4 and the M3 Max,
macOS 27.0.1, for rotated_planes' plane rule; the M3 Max for
level_sizes'), what the recordings are held to, and what is not a case
and why.
The "not ported" passages of buffer_blits, compute_threadgroups and
format_copies now say what is not a case and why (an out-of-bounds copy,
an over-limit threadgroup, an invalid copy: no case hands Metal's GPU
one), not that the lane keeps them. rotated_planes drops a finding of a
stream's report about the deleted runtime's plane stride. mesh_draws
drops "a later batch" and "this round".
surface_fills' MEASURED_IN literal still names "the runtime lane's
surface-fill table": it is stored in a committed recording, so it stays.
Tests renamed: metals_bytes_are_the_expectation (buffer_blits),
metals_words_are_the_formula and its helper kernel_model
(compute_threadgroups), every_recorded_extent_is_the_level_rule
(level_sizes), every_recorded_word_is_the_shared_exponent_rule,
metals_fill_runs_are_the_fills_ranges (buffer_blits),
the_fixture_declares_the_probes_texture_arguments (texture_accesses),
and from earlier modules the_expectation_is_the_fresh_texture_rule,
the_sweep_is_exact_in_half_and_spans_both_ranges and tile_threadgroups'
the_recorded_32x32_threadgroup_is_the_formula and
the_recorded_even_threadgroups_are_the_quad_order. Thread
and channel lanes are unchanged. Comments, docs and test panic messages
only.
nearest_positions, mesh_commands, astc_textures, ycbcr_textures,
textures, swizzled_storage and discard_hoist. Each lane passage is now
the fact it carried: the fitted coordinate set, the Apple M4's answer
for mesh_commands' racy row and swizzled_storage's rule, the committed
YCbCr probe's surface and SHA-256, the decoders the ASTC recordings are
held to.
Three passages gave the deleted runtime's or a planning reason:
mesh_commands' "not ported" list said a did-not-return outcome was
unbuilt and waited on the user (MetalSource::did_not_return exists) and
named runtime_side.rs and the porting streams; ycbcr_textures said the
runtime answers multisample descriptors Error::Invalid. They now say
what is not a case and why: Metal does not return, or its validation
ends the process.
Tests renamed: every_recorded_read_is_the_read_rule and every_recorded_
store_is_the_store_rule (swizzled_storage). Thread and channel lanes are
unchanged. Comments, docs and test panic messages only.
tile_threadgroups, etc_textures, texel_swizzles, rotated_targets,
pvrtc_cpu_order and pixel_downscales. The facts stay with their
sources: the M3 Max on macOS 26.7 and the Apple M4 on 27.0.1 behind the
texture-buffer swizzle rule, the M4 behind the PVRTC host order and the
pixel-downscale digests, the M3 Max on 27.0.1 for the recordings.
Two passages described the deleted runtime's behaviour as reasons:
pvrtc_cpu_order's "Not ported" said our runtime refuses typed with
NotImplemented(PvrtcBlockOrder) (the runtime makes no PVRTC texture on
these devices, per known-gaps-rt.tsv), and pixel_downscales said the
case vocabulary has no vertex-and-fragment pipeline (case.rs has
FragmentFill). Both now state only what is not a case and why.
Tests renamed: every_recorded_word_is_the_swizzle_rule, every_recorded_
host_copy_is_the_z_order, the_recorded_digests_are_the_m4_answers
(pixel_downscales). A SIMD lane in tile_threadgroups' formulas and a
channel lane in the layouts are unchanged. Comments, docs and test
panic messages only.
sample_positions, pvrtc_rows, pixel_samplers, compressed_decode,
rgb10a2_srgb, half_read_nans and border_swizzles. Each keeps the fact a
lane passage carried: the probe and chip a table or rule came from (an
Apple M4 for the sample-position table, the PVRTC arithmetic, the
pixel-sampler digests, the BC decode rule and the border rule; an Apple
M3 Max for the recordings), and what the cross-check holds the
recordings to. rgb10a2_srgb's story of the lane's truncated digests is
now the fact it ended in: the write and store cases record all 20,480
words, not the sweep's 16,401 and 16,405. "Not ported" and "Left to the
lane" passages are "Not a case" with their reasons.
Test functions renamed with their doc references: the_recorded_coverage_
is_the_probes_table, every_carried_row_states_the_probes_number_and_
forbids_re_recording, the_recorded_digests_are_the_m4_answers (pixel_
samplers), every_recorded_texel_is_the_fitted_rule and every_recorded_
texel_is_the_border_rule. A lane that is a vector channel or a thread
is unchanged. Comments, docs and test panic messages only.
fresh_contents, half_output_blends, compressed_moves, extended_swizzles,
chroma_pairs, half_texel_nans, compressed_views and visibility said
where each rule, table and seed came from: the deleted runtime's test
lanes ("the lane's order", "the cross-check the port owes the lane",
"Not ported, and why"). Each now states the fact alone: what the case
asks, the chip and macOS a measurement was taken on (an Apple M3 Max
under macOS 27.0.1, an Apple M4 for the byte models' digests and the
visibility table), and what the cross-check holds the recordings to.
"Not ported" sections are "Not a case" and keep their reasons.
fresh_contents' venue paragraph also named DeviceProperties::
lossless_compression and an RTX 5080 presenting compression; it now says
the runtime presents a Mac keeping none (Venue::lossless_compression
false) and that a texture it places reads zero until written, so the
Private rows' fresh site is the declared one there. chroma_pairs no
longer says the runtime answers Error::Invalid, an error it does not
have.
Four test functions named for the lane are renamed: metals_texels_are_
the_rules_expectation, every_recorded_move_is_the_byte_model,
every_recorded_view_move_is_the_byte_model and the_recorded_results_are_
the_tables_words. A lane that means a GPU thread or a vector channel is
unchanged. Comments, docs and test panic messages only; no string a
recording stores.
What: a public read, Device::loss() -> Option<DeviceLoss>, with DeviceLoss { call: &'static str,
result: vk::Result } (the pairing Error::Vulkan has), exported at the crate root. The work state's
lost flag becomes the first loss itself (Option<DeviceLoss>): Work::lose takes the cause and keeps
the first, so the read and the lost state cannot disagree, and the cause is set before any command
buffer ends DeviceLost. Every site that takes the device as lost now passes its call and result:
- the submit thread: vkQueueSubmit2, its uploads' vkEndCommandBuffer, and the begin of an upload
for side copies (vkCreateCommandPool, vkAllocateCommandBuffers or vkBeginCommandBuffer);
- the completion thread: its progress read (vkGetSemaphoreCounterValue, and vkWaitSemaphores with
a timeout of 0) and its blocking vkWaitSemaphores.
Which results count as a loss is unchanged, and no new CommandBufferError code is added.
Why: a Windows UHD 630 boot lost the device early ("lost, with 2 command buffers committed and not
complete"), and nothing named why. The submit thread dropped vkQueueSubmit2's VkResult, so an
out-of-memory submission read the same as VK_ERROR_DEVICE_LOST; the completion thread dropped both
the call and the result.
Out-of-memory submissions stay a loss (the planner, 11-20) until a recorded result shows one. The
Vulkan specification on vkQueueSubmit2: "If vkQueueSubmit2 fails, it may return
VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY. If it does, the implementation must
ensure that the state and contents of any resources or synchronization primitives referenced by
the submitted command buffers and any semaphores referenced by pSubmits is unaffected by the call
or its failure. If vkQueueSubmit2 fails in such a way that the implementation is unable to make
that guarantee, the implementation must return VK_ERROR_DEVICE_LOST." The runtime README's
device-loss known gap now says that a failed vkQueueSubmit2 of any result, out-of-memory included,
ends the device.
Docs: the runtime README (loss behaviour, known gaps); api_signatures.tsv gains the four records
(DeviceLoss, its two fields, Device::loss). docs/REFUSALS.md regenerates unchanged.
Tests: every_device_ends_its_work_at_a_loss_and_a_new_device_opens gives its loss a cause and
checks that loss() is None before the loss, names the cause after it, keeps it through a second
loss of another cause, and is None on the new device. No real failing submission is provoked: on
lavapipe that would take a fault, hang or exhaust test, which are opt-in.
Checked by the lane's compile jobs on this commit: fmt, clippy (plain, --cfg m2v_gpu,
--cfg m2v_cpu_icd, Windows x86_64-pc-windows-gnullvm and x86_64-pc-windows-msvc), workspace
Rustdoc with warnings denied, the runtime's suite on lavapipe and api_signatures.
What: the rt backend's live counters, printed with each present, now carry
private_units and private_unit_used_bytes, texture_block_held_bytes and
texture_block_bytes, private_take_held_bytes and private_take_bytes, and
texture_own_bytes.
Why: a play then shows, frame by frame, the Private units a scene holds and the
bytes in use inside them, beside the textures' blocks and own allocations apart.
How verified: the validation crate's suite in the branch's compile-gate job.
What: two public gauges, relaxed and always on. Gauges::private_units counts the
pool's 16 MiB Private units that hold a block, of either kind: the consumer's
blocks, or a texture block, which fills its unit (the one kept empty for the next
place among them). Idle units and long allocations are not counted.
Gauges::private_unit_used_bytes counts the bytes in use inside those units: the
consumer's blocks' lengths there, set by the pool, and the image sizes of the
textures placed in their texture blocks, moved by the places as a place no longer
than a block is taken or freed. Both read zero after teardown.
Why: the Private memory a scene leaves behind is units held by something small and
live, or units kept empty. The ratio of these two, used bytes against 16 MiB per
unit, is the one figure a walk watches for it, with both kinds of unit together;
the earlier gauges split the kinds, and texture_block_bytes and private_take_bytes
include the long allocations.
How verified: the device test every_device_gauges_texture_blocks_and_private_takes_apart
now also checks the two gauges at each step: none at the start; one unit with a
small block's bytes, then with a sixteenth beside it; two units once a texture is
placed, with the texture's image size added; unchanged by a take longer than a unit;
the kept texture block's unit with no bytes once the textures are freed; one unit
(that kept block) with 0 bytes once the blocks are given back; every gauge zero after
teardown. README Counters text and api_signatures.tsv updated.
the_runtime_sources_are_the_committed_ones failed on development 6deb44b01a with
"listed, but no runtime input reaches them": reflection/mod.rs (its row named
the argument encoder over a buffer binding, which the orphan pass deleted with
from_buffer_binding) and spirv/ir/intern.rs (the bind-shape hasher bind/state.rs
no longer reaches since the orphan pass). No runtime input reaches either, so
neither is listed. Seen by privmem's gate 60021 and cutxlate's 59951/59970.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
Before a published crate's public item is deleted, the lane searches the
consumer's checkout for it and names the hit or the zero in the commit message.
The consumer is asked only where a search cannot answer (a macro, a re-export).
A search takes seconds and leaves the same evidence as a round of messages.
The orphan pass deleted ArgumentBufferLayout::from_descriptors because nothing in
this tree called it; the consumer did, and its build broke at f53cd542b6. The
dead-code rule now says a public item of a published crate is used when a
consumer calls it, and that the consumer is asked before one is deleted.
The orphan pass (f5faf44098 and its WIP follow-ups) deleted
ArgumentBufferLayout::from_descriptors as unused in this workspace. It is the
published crate's answer for Metal's newArgumentEncoderWithArguments:, and the
consumer calls it for the guest's MTLArgumentDescriptors: its argument encoder
writes at those offsets. Function::argument_buffer_layout covers only
newArgumentEncoderWithBufferIndex:. A use outside this tree is still a use.
Restored as it was at f5faf44098^: the function, its two helpers (metal_align,
type_size_align), the module docs' descriptor rule, the bind root's line,
API.md's line, and its Metal-measured tests in src/tests/argument_buffers.rs
(the order given, arrays, MSL sizes, constant-block alignment, the refusals, an
index two descriptors claim). api_signatures.tsv regained its row.
from_buffer_binding (newArgumentEncoderWithBufferBinding:) stays deleted unless
the consumer's own compile shows a call.
The M3 bless job m3-max-59945 re-derived crates/metal2vulkan/tests/golden_hashes.tsv
on development 69cd6b7fb6 (SEMANTICS 2208). The quick check m3-max-59944 at the same sha
passed clippy x3, Rustdoc and lavapipe's rt suite (484 passed).
The dead-variant batch (cutxlate-dw) and the translator orphans (cutcheck) deleted items on both
sides: the orphans removed CompensatedViewport, is_permanent_for and the ViewportCompensation
path; the batch removed the offset-0 class (ZERO_OFFSET_CLASS, ZERO_OFFSET_TOLD,
storage_view_buffers), Needs::DriverDefect and the dead DriverWorkaround variants. The landing's
rebase kept both deletions, so the generated tables are regenerated from the merged sources:
scripts/api-signatures/signatures.py --bless and scripts/refusal-surface/refusal_surface.py.
Verified: both scripts ran on the merged tree; the table holds no ZERO_OFFSET row.
Gate m3-max-59801 at e10278404b: clippy_gpu and clippy_cpu refused chunks_exact(16) in rt's lost_writes test (clippy::chunks_exact_with_const_size). Verified: nothing yet; the recheck follows.
Gate m3-max-59801 at e10278404b failed three tests the batch moves (the golden table's red is the
bless's):
- tests::engine_lane_reads asserted the uniform view of a constant slot read at each lane's own
index on every capture. The planner's ruling (68bf8694a5) gives such a slot its storage view on
every device, so the test now asserts that: lane_table's table is a storage view, loop_table's
and field_table's (reads at a uniform address) keep the uniform view, under every NVIDIA ID and
on RADV.
- validation's coverage test expected ob1_uniform_buffer's target as a uniform buffer on every
leg but robustness off. Its kernel reads the constant buffer at each thread's own index, so the
compiled slot reaches it as a storage buffer on every leg now; the fixture README says so.
- pipeline::compile's old render key takes its value under SEMANTICS 2208 (6f48782e2f..., the
gate's left side).
Verified: nothing yet; the recheck follows.
SEMANTICS_VERSION 2208: the batch changes what a module holds on devices that took the deleted
variants (the clipping notes and the denormals note on every device, one serializer form, a
constant slot's storage view, the half rounding bound) and no longer defers discards or guards
helper branches anywhere.
runtime-sources.sha256 moves without a RUNTIME_VERSION bump: the binder's edits in the batch drop
forms no plan reaches (the uniform texel view's class, the offset-0 class no consumer set, the
mesh limit's always-zero staged bytes), so it binds every plan it can be handed as before.
REFUSALS.md and api_signatures.tsv are regenerated (signatures.py --bless, refusal_surface.py).
Verified: nothing yet; the gate follows.
PushReadsLengthenThreadPayload was the only reason a storage view declared
SpecKey::RangeAtBindOffset, and lower::access now declares it for a uniform view alone. What told
offset 0 apart for such a view had no reader left: StageTable::zero_offset_views,
bind::ZERO_OFFSET_CLASS and ZERO_OFFSET_TOLD, PipelineInterface::storage_view_buffers, and the
storage arms of range_at_bind_offset. No crate of ours or the consumer's names them (the runtime
never set zero_offset_views). They go, with the test of the storage form, the offset class test's
offset-0 half, the validation executor's line that set every slot's bit, and the API guide's
paragraph. range_at_bind_offset answers false for a storage view: it reads at its residual.
Verified: nothing yet; the gate follows.
DriverWorkaround held 26 variants; Device::from_queries takes only ClippedCoverageNotMetals and
TessellatorNotMetals, on every device, and the batch's earlier commits removed every reader of
the other 24. They go, and the enum's docs now say what it is: a device answer that no Vulkan
query tells apart, noted on every device.
Needs::DriverDefect and Unsupported::driver_defect named a DriverWorkaround measured on a
driver's identity. No site constructs it any more; they go, with their arms in the permanence
match, the validation engine's outcome map and its key test, the conformance verdict's device
gap, the error tests and the refusal surface script.
Docs that named deleted variants are rewritten to what the code does now: the f32 denormals in
an entry that declares the 16-bit float controls are the device's own on every device; the stage
bound is the one bound a kernel's plan is held under; the uniform view is a Uniform block (the
texel form went with ExternalUniformReadsSkipACache); the Intel venues' note no longer claims the
RPL-P's profile takes a workaround.
Verified: nothing yet; the gate follows.
m3-max-59760 (clippy at 59a9282467): discard.rs's TypeId and stage_io/plan.rs's DriverWorkaround
imports were left unused; fetch.rs's movable-writes call still passed the deleted dropped flag;
FragmentStrategy::name no longer reads its plans; engine_coverage_loop still read the per-sample
defect.
Since the fact tables went, Device::from_queries gives every device the same two workarounds
(ClippedCoverageNotMetals, TessellatorNotMetals), so every reader of another variant tested a
fact no profile carries. Deleted with their now unreachable forms, each changing what no device
emits:
- EarlyTestsDropMultisampledImageWrites (MoltenVK on Apple's GPU): the framebuffer fetch's
per-sample refusal and its 'dropped' arm (fetch.rs), the imageblock's late-tests form and its
two refusals (imageblock.rs, ImageblockPlan::late_tests), the input shadow's arm. The device
test every_device_keeps_an_early_tests_fragments_texture_writes_at_four_samples (runtime,
lost_writes) holds the defect's shape on every device.
- MemoryWritingFragmentsRunPerSample (MoltenVK): CoverageLoop::DriverRunsPerSample, the coverage
plan's driver_runs and writes, its refusal, link's sample-shading exception, the codec tag and
engine_coverage_loop's per_sample_defect. Held by
every_device_runs_a_memory_writing_fragment_once_per_covered_sample.
- BothBarycentricFormsRejected: the stage interface's refusal of a second barycentric form.
- MeshIndexComponentStoresMisplaced (lavapipe before Mesa 26.2, below the floor): the staged
index words, their declaration, stores, write-back and workgroup bytes
(stage_workgroup_limit's staged argument).
- BufferAtomicsUncontained (SwiftShader, below the floor): contain::atomic_encoding and
DeviceProfile::checks_atomics_in_shader, which validation's out-of-bounds contract read; an
atomic is contained as every other access is.
- DiscardDropsSimdgroupStores (MoltenVK on Apple's GPU, SPIRV-Cross's optnone helpers): the
deferred discards (discard.rs late_discards, Reach::FLOAT, the census name
fragment.discard.deferred), spirv::helper_branches whole (its guard, fences and census
entries), and the notes DiscardDropsSimdgroupStores and HelperBranchDropsSimdgroupStores with
their codec tags, conformance degradations, validation allowances, API.md entries and the
engine_fragment test of the uniform branch. The rch_helper_* fixtures stay, compiled as written
everywhere, their README rows saying so. Held by
every_device_keeps_the_texture_writes_beside_a_discard_after_a_texture_sample.
The three runtime device tests are in tests::lost_writes, passing on lavapipe (m3-max-59701).
The planner's ruling: no VertexSimdgroupGrouping. lower/simd recorded it for a vertex function's
simdgroup or quad operation where the stage takes no required subgroup size and the profile
carried DriverWorkaround::VertexGroupingNotApples (ANV's 8-vertex interleaved subgroups); no
profile carries that variant since the fact tables went, so it was recorded nowhere. The note,
its reader (regroups_vertices), its codec tag, its conformance degradation and code, its
validation allowance, deferral and bound text, API.md's catalogue entry and the engine_simd and
c3 tests that named it go.
The public surface moves with this commit and the batch's earlier ones: the api_signatures table
(regenerated by signatures.py) drops PrecisionNote::VertexSimdgroupGrouping (the translator's
and the runtime's re-export), Feature::PixelCoverage and Feature::CentroidVarying (link's split
refusal), and DescriptorView::UniformTexel (the views' rung 1); REFUSALS.md (regenerated) drops
the two features, and the reach table their rows.
quantize_form took the controlled conversion pair (QuantizeForm::Controlled) under the 16-bit
float controls except on a profile carrying DriverWorkaround::HalfConversionPairFolded (NVIDIA's
driver folds the pair even under the controls), which took QuantizeForm::Converted. No profile
carries that variant since the fact tables went, so every device with the controls already takes
the pair, and the planner's ruling is rung 4 with no quantize form for it: the pair stays the
one form, and PrecisionNote::NativeHalfConversion, recorded on every device that rounds through
it, states the worst a floor device does, which its doc already lists: no rounding at all (the
RTX 3090's drop of the pair, lavapipe's), its differences compounding and a value past the half's
range staying finite until a half store narrows it. Validation's allowance for the note is
Unbounded and the conformance suite loosens no value by it (NATIVE_NOTES declares the notice
alone), so both already follow that bound.
The readers' docs (narrow.rs, compile.rs, half_hold.rs, arith/mod.rs, blend.rs, artifact.rs,
API.md, HOWTO.md, engine_native_half's expected form) drop the two variants' names
(HalfConversionPairFolded, and HalfConversionFusedWithArithmetic, docs only) and say what the
drivers do in plain words. No module changes on any from_queries device.
compile.rs left a module's float denormals to a device that takes the measured
DriverDeviation::MetalFloatDenormals (requiring VkProperty::MetalFloatDenormals), except in an
entry that declares the 16-bit float controls on a profile carrying
DriverWorkaround::FloatDenormalsKeptUnderHalfControls (NVIDIA's on the RTX 3090 and the RTX 5080
Laptop GPU keeps f32 denormals there), where it recorded PrecisionNote::DeviceDenormals. No
profile carries that variant since the fact tables went. Now every entry that declares the
16-bit controls records the note and requires no such property, on every device: no query tells
which driver keeps the denormals there. Its readers' docs (artifact.rs, requirements.rs) say so.
On every from_queries device today no profile takes MetalFloatDenormals, so every f32 operation
whose denormals are left to the device already records the note (arith's leave_denormals); the
new test from_queries_records_the_device_denormals_of_a_float_product (device/tests/from_queries.rs,
an owned synthetic kernel of a float and a half product) holds that on every committed profile:
the note, and no MetalFloatDenormals requirement.
QuadsSplitByClipping is recorded on every device, by the function's structure alone: a fragment
function that runs a quad or simdgroup operation over its active lanes (counts_active_lanes)
records it, with no fact test. A device may shade a triangle it clips as several triangles, and no
Vulkan query tells such a device apart; the note's doc and API.md's catalogue say so and link no
workaround.
Link's split_pixel_fragments refused, in a pipeline of more than one sample, a pixel-rate
fragment function that reads [[sample_mask]] (Unsupported{PixelCoverage}) or a centroid varying
(Unsupported{CentroidVarying}) where the profile carried
DriverWorkaround::ClippedTrianglesSplitPixelFragments. Since the fact tables went, no profile
carries that variant (Device::from_queries gives only ClippedCoverageNotMetals and
TessellatorNotMetals), so the refusal never fired: deleting it changes what no device emits. The
function, its module doc and the two Feature variants only it named go.
ClippedCoverageSplit now also covers the centroid arm: a fragment function compiled for a
multisampled pipeline that reads a centroid float varying and runs once per pixel (no sample
index, sample-qualified varying or memory write) records it where ClippedCoverageNotMetals holds
(every from_queries device): its centroid is the whole coverage's where Metal's may be a piece's.
One that runs per sample reads the varying at its own sample, which no split moves.
Tests:
- engine_fragment's a_fragment_group_operation_records_the_clipping_split_on_every_device: on
every committed from_queries profile, fragment_discard_msl22's discard_simd (simd_sum) records
QuadsSplitByClipping and discard_terminate does not.
- engine_coverage_loop's a_multisampled_centroid_reader_at_the_pixel_announces_the_split:
air_2_1_front_end's a21_blit_fs (a centroid uv) records ClippedCoverageSplit at 4 samples and
not at 1; multisample_centroid_at_sample (per sample) records nothing at 4.
Validation's c3 and two conformance comments say the note is on every device.
Through a texture slot lw_dropped's numbered samplers are its constexpr sampler and then its
texture write's (m3-max-59686 read [Constexpr(..), Write]), as sample_up's are; the test gives the
write's 0.
lost_writes' discard test sampled a texture its argument buffer held, the shape Apple's M4 lost
the writes in. The identity domains, which every runtime state is translated under, lower no
sample of an argument buffer's texture: a typed refusal, Unsupported{IdentityDomains} naming
"a sample, gather or comparison of an argument buffer's texture" (the runtime README's known
gaps of pipeline states; no guest has met it), so the test stopped at pipeline creation on every
device (m3-max-59606 on lavapipe, first under the raw-member text the previous branch corrects).
lw_dropped now samples a texture slot, texture(1); the discard, the second sample, the derivative
and the half arithmetic in the branch only discarded fragments take are unchanged (the regenerated
AIR keeps both samples, air.fwidth and the conditional branch on the discard's condition). The
test is every_device_keeps_the_texture_writes_beside_a_discard_after_a_texture_sample. The
argument buffer's form joins it once the identity domains lower that sample.
The planner's ruling on UniformBufferPerLaneReadsSerialize: memory::plan's lane reads were marked
only on a profile with the fact, which nothing constructs since the driver-fact tables went, so
every device read such a slot through its uniform view. The lane-read analysis now runs wherever a
slot a uniform view could read has an indexed read, and such a slot keeps its storage view on every
device. Measured (lower::access::view_kind's notes): the storage buffer took 0.011 to 0.18 of the
uniform buffer's time on NVIDIA's driver (RTX 3090, RTX 2080, RTX 5080 Laptop GPU) and 0.96 to 1.00
on RADV (Radeon 780M, RX 7900 XTX); Intel unmeasured, its check after the land. The analysis
(Uniformity::among_active_lanes) now runs on every device where such a slot exists: a compile-time
cost not measured here.
Two never-constructed facts' readers go:
- ExternalUniformReadsSkipACache (speed only; Iris Xe external memory, where a uniform buffer over
imported memory took 2.0 to 5.5 times as long): its uniform texel form goes whole, ViewKind and
DescriptorView::UniformTexel, SlotPlan::indexed_read, texel_view and TEXEL_WINDOW_BYTES, the
texel arms of memory::views, lower::access, spirv::hoist (and its test of the texel form), the
binder's Sampled use class, the codec and validation's containment arms.
- PushReadsLengthenThreadPayload (speed only; Iris Xe, a light kernel reading a push word ran
120.2 us a dispatch against 55.7 us): AccessPlan::storage_at_bind, which declared a storage
view's RangeAtBindOffset; engine_access's assertion of the fact's absence.
The planner's ruling: DontInlineKeepsCalls' second reader (lower::sampler::select's
Sample::routine) chose the routine form only on a profile with the fact, which nothing constructs
since the driver-fact tables went, so development wrote each extended-range sample's code at its
site on every device. The routine, a kept routine declared DontInline, is now the one form:
measured in the module's notes, a guest fragment's 49 two-plane samples on the RTX 5080 Laptop GPU
took its variant from 446,777 words made in 7.1 to 9.6 s to 259,809 words made in 2.8 to 4.8 s, and
a driver that inlines every call compiles a copy per sample either way.
The known loss, recorded in lower/sampler/extended.rs's module docs: on ANV (the Iris Xe) the
routine made the same variant in 18.0 to 18.3 s against the site code's 17.6 to 17.7 s, 2 to 3%
slower to create.
Sample::routine and the site-code path of extended::emit go; sampled() takes only the routine's
passed offset; tests::engine_extended_range::samples::the_samples_of_one_slot_call_one_routine
asserts the routine on every profile.
Before the dead DriverWorkaround branches go, the planner asked for a device-agnostic test of each
defect that guarded correctness on a host the runtime supports (the Mac on KosmicKrisp runs on the
same GPU through Metal), so the matrix's Mac leg reads them there. The owned fixture
examples/lost_writes.metal (compiled by scripts/regen-air-fixtures --dir examples) and
tests::lost_writes, each asserting Metal's answer on every device of the cfg's kind:
- every_device_keeps_an_early_tests_fragments_texture_writes_at_four_samples
(EarlyTestsDropMultisampledImageWrites' shape: an early-tests fragment's texture writes at 1 and
4 samples, every texel its own coordinates);
- every_device_keeps_the_texture_writes_beside_a_discard_after_an_argument_buffer_sample
(DiscardDropsSimdgroupStores' shape: a discard, a sample through an argument buffer, float
arithmetic kept apart in a branch only the discarded fragments enter, then a texture write: every
kept pixel's write lands, no discarded one's);
- every_device_runs_a_memory_writing_fragment_once_per_covered_sample
(MemoryWritingFragmentsRunPerSample's shape: a function reading [[sample_mask]] and writing
memory at 4 samples runs once per covered sample, each pixel's run count its mask's bits).
The planner's ruling (b): DontInline on sampling routines, rung 1, unconditionally on every device,
as a texel routine already took it on every serialization. serialize_for's options read four
DriverWorkaround variants that nothing constructs since the driver-fact tables went:
CompositeInsertsWrittenInPlace, LoadsForwardedIntoLoops and
LocalizedLoadsForwardedPastAtomicsAndCalls (MoltenVK 1.4.1's SPIRV-Cross encodings: insert copies,
loads materialized before loops and past atomics and calls), FunctionsInlinedAtEveryCall
(DontInline on every routine, MoltenVK's) and DontInlineKeepsCalls (DontInline on sampling routines,
NVIDIA's cost fact). Development wrote none of those forms on any device.
- spirv/serialize: Options, Forwarding, states_dont_inline, loop_reads, localized_loads, the insert
copies and the MATERIALIZED and FROM_MEMORY marks go; serialize_for goes, every caller takes
serialize, and id_table_bytes takes no profile. The unconditional materializations (a tangled
value read lazily, a value forwarded without its operands' dependencies) stay.
- spirv/builder: ModuleBuilder::kept_routine replaces texel_routine and sampling_routine;
routine() was function() but for the flag only the MoltenVK form read, so its callers take
function(). The IR function keeps one flag, kept.
Expected effect, from the serializer's own notes: nothing on Mesa's drivers (they inline whatever
the control states), and NVIDIA's sampling routines created as calls again (0.4 s against 10 s for
a fragment of 256 calls on the RTX 3090). Reads after the land, per the ruling: the states-only
play's count of modules holding a sampling routine, and the post-merge matrix's GPU time per card.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
ReproBundle::for_compute and ReproBundle::for_render were orphans (the deleted runtime was their
only caller, and xlate_orphans.py listed them); tests/cli.rs's
a_runtime_bundle_replays_the_refusal_on_the_device_it_names was their last user, and its replay
helpers (replay, path_with_binary) had no other. All three go.
This closes the orphans pass. Over the branch: every DELETE item of
xlate_orphans.py (REPO 5d725aeec7^ reims-vgpu/crates) is gone with its tests-only users; a re-run
prints no DELETE but four test-infrastructure KEEPs (finish_parts, interp at_element,
outside_bound, from_layers) and the two reims names (needs_specialization, with_precompiled).
ViewportCompensation goes too, point_guard included, with its tests, its VariantKey field and its
push fields (PointGuard, ViewportMirrors, VertexDepthClamp): Metal documents no point-clipping
rule, so no guard band is built. ARTIFACT_FORMAT_VERSION moves for the codec's dropped variants.
docs/REFUSALS.md and tests/api_signatures.tsv are regenerated; docs/API.md, docs/HOWTO.md and the
doc comments no longer name a deleted item.
Verified: compile gate with Windows clippy, job m3-max-59815 at 3b4798aed5 (fmt, Rustdoc and both
Windows targets green; clippy red only on this test), re-run at this commit.