Commit Graph
278 Commits
Author SHA1 Message Date
Anees Iqbal 072eaaba18 profiles: delete amd-rdna3-radv, whose every cell is the Radeon 780M's
What: the RX 7900 XTX capture amd-rdna3-radv derives the same translation fingerprint as
amd-780m-radv: the Radeon 780M and the RX 7900 XTX under one RADV build. So every golden and
census cell of the profile equals the 780M's (dff8c48964). Nothing outside the translator
derives from it: no runtime, conformance, harness or devtools use. Under the planner's rule,
such a profile is deleted.
- The profile file, its regen_device_profiles.py source entry, and its README row and venue
  sentence go. profiles/README.md now names amd-780m-hawkpoint-radv alone as the capture no
  venue runs on.
- Its two opened-chains contexts go from opened_chains.txt (device and restricted).
- The shared-fingerprint pair dff8c48964 added to fingerprints_distinguish_committed_profiles
  goes, with its comment.
- Rows of tables that already hold amd-780m-radv lose the rdna3 row:
  description.rs COMMITTED, profile.rs the_profile_holds_the_largest_whole_point_size (8191 on
  both), subgroup.rs GOLDEN and its own-limits table (equal rows), fetch/tests.rs,
  engine_device_replay.rs, engine_lane_reads.rs and engine_widest_pin.rs (equal rows).
- Every other test stem "amd-rdna3-radv" is now "amd-780m-radv": 43 translator files (42 test files and metal/format/word.rs's test module),
  plus validation's c3, worker/device and candidate/platform/enables tests (one line there,
  depth_range_unrestricted_is_enabled_where_the_device_lists_it, which the 780M lists too).
  The two descriptions are equal in everything a translation reads (the fingerprint test's own
  equality check), so no asserted value changes. Comments that read "the committed RDNA3
  description" stay true: the 780M is RDNA3.
- corpus/observations/vulkan/shard_056.jsonl drops the row recorded under the old gpuinfo
  profile, which is gone: environment amd-780m-radv@engine@amd-rdna3-radv, case
  atomics-past-a-device-buffer (case_id fdbf7c9b9e09e38aff99a04768f8375ac8e7a604dfcacf21e236b2d2482b3896,
  air e1382758476864b76c1eab9d944b033c016808309fe44581fe38f539f23d67e5), executor
  vulkan-engine-v131. The shard keeps the same case's other row.
- cutover/c1-reviewed.json's note names the profiles that remain in the bucket:
  intel-irisxe-anv and nvidia-rtx50-linux.
- scripts/drm-shim.Dockerfile no longer lists the profile among the 26.2.3 captures. The example
  in scripts/linux-gate uses --chip rembrandt with amd-rdna2-apu-radv (the Radeon 680M, RADV
  REMBRANDT).

Left to the next pin's bless: three generated tables still name the profile, and only a bless
drops their columns. They are tests/golden_hashes.tsv (its profile row and column),
tests/public_fixture_expectations_engine.tsv (its column) and corpus/authored-compile.tsv (its
census column).

Search: `git grep -n amd-rdna3-radv` gave 118 hits at dff8c48964. After this commit it gives
4, the three tables above. `git grep -n amd-rdna3-radv` in the consumer's checkout gives 0.

Verified: m3-max-65582 at the series' tip 0f732c1141: fmt, signatures, clippy plain, --cfg m2v_gpu
and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings and the device-profile pyunit green;
conformance 1025/1025; validation 1330/1331 and product 4015/4026 (24 skipped), every red a
bless item: the golden table (1861 rdna3 cells gone), ten fixture-inventory tests on
tests/public_fixture_expectations_engine.tsv (the column's drop; every one of its 3499 rows
holds the same cell under amd-rdna3-radv as under amd-780m-radv), and the opened-chains pin
left by the enables move. bless_engine_inventory needs metal-as, so that bless is the pin's,
on a Mac.
2026-11-21 19:40:54 -08:00
Anees Iqbal 591f813569 REFUSALS.md: a rate map outside the compile's measured bounds is ours
docs/REFUSALS.md section 4 showed '-' for its five rows (UnpinnedCompile: ScreenExtent,
LayerCount, DenseSamples, SampleOutOfRange, SampleCount). The code says the basis: each is
built in one place, `RasterizationRateMap::new` (bind/rate_map.rs), through
`RateMapError::Unpinned`, which refuses a descriptor outside the bounds where Apple M3's compile
was measured, and the enum's own doc states "The bounds are this crate's, not Metal's". So the
script derives `ours` for the section, as it does for the translation caps and the deadline.
No row of another section moved. Every section's '-' total is now 0.

Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass.
2026-11-21 19:04:11 -08:00
Anees Iqbal dd150e4f46 Delete the 14 Feature variants and 3 Needs variants nothing builds
Nothing in the product crates built these 14 Feature variants: SamplePositions, TextureSize,
TextureSampleCount, TextureView, MipmapGeneration, HostMemory, GpuTimes,
ViewFormatReinterpretation, SeparateMultisampledDepthStencil, SparseTextures,
TimelineSemaphores, HeapTextureTiling, UndeclaredTextureUsage and RenderTargetSize. They were
refusals of the runtime this tree cut over from, and so they were docs/REFUSALS.md's last 14 '-'
rows. Nothing built the Needs variants DeviceCapability, MetalGpuFamily and MetalRefuses either,
nor called their constructors Unsupported::device_capability and Unsupported::metal_gpu_family
outside tests. No doc or test showed one to be the vocabulary of a Metal refusal anything
answers: the three Feature docs that said the runtime answers MetalGpuFamily or MetalRefuses
were corrected in the previous commit.

Searches:
- The tree, outside the definitions, the reach rows and the generated tables:
  - Feature::SeparateMultisampledDepthStencil in one translator test
    (bind/depth_stencil_copy/tests.rs), now Feature::StencilExport, since
    depth_stencil_copy_modules refuses with whatever feature its caller names;
  - Feature::SparseTextures, SparseNeed and Unsupported::device_capability in one conformance
    test of verdict::device_gap_of's DeviceCapability arm. That test pinned a chain from the
    runtime's `sparse_refusal`, which no longer exists, so the test and the arm go together;
  - Unsupported::metal_gpu_family and the three Needs variants in error/tests.rs
    (one_of_each and the retry table);
  - the golden and public-fixture tables' refusal cell (golden_hashes.rs, public_fixtures_engine.rs)
    named the other Needs through a wildcard arm, now unreachable: the three arms are the cell;
  - stale prose naming them in conformance cases/sparse_heaps.rs, probes/bgra4_write_and_mipmap.m,
    the engine fixtures README and docs/API.md (its TextureSampleCount sentence now names the
    runtime's Limit::TextureSamples, which refuses that texture);
  - the payload enums SparseNeed and LinearNeed are used by nothing else, and go too.
  The other hits for these names are other enums' variants (the runtime's Limit::TextureSize,
  Refusal::TextureSampleCount, Gap::TextureView, ImportHandle::HostMemory, ...).
- The consumer's checkout at bd9d6ae85a: 0 hits for Feature:: with any of the 14, SparseNeed,
  LinearNeed, Needs::DeviceCapability, Needs::MetalGpuFamily, Needs::MetalRefuses,
  metal_gpu_family or device_capability( (its own `Piece::SamplePositions` and
  `Piece::SparseTextures` and its own HostMemory types are unrelated).

Needs is now AnyOf, NotImplemented and NotRepresentable; Needs::basis answers Device, Ours and
Device for them. The script drops the two constructors and their condition texts.
docs/REFUSALS.md: section 1 is 119 variants, every one with a site and a basis (device 51,
ours 68, '-' 0). api_signatures.tsv: 35 records removed, all in metal2vulkan::error; the public
surface table loses SparseNeed and LinearNeed.

Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass;
signatures.py --check passes after --bless.
2026-11-21 19:04:10 -08:00
Anees Iqbal aecdc8ee84 profiles: amd-rdna3-radv is a capture of an RX 7900 XTX, with per-format sample counts
The RDNA3 census profile was a gpuinfo report (51898, an RX 7800 XT on Mesa 26.2.3). Such a
report holds no VkImageFormatProperties, so the profile stated no color attachment format's own
sample counts, only the device-wide framebufferIntegerColorSampleCounts, which RADV states as
1x. The authored compile census therefore refused integer color targets above 1x on that column
(RasterSampleCount needs FramebufferIntegerColorSampleCount(N) |
ColorAttachmentSampleCount(format, N)), 9 cells. amd-780m-radv, the same driver measured,
compiles all 9, and the runtime on a real RDNA3 card queries each format's counts itself.

The profile is now a local capture of a card we run, made as the other local captures are:
`vulkaninfo --json` and its `corpus-vulkan --capture-formats` supplement on an AMD Radeon RX
7900 XTX (RADV NAVI31, Mesa 26.2.6, job m3-max-65462; device queries only), converted by
scripts/regen-device-profiles (--offline, the pinned vk.xml). Its
m2v_color_attachment_sample_counts states 70 formats, R32_UINT and R32G32B32A32_UINT among
them at 1, 2, 4 and 8 samples. The SOURCES entry and the profiles README row say so; no venue
names the profile. The c3 test that refuses a gpuinfo report under a venue now names
amd-rdna2-apu-radv, a gpuinfo profile still.

Bless items, at the next pin and not here: the golden table's amd-rdna3-radv cells (the
profile's fingerprint moves), the authored compile census's amd-rdna3-radv column (the 9
sample-count cells are expected to compile, and other cells move where Navi31 under 26.2.6
states other features or limits than the old report), and the opened-chains pin's two
amd-rdna3-radv contexts.
2026-11-21 18:50:50 -08:00
Anees Iqbal 7f156bc920 Error::basis answers a translation error from what its refusal needs
The runtime's Error::basis answered None for every Error::Translation, so each translator
refusal a guest met sat in a consumer's census unsorted between Metal's own refusal and our
gap, and 36 of the translator's 133 Feature variants showed no basis in docs/REFUSALS.md.

What:
- RefusalBasis moves to metal2vulkan::error; the runtime re-exports it at the same path
  (metal2vulkan_runtime::RefusalBasis: its signature records do not move).
- Needs::basis: AnyOf, DeviceCapability and NotRepresentable are Device, NotImplemented is
  Ours, MetalGpuFamily MetalDocumented, MetalRefuses MetalMeasured.
- metal2vulkan::error::Error::basis: a refusal's from its Needs; LimitExceeded, Budget and
  Internal Ours; InvalidInput, InvalidDescriptor, NeedsInput and Cancelled None. Both matches
  are exhaustive in the translator, so a new Needs or Error variant must answer (the runtime
  could not match the translator's #[non_exhaustive] enums without a wildcard arm).
- The runtime's arm is `Error::Translation { error, .. } => error.basis()`.
- refusal_surface.py follows the helper a site hands its feature to (a front-end reference is
  NotImplemented; the feature argument of a construction; a helper's argument; the enclosing
  function's computed construction; a function that returns the feature, through its calls in
  its file). Its kind-to-basis table is read from Needs::basis's arms. --check fails on a
  variant with a site whose basis is not settled.
- docs/REFUSALS.md: the 22 variants with a site and no basis are settled, and their Where
  cells filled; no other row's Where or Basis moved. Section 1's totals: device 51, ours 68,
  '-' 14 (the 14 variants nothing builds).
- The docs of SimdgroupMatrix16x16x16, IndirectRenderState and GlobalBuiltinInFragment (and
  three comments that repeated them) said the runtime answers them as Metal's own refusal; no
  code does, and the translation refuses them NotImplemented on every device, so they say that.

Size, past the 200-line mark (hand-written lines, generated tables excluded): 272 added, 50
removed. The script +147/-12 (helper following and its call scan about 60, the Needs table and
derived basis 20, scan bookkeeping 25, the unsettled check 12, selftest cases 20, doc text 10);
the translator +63/-7 (21 of them RefusalBasis moved from the runtime, -23/+8 there); the
runtime test +44; docs/API.md +6.

Verified (locally, source-reading scripts): refusal_surface.py --check and --selftest pass;
with unsettled() emptied the selftest fails; signatures.py --check passes after --bless added
7 records, all on metal2vulkan::error.

Verified: compile m3-max-65442 (fmt, refusal_surface.py --check and --selftest, signatures.py --check,
clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, scripts/api-docs);
host suites m3-max-65443 (metal2vulkan, -air, -runtime: 3969/3969, the golden hashes and the old
render key among them; doctests); before-run m3-max-65444 (development plus the new test alone):
a_translation_error_answers_the_basis_of_what_it_needs fails as expected (None against Some(Device)).
2026-11-21 18:25:57 -08:00
Anees Iqbal 2b265713c8 matrix: two comments name the RTX 3090 by its link, not by its host
scripts/matrix/results.py (the per-process level note above HARNESS_ALONE) and its test in
scripts/matrix/test_results.py named the 3090 of rounds b0c08e51b5, 7cda47f536 and 6b535f55c9 by
the machine it sits in. They now name the card and its link: an RTX 3090 on a 20 Gb/s
Thunderbolt 3 link (the link as read from the kernel's own lines on 11-20). Comments only.

Verified: python3 -m unittest of scripts/matrix/test_results.py in the compile job named in the
report.
2026-11-21 17:28:31 -08:00
Anees Iqbal e734db4be2 Runtime: the translator's description states every feature and extension device creation enables that it names; maintenance4 joins the floor
What: shader_enables, the enable set the translator's description of the device is restricted to
(DeviceDescription::with_enabled), now reads every table of features device creation enables
(floor::ENABLED: the floor, the portability subset, the optional features, the attachment
reads, step rates, min-LOD clamps, fill modes, quad control, the pixel interlock, barycentrics,
the border swizzle, linear attachments, fault reports, and the indirect commands' features, now a
table of their own, INDIRECT_COMMAND_FEATURES, which indirect_commands sets). Each entry the
translator names reaches it where creation enabled it. Entries that were enabled but unnamed now
carry the translator's name: depthBiasClamp, drawIndirectFirstInstance, bresenhamLines and
occlusionQueryPrecise (floor), attachmentFeedbackLoopLayout (the attachment reads),
borderColorSwizzle and borderColorSwizzleFromImage, and maintenance5 (indirect commands).
shader_extension names the extensions those need, and the others creation enables that the
translator names: VK_EXT_line_rasterization, VK_EXT_attachment_feedback_loop_layout,
VK_EXT_border_color_swizzle, VK_EXT_custom_border_color, VK_EXT_external_memory_host and
VK_KHR_maintenance5.

maintenance4 joins the floor (REQUIRED, the README's floor table, runtime-floor.json's
m2v_runtime_floor block and regen_device_profiles.py's RUNTIME_FLOOR): Vulkan 1.3 requires it
of every device, so no device at the floor lacks it. The translator's profile reads it for
spirv-val's --allow-localsizeid alone.

Why: the planner's feature-enable walk (lane texoff, 11-21) found these features enabled at
vkCreateDevice and absent from the translator's profile, the class maintenance8 was in before
38dcc857dd. None changes what the runtime does on its own paths: the runtime sets depth bias,
border colors and indirect draws itself, and the translator's readers of these features
(metal::state::depth_bias, the bind plan's indirect_first_instance_missing, metal::sampler's
opaque-black border) are not on them. The profile now states what the device has. Its fingerprint
moves on every device, and with it every cache key.

64-bit image atomics stay off, and the features the translator reads that the runtime does not
enable are the feature-enable test's (next commit).
2026-11-21 13:39:50 -08:00
Anees Iqbal c5ee8d7919 rt: Error::basis answers each refusal's basis, generated from its Basis: line
What: a public RefusalBasis (MetalDocumented, MetalMeasured, Ours, Device) and Error::basis, which
answers Refused, Limit and Unsupported from the variant's own basis, BelowFloor and
NoDirectDriverLoading as Device, and None for Translation, the platform's and Vulkan's failures and
the consumer's own block, stage or quiesce. Refusal::basis, Limit::basis and Gap::basis live in
crates/metal2vulkan-runtime/src/error/basis.rs, which scripts/refusal-surface/refusal_surface.py
writes from the `Basis:` line each variant's doc comment ends with: 131 arms (Refusal 82, Limit 17,
Gap 32), one per variant in declaration order, no `_` arm. The doc comment stays the one source.

Why: a consumer's census of the refusals its guests meet could only match names, so 67 refusals
whose basis is ours counted as "Metal refuses it". A typed basis tells them apart.

How: the script enumerates the enums structurally (rt_refusal_enums), reads each variant's pattern
(`Name`, `Name(..)`, `Name { .. }`) with enum_arms, and maps the basis value to the RefusalBasis
variant it names. It fails where the enum has no such variant (metal-takes and unknown have none:
the value comes with the first variant that needs it) and where a name is too long for rustfmt to
keep its arm's pattern on one line. It writes the file as `cargo fmt` leaves it (one line per arm,
else rustfmt's block form past 100 columns), so no rustfmt run is needed. `--check` fails where
basis.rs is stale, as for docs/REFUSALS.md, and one run regenerates both. `--selftest` gains three
cases: the arms and the block form, two Basis lines give two files, a missing value fails.

Verified: refusal_surface.py --check and --selftest, signatures.py --check and cargo fmt --check
pass on this tree. The generated forms were checked against rustfmt at five name widths and three
variant shapes. The compile job and the lavapipe rt suite are named in the lane report. Without
the change, the new tests do not build: RefusalBasis is unresolved and `basis` is not found.
2026-11-21 09:41:04 -08:00
Anees Iqbal 817463704e rt: texture buffers are buffer views of their buffer's bytes in set 1's two texel-buffer arrays
What: Buffer::new_texture of a texture buffer's descriptor makes one VkBufferView of the bytes
shaders reach (a Managed buffer's device copy where it has one), from the offset, its width's
texels long: no image, no copy, no new push field. Set 1 gains two arrays of 65,536 elements,
binding 5 (uniform texel buffers, the read ones) and binding 6 (storage texel buffers, the written
ones), at the same index class as textures; a texture buffer's index is the same element of both,
and placing a texture or a texture buffer over the other's index nulls the other's elements. The
translator's identity domains classify a texture_buffer slot or argument-buffer member as a texel
buffer of that array (no TexelBufferRange fact, no swizzle under identity), so a pipeline that
declares one is no longer Unsupported{IdentityDomains}. SEMANTICS_VERSION 2258.

Metal's own refusals are typed: an offset off Device::minimum_texture_buffer_alignment
(minimumTextureBufferAlignmentForPixelFormat:, the device's texel-buffer offset alignment, the
larger of the uniform and storage ones, a single texel's size where the device says it suffices)
is Refusal::TextureBufferAlignment; a bytesPerRow below the row or texels past the buffer is
Refusal::BufferTextureLayout; a descriptor of more than one row, level, slice or sample, and a
swizzle with writes, as Metal refuses them. Device::new_texture (and every other make) of a texture
buffer's descriptor is Refusal::TextureBufferNotOverBuffer: the consumer places the bytes as it
places every buffer. Gap::TextureBuffer goes; a swizzled texture buffer (Gap::TextureBufferSwizzle),
a view of one, and a blit copy of one are recorded gaps. A format needs both texel-buffer usages in
its buffer features (Gap::TextureFormat otherwise): the view's buffer has both usages, and without
maintenance5 its usage is the buffer's.

The floor requires the six texel-buffer descriptor-indexing features (update-after-bind, dynamic
and non-uniform indexing, uniform and storage) and raises the limits the two arrays count against:
uniform texel buffers against the sampled-image limits, storage texel buffers against the
storage-image limits, both against maxPerStageUpdateAfterBindResources and the pools: sampled and
storage per stage and per set 131,072 (196,608 sampled with attachment reads' second elements),
resources 262,152 (327,688), pools 274,144 (339,680). Every recorded device fits: the 8 device dumps'
least are llvmpipe's 1,015,808 sampled/storage/resources and the UHD 630's 1,048,576 pools; all 12
devices there report the six features.

Why: six harvested guest functions declare a texture buffer, and a pipeline that declared one was
refused at creation.

Checked by: tests::texture_buffers (lavapipe: R32Uint read at a buffer offset and written, out of
bounds read zero and dropped, atomics through read_write, every refusal), engine_identity's
a_texture_buffer_is_the_texel_buffer_element_its_resource_id_names (L3 on lavapipe and moltenvk-m3),
the floor tests, the signatures table and REFUSALS.md regenerated; the lane's compile job reports
the runs.
2026-11-21 07:27:27 -08:00
Anees Iqbal b5ac9fd07b rt: visibility results, one precise occlusion query per mode, copied into the buffer at the pass's end
What: `setVisibilityResultMode:offset:` builds `Boolean` and `Counting`. Each such mode set is one
segment counted by one precise occlusion query (`VK_QUERY_CONTROL_PRECISE_BIT`), begun in the
pass's rendering before the segment's first draw and ended there at the next mode set or the
encoder's end; a segment with no draw begins and ends its query as it ends, so its word is 0.
After `vkCmdEndRendering` the pass copies the counts (`vkCmdCopyQueryPoolResults`, 64-bit, WAIT)
straight into the visibility result buffer's `VkBuffer` at place+offset, one copy for each run of
consecutive offsets in one pool, before the pass's second barrier (recorded or owed), which orders
them before every later command; a Shared buffer's segment end barrier reaches the host, and a
Managed buffer's write and a texture over the buffer in an image of its own are kept as a blit's
write is. `Boolean` writes the count too, nonzero exactly where a sample passed (Metal documents a
nonzero word; the M3 Max writes 1): an accepted difference in docs/API.md section 10, and the
conformance cases compare a `Boolean` word as nonzero alone.

A command buffer takes its queries from occlusion pools of 256 the device lends it
(`crate::visibility`), each query reset on the host (`hostQueryReset`) as the command buffer
retires or drops uncommitted; the device keeps at most 16 pools free and destroys the rest
(`Gauges::occlusion_pools`). `occlusionQueryPrecise` joins the floor's required features (every
venue's profile reports it; Roadmap 2022 requires it), with the README floor table, the
runtime-floor profile's `m2v_runtime_floor` block and the regeneration script's list.

Refusals: Metal's own, each where the mode is set, the encoder's mode unchanged:
`Refusal::NoVisibilityResultBuffer`, `Refusal::VisibilityResultOffset` (not a multiple of 8, or
past the buffer), `Refusal::VisibilityResultOffsetTaken` (Apple documents each offset as set once
per pass; Metal's validation stops it), and `Refusal::ArgumentPlace` at alignment 8 for an offset
at an allocation byte off a multiple of 8 (VUID-vkCmdCopyQueryPoolResults-flags-00823). Gaps, each
counted and a README known gap: `DrawKind::AccumulatedVisibilityResults` (a mode in an
`Accumulate` pass; `Metrics::accumulated_visibility_refused`) and
`DrawKind::VisibilityResultInterrupt` (a command that would end the rendering while a query counts:
a memory barrier after a writing draw, a draw that moves an attachment to the feedback layout, pays
an owed barrier before an attachment read or copies into a shadow, and, bounded, a draw that looks
at textures over a buffer in an image of their own or reaches a Managed buffer with textures over
its device copy; `Metrics::visibility_interrupts_refused`). Every refusal is checked before the
encoder changes state; a segment's first draw may still end the rendering, before its query
begins. `DrawKind::VisibilityResults` is gone. `RenderPassDescriptor::visibility_result_type`
(`VisibilityResultType`, Metal's `visibilityResultType`) is a field now.

Translator: `PrecisionNote::DeviceOcclusionCount`, the static note of a `Boolean` or `Counting`
result (`RenderCommandEncoder::VISIBILITY_NOTE`), quoting Vulkan's "Occlusion Queries" (precise
counts differ between implementations: fragments killed before rasterization, counts multiplied
per colour output) and "Fragment Operations" (`earlyFragmentMultisampleCoverageAfterSampleCounting`);
its codec tag, ARTIFACT_FORMAT_VERSION 588, validation's allowance (unbounded, no tolerance), the
conformance degradation `device-occlusion-count` among the native notes, and docs/API.md's
catalogue. The dead `Feature::CountingVisibility` (no construction site) is removed with its reach
row. The old runtime's `Device::new` is untouched; the runtime-floor test profile now states
`occlusionQueryPrecise`, which re-keys that profile's fingerprint.

Why: the visibility-cut ruling. A guest that sets a mode got a refusal; it now gets its results,
or a typed, counted refusal where the cut does not build the shape (continuations and a combine
are not built).

Verified: cargo fmt; scripts/api-signatures --bless/--check, refusal_surface (0 without reach or
basis), metal-coverage and conformance-coverage regenerated, check_device_profiles (0 findings).
The compile job (fmt, signatures, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace
Rustdoc -D warnings) and the lavapipe rt suite, with tests/visibility.rs (Boolean and Counting
against the CPU's counts, pool reuse and the 16-pool bound past 17, Metal's refusals, Accumulate,
the barrier and attachment-read interrupts), are named in the lane's report.
2026-11-21 06:16:57 -08:00
Anees Iqbal fe6ed10162 rt: the floor profile requires pipelineCreationCacheControl, and the module digest reads its page as 4-byte chunks
Check m3-max-63418 on 2686094aaa: the runtime-floor profile's m2v_runtime_floor block, which
the_floor_profile_states_exactly_the_floor holds equal to floor.rs, lacked the new
pipelineCreationCacheControl row (added to RUNTIME_FLOOR in regen_device_profiles.py and to the
block it writes; the device's own Vulkan 1.3 features already stated it; check_device_profiles 0
findings, the script's 41 unit tests pass), and clippy's chunks_exact_to_as_chunks asked for
as_chunks_mut in the digest's page fill. The lavapipe rt suite otherwise read 573 of 574.
2026-11-21 06:09:05 -08:00
Anees Iqbal c3f9f55e63 rt: a kernel past the stage bound is made from its helper's compile alone, never compiled in the process
A driver's compiler takes memory that grows faster than the stage, in the process that creates the
pipeline. The translator refused every stage past COMPILED_STAGE_WEIGHT (99,109, the heaviest
measured to compile within host-sized memory, ANV on the Iris Xe of RPL-P), where Metal makes it.
Now the translator states the weight and the runtime compiles such a kernel only in a helper
process the consumer starts, caps and times.

Translator: the stage bound refuses nothing. stage_bound::emit still plans a kernel again keeping
its widest-mode pin where only that emulation passed the bound, and returns the module with its
entry weight, now ModuleStats::entry_weight (codec and serde carry it). COMPILED_STAGE_WEIGHT is
public in pipeline. Feature::StageSize and Needs::StageBound are gone. SEMANTICS_VERSION 2257,
ARTIFACT_FORMAT_VERSION 588.

Runtime (new stage.rs):
- Floor: pipelineCreationCacheControl, required and enabled (Vulkan 1.3 requires it), for
  VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.
- A kernel's VkPipeline of a module past the bound is made from a VkPipelineCache of its own entry
  in the cache directory's stages/ alone, with the fail-on-compile-required flag, the cache
  destroyed when the create returns; the device's shared cache and blob never hold it
  (Metrics::pipelines_from_stage_fills).
- With no entry the make is refused with Error::StageUnfilled(StageRequest), at the state's
  creation, at prepare_dispatch (which now returns Result and reports only this refusal) and at
  the dispatch. A StageRequest is Clone, Send, Sync, Eq and Hash by its stage key, the entry's
  name, so a consumer joins the makes and dispatches of one pipeline into one fill.
- Device::fill_stage writes the request to the helper's pipe, reads its reply and keeps the
  cache data as the entry (Metrics::stage_fills); serve_stage is the helper's main: it opens the
  device of the request's deviceUUID and driverUUID with the parent's options, checks the
  enables, compiles through an empty cache and writes its data. A wire frame is the magic
  m2vstage, the wire version, the length and a checksum.
- Device::record_stage_breach keeps what the consumer ended its helper for (memory, time) as the
  entry; fill_stage keeps a failed compile; a create answered compile-required keeps that. Each
  refuses the pipeline (Gap::StageSize, StageGap::Breach) with no helper asked again, until the
  driver's header changes the key.
- stages/ holds at most 256 MiB and 32 entries, breaches among them, least recently used out
  first (a hit touches the file). An entry that does not check, of another key or another
  driver's header is a miss and is removed. Nothing of an entry stays in memory past the call
  that reads or writes it.
- A device with no cache directory, or whose driver writes no pipeline cache header (lavapipe),
  and a render stage past the bound are refused typed (Gap::StageSize with its StageGap).

The validation runtime executor reports a refused prepare_dispatch; the replay prepass ignores it
as the dispatch reports it again.

Docs: the runtime README's "Kernels past the stage bound" and its known gaps, the stages/
directory, prepare_dispatch's one error, the floor row; docs/API.md's entry_weight;
docs/REFUSALS.md regenerated; the api signature and surface tables.

Tests: tests/stage.rs: the directory past capacity on both bounds, oldest use out first, a hit
outliving older entries, a breach under the same bounds; cut, foreign-key, other-header and
unknown-breach entries a miss and removed; the wire's version and cut frames; the request's
joinable bounds; and on a device (m2v_gpu, m2v_cpu_icd), with the bound lowered for the test, the
refusal with no directory, lavapipe's NoPipelineCache, and elsewhere refused unfilled, filled by
serve_stage over two pipes, made from the entry alone with the shared cache's data unchanged,
then refused by a recorded breach.
2026-11-21 05:55:29 -08:00
Anees Iqbal 22ae7df766 rt: indirect command buffers of indexed draws on VK_EXT_device_generated_commands
What: the first cut of Metal indirect command buffers, the runtime's half, in one commit: the
device's extension, the buffer object, the executions, the reset and the pool depend on each
other, and any part alone would be dead code.

- The device enables VK_EXT_device_generated_commands with VK_KHR_maintenance5 together where
  both are reported (floor::INDIRECT_COMMANDS), and nothing else chooses a form. maintenance5 has
  one form here: rt takes nothing of it but the BufferUsageFlags2 a preprocess buffer needs, and
  its A8 format stays untaken. dgc.rs declares the extension's structures by hand, each size and
  offset checked at compile time against the spec's layout; it goes once ash binds the extension.
- IndirectCommandBuffer, IndirectCommandBufferDescriptor and IndirectCommandType
  (Device::new_indirect_command_buffer): indexed draws that inherit the pipeline state and bind
  their own buffers, at most 31 a stage; records in a Private block, reset from the device's
  template at the next commit. gpuResourceID is the records' device address.
- RenderCommandEncoder::execute_commands_in_buffer (a CPU range) and
  execute_commands_in_buffer_with_range (a range read from a buffer, executed at full capacity
  with the SEQUENCE_INDEX token): one PUSH_CONSTANT token a run of slot words, the index buffer
  token and the indexed draw, through the inherited pipeline; the push constants and the index
  buffer are pushed again after an execution. Every execution runs as one
  vkCmdExecuteGeneratedCommandsEXT a part of CHUNK = 64 commands, in order, on every device (the
  planner's ruling: one execution of more drew wrong on the XTX past ~4 MiB of generated commands
  and out of order on the 2080 past 64 sequences); each later part pushes its first command
  (PushField::IndirectBase) and takes its own preprocess offset in the execution's one region. A slot a command binds is pushed the widest bounds,
  unchecked, as a loaded pointer's access is (README, SlotBounds).
- BlitCommandEncoder::reset_commands_in_buffer (copies from the template in regions) and
  optimize_indirect_command_buffer (no work); useResource of an indirect command buffer in the
  compute and render encoders, and RenderCommandEncoder::use_heap.
- Preprocess memory: sized from vkGetGeneratedCommandsMemoryRequirementsEXT with the inherited
  pipeline per (content, raster state, record layout) at a part's 64 commands in a cache of
  SHAPES = 256; layouts LAYOUTS = 64;
  templates TEMPLATES = 16, each at most 64 KiB. Each a fill-past-capacity test. A new pool of
  regions (its own VkBuffer and VkDeviceMemory each, usage2 PREPROCESS | SHADER_DEVICE_ADDRESS, a
  memory type from the requirements' bits, device-local first, rounded to 64 KiB): one taken at
  record time per execution (an idle one at most twice its need, else one made), given back when
  its command buffer retires, the oldest idle ones freed past IDLE_BYTES = 128 MiB. At rest it
  holds idle regions up to 128 MiB, freed at device drop. No execution waits or is refused for
  the pool's sake. Not the block mechanism: blocks are made with the floor's one usage on every
  device, and adding the preprocess bit on DGC devices alone would be a second form; the memory
  types come from the driver's per-layout requirements. Gauges of the used and idle bytes: flat
  between iterations 100 and 200, zero at device drop (tested).
- Typed refusals by name (Gap::IndirectCommandBuffers with IndirectCommandsKind): no extension,
  other command types, per-command pipelines (everywhere), inherited buffers, bind counts past
  31, capacity, an unflagged state, a draw input the commands cannot carry, more tokens than the
  device takes; Refusal::CommandRange for ranges past the commands.
- README: indirect command buffers and their known gaps (b1's two costs, the preprocess cost,
  lavapipe's preprocess size defect verbatim, the Iris, UHD 630 and Mac host lines, the parts
  and their measured cost), the
  extension rows; METAL-COVERAGE and REFUSALS regenerated; api_signatures blessed.

GetDeviceProcAddr audit (verified by grep of the runtime's loads): every device function rt
loads belongs to an extension enabled at the load. calibrated_timestamps is a floor extension;
feedback_loop_dynamic_state loads only under the feedback loop; device_fault loads only where
device creation enabled it; external_memory_fd,
external_memory_win32 and external_memory_host load only where enabled(); Dgc::load runs only
where INDIRECT_COMMANDS is enabled.

Verified: see the lane's report (compile gate, lavapipe and GPU device tests).
2026-11-21 01:53:50 -08:00
Anees Iqbal 99e5d42deb rt: several viewports and scissor rectangles, and the viewport index, through the with-count dynamic states
setViewports:count: and setScissorRects:count: refused any count but 1 (DrawKind::Viewports). They
now take 1 to 16 each, and every draw records them with their count (vkCmdSetViewportWithCount,
vkCmdSetScissorWithCount, core in Vulkan 1.3). VIEWPORT_WITH_COUNT and SCISSOR_WITH_COUNT replace
VIEWPORT and SCISSOR in every pipeline's dynamic states, whose viewport state counts become 0, so
no pipeline is made for a count. Vulkan takes as many scissors as viewports. Each viewport's
scissor follows the deleted runtime's rule (render_state.rs's vk_scissors at 5d725aeec7^): the
rectangle of its index, the one rectangle where one is set, and none past the rectangles set where
several are, each cut to the pixels its viewport covers. A draw's attachment-read area is the
union of what it covers through the viewports it reaches: every viewport set for a vertex function
that writes [[viewport_array_index]] (GraphicsState::writes_viewport_index, now Draws::
selects_viewport), and viewport 0 for any other.

A vertex function's [[viewport_array_index]] is the translator's one form at the floor: its
ViewportIndex output, written 0 at or past the encoder's count (RuntimeFact::ViewportCount), which
the draw now pushes (PushField::ViewportCount -> FieldValue::ViewportCount, refilled when the count
changes). Its fragment function reads the index as written. An index that is not one value across
a primitive stays the translator's refusal at creation, needing geometryShader, which device
creation does not enable. Out of range: none or more than 16 is DrawKind::Viewports.

Floor: multiViewport and shaderOutputViewportIndex join REQUIRED, and the translator is told.
The venue dumps report both true on every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736,
48737 and 61508. shaderOutputViewportIndex is also true in the probes 61359 to 61362 and 61366.
tests/floor.rs, the README floor table, RUNTIME_FLOOR and profiles/runtime-floor.json add them.

The translator's tests that read runtime-floor as a device without the viewport index now take it
below the floor: engine_selected_indices (the raw index alone without multiViewport; the zero
indices without shaderOutputLayer and shaderOutputViewportIndex) and engine_stage_io_tail (the
floor declares Layer and ViewportIndex; the zero index below it). runtime-floor joins the stems
whose fragment ViewportIndex needs MultiViewport.

Also, missed in a5fac6fa9b: the README's pipeline bullet names the depth clip and triangle fill
modes among what a VkPipeline bakes.

Conformance: render-state-boxes leaves known-gaps-rt.tsv; CONFORMANCE-COVERAGE.md regenerated.
Docs: README (encoder bullets, floor table, refusal list), REFUSALS.md (Viewports' doc), the
encoder's built list.

Tests: tests/viewports.rs. rt6_select draws through the viewport of its instance, two viewports
(the halves) and two scissors (the whole target and its top half). Instance 0 fills the left half,
instance 1 the right half's top, and instance 2, past the count, draws through viewport 0, its
fragment reading 2. No pipeline is made, and none or 17 viewports or rectangles are Viewports.
draw.rs drops its two-viewport refusal. floor.rs adds the two missing cases, and the translator
sees shaderOutputViewportIndex.
2026-11-21 00:34:20 -08:00
Anees Iqbal 7cd1103a44 rt: cube array textures and views, with imageCubeArray in the floor
A cube array texture (`MTLTextureTypeCubeArray`) is built: an image cube-compatible with six of
its layers a cube (`arrayLength` times six layers), whose shader view is
`VK_IMAGE_VIEW_TYPE_CUBE_ARRAY`. Metal's casts with a cube array
(`makeTextureView(pixelFormat:textureType:levels:slices:)`) are built in the same form: a cube
array's subrange of whole cubes, its faces as a 2D texture (one face) or a 2D array (any faces),
six of its faces as a cube, a cube as a cube array of one cube, and a multiple of six slices of a
square 2D array as a cube array where its image is cube-compatible. A pass resolves into a
one-sample colour cube array as into a cube (`Plan::resolves`), and a layered pass renders a cube
array's faces across its cubes (the attachment view of its layers, as for a cube).

`imageCubeArray` joins the floor's required features. Every probed device reports it (vulkaninfo
dumps m3-max-48727 to 48731, 48736, 48737 and 61508: the RX 7900 XTX, every 780M, the RTX 2080,
the RTX 3090, the RTX 5080 Laptop, the Iris Xe, lavapipe, the UHD 630's Windows driver,
KosmicKrisp and the RX 550), and Vulkan 1.4 and Roadmap 2022 require it of every device. A device
without it gets the floor's refusal. The runtime-floor profile and its generator state it
(check_device_profiles: 0 findings), and the floor's missing-feature test has its case.

`Gap::CubeArrayTexture` is deleted (the consumer's checkout at 9bb622a2c2: 0 hits); REFUSALS is
regenerated and the API table loses the variant. The runtime README's texture and view lines,
its resolve line and its floor table say what is built.

Tests, each on every device of the cfg's kind: `tests::texture` round-trips a cube array's last
face (its second cube's); `tests::view` casts a cube as a cube array of one cube, reporting
Metal's array length 1; `tests::cube_views` samples a two-cube `RGBA32Float` cube array at its
second cube and a cube view of its first six faces through the owned fixture
`unk_cube_grad_lod`, every lane reading its face's slice, with `imageCubeArray` enabled; and
`tests::layered` renders a cube array's slices 4 to 9, across both its cubes (the cube-array
layered case, as the layered change landed first).

The conformance ledger's cube array rows and the runtime-floor contexts' opened chains follow in
the next commits.
2026-11-21 00:19:34 -08:00
Anees Iqbal a5fac6fa9b rt: the depth clip mode Clamp and the triangle fill mode Lines, as pipelines of the draw's class made at first use
setDepthClipMode: and setTriangleFillMode: refused every value but Metal's defaults
(DrawKind::DepthClamp, DrawKind::FillMode). Vulkan 1.3 bakes both in
VkPipelineRasterizationStateCreateInfo, and only VK_EXT_extended_dynamic_state3 makes them
dynamic. The floor cannot require that extension: the UHD 630's Windows driver lists no EDS3, and
KosmicKrisp reports extendedDynamicState3PolygonMode false. So both are now first-use pipeline
variants, the accepted form. The encoder keeps a Raster (clamp, lines) and each draw takes
RenderCompiled::pipeline(topology, raster). The content keeps its primary VkPipeline (the triangle
or patch class at the default state) and a bounded list of the others, by class list topology and
raster state: at most 7 (three more states of the triangle or patch class, two of each other
class). The line and point classes take the clip mode alone, since Metal and Vulkan apply the fill
mode to triangles only. A triangle's edges under Lines chain Bresenham's rule, as the line class
does ("the effective rasterization input topology is in the line topology class"). The first draw
under a state makes its pipeline and waits for it: a first-use wait of a new site,
FirstUse::Raster (Metrics::first_use_raster_waits, _nanos, _max_nanos). The line and point
classes' first draws at the default state count where they did.

Floor:
- depthClamp joins REQUIRED, and the translator is told (=> DepthClamp), so the encoder maps the
  mode through metal::state::depth_clamp_enable. Vulkan 1.4 and Roadmap 2022 require it. The venue
  dumps report it true on every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736, 48737 and
  61508. tests/floor.rs, the README floor table, RUNTIME_FLOOR and profiles/runtime-floor.json
  add it.
- fillModeNonSolid is enabled where reported (FILL_MODES, told to the translator), and the setter
  maps Lines through metal::state::polygon_mode. KosmicKrisp on the M3 Max reports it false
  (m3-max-48737); every other dumped venue reports it true. There Lines stays DrawKind::FillMode,
  and so does the raw value 2, which no SDK header declares.

DrawKind::DepthClamp is deleted. The consumer's checkout names it nowhere (git grep in
reims-vgpu: 0 hits). Its only call sites are set_triangle_fill_mode and set_depth_clip_mode at
crates/reims-vgpu-vulkan/src/rt_platform/render.rs:371 and :374, whose signatures are unchanged.

The translator's raster-state test reads runtime-floor, which now states depthClamp. Clamp maps
there, and the refusal is asserted on runtime-floor without it, as ab8277a560 did for
depthBiasClamp. Other translator tests that read runtime-floor were grepped for DepthClamp and
FillModeNonSolid, and none reads the floor as lacking them.

Known gaps (README): a content's first draw under Clamp or Lines makes a VkPipeline, which Metal
does not. Under Clamp the depth a fragment function writes is the device's clamp's: Metal stores a
negative NaN as 0 below a range above 0, and the translator's depth_clamp_range variant is not
drawn.

Conformance: render-state-depth-clip and render-state-facing leave known-gaps-rt.tsv;
CONFORMANCE-COVERAGE.md regenerated. Docs: README (encoder, first-use waits, floor and fill-mode
tables, known gaps), REFUSALS.md, the api_signatures table (3 Metrics fields, 1 variant gone).

Tests:
- tests/raster.rs: a triangle in front of the near plane draws nothing under Clip and every
  texel under Clamp (twice: one pipeline made). Under Lines, through a viewport half a pixel
  right of and above the corner, the triangle draws its two edges inside the target, column 0
  and row 7, and nothing inside. Without fillModeNonSolid it is FillMode and fills. Pipelines
  made, raster first-use waits and first-use waits are each 1 + fillModeNonSolid.
- draw.rs: setting both modes makes no pipeline when no draw follows.
- floor.rs: depthClamp's missing case, and the fill-mode feature enabled where reported.
- first_use_sites.rs: the raster site.
2026-11-21 00:14:34 -08:00
Anees Iqbal 57855c6097 Link: the synthesized geometry stage goes, both forms (the barycentric weights and the rate map's fan-out)
The translator built geometry stages in two forms that no Metal function asks for:
- the barycentric weights: a fragment function's [[barycentric_coord]] read as varyings, which a
  generated geometry stage of each topology class wrote, on a device without
  fragmentShaderBarycentric;
- the rate map's fan-out: a draw of a rasterization-rate-mapped pass's triangles once, a geometry
  stage emitting a copy of each per region, with its probe and its region-copy vertex variant.

Neither form reached a guest. The runtime enables no geometryShader, so it refused the weights
form already. It never sets BindShape::region_fan_out, and draws a rate-mapped pass region by
region (the regions route, RateMapRegions, and region_viewports, which stay). Validation never set
region_fan_out either.

After this change, one form is left for each:
- A fragment function that reads [[barycentric_coord]] reads the device's own
  BaryCoordKHR/BaryCoordNoPerspKHR. Without fragmentShaderBarycentric it is refused as
  Unsupported(Barycentrics) needing that feature alone; geometryShader is no longer offered.
- A rate-mapped pass draws through the regions route.

Rule 1: no precision note stops being raised. The fan-out's copies were a near-equivalent of the
regions route, which carries its own note (RateMapRegions::precision), and the weights form
raised none. The catalogue is unchanged.

Removed:
- pipeline::link::geometry (GeometryStages, the three classes' stages) and pipeline::link::fan_out,
  with their tests (link/tests/geometry.rs, link/tests/fan_out.rs) and tests/engine_region_fan_out;
- bind::fan_out (the region table, the probe's word layout and its constants);
- RegionFanOut and FanOutState;
- the region_fan_out fields of GraphicsState, BindState, BindShape, VariantKey and
  RenderLinkInputs, and LoweringInputs::region_copies;
- the region copy's lowering: StageIoPlan::region_copy, RegionCopy and the region table's
  declaration;
- PushField::RegionBox and RegionProbe;
- SyntheticBinding::RateMapRegions and RateMapFlags, and WriteSource::RateMapRegions and
  RateMapFlags;
- RuntimeFact::SynthesizedGeometry, RenderPipeline::runs_stage and Linked::geometry;
- IoRole::Barycentric with VaryingKey::barycentric and its key tag;
- VkProperty::SubgroupGeometryStage;
- the SPIR-V IR's geometry execution model, which only these stages produced: ExecModel::Geometry,
  OpEmitVertex and OpEndPrimitive, the InputPoints, InputLines, OutputLineStrip,
  OutputTriangleStrip and Invocations modes, ModelNeed::Geometry, EntryRule::GeometryModes and the
  builder's geometry ops;
- from scripts/regen-spirv-grammar/items.txt, the opcodes EmitVertex and EndPrimitive, the
  execution model Geometry and those five execution modes. spv.rs is regenerated: the opcodes and
  the model stay as test-only values, which the test parser reads, and the modes go;
- in validation, the census's geometry stage filter, the draw's runs_stage filter and the
  candidate's GEOMETRY stage arm. The census test that read three geometry stages from
  engine/bary_weights goes with them.

The SPIR-V builder now marks only Position Invariant; ClipDistance was the fan-out's.
band::plan loses its geometry flag, and takes the four SPIR-V helpers it shared with the
geometry module. The binder's stage map takes a geometry stage as no render stage.

Validation cases that executed either form: none.
- Fan-out: no validation code sets region_fan_out.
- Weights: two authored cases read [[barycentric_coord]], fa8b920d3cf3 and ae0a7e39b12f. Neither
  has a stored Vulkan observation on a profile without fragmentShaderBarycentric. fa8b920d3cf3 is
  observed on Metal and MoltenVK, and moltenvk-m3 has the feature. ae0a7e39b12f is observed on
  Metal only.

Fourth user of GeometryStages: none. It was used by link, the compile API's splice, the binder's
selection (through RuntimeFact::SynthesizedGeometry and GraphicsState::region_fan_out) and its
own tests.

Tests:
- engine_stage_io_tail's weights test is now without_the_feature_the_weights_are_refused: on
  lavapipe, ANV's Iris Xe, NVIDIA's Pascal (each with geometryShader) and runtime-floor (without
  it), both barycentric entries are refused needing fragmentShaderBarycentric.
- engine_target_indices checks each pipeline's stages valid where it counted geometry stages, and
  loses the_weights_stage_beside_a_vertex_layer_is_not_implemented: that combination is now the
  plain refusal above.
- engine_amplification no longer counts geometry stages.
- The binder's render stage test refuses a geometry stage.
- The builder's invariant test refuses ClipDistance.
- engine_rotated_weights' rotated draw runs on moltenvk-m3 and RDNA3's RADV, each with
  fragmentShaderBarycentric, where it ran on lavapipe through the weights form.
- The fact mechanism test numbers its 100 RuntimeFact variants densely again (PrivateArena,
  which development added, takes 99).

Bless due until the next named pin, where the M3 bless job takes them; nothing is blessed here:
- tests::public_fixtures_engine (the inventory): every [[barycentric_coord]] cell on a profile
  without fragmentShaderBarycentric becomes Unsupported(Barycentrics) needing it alone, where it
  compiled through the geometry stages (with geometryShader) or offered GeometryShader as the
  alternative;
- tests::golden_hashes, and pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value
  (the render key), as under the commit below: the profiles' fingerprints change;
- the authored compile census.

SEMANTICS_VERSION 2247 -> 2248 and ARTIFACT_FORMAT_VERSION 583 -> 584 are placeholders that main
renumbers.
SEMANTICS: a fragment function's weights and every rate-mapped variant change form. ARTIFACT: the
codec loses the RegionFanOut, FanOutState, GraphicsState::region_fan_out, IoRole::Barycentric,
RuntimeFact::SynthesizedGeometry, PushField, SyntheticBinding and VkProperty tags. RUNTIME_VERSION
stays: the runtime's render-pipeline kind no longer reads region_fan_out, which it never set, and
its SynthesizedStages doc names the bands alone. runtime-sources.sha256 keeps development's (land-pkt
re-pins it), api_signatures and api_surface drop the removed items, and docs/REFUSALS.md is regenerated.
API.md drops the geometry stages from RenderPipeline's stages, its barycentric bullet and its band
bullet. ARCHITECTURE.md's link line drops pipeline::link::geometry, and the runtime README's
Barycentrics gap names the feature alone.

Consumer check (consumer_check.sh, consumer development b76d6ac4a9): region_fan_out,
RegionFanOut, FanOutState, region_copies, region_copy, RateMapFlags, RegionBox, RegionProbe,
SynthesizedGeometry, FEW_COPIES, PROBE_DRAW_WORDS, RegionCopies and runs_stage have 0 hits.
GeometryStages appears in crates/reims-vgpu-c/link-order.txt only. fan_out's hits are the
consumer's own event fan-out in crates/reims-vgpu/src/graphics/decode/cmdbuf.rs, not this
module.

Verified (jobs read):
- m3-max-61801: the suites at this change's work in progress (4f1f934423); its real reds were the
  mechanism numbering and the rotated weights on amd-rdna3-radv, both fixed here; the render key
  reads bless-due.
- At the stack's tip over this change (dvl-5 1fa4aed963 and dvl-6 92fe40c38f): 61978 and 61987,
  fmt, clippy in every configuration, Rustdoc, each feature alone, the API docs and the Windows
  clippy, green; 61891, the suites at dvl-4: 13 failures, each a bless-due golden above or
  development's own (the raster state test, the inventory's sample_fill rows); 61968, the lavapipe
  device suite of metal2vulkan-validation, 1483 of 1483, and public case qualification Match;
  62042, the metal2vulkan-validation suite at dvl-5, 1378 of 1378 passed.
- States-only play of this change's player (p-gd.zst) over 35 distinct streams on gem10 (61919),
  um870 (61924), ms01 (61967) and um790 (62004): 456,384 render and 91,972 compute states made,
  0 refused, every stream exit 0. The msi stream (windrag-780m-b2) is not played: msi had no
  memory free.

Rebased onto development 4cf936ed4d (selidx landed as 3ecf606aa8). The conflicts: the version
lines; the mechanism test, where development added RuntimeFact::PrivateArena; runtime-sources.sha256,
where development's is kept; and api_signatures.tsv and docs/REFUSALS.md, both regenerated
(signatures.py --bless, refusal_surface.py) and differing from development by this change's items
alone. The jobs above ran at the old base; the rebased tip's are in the report to main.
2026-11-21 00:03:34 -08:00
Anees Iqbal aed460e0da rt: indirect draws, of primitives, indexed primitives and patches
The render encoder builds Metal's three indirect draws:
`drawPrimitives:indirectBuffer:indirectBufferOffset:` (`draw_primitives_indirect`),
`drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:`
(`draw_indexed_primitives_indirect`) and
`drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:`
(`draw_patches_indirect`). Each is one `vkCmdDrawIndirect` or `vkCmdDrawIndexedIndirect` on the
buffer at its offset: Metal's argument structs lie as Vulkan's commands do, so the GPU reads
them as they are and nothing is copied. Before, the encoder had no such methods and the README
listed indirect draws as not built.

drawPatches indirect is built: rt's patch draw is vkCmdDraw(patch_count, instances, patch_start,
base), each patch one vertex of the state's patch list, so Metal's patch count is the indirect
command's vertex count unchanged. A patch index buffer stays `DrawKind::PatchIndexBuffer`, as
the direct draw's.

The arguments' buffer counts among the draw's reads as an index buffer does (draw_reaches,
Managed copies), and the command buffer keeps it until it retires. The pass's first barrier
(Reach::Commands, which has INDIRECT_COMMAND_READ) and the encoder's memory barrier make earlier
writes visible to the read. An offset not a multiple of 4 or without the arguments' 16 bytes (20
indexed) is Refusal::IndirectOffset; arguments at a block byte not a multiple of 4 are
Refusal::ArgumentPlace; an indexed draw's index offset must be a multiple of the index size and
inside the buffer. A device that takes firstInstance 0 alone under a divided step rate refuses
an indirect draw through such a state (DividedBaseInstance), since the GPU reads the base
instance.

Floor: drawIndirectFirstInstance joins REQUIRED (Vulkan 1.4 requires it), so Metal's base
instance is the device's own. The translator is not told. The venue dumps report it true on
every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736, 48737 and 61508. tests/floor.rs,
the README floor table, regen_device_profiles.py's RUNTIME_FLOOR and profiles/runtime-floor.json
add it. The translator's tests that read runtime-floor only see indirect_needs_arguments become
false more often, which none asserts the other way.

Known gap (README): an indexed indirect draw's index count is the GPU's, so a count past the
index buffer is not refused as a direct one is. Without robustBufferAccess2, which the floor does
not require, a count past the block's VkBuffer is outside valid usage
(VUID-vkCmdDrawIndexedIndirect-robustBufferAccess2-08798).

The encoder's doc no longer lists `useResource:` as not built (it is, since 62b3e5a250).

Docs: README, REFUSALS.md and METAL-COVERAGE.md (the three selectors now implemented), the
api_signatures table (three methods).

Tests: draw.rs's every_device_draws_from_indirect_arguments_a_blit_wrote: arguments written by a
blit earlier in the command buffer, at offset 16, draw the constant-step triangle as the direct
draw does (vertex 1, instances 1 and 2 at base instance 1), indexed through [7, 0, 1, 2] from
index 1 at base vertex 1 too; arguments of no instances draw nothing. patch.rs's
every_device_draws_patches_from_indirect_arguments: two patches from arguments 4 bytes in draw
as the direct patch test's, and a patch index buffer is PatchIndexBuffer.
2026-11-21 00:02:34 -08:00
Anees Iqbal 374061b156 Validation: the MoltenVK MSL helper and corpus-pipeline's .cfg writer are deleted
The MoltenVK MSL helper converted a kept module to MSL as MoltenVK
1.4.1 converts it on the moltenvk-m3 device. It had three parts:
- scripts/moltenvk-msl-helper/build, which built helper.cpp against
  SPIRV-Cross at MoltenVK's commit;
- msl_portability::moltenvk, which derived the helper's configuration
  from the pipeline layout;
- corpus-pipeline --keep-modules, which wrote that configuration beside
  each kept module as <hash>.<stage>.<variant>.cfg, or .cfg.err.
Only the helper read a .cfg. No check, CI job or script ran the helper,
and the MoltenVK backend it served is gone. So the module, its tests,
helper.cpp, the build script and the .cfg writer go. --keep-modules
still writes each stage's .spv and its .json (entry point,
specialization layout, strategy census).

The fixtures under fixtures/public/msl_portability/ stay: the
translator's forwarding tests (spirv/testing/forwarding.rs) read them.

The engine's linked translation returned a translated module's words
with the pipeline layout link gave it, "what msl_portability::moltenvk
configures MoltenVK's conversion from". No caller read that output, so
these go:
- translate_new_linked and translate_row_linked. translate_new and
  translate_row validate directly.
- translate_with, which had no caller. specialization::attempt's doc
  now names translate_unvalidated, which is what it runs.
- PendingL3::layout. validated and PendingL3::validate now return the
  Attempt alone.
- Attempt::settle_l3's bool, which no caller reads now.

Not deleted, because of the macOS grep: corpus-pipeline (L4 driver
acceptance, --device-type gpu) still opens a Vulkan device on macOS,
which is MoltenVK there. acceptance::metal_report parses MoltenVK's
reports for it. So VulkanContext's loader-word restore (loader_word.rs
and clippy.toml's list), MoltenVK's withheld diagnostics (device.rs)
and coverage's MoltenVK host class serve a live path, and stay.

Verified: cargo fmt; no file names msl_portability's module,
moltenvk-msl-helper, translate_new_linked, translate_row_linked or
translate_with (git grep). The compile gate follows as a potluck job.
2026-11-20 22:19:52 -08:00
Anees Iqbal d54a1a5568 Validation: the MoltenVK backend, its C3 venue and the old engine's baseline are deleted
The validation executor's Vulkan side runs on Linux through native ICDs
and the runtime. No lane records MoltenVK rows any more, and no MoltenVK
venue is wanted. This commit deletes the MoltenVK backend from the
store up.

Before the deletion, git grep at e35d9098c0 showed these readers of
Backend::Moltenvk rows outside tests:
- C3's input (c3.rs: C3Input::moltenvk, the baseline, the old-mismatch
  ledger), its venue kind (venues.rs), the evidence census
  (index.rs: the index's candidate table and evidence_status);
- the store's own layout check, shard rewrite and rekey;
- the batch's worker store, which linked the other backend's rows;
- the corpus-moltenvk binary, the host and driver checks
  (candidate.rs, platform/compute.rs) and candidate_batch's CPU refusal.
Every one goes or loses its MoltenVK arm here. No reader is left.

What goes:
- The corpus-moltenvk binary (Cargo.toml entry included), and
  Backend::Moltenvk and BatchBackend::Moltenvk. Backend keeps one
  variant, Vulkan. Collapsing it is a follow-up commit.
- corpus/observations/moltenvk: 64 shards, 4,809 rows. 4,802 of them
  are old-engine rows in about 60 slots: apple-m3-max-moltenvk 1,137,
  the byte-exact-* and local-* runs, and probe slots. The other 7 are
  engine rows of apple-m3-max-moltenvk@engine.
  corpus/observations/refusals/moltenvk: 16 shards, 6 refusals.
- The store's MoltenVK shards: its layout check, the aligned rewrite,
  the refusal follow and the rekey now read the Vulkan backend alone.
  The batch's worker store links only the Metal rows. The index stores
  the Vulkan candidates alone, and evidence_status's rows have no
  moltenvk column (corpus-status's evidence line loses it too).
- C3's MoltenVK venue (VenueKind::Moltenvk, c3-venues.json's
  apple-m3-max-moltenvk entry) and with it the old engine's baseline:
  - Population::OldEngineMatched, the baseline closure and the "new
    mismatch" count (SlotReport::new_mismatches);
  - the old-mismatch ledger (LedgerRow, C3Report::ledger, stale_causes,
    unexplained);
  - the reviewed list's old_mismatches part (OldMismatch,
    ListPart, EntryRow::part), and Venues::baseline and by_environment.
  The venue list's MoltenVK-driver check goes too. VenueDevice's
  metal_environment_id, which only an Apple GPU's venue device set,
  goes with Venue::identities_compared_with: a venue run is held to
  all of its devices' identities.
- c3-reviewed.json: the 12 old_mismatches entries (all signed off),
  and the 10 fast_math_regrouping readings whose only observation was
  the apple-m3-max-moltenvk@engine slot. These are the linked-single
  radix 5/7/11/13/15 zero-write cases, two each, all signed off. A
  reading must list an observation, and theirs named a slot that no
  longer exists. A regrouping mismatch of those cases on another venue
  now reads unreviewed until a reading lists that venue's row. The 12
  apple_reading entries are untouched; none named a MoltenVK slot.
- corpus/authored-compile.tsv: the moltenvk-m3 column keeps its cells
  but drops their artifact digests (2,255 cells). Only a C3 venue's
  profile keeps a digest, and moltenvk-m3 is no venue's now. This is
  what a bless writes; the profile itself stays, since the translator's
  tests read it.
- scripts/rerecord-venue's moltenvk kind (and its Homebrew validation
  layer path), and scripts/rerecord-commit's MoltenVK build, install
  and shard paths. docs/VALIDATION.md loses corpus-moltenvk, and its
  venue list names what each venue covers.
- In the docs, the robustness leg's "profile-leg" (validation README,
  corpus README) is now "profile", which 79d95a2887 missed.

What C3 still decides: per venue of c3-venues.json, lavapipe on arm64
and x86 (the public cases) and the 780M, the Iris Xe RPL-P and the RTX
5080 Laptop (every Metal-qualified case), each case's verdict in the
venue's engine slot by the same rules as before (match, reviewed,
device_gap, out_of_scope, reference_gap, mismatch, refused, stale,
missing). It holds when every slot holds, every reviewed observation
holds, every listed reference gap is recorded, every entry and recorded
reference gap is signed off, and no sign-off is refused. It no longer
holds anything to an old-engine population, counts new mismatches
against one, or keeps a ledger of old-engine mismatch causes.

Tests:
- c3/tests.rs: the synthetic MoltenVK venue becomes a native GPU venue
  (GPU, Metal-qualified, still described by the moltenvk-m3 capture).
  Deleted: the baseline test (moltenvk_must_cover_every_case...), the
  ledger test, and the Apple-GPU Metal-environment test.
  Rewritten: the population tests (two populations now) and the
  reference-gap test (on lavapipe's public population). The schema test
  checks its review fields on a reading. The venue checks lose the
  baseline and driver cases.
- index.rs and store.rs tests run their toy rows as Vulkan's. The
  cross-backend checks have no second backend and go.
- vulkan_batch/tests.rs: the MoltenVK batch test goes. The install test
  refuses a Metal batch's record in place of a MoltenVK one.
- tests/integration: the store-layout and worker tests drop
  corpus-moltenvk. fast_trig_within_apples_bound reads the Vulkan store
  and wants one row per venue (5). It wanted 10, which the robustness-off
  and MoltenVK rows made up.

Device-level MoltenVK accommodations stay for the follow-up commit with
the MSL helper, once a grep shows no Vulkan run on macOS: the loader
word, MoltenVK's withheld diagnostics, coverage's robust-buffer host
class and the pipeline flag.

Verified: cargo fmt; no committed observation path, C3 list entry, venue
or script names the MoltenVK backend (git grep). The compile gate of the
Q3 commits follows as a potluck job.
2026-11-20 22:15:53 -08:00
Anees Iqbal 79d95a2887 Validation: the robustness-off leg and its slots are deleted
The ruling Q3: the validation executor runs each case in one context,
which enables every robustness feature its device states. Its second
leg (every robustness feature off, the ID@engine+robustness-off slots)
measured an encoding that metal2vulkan-runtime never runs, since the
runtime's floor fixes the robustness it enables. The tier table keeps
both of its compiles: they are translator coverage of what the runtime
ships, so coverage::Leg stays as the tier table's type alone.

Deleted:
- the executor's leg: corpus-vulkan's and corpus-moltenvk's
  --robustness-off, the device worker's leg, engine_slot's leg (an engine
  slot is ID@engine or ID@engine@P; an ID@engine+robustness-off is no
  engine slot), the enable lists' leg (engine_list enables what the
  description states), and the leg in a row's environment and census
  (ExecutedCensus.leg, environment.robustness.leg) with its validation;
- the batch's legs: corpus-vulkan-batch takes no --leg. Its passes are
  Pass::Engine and Pass::Metal, so a done-list line names "engine" where
  it named "stated", and a log is CASE.engine.txt. Its report lines carry
  no leg= field, and batch-slowest names pass=engine;
- the authored compile census's robustness-off profiles: a profile is
  its committed stem (ProfileStem, which was ProfileLeg); a label with a
  "+" names no profile. corpus/authored-compile.tsv loses its 9
  +robustness-off columns mechanically. Every other cell stays, and the
  reader takes the new layout in this commit. The rows are re-blessed
  at the next named pin. the_committed_expectations_parse holds the file
  to what a bless renders. No test is expected to read red until the
  bless, since no kept cell changed (unaudited until development's census
  runs);
- C3's legs: a venue lists no legs and has one slot (c3-venues.json
  drops its legs fields). c3-reviewed.json drops the 12 observations
  recorded in robustness-off slots;
- the committed rows of the +robustness-off slots: 193 rows and
  refusals out of corpus/observations, which empties and removes 44
  shards. "leg":"stated" is stripped from the remaining rows' census and
  environment;
- scripts/qualify-public-cases' second run per case, and
  scripts/rerecord-venue's --leg; docs/VALIDATION.md's robustness legs.

corpus-triage's usage, corpus-status' --c3 help and the census's file
comment say "profile" where they said "profile-leg".

Verified: cargo fmt. The compile gate follows as a potluck job.
2026-11-20 22:15:02 -08:00
Anees Iqbal 7ba1cdbf30 rt: a blit copy between a buffer and a texture takes MTLBlitOption's plane options
copyFromBuffer:...:options: and copyFromTexture:...:toBuffer:...:options: are
BlitCommandEncoder::copy_from_buffer_with_options and
copy_from_texture_to_buffer_with_options, with a public BlitOption (None,
DepthFromDepthStencil, StencilFromDepthStencil). A plane option copies the aspect it
names, one vkCmdCopyBufferToImage or vkCmdCopyImageToBuffer region of that aspect, where
the pixel format has it: the depth or the stencil of a combined format, and the depth of
Depth16Unorm or the stencil of Stencil8 too, which Metal takes (the conformance crate's
buffer-depth-samples rows put the option to Metal on those formats). The forms without
an option are those of None. The unit is texture.rs's copy_unit of the named aspect, so a
copy into a 32-bit float depth is Gap::FloatDepthUpload as Depth32Float's is, and a
multisample texture stays Gap::TextureBytes; a plane option of a format without its
aspect is Gap::TextureBytes. MTLBlitOptionRowLinearPVRTC is not offered: the runtime
makes no PVRTC texture, and the conformance side keeps it unavailable.

The private buffer_copy takes the direction and the option as one Way, which keeps it
under clippy's argument count without an expect.

Docs: the rt README's blit lines, Gap::TextureBytes's doc, REFUSALS.md (regenerated),
the metal-coverage map (the two options selectors now name the options methods) and
METAL-COVERAGE.md, the public signature table (6 records added, none moved).

Tests: tests/blit_options.rs. On the host, each option's aspect and unit bytes in both
directions, and each refusal. Under a device cfg, a pass clears a Depth32Float_Stencil8
texture to depth 0.25 and stencil 0x5a, a stencil region goes in from a buffer, and both
planes come back out (the region with 0x5a around it, 0.25 at every texel);
Depth16Unorm's depth and Stencil8's stencil go in and come back out bit for bit.
2026-11-20 22:11:29 -08:00
Anees Iqbal 62b3e5a250 rt: the render encoder's use_resource, and a draw after a declared write of a texture with no storage element is Gap::StorageElement
What: RenderCommandEncoder::use_resource is useResource:usage:stages:, its plural and their
deprecated forms without stages. The command buffer keeps the buffer or the texture until it
retires and nothing is recorded: every resource is resident to every function, and the pass's
barriers already order its draws. A usage that writes a texture (or a view of one) made for
shader writes with no storage element marks the encoder, and every later draw whose vertex or
fragment function may reach a texture through its storage image beyond its slots
(PipelineInterface::unbound_storage_textures: an argument buffer's write or read_write texture, a
resource ID) is Gap::StorageElement with no slot, as the compute encoder's dispatch already is.
Before this, such a draw ran and Vulkan dropped the writes Metal makes. The declaration
invalidates the encoder's held draw facts, so a draw of an unchanged state and bindings after it
is checked again.

Also: the three redundant explicit links in new_render_pipeline_state's docs (private rustdoc
-D warnings, from 3653240b57) are plain intra-doc links; Refusal::OtherDevice's doc names the
render encoder's calls; the README's storage-element known gap no longer waits for the render
encoder's useResource:, and the render encoder's section describes use_resource; coverage.tsv
marks the four MTLRenderCommandEncoder useResource rows implemented; REFUSALS.md,
METAL-COVERAGE.md, CONFORMANCE-COVERAGE.md and api_signatures.tsv regenerated.

Test: every_device_refuses_a_draw_after_a_declared_write_of_a_texture_with_no_storage_element
(storage_element.rs, device cfgs): an owned fragment function writes an argument buffer's
texture2d<float, write>; for RGBA8Unorm, RGBA8Unorm_sRGB, BGRA8Unorm_sRGB, A8Unorm and an sRGB
view of an RGBA8Unorm texture, a draw before the declaration draws, the same draw after
use_resource(WRITE) is Gap::StorageElement { slot: None, pixel_format } exactly where the texture
has no storage element, and a colored_fragment draw after the declaration draws; the fragment
function's write through its resource ID lands (1, 0, 1, 1). Without the Facts::find check the
refused cases draw and the test panics.
2026-11-20 22:08:11 -08:00
Anees Iqbal a529fb658e rt: the floor's depthBiasClamp has its missing-feature case, and the runtime-floor profile states it
The floor requires depthBiasClamp (the first commit of this change). The runtime's
each_missing_feature_is_named gains its case, as its count of cases is held to REQUIRED's. The
regeneration's RUNTIME_FLOOR and runtime-floor.json's m2v_runtime_floor block state it, in the
generator's order (the block the runtime's the_floor_profile_states_exactly_the_floor holds equal
to floor.rs; check_device_profiles: 0 findings over 17 profiles; the JSON line is written as the
regeneration writes it, without refetching its pinned sources). CONFORMANCE-COVERAGE is
regenerated for the ledger row render-state-depth-bias left (7688 rows to 7687).

The runtime-floor contexts' opened chains move with the profile; their bless is the next commit.

Verified: suite m3-max-61635 at 406f39dc90 (msi; the workspace suite and the lavapipe device
tests) failed exactly these three, each_missing_feature_is_named (52 cases against 53),
the_floor_profile_states_exactly_the_floor (depthBiasClamp) and the coverage document; the rerun
follows.
2026-11-20 21:33:04 -08:00
Anees Iqbal 4e3a6a3555 rt: layered rendering in one form, the vertex function storing Layer in every pass
`RenderPassDescriptor::render_target_array_length` is Metal's `renderTargetArrayLength`. A pass
of length N of 2 or more is one rendering of `layerCount` N: every attachment and resolve texture
is a view of its level and N slices from its own `slice` (a 2D array view; a cube's faces are its
slices), and the rendering's load, store and resolve cover every layer, with no per-layer loop.
At 0 and 1 the pass renders the attachment's slice alone, as Metal's does.

A vertex function's `[[render_target_array_index]]` has one form: the variant that writes
`Layer`, in every pass. Each draw pushes the pass's length, max(len, 1)
(`FieldValue::RenderTargetArrayLength` for the translator's `PushField::RenderTargetArrayLength`),
and the function stores 0 for an index at or past it, so at 0 and 1 every index renders the
attachment's slice. The fragment function reads the raw index through the flat varying the
translator carries. The runtime never asks for `VariantKey::dropped_vertex_layer`; a state whose
fact is `RenderTargetArrayLength { layer_dropped: true }` is refused as a draw input. What still
uses `dropped_vertex_layer`: the old binder (`bind/graphics.rs:905`, the variant it asks for at a
shape's length), stage_io's plan (`lower/stage_io/plan.rs:1600` and `:2305`, also the
non-layered amplification), and the validation crate's engine tests
(`candidate/engine/graphics/tests.rs:907`); it stays for cutxlate to delete.

`shaderOutputLayer` joins the floor's required features: every probed device reports it
(vulkaninfo, jobs m3-max-61359 on gem10: the 780M, the RX 550 and lavapipe; 61360 on um790: the
RX 7900 XTX, the RTX 2080, the 780M and lavapipe; 61361 on um870: the 780M, the RTX 3090 and
lavapipe; 61362: KosmicKrisp, Mesa 26.3.1; 61366: the UHD 630's Windows driver, Vulkan
1.3.215). A device without it gets the floor's refusal. The runtime-floor profile and its
generator gain it.

Refused, in the README's layered-rendering gap line: an attachment or resolve texture with fewer
slices from its own than the pass's length (`Refusal::AttachmentPlace`, naming the last slice); a
3D texture's depth planes (`TextureType`, as for every 3D attachment); a length past
`maxFramebufferLayers` (`RenderPassKind::ArrayLength`, new:
VUID-VkRenderingInfo-layerCount-07817); a draw that reads one of a layered pass's attachments
through a texture on a device without the feedback loop (`AttachmentRead`: a shadow holds one
layer); and a vertex function whose index the translator cannot show the same at every vertex of
a primitive, at creation, naming `LayeredRendering` and `geometryShader`: Vulkan requires one
`Layer` per primitive (VUID-VkPipelineShaderStageCreateInfo-stage-02596), the translator's other
form is a geometry stage device creation does not enable, and Metal calls a differing index
undefined. The feedback-loop move's ranges around the rendered layers (`around`) take the
attachment's layer count.

The conformance runtime side passes the length; the case `layered-render-target-array-length`
loses its ledger row. REFUSALS, METAL-COVERAGE and CONFORMANCE-COVERAGE regenerated; the API
table gains the field and the kind.

Test: `tests::layered`, on every device of the cfg's kind: a 2D array's slices 1 to 3 with an
index past the length, a cube's six faces, a pass of length 0 and one of length 1 whose vertex
function writes index 3 (rendering the attachment's slice, the fragment reading 3), every slice
read back; and `rt6_first_vertex`'s per-vertex index refused naming `LayeredRendering`.
2026-11-20 21:11:36 -08:00
Anees Iqbal a8d448f4ce Depth stand-ins go: no variant runs its draw's depth or stencil test in the shader
The runtime asks for every render variant with VariantKey::new() (render.rs) and never states
FragmentTests, so VariantKey::shader_tests, shader_stencil and window_depth_varying are false on
its path. No variant it makes tests a fragment's depth or stencil against a stand-in of the pass's
attachment. That variant, its stand-ins and their consumer contract are deleted. The consumer
names none of them on its development branch (consumer check below).

The binder: for a fragment function that stores before Vulkan's tests (TestedStorageWrites), a
draw whose depth test writes (FragmentTests::Depth { writes: true }) or whose stencil test acts
(Stencil, or Drop for a function without the early-tests variant) ran the in-shader variant. It is
now refused NotImplemented at the tested attachment, of the feature that stores first
(FramebufferFetch, or Imageblocks for an imageblock alone):
- a function with the early-tests variant: at the depth attachment for Depth, at the stencil
  attachment for Stencil;
- a function without it: at the depth attachment, or the stencil one where the pass has no depth,
  as Any already was.
A draw whose tests drop but write and count nothing keeps the early-tests variant, and one whose
tests drop nothing runs the pipeline as compiled, as before.

Removed:
- the inputs and keys: VariantKey and LoweringInputs::{shader_tests, shader_stencil,
  window_depth_varying}, and their key bytes;
- the lowering: lower/fragment/depth_test.rs (DepthTest, StencilTest, depth_test_form,
  stencil_test_form, depth_test_word, stencil_test_word, STAND_IN_FORMAT) and its calls from
  fetch's and the imageblock's tests, and the stencil output stage_io stored nowhere under it;
- the window depth varying: IoRole::WindowDepth, VaryingKey::window_depth, the vertex function's
  store (stage_io's WindowDepth) and the fragment's input, and its link checks;
- the facts and state: RuntimeFact::ShaderTests and ShaderStencilTest, GraphicsState::shader_tests,
  ShaderTestsUse, StandInUse, StandInView, link/shader_tests.rs, and compile::api's stand-in
  requirements;
- the bindings: SyntheticBinding::DepthStandIn and StencilStandIn, WriteSource::DepthStandIn and
  StencilStandIn, PushField::ShaderTestsState and ShaderStencilState, the binder's push words and
  ShaderTestsTemplate, and BindState::{depth_range, depth_clip_mode_clamp, stencil_references},
  which only those words read;
- the copies: DepthStencilCopy::DepthFromStandIn, DepthStandInForm, DepthSplitModule and
  depth_split_module;
- the notes and kinds: PrecisionNote::ComputedSampleDepth (and its conformance Degradation, C3
  deferral and comparison rows, and its catalogue entry in docs/API.md),
  Feature::MultisampledShaderDepthTest (and its reach row), DriverDeviation and VkProperty
  CenterFragCoordDepth and SampleFragCoordDepth, which nothing else reads;
- DrawReplayRule::ShaderTests, and the mechanism rows of the two facts;
- the runtime's translator_fields row for shader_tests.

Tests:
- engine_fragment: the discarding fetch beside depth expects a depth test that writes refused at
  the depth attachment and a stencil test that acts at the stencil attachment. The per-sample
  depth test, the memory-writing fetch's Drop draw, a returned depth
  (a_fetch_that_returns_its_depth_refuses_a_draw_whose_depth_test_writes, which keeps the compiled
  pipeline's checks) and a returned stencil or mask
  (a_returned_stencil_or_sample_mask_refuses_a_draw_whose_tests_act) expect the refusal. The
  stencil test in the shader goes.
- engine_fragment_imageblock: a tested imageblock writer's depth draw is refused
  NotImplemented(Imageblocks) at the depth attachment.
- engine_moved_writers: the writers' wanted tests are the early-tests variant alone; a draw that
  ran the function's own tests is refused.
- depth_stencil_copy, owned_divisions, the mechanism table, api_tests, the binder's templates, the
  variant key's debug text: their stand-in rows go. The binder's stencil words test goes.

api_surface loses its rows; api_signatures is blessed; docs/REFUSALS.md is regenerated.

SEMANTICS_VERSION 2227, ARTIFACT_FORMAT_VERSION 572, RUNTIME_VERSION 2547 (placeholders; main
renumbers). SEMANTICS: the binder's plans of such draws change, and the key bytes go. ARTIFACT: the
codec loses SyntheticBinding, PushField, RuntimeFact, IoRole, VkProperty and PrecisionNote variants,
GraphicsState's field and three structs. RUNTIME: plans and BindState change. The runtime pin
moves.

Consumer check (consumer-uses.sh, consumer development 0140a12682, 61 refs): 0 hits (code) for
ShaderTestsUse, StandInUse, StandInView, shader_tests, shader_stencil, window_depth_varying,
DepthStandInForm, DepthSplitModule, depth_split_module, DepthFromStandIn,
MultisampledShaderDepthTest, CenterFragCoordDepth, SampleFragCoordDepth, ShaderTestsState,
ShaderStencilState, DepthStandIn, StencilStandIn, WindowDepth, window_depth, stencil_references,
depth_clip_mode_clamp, ShaderStencilTest, DepthTest and ShaderTests; depth_range in link-order
lists only. ComputedSampleDepth: 0 on development; used in crates/reims-vgpu-vulkan/src/answer.rs
on 38 of the consumer's steelbrain/* branches, a crate its development no longer has.

Verified: m3-max-61056 (msi) at this commit's tree: fmt, clippy, Rustdoc, and nextest of
metal2vulkan, -conformance, -validation and -runtime, 5885 of 5886 passed; the one failure is
the_old_render_descriptor_key_keeps_its_value, which moves with SEMANTICS_VERSION (main pins it).
States-only plays on lavapipe of the probe player built at the change on 999b82bfe2
(steelbrain/cutxlate-siplay, m3-max-61016): m3-max-61022 to 61026, 61 runs over the 36 streams,
render 502920 states made and 0 refused, compute 108189 made and 0 refused, the counts of the play
before the change: no state a stream makes meets the new refusal.
2026-11-20 18:07:17 -08:00
Anees Iqbal 256c363847 Fix forward: runtime-floor states the floor's line rasterization, and Profile F may ask for a format where the formatless floor refuses
The runtime's floor requires VK_EXT_line_rasterization with bresenhamLines (107dba0b33); the
regeneration's RUNTIME_FLOOR block now states both, and runtime-floor.json is regenerated from it
(scripts/regen-device-profiles, --only runtime-floor; check_device_profiles: 0 findings), so the
runtime's the_floor_profile_states_exactly_the_floor holds.

On runtime-floor, a function with more storage textures than the per-stage limit (13 against 4,
kernel_block_read's br_rw) is refused on the formatless floor by the descriptor count, while the
device without the formatless reads asks for the storage format first, before that check is
reached. profile_f_functions_reach_every_buffer_through_a_descriptor accepts that pair.

Verified by suite m3-max-60543 (msi) naming these two among its reds; rerun follows.
2026-11-20 16:35:53 -08:00
Anees Iqbal e3d7ba6bf2 Profiles: the swiftshader description below the floor is deleted
What: profiles/below-floor/swiftshader.json, its generator source entry
(scripts/regen-device-profiles, gpuinfo report 38278) and its README row are deleted. The
from_queries refusal test (a_push_window_below_256_bytes_is_below_the_floor) reads
below-floor/vk12-floor alone.

Why: no test compiles on it any more. Its forms (4-lane vertex subgroups, reads with a format
only, robustImageAccess alone) are tested on runtime-floor with those properties stated, and a
below-floor push window is the vk12-floor description's 128 bytes.

Consumer check: no public item of a published crate is deleted.

Verified: cargo fmt. The suites run on this tree with the previous commit's jobs.
2026-11-20 16:35:53 -08:00
Anees Iqbal b90e0565da The floor: from_queries refuses a push window below 256 bytes, the runtime's floor requires 8 fragment outputs, and runtime-floor replaces the profiles below it
What: Device::from_queries refuses a description whose maxPushConstantsSize is below the 256
bytes every stage's push window is lowered for, with a typed Unsupported{PushWindow} naming the
MaxPushConstantsSize limit (crates/metal2vulkan/src/device/derive.rs, the floor checks of
from_queries). The runtime's floor (metal2vulkan-runtime's floor list) requires
maxFragmentOutputAttachments >= 8. All 15 committed device profiles report 8, and so does every
matrix card.

The committed profile set keeps only devices at or above the floor:
- roadmap-2022 and lunarg-desktop-baseline-2023 are deleted;
- vk12-floor and swiftshader move to profiles/below-floor/, inputs of the from_queries refusal
  test only;
- runtime-floor, derived from the runtime's floor by scripts/regen-device-profiles and held
  equal to it by a test, is the floor every test compiles on.

A test of a below-floor form now runs on runtime-floor without the feature that form stands in
for, labelled "below the runtime's floor" (pipeline::testing::profile_without, PROFILE_F,
device_f, FORMATLESS_FLOOR). The validation tests name runtime-floor, or derive the device they
need from it (no tessellation, no formatless writes, robustImageAccess alone, no device
addresses).

Why: the runtime refuses every device below its floor, so translating for those profiles tested
forms no device the runtime opens can ask for. A push window below 256 bytes cannot hold what
the lowering puts there.

Consumer check: no public item of a published crate is deleted. The one removed constant,
FORMATLESS_FLOOR's old value, is in the crate-private pipeline::testing.

Not in this change, re-blessed on development: the golden hashes table
(tests::golden_hashes) and the public fixture expectations (tests::public_fixtures_engine). The
runtime-sources pin (candidate::engine::artifact) follows from the test run at this tree.

Verified: cargo fmt. The suites, clippy and the CPU-ICD run are potluck jobs on this tree, named
when the branch is handed over.
2026-11-20 16:35:52 -08:00
Anees Iqbal 569b32b49a RuntimeDriverDefect goes: an identity-keyed table no runtime code reads
The enum listed 33 defects of named drivers in commands a runtime records, keyed on the driver's
identity and release (rule 2). The runtime constructs none and reads none: no crate of ours, and
none of reims's, names a variant. With it go Needs::RuntimeDriverDefect,
Unsupported::runtime_driver_defect, validation's UnsupportedReason::DriverDefect ("driver_defect"
keys; the stale census rows that carry one go at the next re-bless), the conformance verdict's
device-gap arm, the error and engine key tests' entries, the API guide's Needs entry and the
refusal surface script's constructor.

Since nothing reads a variant, no ladder rung follows from one: no site becomes a precision note or
a typed gap. The four docs that cited a variant now state what Vulkan or the module does without
it: the depth/stencil copy modules (maintenance8's copies), the generated-commands replay (the
explicit preprocess form, which the runtime does not take), the validation executor's set-layout
query note (MoltenVK's understated answer), the pipeline-cache probe's comments (MoltenVK compiles
a seeded cache's shaders at load), and SeparateMultisampledDepthStencil's refusal (maintenance8
alone).

NativeHalfConversion's bound adds NVIDIA 620.70.06's measurement on the RTX 3090: the pair is
dropped under the 16-bit RTE, DenormPreserve and SignedZeroInfNanPreserve too, every float that is
no half coming back unchanged over all 2^32 inputs. The bound already covered no rounding at all.

REFUSALS.md and api_signatures.tsv regenerated.

Verified: nothing yet; the gate follows.
2026-11-20 13:39:49 -08:00
Anees Iqbal 88a5a8d641 matrix: the golden table and the runtime without the old-runtime wording
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.
2026-11-20 13:10:00 -08:00
Anees Iqbal 3656f31676 DriverWorkaround keeps the two answers every device takes; the driver-defect refusal goes
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.
2026-11-20 11:57:41 -08:00
Anees Iqbal 912bf785ce Simdgroups: the vertex grouping note goes, with its fact's reader
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.
2026-11-20 11:56:55 -08:00
Anees Iqbal 92ce7950fc Docs: "the runtime", not "the new runtime"
There is one runtime, so the prose of the harness, validation, devtools,
the translator's lockstep module, .config/nextest.toml and the refusal
surface and conformance coverage generators says "the runtime"
(scratch newrt.py: a word replacement, identifiers such as new_runtime
and NewRuntime untouched). docs/REFUSALS.md and
docs/CONFORMANCE-COVERAGE.md are regenerated from the edited scripts.

Four harness passages said the runtime makes no heap and no texture
over a buffer, and has no Managed mode. The runtime has all three
(Device::new_heap_buffer and heap textures, Buffer::new_texture,
Device::new_managed_buffer); the harness's own backend refuses the two
texture sources. They now say the harness makes neither on the runtime,
and the Managed note names Device::new_managed_buffer. The refusal
strings keep the words the harness's described test matches ("makes no
heap", "makes no texture over a buffer").

Left: three fixture comments (.metal under validation's public
fixtures, whose text keys the golden tables and the committed AIR) and
scripts/matrix, whose keys (harness-new) carry the same naming.

Verified locally: the refusal surface, Metal coverage, conformance
coverage and API signature checks pass.
2026-11-20 11:52:56 -08:00
Anees Iqbal be2c5d567e Fragment: the multisampled in-shader depth test is one typed gap on every device, Feature::MultisampledShaderDepthTest
The planner's ruling. A fragment function that runs its draw's depth test itself at more than one
sample, without returning its depth, needs each sample's depth. The two forms that gave it were
keyed on measured facts (VkProperty::SampleFragCoordDepth on RADV, CenterFragCoordDepth on
MoltenVK) that no query produces, so development already refused it on every device, as
Unsupported(FramebufferFetch, NotImplemented) at the depth attachment, which a play cannot count
apart from framebuffer fetch's own refusals. It is now its own kind.

- error/mod.rs: Feature::MultisampledShaderDepthTest.
- lower/fragment/depth_test.rs: depth_test_form refuses with it; the module docs say why.
- docs/REFUSALS.md regenerated with its reach row (--check passes); api_signatures.tsv blessed
  (it also takes the extrapolation commit's removal of DriverWorkaround::PerspectiveReadsExtrapolated).
- Tests: engine_fragment's per-sample depth and stencil-before-depth refusals, and
  engine_fragment_imageblock's multisampled tested write, assert the new kind at the depth
  attachment.

The forms keyed on the two never-produced properties, and the window-depth varying that feeds the
computed one, go with the other never-produced vocabulary.
2026-11-20 10:36:12 -08:00
Anees Iqbal ffc3208151 Docs: delete the cites of the deleted runtime lanes
The runtime_lane tests went with the old runtime, so every cite of one
was false. Each cite is deleted outright, in the conformance cases and
probes, the engine fixtures README, the translator's precision-note and
profile docs, one engine test comment and the i915 counter's header.
Where a sentence only restated what a deleted lane held or showed (the
"what the port changes" paragraphs, the "stays a lane assertion"
sentences, the lane's own model kept "exactly as" it stated it), the
sentence is deleted; the Metal facts the cases record stay.

Two runtime claims beside the cites were false of the live runtime and
now say what it does: a command queue of 0 command buffers is
Refusal::NoCommandBuffers, and a heap texture's size is the device
image's own requirement, held by its property.

Verified: git grep runtime_lane finds nothing. Not built yet; the gate
for the whole pass follows.
2026-11-20 10:27:17 -08:00
Anees Iqbal f3b9e0253a Pull-model interpolation: a sample or offset read where the quad may have left is one typed gap on every device
The planner's ruling. interpolant_reads refused a read at a sample or an offset outside the
fragment function's first block, or after a discard in it, only on a driver with
DriverWorkaround::InterpolationNeedsTheWholeQuad, which nothing sets since the driver-fact tables
went: development lowered the shape on every device, RADV included, whose InterpolateAtSample and
InterpolateAtOffset read garbage where the quad's other invocations have left.

- lower/stage_io/plan.rs: the structural test stays as it was (Sample or Offset, past the first
  block or after a discard in it) and refuses on every device, as its own kind:
  Unsupported::not_implemented(Feature::DivergentInterpolation), so a play counts it apart from
  PullModelInterpolation's select, phi and store refusals.
- error/mod.rs: Feature::DivergentInterpolation; PullModelInterpolation's doc points at it.
- device/profile.rs: DriverWorkaround::InterpolationNeedsTheWholeQuad deleted.
- The coverage loop's rung-1 form, beside it: lower/fragment/coverage.rs read the fact nothing
  set, so development read a looping function's sample-qualified varyings inside the loop on
  every device, where the helper invocations of a partly covered quad have left. The entry now
  reads each such varying at every sample a pipeline of the device may have before the loop, on
  every device (samples_before_loop, stage_io::read_at_every_sample).
- SEMANTICS_VERSION 2205.
- docs/REFUSALS.md regenerated (scripts/refusal-surface, with the new reach row); --check passes.
- Tests:
  - rt's every_device_refuses_interpolation_where_the_quad_may_have_left (lavapipe): a sample
    read in a branch, an offset read in a branch and reads after a discard in the first block
    are refused, Unsupported(DivergentInterpolation), NotImplemented; the same reads in the first
    block, and before a later discard, are made and draw the colour.
  - engine_pull_model: pm_offset_after_discard (reads past the first block) is refused on every
    committed profile at 1 and 4 samples, before what its reads need is asked.
  - engine_coverage_loop: a looping function's sample-qualified varying is read at every sample
    by constant index from 0, a power of two of them and at least the pipeline's samples, and at
    no computed sample.
2026-11-20 09:53:17 -08:00
Anees Iqbal 23b8d08409 Conformance: no case declares shared-in-system-memory
The runtime's side announces only the codes of the precision notes its states, textures and
sampler states carry. shared-in-system-memory is not one: it was the deleted runtime's notice
for a Shared buffer on a device without unified memory. Every case that read an answer back
through a Shared buffer declared it, so the declaration held on no run.

What goes:
- the declaration in every case, and the prose and measurements that justified it;
- the allowances methods left returning nothing (the trait's default stands), and the helpers
  that only carried the declaration: replay::shared_memory_notice, fresh-contents' copy of it,
  mesh_draws::mesh_notice_allowances, buffer-tails' and buffer-textures' allowances,
  render-depth-stencil-state's pass_notices, blit-encoder-commands' NOTICES and its notices
  field, sparse-mappings' reaches_a_shared_buffer, format-footprints' shared_texture_buffers,
  and the entries of sample-positions' and visibility's notice lists;
- the SharedInSystemMemory kind, its ALL entry and its code;
- compressed-moves' prose about notices of the deleted runtime (staged-texture-copy,
  shadowed-texture);
- imports that only the removed code used;
- docs/FAST-PATHS.md's sentence on the declaration, and coverage.py's count of the helper.

The prose a removed paragraph shared with other notices is kept for those notices. Tests that
counted a case's declarations count what is left; that includes depth-resolve-pairs,
stencil-resolve-pairs and pass-attachment-pairs, whose counts the previous commit left at the
deleted kinds'. A new test, every_kind_is_a_catalogued_precision_note, holds every kind to an
entry of docs/API.md section 9; it fails on any kind no precision note announces.

Verified: cargo fmt --all. The gate runs once over this range.
2026-11-20 09:14:19 -08:00
Anees Iqbal 9a1c8fe6dc metal2vulkan-rt takes the runtime's name: metal2vulkan-runtime, published
The cutover's last mechanical step. The old runtime is deleted, so its name is free: the crate
moves to crates/metal2vulkan-runtime, its package is metal2vulkan-runtime and its library
metal2vulkan_runtime, and every reference in the tree follows (sources, tests, scripts, CI,
generated tables and docs).

It is now a published crate, as AGENTS.md said it would be once it took the name: version 0.2.0
with the other two, the translator pinned exactly (=0.2.0, as the translator pins the AIR front
end), documentation, keywords and categories, and copies of the repository's four license files,
which the published-crates test now holds equal to the root's for three crates. CI packages it
with the others. Prose that said it was unpublished, or counted two published crates, says three.

AGENTS.md: facts only. The crate table row, the published-crates and version sentences, and the
paragraph on the old runtime, whose name the runtime now carries (listed for the owner).

Made by one script run on this tip. Verified by the job
named in the landing note.
2026-11-20 09:10:02 -08:00
Anees Iqbal 7596ec76db Translator: its comments cite no deleted runtime crate or lane
The translator's comments cited the deleted runtime's files and the deleted validation lanes
(runtime_lane::*) as where a measurement or a mirror test lived, and called rt "the new runtime".
The measurements now stand as measured, and "the new runtime" says "the runtime". The crate
docs' last line names metal2vulkan-rt as the Metal-like runtime built on this API, and
scripts/api-docs no longer says the runtime uses the hidden env_vars and repro modules (nothing
outside the crate does).

Left for the translator-switch commit, which deletes what they describe: driver_facts.rs,
profile.rs, derive.rs, lockstep.rs's resident-table domains, the old render descriptor key
(compile/api.rs and its pinned test), DriverDeviation's doc in error/mod.rs, function_storage.rs,
and the Device::new notes in engine_private_render_state, engine_simd and engine_arith.

Comments only, plus the crate-root doc line and one script comment.
2026-11-20 07:59:12 -08:00
Anees Iqbal 5d725aeec7 Delete metal2vulkan-runtime, with every test and script that read it
The cutover deletes the old runtime: crates/metal2vulkan-runtime and its workspace member go.
Nothing in the workspace depends on it any more: the harness and conformance lost their old arms,
and validation dropped its dependency in its own commit.

Adapted in this commit, so no gate reads the deleted tree:
- CI and scripts/linux-gate-ci: the crate's per-feature clippy group, its `-p` in the Windows
  clippy and the test step, and its private-doc-links row go. Packaging needs no edit: the
  workspace's published crates are now metal2vulkan and metal2vulkan-air.
- The published-crates test lists those two; devtools' carried trees and the five nextest groups
  of the old crate's tests go.
- scripts/api-signatures: the crate leaves CRATES, FLOORS and the header, its self-test trees name
  rt (read by the same rules), and the table is re-blessed (the old crate's 4555 rows go);
  api_signatures.rs pins the three crates left.
- scripts/refusal-surface: the old crate's tree and its sections go (RuntimeGap, AppleOnly,
  Problem and the problem enums it forwards to), with their 87 reach rows, the `--delegations`
  verb and the test that counted the old Problem's delegations; docs/REFUSALS.md is regenerated.
  The basis check now holds rt's refusal enums alone, which it already required.
- scripts/api-cost-coverage goes: it measured only the old crate's surface.
- feature_vocabulary.rs: the old crate's two enable tables go; the Khronos and validation tables
  stay held to the vocabulary.
- The conformance coverage generator's by-hand roots read rt instead of the old crate, and
  docs/CONFORMANCE-COVERAGE.md is regenerated (MTLResourceOptions' row, which only the old crate
  modelled, gives way to rt's MTLCommandBufferError).
- scripts/matrix: the harness times the new runtime alone (`--runtime new`), so the rules that
  judged it against the old one go: the new-over-old budget with its floors (floors.tsv,
  gpu-floors.tsv), ceilings, card variance and status table (status.tsv), the frozen arm, the
  base spread and the timing once more it set off, the re-timed pairs, the five creation rounds
  and the old runtime's parked tests and records. A harness row's time is judged as a cross-GPU
  outlier, with its alone runs as before, and the frame and burst rows by their stored
  instruction counts; the creation rows run once, in their own process. docs/VALIDATION.md's
  matrix section says these rules.

Checked locally (python, no build): signatures.py --check and --selftest, refusal_surface.py
--check, --selftest and --missing-basis, coverage.py --check and --selftest, and scripts/matrix's
49 tests pass. The compile gate (fmt, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Windows
clippy for gnullvm and msvc, workspace Rustdoc, packaging, the touched crates' suites on the host
and on lavapipe) runs on this sha as potluck jobs that the landing note names.
2026-11-20 07:01:01 -08:00
Anees Iqbal ac90becd94 Conformance: the old runtime's side goes; rt's side is the only one, held to one ledger
The cutover deletes metal2vulkan-runtime, so the conformance suite stops depending on it.

What goes: the old runtime's side (runtime_side.rs, runtime_work.rs, states.rs) and its runs in
run.rs, report.rs and the command; the cost verb, the timing-coverage verb, `times`' leg of ours,
the `--rt`, `--default-policy`, `--leg`, `--call` and `--cold-shaders` flags; the four split
binaries that drove the old runtime directly; coverage.rs; and the old side's ledger,
known-gaps.tsv. The harness half of the cutover landed separately.

What stays: rt_side is the only runtime side, and `conformance replay` runs it (CI's
`replay --cpu` now replays rt on lavapipe). Its ledger, known-gaps-rt.tsv, is the one ledger, with
the rows it held; a call rt_side does not answer yet stays Failure::unavailable on it, as before.
The cases keep every allowance: the old runtime's Degradation kinds become the suite's own codes
(degradation.rs, the same `metal2vulkan-degrade-<kind>` codes), and the old runtime's Metal value
enums the cases state become the suite's own (values.rs). The old side's descriptor helpers that
rt_side and its tests used move to rt_side/fields.rs. Recordings keep their `costs` and our times
as data; `deny_unknown_fields` still reads them.

The coverage generator reads rt_side alone, and docs/CONFORMANCE-COVERAGE.md is regenerated.
The README describes the suite as it now is.

Checked: coverage.py --check and --selftest locally. The compile gate (fmt, clippy plain,
--cfg m2v_gpu, --cfg m2v_cpu_icd and for aarch64-apple-darwin, workspace Rustdoc, the suite on the
host and on lavapipe, and the lavapipe replay) runs on this sha as potluck jobs that the landing
note names.
2026-11-20 06:19:03 -08:00
Anees Iqbal a9acc24aa0 Coverage map: rows rt and the translator answer through their own calls, per-row sizes, refusals by rt's names
The fast switch to metal2vulkan-rt marked missing every runtime row whose old counterpart rt
does not hold under the same name. rt's and the translator's Rustdoc answer more of them:
- 28 runtime rows are implemented: the 9-argument texture and buffer-to-texture copies and the
  options form with no option, `enqueue`, `commandBufferWithUnretainedReferences` (the same call
  as `commandBuffer`), every `withRange:` setter of both encoders (a loop of the single setter),
  `useResources:count:usage:` and `useHeaps:count:`, both encoders' memory barriers,
  `newBufferWithBytesNoCopy` (Device::import_host_memory and a buffer in its block),
  `MTLCreateSystemDefaultDevice` (Device::new), `MTLCopyAllDevices`
  (Instance::physical_devices), a texture's `storageMode` through its descriptor, and
  `renderPassDescriptor` (RenderPassDescriptor's Default);
- 23 translator rows are implemented: MTLLibrary and MTLFunction by the translator's Library
  and Function (from_metallib, function, functions, library_type, install_name, properties,
  function_constants_dictionary, reflection), and MTLFunctionDescriptor by FunctionDescriptor;
- maxBufferLength and a texture descriptor's resourceOptions are the consumer's;
- 53 missing rows take their own size and note: encoder calls (S for loops of existing calls and
  store action options, M for stride binds and indirect draws, L for vertex amplification),
  render pass fields, a texture buffer's descriptor and alignment, function options;
- refusals are named by rt's types: Gap::IndirectCommandBuffers, Gap::KernelInput and
  Gap::DrawInput for function tables, RenderPipelineKind::VertexAmplification and Tessellation,
  RenderPassKind::TextureType and NoAttachment, Gap::TextureBuffer;
- 629 notes no longer name the old runtime's items (RuntimeGap's variants, FeatureRow's rows,
  its compiled_reflection, function_handle, allocated_size, new_library_with_source and
  BlitOption).
coverage.py's group names follow (buffers, encoder calls, command buffer options, function
options). docs/METAL-COVERAGE.md and docs/CONFORMANCE-COVERAGE.md regenerated: implemented
593, missing 1118, out of scope 424.

Verified: every implemented row resolves by the test's own rules in its crate's sources (a
script run of them: runtime 237, translator 356, none missing); every `Type::name` a note names
is held by rt or the translator (14 checked; the same check over the table before this commit
finds 26 it does not hold). The compile job is named in the hand-off.
2026-11-20 06:02:37 -08:00
Anees Iqbal 8871d40bdf Validation: delete the old runtime's lane, parity harness, player backend and old-only tools
The old runtime goes at the cutover, and validation's old-runtime-only parts go with it:

- runtime_lane/ (the old runtime's device tests) and the Metal predication probe that pinned
  its streams. Its one rt-based module, the replay player's rt device tests, moves to
  replay/rt_replay.rs with its three old-runtime comparisons cut (the census test on both
  runtimes goes; its rt half is its own test) and a pipeline cache directory of its own in the
  scratch root.
- parity/ (Metal programs compared with the old runtime alone) and its Metal records under
  corpus/observations/parity.
- The player's old backend (replay/old_runtime): command-replay always plays on the new runtime,
  and `--runtime` is gone.
- corpus-draw-ab and format-scout (old-runtime-only tools), scripts/making-bench (corpus-draw-ab's
  bench), and the eleven public fixtures only the deleted sources used.
- The nextest overrides of runtime_lane tests, the queue-plan test group and the few-channels
  profile; the matrix's device-test filter now names replay::rt_replay.
- VALIDATION.md, REPLAY-STREAM.md and validation's README lose the lines of what went.

The candidate executor's runtime path, and validation's dependency on metal2vulkan-runtime, go in
the next commit.
2026-11-20 05:42:33 -08:00
Anees Iqbal 220473aafd Coverage map: the runtime's counterparts are metal2vulkan-rt's, and the test reads rt's sources
The old runtime is being deleted, and the coverage map's 649 runtime rows named its items. Every
runtime row now names metal2vulkan-rt's counterpart or none:
- 180 rows whose counterpart rt holds under the same name keep it;
- 29 take rt's name for it: DeviceProperties fields that are Device methods, the heap placements
  that are Device::new_heap_buffer and Device::new_heap_texture, the lod-clamp and stencil
  setters, the dispatch type taken by CommandBuffer::compute_command_encoder, and a texture's
  getters through Texture::descriptor;
- 73 are out of scope as rt's README gives them to its consumer: labels, MTLHeap and its
  descriptor, MTLBinaryArchive and every descriptor's binaryArchives, a resource's options, a
  texture's parent and shareable getters, a library's and a function's device;
- 367 are missing, each with a group, a size and a note: indirect command buffers (71), function
  tables, handles and dynamic libraries (38), mesh (33) and tile (26) pipelines and their calls,
  encoder calls (59), argument encoders (24), libraries and functions as runtime objects (25),
  and smaller groups. Their sizes are the group's, to be refined.

coverage.py names metal2vulkan-rt as the runtime and gains the new groups;
metal_coverage.rs reads crates/metal2vulkan-rt/src. docs/METAL-COVERAGE.md and
docs/CONFORMANCE-COVERAGE.md regenerated from the table (implemented 542, missing 1171, out of
scope 422).

Verified: every implemented runtime row resolves in rt's sources by the test's own rules (a
script run of them over the tree: 209 of 209); the compile job is named in the hand-off.
2026-11-20 05:28:07 -08:00
Anees Iqbal 54bf558a74 matrix: the batched harness job tidies as the node's last planned job; a once-more timing lays out again
Follow-up to ef5b888c2f: its unit test expected the batched harness job not to tidy, but it is the
node's last planned job, and the once-more timing is decided only after it. The once-more job lays
the tree out again (potluck pushes the carry's mirror again for its dispatch) and tidies as well.
The docstring says so and the test expects it. Verified: scripts/matrix tests in a potluck job.
2026-11-19 22:39:16 -08:00
Anees Iqbal ef5b888c2f matrix: a node's harness timings in one exclusive job, and its re-times in one more
What: gpu_node times all of a node's GPU legs in ONE job that holds the node alone (--exclusive),
the legs in turn, each still timing its one GPU with nothing else running; the legs whose old
runtime spread past results.BASE_SPREAD are timed once more together in one more such job. retime
does the same for a Linux node's outlier legs (a Windows node's leg stays its own job). A job's
timeout is its leg count times one leg's: size() keeps a run's minutes per leg.

Why: the supervisor measured homelab GPU jobs waiting 8.6 job-hours an hour from 20:15 to 22:30,
29% of it behind exclusive runs (5% before). The matrix round at 1ae9003019 took 10 exclusive runs
of 2-6 min (ms01 3, um870 2, gem10 2, um790 2, the mini 1), and each drained its node first. One
exclusive job per node per round drains each node once.

Verified: scripts/matrix/test_matrix.py in a potluck job (see the landing note).
2026-11-19 22:38:30 -08:00
Anees Iqbal 6e010b843f rt lock budget: a test that counts nothing says so, and the matrix shows its leg as not counted
A lock-budget test on a node that names no M2V_LOCK_EVENT returned early and passed, printing a
LOCKS-UNMEASURED line the matrix's filter dropped with the rest of a passing test's output. The
gem10 and um870 legs passed that way at 1ae9003019 while every leg that counted failed, and the
report could not tell them apart.

Each budget test now names its record (Locks::open takes its key) and prints, where it counts
nothing, 'LOCKS <test>: not counted, the node names no M2V_LOCK_EVENT' and
'M2V-MATRIX uncounted lock_budget/<key>'. The matrix keeps that line as it keeps a record
(KEEP matches 'M2V-MATRIX '), results.parse_suite collects it, leg_entry stores the leg's keys
(results.leg_uncounted), and the leg's verdict line ends in 'not counted: <keys>'. No node
setting changes.

Verified: scripts/matrix's unittest suite, 87 tests, OK locally, with the new
UncountedTests case (a passing test's line through matrix.KEEP, parse_job and verdict_line).
2026-11-19 21:12:49 -08:00
Anees Iqbal 09eefd5be8 matrix: an argument the usage does not name prints the usage and starts no run
`scripts/matrix/matrix run --help` took --help as an option it ignored and started a full run at
development's tip (stopped by hand after two minutes, before it dispatched anything). main() now
walks its arguments: run takes one SHA, --legs LEG,... and --dry-run; show takes one SHA; anything
else (--help, -h, a misspelt option, a second SHA, --legs without its list) prints the usage and
exits before git or a run is touched.

Test: ArgumentTests in test_matrix.py; the first test calls run_cmd under the old main().
2026-11-19 19:33:11 -08:00
Anees Iqbal a69cb43486 translator: threadgroup memory reads zero until the program writes it, on Device::from_queries
On the new runtime's profile every Workgroup variable that holds a
function's threadgroup memory has a null initializer: the threadgroup
arena (declared threadgroup variables, [[threadgroup(n)]] regions and the
imageblock, memory::arena) and the typed threadgroup objects
(lower::access::local). One form on every device: the Vulkan 1.3 floor
requires shaderZeroInitializeWorkgroupMemory; a profile without it
refuses such a function, Unsupported{ZeroedThreadgroupMemory}.
Device::new's profile is unchanged (ProfileFacts::ROWS keeps
ThreadgroupStart::Unwritten), so the old runtime's SPIR-V is too.

The translator's own Workgroup words get none, as it writes each before
any read: the emulated SIMD-group scratch and vote word, the object
stage's mesh grid, the mesh wrapper's count and staged indices, the
emulated payload and the binder's scan and merge kernels.

The builder refused a null of an array whose length is a specialization
operation (spirv/ir/constant.rs, ConstRule::NullType); an arena with
regions, and the emulated scratch, have such lengths. spirv-val's
IsTypeNullable reads an array's element type alone, so the builder now
takes it. That refusal is what made rt report a probe's emulated variant
as missing (Gap::PartialSimdgroups after Later::lower's Refused).

The profile verifier also refuses a Workgroup initializer other than a
null (VUID-StandaloneSpirv-OpVariable-04734).

docs/API.md states the form with Metal's words on threadgroup memory;
SEMANTICS_VERSION 2192; REFUSALS.md and api_signatures regenerated.

Tests: engine_zeroed_threadgroup (null initializers through from_queries
on four profiles, zeros on the interpreter in both orders and two
threadgroups, the emulated variant's arena zeroed and scratch not,
Device::new uninitialized, the vk12 floor refused),
a_specialization_sized_array_has_a_null, a_workgroup_initializer_is_only_a_null,
the profile facts' fingerprint.
2026-11-19 13:52:35 -08:00