Commit Graph
140 Commits
Author SHA1 Message Date
Anees Iqbal 8006d54fbb Runtime tests: six more Managed-form tests run in both forms
The tests of upload, import, spill, sites, gpu_span and resolve that read a Managed buffer's form
(Device::has_unified_memory, or a Managed buffer they make) ran each device in its own form only,
so lavapipe and the integrated cards never took their two-copy arm. Each now runs through
tests::command::on_device::each_device_in_both_forms, which runs a one-copy device once more
through the two-copy view:

- upload: every_device_counts_and_times_its_own_command_buffers
- import: every_device_releases_an_import_under_a_managed_buffer_dropped_before_any_commit
- spill: every_device_spills_private_memory_out_of_device_memory
- gpu_span: every_device_leaves_a_copy_in_out_of_the_gpu_span_it_goes_ahead_of
- resolve: every_device_resolves_a_loaded_pass_into_a_shader_read_texture_over_a_buffer
- sites: every_device_counts_each_allocation_site_apart, through the new
  each_device_in_both_forms_with, which opens both runs with the test's own options
  (MakerTest::Fail here); each_device_in_both_forms is it with the default options.

docs/VALIDATION.md names the six modules among those that run both forms. Test-only: no product
source changes. Verification (lavapipe two-copy runs counted per test, lint) is in the landing
line.
2026-11-26 16:59:51 -08:00
Anees Iqbal 0cd1618247 Runtime tests: the two-copy view runs a Managed buffer's device-copy form on one-copy devices
No device in CI kept a device copy of a Managed buffer: lavapipe is a CPU device, so
Core::unified_memory() (rule 2's unified-memory form, decided by Vulkan's device type alone) is
true there, and every device test of the two-copy form returned at its unified-memory check or
took the one-copy arm. every_device_synchronizes_a_texture_over_a_managed_buffer passed vacuously
on lavapipe while the runtime recorded nothing for that synchronize on discrete cards (fixed in
d0f117f2a8). The integrated lab cards take the same one-copy arm.

DeviceOptions gains a test-only field beside `memory`, under the same
cfg(all(test, any(m2v_gpu, m2v_cpu_icd))): `two_copies`. Device::open reads it, under that gate
alone, where it decides `unified_memory`: where true the device keeps a device copy of every
Managed buffer whatever its device type, and Device::has_unified_memory answers false, as on a
discrete GPU; its Vulkan device, memory types and every other answer are its own. No product
build carries the field or its read, and tests/one_path.rs is untouched.

tests::command::on_device::each_device_in_both_forms runs `body` on each device in its own form
and, where the device keeps one copy, once more through the view (the run's name ends in
", two copies"). The tests a Managed buffer's form decides take it: those of tests::managed that
make a Managed buffer (not the two Managed-texture tests, nor the Shared variant of the
two-queue read), the three of tests::copy_over that read the form, two of tests::blit
(buffer-to-buffer, synchronize of a Managed buffer) and tests::over's texture held in place. So
the plain m2v_cpu_icd and m2v_gpu suites run the two-copy form on lavapipe and on the integrated
cards; a discrete card runs as before. docs/VALIDATION.md says so.

Verification: the jobs on lavapipe (the synchronize test failing with blit.rs and texture.rs at
e9f09c9a92 and passing here, and the device suite), the RTX 5080 and the Radeon 780M follow in the
lane's report.
2026-11-26 16:59:51 -08:00
Anees Iqbal f6aa8dbdf1 Runtime: a dma-buf import is refused where the Shared type is not host-coherent
What: the dma-buf rule (import.rs, dma_buf_type) now takes the device's Shared
coherence, keyed by the query that already decides it (the Shared type's
HOST_COHERENT flag; the device holds a coherence state exactly where it lacks
it). On a device that holds one, every dma-buf is refused with the new
Limit::ImportCoherence { handle }, whatever the fd's query offers, before any
allocation: Device::import_dma_buf and Device::import_dma_bufs (each fd's rule;
the sparse buffer is destroyed, as for Limit::ImportType). Basis: device. The
pointer import (import_host_memory) is unchanged, so the consumer's fallback
imports those pages by pointer. No new route: the refusal sits inside the
existing rule.

Why: on a Meteor Lake GPU under Mesa's Intel driver and the i915 kernel driver
(no LLC), the fd's query offers type 0 (device-local, host-visible,
host-coherent, write-combined) first, so the rule took the import, and the
runtime never flushes an import because its type is host-coherent. That flag
speaks only for mappings Vulkan makes; the consumer writes the pages through
its own cached mapping. In Linux v7.3, i915_gem_prime_import
(drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c:281-337) makes the object with
i915_gem_object_alloc (kmem_cache_zalloc, gem/i915_gem_object.c) and never calls
i915_gem_object_set_cache_coherency, so pat_index 0 and cache_coherent 0; the
only CPU-cache work is one wbinvd_on_all_cpus at get_pages where !HAS_LLC &&
!IS_DG1 (i915_gem_dmabuf.c:249-261, whose comment says only DG1 "still snoops
transactions even with CACHE_NONE"); on MTL PAT 0 is WB with no coherency. So
the GPU reads DRAM without the guest's lines still in the CPU cache: text and
images missing. The pointer import (userptr, I915_CACHE_LLC, PAT 3) snoops.
No Vulkan query says whether a driver's GPU mapping of a foreign dma-buf sees
the CPU's caches, so the Shared type's flag is a proxy that errs to the safe
side: where it refuses, the pointer route is coherent by its type's flag.

Docs: import.rs's header and both dma-buf calls' doc comments; coherence.rs on
imports; the runtime README's Shared memory's coherence ("Imported blocks take
no call"), Imported blocks (the rule, the proxy and its limit) and its known
gaps; docs/VALIDATION.md on the shared view; docs/REFUSALS.md regenerated; the
api_signatures table blessed (one variant added).

Tests: a_dma_buf_is_refused_where_the_shared_type_is_not_host_coherent (pure,
over Meteor Lake's i915 type list and the Iris Xe's);
every_device_under_the_view_refuses_a_dma_buf_and_imports_host_memory (device,
through the refused device's view); the existing dma-buf device tests take the
new refusal. Verified at this commit: cargo fmt only; the build, the pure
tests and the device run are in the jobs the lane reports.
2026-11-26 11:51:26 -08:00
Anees Iqbal 6db36df158 Tests: the refused device's memory view has three doors, and a device opens through it only by the floor's choice
What: cached_types_incoherent moves from tests/mod.rs into tests::command::on_device and is no
longer crate-visible. The tests reach it through three doors alone:
- each_device_under_the_view, the one way a test opens a device through the view; the floor's
  choice over the viewed types decides the arm, and a refused make is asserted and printed;
- viewed, which returns a device's memory properties read through the view (the coherence test's
  read of the types a device under m2v_shared_view reads); it takes and returns a value, so it is
  no DeviceOptions::memory;
- suite_view, compiled only under m2v_shared_view, the suite-wide hook in Device::new that gives
  every device the view where the test gives none.
The doc mentions of the old path (coherence.rs, floor.rs, the settle test, docs/VALIDATION.md)
name the new one.

Why: the planner's ask after the second red of this class today. kkview (cb3d913139) fixed two
view tests that opened KosmicKrisp through the view raw, and the settle test (f78d45b9e0) was a
third, landed beside that fix. With the view private, a new test cannot pass it to
DeviceOptions::memory in the device cfgs; it has to take each_device_under_the_view. The
m2v_shared_view hook stays a door of its own because that cfg runs the whole unchanged suite
through the view on cards the floor opens under it (docs/VALIDATION.md), which no per-test helper
gives. Test only; the runtime does not change.
2026-11-25 16:54:02 -08:00
Anees Iqbal e6df09cddd Docs: under m2v_shared_view a card that offers imports only cached types refuses every import
What: VALIDATION.md's m2v_shared_view entry gains the planner's sentence: under the view a card
whose host-pointer and dma-buf queries offer only its cached types refuses every import; run it
with the import families filtered.

Why: on the RX 7900 XTX (RADV) the host-pointer query offers type 5 alone (0x20) and the dma-buf
query types 5 and 10 (0x420); the view leaves neither coherent, so import.rs's rules refuse
every import there: 17 tests of the view's suite failed on that alone (job m3-max-73943). The
planner's ruling keeps the view and import.rs unchanged and filters those tests in the leg's
command line.

Verified: docs only.
2026-11-25 14:24:29 -08:00
Anees Iqbal 6c1eb0e77c Runtime tests: m2v_shared_view runs the device suite through the refused device's view
What: a test-only cfg, m2v_shared_view, declared in metal2vulkan-runtime's check-cfg list beside
m2v_gpu_hazards and added to docs/VALIDATION.md's cfg table. Under it, Device::open gives every
device the tests make with no memory view of its own the refused device's view through the
landed seam: options.memory.or(Some(crate::tests::cached_types_incoherent)), which takes
HOST_COHERENT from every host-visible, host-coherent, host-cached type. A test that sets its own
view keeps it. The existing device suite then runs, unchanged, with Shared in a cached type that
reads not coherent, so it runs Shared memory's flushes and invalidates on memory that is coherent
in fact, which Vulkan allows. tests::coherence's every-device test asserts, under the cfg, that
every device builds the coherence state, and prints the Shared type and the calls.

Why: the planner's condition for A-narrow's proof on lab cards, which have no cached type that is
not coherent: a test that sets the option, no second suite, no env var.

Verified: not yet run (cargo fmt only).
2026-11-25 14:24:29 -08:00
Anees Iqbal db3a88526b Validation: the stencil rule's Counting clause has nothing to read in the case schema
The runtime's BitDraws rule refuses a draw through a [[stencil]] output drawn by bits in two
places: a face whose compare is other than Always and Never (DrawDepthStencil::
stencil_reference_face reads it), and, where the state replaces a stencil bit, a draw inside a
Counting visibility result's segment. The second needs a visibility result mode, and the case
schema has no way to state one:

- crates/metal2vulkan-validation/src/case.rs:19-21, AuthoredCase: #[serde(deny_unknown_fields)],
  and none of its fields is a visibility result mode, offset or buffer;
- src/case.rs:1819-1821, Draw (primitive, vertex_start, vertex_count, instance_count,
  index_buffer, base_vertex, base_instance): deny_unknown_fields, no visibility field;
- src/case.rs:1388-1390, DepthStencilResource, and src/case.rs:1406-1408,
  DepthStencilStateLiteral: deny_unknown_fields, no visibility field;
- neither executor sets a mode or gives its pass a visibility result buffer: no "visibility" in
  src/metal/ or src/candidate/ (grep -rni visibility), and runtime_render.rs's Targets::pass
  (line 661) builds the pass from its attachments, array length and default size alone.

A manifest naming such a field is refused at parse, so no case's draw is in a segment and the
classifier carries no clause for it. When the schema grows a visibility result mode, the clause
belongs beside the compare rule, with its own classification test. The doc comment of
stencil_reference_face and docs/VALIDATION.md now say this instead of "a case sets no mode".

Verified at this commit: cargo fmt; doc comment and docs only, no code changed.
2026-11-25 13:24:41 -08:00
Anees Iqbal 5517e2df1b Validation: a stencil output whose test it decides needs VK_EXT_shader_stencil_export on a device without it
What: the engine's render route through the runtime now reads, from the case's own structure, the
draws the runtime refuses on a device without VK_EXT_shader_stencil_export, and records them as the
device's refusal (NotSupported::NotEnabled, not_supported{not_enabled}, class device) naming the
extension, the face and its compare function, instead of drawing them and failing on the runtime's
Gap::Draw { kind: StencilOutput }.

- RenderCase::stencil_output: the case's own fragment function writes a live [[stencil]] output,
  read from its AIR outputs' roles (executor_contract::depth_stencil_test), false for a vertex case.
- DrawDepthStencil::stencil_reference_face (executor_contract/depth_stencil.rs): the first face
  whose stencil test the output decides. It is the runtime's rule, depth_stencil::BitDraws::of, on
  the same Vulkan state (metal::state::depth_stencil_state of the same descriptor): None where the
  stencil test is off; otherwise a face whose compare op is other than ALWAYS and NEVER, whatever
  its operations and masks (BitDraws::of returns None before it reads the replaced bits).
- runtime_render::run: once the state is made, a case with a stencil output, on a device whose
  translator profile lacks fragment.stencil_export (the bit the translator chose the bit-draws form
  by), under a state with such a face, is NotEnabled. After the make, so the product's own refusals
  at creation (a colour beside the output: StencilExport) keep their records.

The runtime's second refusal, a draw that replaces a bit inside a Counting visibility segment,
meets no authored case: the case schema and the executor set no visibility result mode, so no
draw is in a segment. The doc comment and docs/VALIDATION.md say so.

Why this form and not the runtime limit: a ToolingRequirement with Limit::Runtime stops the engine
on every device, and lavapipe, RADV and ANV list the extension and run and match these cases. The
refusal holds only on a device without the extension, which is what a device's NotEnabled records.
Before the stencil form (5a722b5c3f) such a case was the device's refusal on NVIDIA too, through the
translator's StencilExport. Round 733b14ed24's RTX 3090 public leg failed 14 such cases
(stencil-output-reference-* and stencil-output-at-*-rate-*: "the runtime refused a case its
structure classifies as one it runs (Draw { kind: StencilOutput })").

Versions: none move. The authoring-capability census classifies by ToolingRequirement, which this
does not touch, so no census or index version. ENGINE_EXECUTOR_ABI stays: on a device with the
extension nothing changes, and on one without it every case this refuses failed at the base with
no row and no refusal recorded, so no recorded row observes the change (engine.rs's rule for a
bump).

Tests: runtime_render's a_stencil_output_needs_the_extension_where_it_decides_its_test, on the
committed profiles nvidia-rtx5080-laptop (no extension) and gate-lavapipe (the extension): every
pair of the eight compare functions on the two faces under Keep and Replace, 120 refused naming
the face and its function, the 8 of Always and Never drawn; a function with no stencil output and
a device with the extension draw every state. The graphics mapping tests assert stencil_output for
fragment_depth_stencil and its absence for fragment_varying_color. Without this change the case
reaches the runtime's draw and fails, as on the 3090.

Verified at this commit: cargo fmt only. The jobs that check it (the validation suite, the 3090
public leg, lavapipe's public leg) report to the orchestrator.
2026-11-25 13:24:41 -08:00
Anees Iqbal d16eb39e8f Tests: METAL2VULKAN_TEST_UNVALIDATED=1 runs rt's device tests without the validation layer, and says so
Every rt device test opens its instance through tests/validation.rs instance(), which fails
unless each device lists an active VK_LAYER_KHRONOS_validation. A Windows machine whose only
Vulkan pieces are its GPU driver and the loader it ships therefore cannot run the device suite at
all, and a machine of that kind is the only place some drivers are ever covered (AMD's
proprietary Windows driver: the lab has no AMD card under Windows).

The setting is test-only and off unless its value is 1; product code and the lab's runs, which
never set it, are unchanged. Under it, instance() enables nothing and checks the opposite: every
device lists no validation tool, so a run that says it is unvalidated is. No layer writes a log,
so the guard checks none. Each test process writes "M2V-UNVALIDATED unvalidated run: ..." once to
its standard error, past libtest's capture of a passing test's output, so the run's output says
it whatever passes. The test of the layer's log itself
(every_device_logs_a_deliberately_invalid_call_once) skips: without the layer its call is only
invalid.

The new device test the_setting_runs_the_device_tests_without_the_layer_and_says_so runs the
test binary's unvalidated_child in a process of its own under the setting, with VK_INSTANCE_LAYERS
and VK_LOADER_LAYERS_ENABLE removed, and requires it to pass and to print the line. Without this
change the child opens a validated instance (the layer is on VK_LAYER_PATH in every lab job) and
prints no such line, so the test fails; on a machine without the layer the child fails outright.

Docs: the setting in tests/validation.rs's module doc, docs/VALIDATION.md (the layer section),
CONTRIBUTING.md, and env_vars.rs's module doc, which now says the test suites' own
METAL2VULKAN_TEST_* variables are not in REGISTRY.
2026-11-23 20:27:07 -08:00
Anees Iqbal 58148264f8 Conformance: compute-imageblock-sizes, one encoder's dispatches before any imageblock size and at two it sets
A compute step for setImageblockWidth:height: on both sides, and a case that runs
a4_imageblock_extent three times in one encoder: before the encoder sets a size (one
thread, Metal's 1 by 1), then at 4 by 2 and at 4 by 4, each one threadgroup of the
imageblock's extent, into a guarded slot each. The case's test holds Metal's recorded
answer equal to the fixture's own at each extent.

The runtime README states the size as a specialization: each size a kernel runs at is
one VkPipeline made at prepare_dispatch or at the dispatch, a first-use wait, where Metal
changes the size with no compile (m3-max-69983); prepare_dispatch and dispatch_variant
take the size. REPLAY-STREAM and VALIDATION say the player and the engine candidate set
it; the ledger row for the state's imageblock length drops the dispatch refusal.

The recording follows in its own commit (taken on the M3).
2026-11-23 00:09:50 -08:00
Anees Iqbal 28e2b0e6ca Validation: a kernel case's visible-function tables run through the runtime
The runtime candidate makes each table the case binds of the pipeline
state (newVisibleFunctionTableWithDescriptor: of its size, each authored
entry set to the handle of its linked function made with the case's
constants, as the Metal oracle sets it) and binds it at its buffer index.
ToolingRequirement::KernelFunctionTable, which held such cases to Metal
alone, is retired; a render stage's table stays the runtime's limit
(RenderFunctionTable). ENGINE_EXECUTOR_ABI does not move: no recorded row
ran a kernel table case (they were refused).

The runtime README states the device answer, the encoder's bind, the
state's handles and tables, and the known gaps (a table's 64 KiB block, a
consumer-compiled kernel's handles, an argument buffer's table). The
coverage table marks the compute items implemented; METAL-COVERAGE.md and
CONFORMANCE-COVERAGE.md are regenerated. Adds the owned linked module
visible_table_ops.metal, whose companions scripts/regen-air-fixtures
writes on the Mac.

Verified: the lane's jobs.
2026-11-22 22:11:29 -08:00
Anees Iqbal a7dd2e846e Translator: the binder's plan goes, with everything only it reaches, and the TexelRows and YCbCrInPlace forms
The runtime never made a plan (it binds each draw and dispatch by the pipeline's interface), and
since the census digests each pipeline's content alone (two commits back) nothing in the tree calls
one. What only the plan reached goes with it:

- bind: BindState, BindShape and their shapes, BindingPlan and its instantiation
  (DispatchCommands, DrawCommands, push, descriptor and root-table templates and writes),
  plan.rs and plan/ (compute, resources, slots), instantiate.rs, resident.rs, the neutral
  resources' plan side, the heap's member planning and table bytes, the mesh arguments pass
  (MeshArguments, MeshArgumentsForm, fold_object_grid, metal_object_grid), ExecutionStatus and
  StatusBits as public items, TextureShape::Buffer, IndirectRef with the four indirect call
  variants (Dispatch::ThreadgroupsIndirect, DrawCall::Indirect, PatchesIndirect,
  MeshThreadgroupsIndirect) and IndexBufferRef::fetch_end. Dispatch, DrawCall and IndexBufferRef
  stay: validation states its cases' calls with them.
- error::BindError leaves the public surface; a crate-private BindError of three variants stays
  as the error of the heap's view derivation, which lower::texture::slot's storage-read check
  reads (bind::heap::tier_read_gaps). That check keeps only the storage view's format: the
  sampled-view branch and ImageViewDesc were reached by the plan alone.
- vk::DrawCommand, the plan's draw output.
- pipeline: ComputePipeline::plan, RenderPipeline::plan; cache: VariantKey::covers and
  large_buffer_form.
- The TexelRows form (bind::texel_rows, LoweringInputs::texel_rows, RuntimeFact and PushField
  TexelRows) and the YCbCrInPlace form (bind::ycbcr_in_place, lower/sampler/in_place.rs,
  LoweringInputs::ycbcr_in_place and ycbcr_planes_sampled, RuntimeFact and PushField
  YCbCrInPlace, PrecisionNote FloatSampleFilter and HalfSampleFilter, Routine::Quad). Only the
  binder set those inputs.
- The tests of the deleted items, and the plan halves of mixed tests. Of 6810 tests (`#[test]`
  functions in the workspace) 309 leave and 11 come in their place: the lowering halves of mixed
  tests, kept without the plan (the heap layout, the stage-in stride and region facts, the
  emulated-simdgroup and bicubic facts, the iris-xe storage classes), and the kept tests of the two
  renamed files. 50 others are edited to drop a plan half or a deleted item (the api_surface round
  trips; the simd_emulated, extended-range, recursion, dynamic-root, handles, heap-storage-read
  and mesh lowering cases). 6512 remain. engine_graphics_binder.rs and engine_heap_binder.rs keep
  one and two tests and are renamed engine_unattached_colors.rs and engine_heap_groups.rs.
- The runtime guard test's list of files the runtime inputs reach without being inputs drops the
  seven no input reaches since the cut: cache/digest.rs, lower/simd/divergent.rs,
  lower/simd/workgroup.rs, pipeline/artifact.rs, pipeline/layout.rs, pipeline/stage_io.rs and
  pipeline/vertex.rs; three of its reasons that named the plan or the binder say what reaches the file now.

559 public items leave (api_signatures.tsv: 55 structs, 26 enums, 140 variants, 245 fields,
52 methods, 24 associated constants, 7 constants, 5 functions, 5 impls). Consumer search, the
consumer's development at 92ffbed817, `git grep -w NAME` of each of the 112 removed names: 0 hits
for 105; the others are the consumer's own items: TessellationFactors 4 (its
Bound::TessellationFactors), YCbCrMatrix 3 (its own string and doc), texel_rows 2 (its own fn),
ThreadgroupsIndirect 6 (its own Dispatch enums and rt::Dispatch::Indirect), DrawIndexed 1 (a doc
naming MTLIndirectCommandType values), covers 109 and plan 105 (generic words; the `.covers(`
calls are its Extent's, the `.plan(` calls its video encoder's rate.plan). Its one import of
metal2vulkan::bind is the argument-buffer layout types, which stay.

The forms' audit. A texture over a buffer: the runtime's
tests::over::every_device_holds_a_texture_over_a_buffer_in_place. A two-plane YCbCr sample: no
runtime test; the runtime makes no texture of a two-plane YCbCr format (Gap::TextureFormat, the
runtime README's "A format is made where the translator's format table maps it" row), the
conformance cases ycbcr_gathers and ycbcr_textures record Metal's answers, and
known-gaps-rt.tsv lists the runtime's refusals (ycbcr-gathers-*, ycbcr-texel-reads-420v).

Versions:
- RUNTIME_VERSION 2550: it covers plan instantiation and the binder's run-time data. Nothing calls
  those since step 2: the runtime never used the binder, and the own-context executor is gone. A
  run of an unchanged artifact does nothing different, so the guard hash (runtime-sources.sha256)
  moves alone, and the RUNTIME_VERSION doc is rewritten to name what it still covers.
- SEMANTICS_VERSION 2273: no output changes for any input that still exists. The TexelRows and
  YCbCrInPlace forms, their facts, push fields and the two notes were reachable only through
  LoweringInputs::ycbcr_in_place, ycbcr_planes_sampled and texel_rows. Only the binder set those;
  the runtime sets none. The function key appended each of them only when set, so every surviving
  key hashes the same bytes. Two type declarations stay where they were, so module words do not
  move: bool in the bicubic types, uvec4 in the bicubic routines. Byte-identical modules are
  expected, not verified here; the 252-row hash probe is the check.
- ARTIFACT_FORMAT_VERSION 591: the codec tags enum variants by name. The removed RuntimeFact,
  PushField and PrecisionNote variants leave their tags unused, which cache/mod.rs's rule says
  needs no bump: an old entry holding one fails to decode, which is a miss. No codec_struct field
  is removed. That is why SamplerDesc.ycbcr stays.

The guard hash (crates/metal2vulkan-validation/runtime-sources.sha256) moves for the bind/
sources this deletes and edits and for vk/draw.rs, which leaves its list. No run of an unchanged
artifact changes: what stays in bind/ computes what it did (the heap's tier check takes the same
storage format; its removed sampled branch had no caller).

Docs: docs/API.md (section 5 is the interface; the binding and plan sections go), README.md,
docs/ARCHITECTURE.md, docs/HOWTO.md, docs/VALIDATION.md, the runtime README's DrawInput and
identity-domain rows, docs/REFUSALS.md (regenerated; the binder's section goes),
api_reference.md, api_signatures.tsv (blessed: removals only), tests/api_surface.rs, the
signatures floor (5000), the bind modules' own docs, and the public field docs of PushField,
RuntimeFact and SpecKey that named BindState, BindShape or BindingPlan. AGENTS.md: the project
table names pipelines and their interfaces, not binding plans; its "core lives in" line stays
true (bind/ still holds what the lowering reads).

Verified on 31692939d4, this commit's tree (steelbrain/cutbinder-probe-6): job m3-max-68107,
fmt, signatures, refusal surface, clippy -D warnings (workspace plain, --cfg m2v_gpu,
--cfg m2v_cpu_icd; the translator with no feature and with each alone; the AIR crate alone),
workspace Rustdoc -D warnings, each crate's private intra-doc links at 0, api-docs; job
m3-max-68109, the product, validation and conformance suites, doctests, and on lavapipe the
validation and runtime suites under --cfg m2v_cpu_icd, the conformance replay and the public
cases' qualification.
2026-11-22 10:15:34 -08:00
Anees Iqbal cd5d336782 Validation: the own-context executor goes; a case runs through the runtime or is refused before it runs
After the profiles layer moved onto the runtime route, kernel rows went through the runtime, and the
layered cases moved too, nothing called validation's own Vulkan executor. This deletes it:
candidate/platform's compute, render (and its multisampled half), plan_resources, buffers and
multisample modules, the own-context device's clamped-layer, extended-dynamic-state, restriction
and environment machinery, the engine's compile_case / compile_render(_case) / compute_request
plumbing, the bind refusal and status verdict it read, the synthetic guest addresses, the attempt's
creation ceiling, and coverage's module census of its own compiles. corpus-pipeline's Vulkan
context for its render rows, and the runtime probe's, stay.

A render case the runtime route does not draw (a depth/stencil attachment of both aspects, a patch
draw through a patch or control-point index buffer, an out-of-bounds target other than an attribute
buffer) is refused not_supported{executor_not_implemented} before it runs, as run_prepared already
did once the gates were gone. The comments and docs/VALIDATION.md that compared with the own
context now say what the runtime route does.

Test-only items move beside their tests: Mechanism's label into the out-of-bounds tests,
Containment::of_compile, its label, Declared and ExecutionClass::of_description into the tier
table. The linked-functions integration test compiles through kernel_request, as the census does.

Deleted tests and what covers their Metal claim:
- a_kernel_runs_with_its_linked_visible_functions: a_kernel_runs_through_the_runtime_with_its_
  linked_visible_functions (engine_compute.rs), kept.
- a_draw_restarts_exactly_its_strips_within_its_class: the conformance case
  primitive_type_crossings compares strip restart with Metal.
- a_combined_depth_stencil_format_moves_both_aspects_together, a_draw_covers_the_whole_target,
  a_guarded_buffer_counts_each_changed_guard_byte, a_target_is_bound_for_its_fetch_form,
  every_state_a_render_pipeline_makes_dynamic_is_recorded,
  multisample_initializers_are_vulkan_legal_for_each_component_class,
  addressed_allocations_take_metal_addresses, the_status_starts_zero_and_stops_non_evidence,
  the_clamped_layer_warning_fails_no_row_of_a_clamped_store_alone,
  a_context_has_the_extended_dynamic_states_where_the_product_reads_them,
  a_store_runs_through_the_binder_under_the_validation_layer,
  a_tessellation_pipeline_census_is_its_functions: the deleted executor's own mechanics, no Metal
  answer of their own.

metal2vulkan-validation is not published, so no consumer can reach a deleted item:
git grep -n -E 'metal2vulkan[-_]validation' development -- '*.rs' '*.toml' in the consumer's
checkout at a11528a7e2: 0 hits.

Verified: cargo check of the validation crate, all targets and features, plain, --cfg m2v_gpu and
--cfg m2v_cpu_icd, clean (m3-max-67506, on the probe branch's identical diff); the dead-code pass
against the base finds only items whose users are macOS-only or tests the binder's deletion takes.
The compile job and the suites follow on this commit.

(cherry picked from commit 5808aaa769e3f44b1bd76dea486b2b150b15e92b)
2026-11-22 07:37:14 -08:00
Anees Iqbal 9675b50e75 Validation: corpus-pipeline makes every kernel row on one runtime device per sweep
At f11d6455e0 each kernel row opened its own runtime instance and device
under the validation layer. A sweep of about 900 kernel rows made about
900 instances and devices. Each instance's layer also opened its own log
file and kept it open after the instance was destroyed: one file
descriptor a row (the 3090, job 67374: 5 descriptors to 24 over 20 rows).
The form the 1b brief asks for is one runtime device of the sweep's kind,
with each row's ComputePipelineState and its dispatch made on it.

candidate::RuntimeKernels is that device:
- open makes the instance (restricted where the process is) and the
  device. The validation layer's variables are set only while the instance
  is made (runtime::under_validation_variables), and the layer logs to the
  process's one log for the device's life;
- accept makes one row's state and encodes its dispatch, as before. The
  row's messages are what the log gained during the row, so a message
  still makes that row INVALID_USAGE;
- finish drops the device and waits for its teardown. A message logged
  at the teardown fails the sweep.
A message logged while the device opens stops the sweep before any row,
because no row on that device would be evidence.

corpus-pipeline opens it at the sweep's first kernel row, so a render-only
sweep opens none, and finishes it after the last row. Render rows keep
their own context.

runtime::opened is split into made_device and torn_down for the held
device; the per-row executors keep opened. create_runtime_kernel is
removed. The device tests make two kernel rows on one device.
2026-11-22 06:05:20 -08:00
Anees Iqbal 71f93243d9 Validation: an L4 kernel row is made through the runtime, its pipeline state and one encoded dispatch
corpus-pipeline asked the driver for a kernel row's compute pipeline at
the region the binder planned for one representative dispatch
(acceptance::dispatch), and tallied the binder's answer (BIND_REFUSED,
BIND_ERROR). That is not the pipeline a guest's kernel gets. A kernel row
is now made as a guest's kernel is made (platform::runtime_acceptance):
- the row's AIR becomes a runtime library, and its function is
  specialized with the row's function-constant values;
- one ComputePipelineState is made on the sweep's device, restricted to
  --profiles-layer's profile where one is given;
- one dispatch of one threadgroup of the state's thread execution width
  (or its maxTotalThreadsPerThreadgroup where that is fewer) is encoded
  into a command buffer that is dropped uncommitted, so the runtime picks
  the module that threadgroup runs on, asks the driver for its pipeline,
  and nothing executes.

The verdicts:
- The creation time is the runtime's own count of it
  (pipeline_creation_nanos).
- A message from the validation layer is INVALID_USAGE.
- A Vulkan error is REFUSED.
- The runtime's typed refusal (the translator's, a known gap, a limit) is
  RUNTIME_REFUSED, counted.
- A kernel the runtime runs as Metal's without effects, and makes no
  pipeline for, is NO_EFFECT, counted.

The row still compiles in its compile worker first, for its words, its
outcome, --compile-only and --keep-modules. The make runs in the sweep's
process, held to the per-attempt ceilings (runtime::within_ceilings).

Removed:
- acceptance::dispatch (plan_compute_row, ComputeCreation, NoCreation,
  BinderAnswer);
- RowCompile::Binder and UnmodelledKind::Dispatch;
- the tally's bind_refused and bind_errors, and the detail's
  imageblock=WxH;
- the own context's compute arm of create_acceptance_pipeline, which now
  takes a render pipeline, with its region test.
The summary line's bind_refused= and bind_errors= become
runtime_refused= and no_effect=.

What is lost: L4 kernel acceptance on Mesa's drm-shim drivers (RADV, ANV
and NVK), which stood for hardware we do not own. The runtime does not
open those devices, so the rung runs on lavapipe and the real cards
only. NVK is lost entirely: the shim was its only venue, and it never
ran here.

Committed rows removed: none. No L4 row is committed. Counted by
environment over corpus/observations/vulkan and observations/refusals at
bcc88a43cf, there are 55 rows in 6 environments (the 780M, Iris Xe,
RTX 5080 Laptop twice, lavapipe twice), and none is from a drm-shim
environment.
2026-11-22 06:05:19 -08:00
Anees Iqbal 48d7ded3aa Validation: the authored compile census compiles as the runtime does, through no binding plan's variant
The census compiled each case's pipeline through the binder's variant route: a kernel under the
key its plan, and its plan's dispatch_variant, asked for (BindingPlan::variant), a draw through
compile_render_variant, a mesh draw through compile_mesh_variant, each with the storage-format
loop. It now compiles through the translator's public pipeline API the way the runtime does:

- a kernel through the new PipelineRequest::Kernel, compile_kernel: its plain module, or its
  emulated-simdgroups variant (LoweringInputs::kernel_variant) where the dispatch's threadgroup
  is not a multiple of a LocalSizeConstraint the plain module states, the runtime encoder's
  rule (encoder::decide);
- a draw with no shape (Device::compile_render_pipeline);
- a mesh draw through Device::compile_mesh_pipeline. The census was MeshDraw's only builder, so
  its shape field and compile_mesh_for_shape go.

The own-context executor (a profiles-layer run, a render case off the runtime) keeps its
requests (BoundCompute, a draw with its shape) under the resident-table domains, where its plan
asks for variants the runtime route does not compile.

The artifact still digests the plan of the compiled pipeline for the run's bind shape, as the
own-context executor records it (artifact::CaseArtifact::record).

Why: on the probe branch (m3-max-66743, 9 profiles, 20,997 cells), the only variant field the
plan ever set was emulated_simdgroups. Yet the census's old route kept the plain module for 33
kernel cases (174 cells on the six real-GPU profiles) whose threadgroups (1, 4, 8, 16, 40 or 42
threads) are no multiple of the plain module's LocalSizeConstraint { multiple: 32 }. The binder
refuses to plan each of them under the runtime's identity domains, so the old route's variant
step never ran. Every one of the 33 observes its threadgroup partition, so the runtime's whole
module is the plain one and its encoder runs the emulated-simdgroups module for those
dispatches. The new route compiles exactly that module (route probe 8468646957, census
m3-max-66936, every cell compiled: the 174 differ only in stage, dependencies and requirements).
So the census's cells for those 33 described a module no guest gets.

AUTHORED_COMPILE_CENSUS_VERSION 7 -> 8: the compiles a cell is made of changed route.

Verified:
- compile m3-max-66813 and suites m3-max-66814 at the lane's base a9c1a7d012: product 3880,
  validation 1335, conformance 1025, doctests, all green.
- the 33 cases through the runtime (executor runtime-compute, validation layer with
  synchronization validation) against the M3 Max's Metal rows (apple-m3-max-macos27.0.1):
  Radeon 780M 33/33 match (m3-max-66869, 66931), RTX 5080 33/33 (m3-max-66871, 66933), Iris Xe
  RPL-P 21/21 (m3-max-66870, 66932); 0 mismatch, 0 refusal. Not run on the Mac's Vulkan:
  validation runs no Vulkan candidate on macOS.
- that those runs took the emulated module is shown by code, not by a count: encoder::decide
  either runs it or refuses with Gap::PartialSimdgroups, and none refused.
- the census table is re-blessed at the next pin.
2026-11-22 02:35:39 -08:00
Anees Iqbal 5d143de078 Validation: a difference under precision notes is a noted difference, counted apart
A candidate row whose bytes differ from Metal's under a comparison class unbounded by
precision notes was recorded Mismatch, so the public lavapipe batch counted 186 mismatches of
which 185 carry a note that can explain a difference, and a new mismatch would hide among
them. Such a row now records CandidateStatus::NotedDifference: never a match, never accepted,
and saying no more than that the row differs and its notes can explain a difference. It is
counted in its own column: the batch outcome and class noted_difference (batch-report,
batch-family, batch-scope, batch-summary), the evidence state noted_difference in
corpus-status. Mismatch stays for an exact class, a difference past a bounded table, and an
out-of-bounds target that escaped.

The owner's decision of 2026-10-06 stays: a case the C3 reviewed list holds under an answer
gap its structure meets (AnswerGap::met_by) keeps Mismatch, and the row names the gap in a new
field, held_open_by, which the executor's verdict line and the batch-run line print.
ReviewedList::holding_open is that rule, shared by C3's report (with the venue's device) and
the executor (candidate::engine::difference_status, with the case's structure alone: the
runtime path has no profile to ask which devices have the gap, so a listed case's difference
is a mismatch on every device, which hides none). C3 reads a noted difference as a mismatch,
so its verdicts do not change; the fast-math regrouping reading keys on "differs" instead of
"Mismatch".

The row contract enforces the vocabulary: a noted difference needs differing bytes, an
unbounded class and no escaped target, and no held_open_by; a mismatch that could be noted
needs held_open_by. comparison.rs's contract sentence now reads that a difference is never a
match: under notes it is a noted difference (unless an answer gap holds its case open), else a
mismatch.

Executor ABI vulkan-engine-v211 -> v212 (the recorded status changed): every recorded
candidate row is stale until rerun. Bless due on development: the authored compile census,
which keys on the executor ABI.

Tests: the row vocabulary (observation), classify and the report's column and held_open_by
line, install of a noted row (vulkan_batch), and difference_status over every committed C3
answer-gap entry (each stays Mismatch naming its gap) and a public case the list does not hold
(a noted difference).

Verified: not at commit time; the compile job and the validation suite run on this sha.

Verified with the two commits after it (the suite fixes and the ff55fa41 case fix), at their
tip 611f45a559 on development 6cf6ee19d0: compile job m3-max-65814 (fmt, clippy plain /
--cfg m2v_gpu / --cfg m2v_cpu_icd, workspace Rustdoc -D warnings, signatures, refusal surface;
its golden and render-key reds are the bless due at SEMANTICS 2267, as on development);
validation suite m3-max-65815, 1,334 of 1,334. Public cases on lavapipe, both arms in one job
(m3-max-65816): development 721 match / 186 mismatch / 268 not supported / 0 failed; this change
722 match / 5 mismatch / 180 noted difference / 268 not supported / 0 failed. 180 cases moved
from mismatch to noted difference and one to match; the 5 left are the cases the owner's 10-06
answer gap (clipped_primitive_split) holds open, each naming it in held_open_by.
2026-11-21 20:47:10 -08:00
Anees Iqbal 35fe287776 Validation: a sample count the runtime makes no texture of is the device's not_enabled
A kernel case through the runtime that binds a multisampled texture of a sample
count the device's image format query lacks failed with free text ("texture 0:
a sample count of 2 is not among the device's (0xd)"): runtime_error took the
runtime's Limit::TextureSamples as any other error. The executor's own context
refuses the same texture typed (NotEnabled, from the same query), and the run
through the runtime already records a pixel format it makes no image of so.
Now Limit::TextureSamples is NotEnabled too, naming the texture, so the case
records a typed refusal on a device without the count and runs where the device
has it. On llvmpipe (sample counts 1, 4 and 8) that is the two public cases
3cadd32e61a4 (four-multisample-reads-at-two-samples) and 505599ae1551
(size-queries-of-multisampled-buffer-and-depth-cube-textures), which failed
before (job m3-max-65594).

- runtime: runtime_error maps Limit::TextureSamples to NotEnabled.
- engine_textures: a_sample_count_the_device_lacks_is_refused_as_not_enabled
  (was ..._before_any_image) runs the case on each run, the own context and,
  on Linux, through the runtime, and asserts NotEnabled naming texture 1 and
  its 2 samples on both (the runtime arm failed with free text without this).
- docs/VALIDATION.md: says so.

These cases recorded no row before, so no recorded row observes the change; it
rides vulkan-engine-v211, the bump of the parent commit.

Verified before this commit: the two failures, on llvmpipe (Mesa 26.2.4) at
af97fa1bee, job m3-max-65594. Verified after: m3-max-65626 (the compile
steps, all exit 0); m3-max-65628 (validation 1332/1333, device run 1442/1443; the test passes,
and fails at 2673e16ab6's runtime.rs with Failed("texture 1: a sample count of 2 is not among
the device's (0xd)")); the one red the opened-chains pin. llvmpipe batch m3-max-65646, this
commit against 2a3cc1cf47: 721 match / 186 mismatch / 268 refusal / 0 failure against
708 / 186 / 266 / 15; exactly 15 cases change (13 failed -> match, 2 failed ->
not_supported{not_enabled}).
2026-11-21 20:00:44 -08:00
Anees Iqbal 81eb5e3826 Validation: a texture-buffer out-of-bounds target through the runtime lies between guards
The run of a kernel case through the runtime made each texture buffer over an
unguarded buffer (Placed::new), so a target of the texel buffer form recorded
no guard count (escaped and past_end None). out_of_bounds::guarded() names
every such target guarded, so matches() failed contained_in_guard and called
equal bytes a Mismatch, which validate_content then refused as contradicting
the equal hashes. Since texture buffers moved to the runtime (ed4f8976a5),
13 public kernel.out_of_bounds cases failed that way on llvmpipe: 0c1792037bb5
162c788b0db2 20b771ceffbb 2776f96c4392 2c9a0ea83995 2d15a85c73a3 474c4e027c5e
53cfa43e915a 53a21d7a2200 a536f99088e1 b16354f4aa9e cde612c13d95 fa187d1aef74.
No row was stored for any of them, and no stored row's status contradicts its
hashes: 0 of the 42 committed Vulkan rows, 0 of the 894 the public batch
recorded (job m3-max-65594; its two Match rows of unequal bytes differ only in
declared handle-array reads, which the ResidentTexels rule allows).

- runtime_textures: a bound texture buffer that is a guarded target is made
  over Placed::within at its declared reach (guards::texel_guard_reach), and
  Bound keeps that buffer (texel_guards) so the run reads its guard back.
- runtime: the run's guard counts take each such texture buffer's, under
  OutOfBoundsResource::Texture.
- runtime_render: a draw passes no targets (a draw with a contained target is
  not drawn through the runtime).
- engine_compute: a_texture_buffer_accessed_past_its_end_is_contained_through_the_runtime
  runs ob1_texel_buffer with both texture buffers declared texel_buffer
  targets, as the committed case does, and asserts escaped and past_end
  Some(0) on each (None without this change).
- ENGINE_EXECUTOR_ABI vulkan-engine-v211.
- docs/VALIDATION.md: the buffer a texture-buffer target is made over is
  guarded too.

The gap that let it through: the lavapipe device shards run synthetic cases,
and the one texture-buffer-through-the-runtime test declared no target; no
check runs corpus-vulkan over the public cases (CI qualifies three).

Verified before this commit: the read, on llvmpipe (Mesa 26.2.4) at
af97fa1bee, job m3-max-65594. Verified after: m3-max-65618 (fmt, clippy plain, --cfg m2v_gpu and
--cfg m2v_cpu_icd, workspace Rustdoc -D warnings, api-docs, refusal-surface --check); m3-max-65619
(validation 1332/1333 and the lavapipe device run 1442/1443; the new
a_texture_buffer_accessed_past_its_end_is_contained_through_the_runtime passes, and fails on
2a3cc1cf47's product files with (escaped, past_end) = (None, None)); the one red in both is the
opened-chains pin, blessed on development since 0631f3432a. llvmpipe batch m3-max-65622 over the
1,175 public cases: 721 match / 186 mismatch / 266 refusal / 2 failure, the 13 failed -> match
and nothing else changed. The cause commit is ed4f8976a5 (texture buffers moved to the runtime,
their guards never placed).
2026-11-21 20:00:44 -08:00
Anees Iqbal 38104834d4 validation: indirect_indexed_draws names the runtime's command shape the executor does not map
What: one requirement row, ToolingRequirement::IndirectIndexedDraws ("indirect_indexed_draws"),
stops the engine's candidate. It is this crate's gap (Limit::Tooling). Its structural check in
executor_contract::case_requirements matches an indirect command buffer of the one shape the
runtime builds, which no runtime-limit row names: render commands of indexed draws alone that
inherit the pipeline state and bind their own buffers, with no command the host encodes. Every
other command buffer already carries indirect_compute_commands, indirect_draw_types,
indirect_command_inheritance or host_encoded_indirect_commands, and a pipeline state in an
argument buffer carries argument_buffer_pipeline_state.

The free-text NotImplemented in candidate::engine::compute_case and graphics::stage_resources
("an indirect command buffer or a pipeline state in an argument buffer") is deleted. Both run
after require_case_families, which now refuses every such case typed, so a case of the
runtime's shape meets NotSupported::Requirements({indirect_indexed_draws}). Since the row is a
tooling gap, the checker's evidence_gap also takes no case of it ("engine_candidate:
indirect_indexed_draws (the candidate is stopped)").

The contract sentence of replay_observes_commands said both executors execute a case's
commands after its producer. It now says the Metal oracle does and the engine's candidate
executes none, naming the row. The same claim in unsupported_observation_requirements is
corrected the same way, and so are compute_case's doc (it no longer lists command buffers and
pipeline states among what it runs) and docs/VALIDATION.md (the runtime's form carries the row,
no longer executor_not_implemented).

Why: one vocabulary. The runtime-built shape was the only indirect command buffer the
vocabulary did not name: it met a free-text refusal.

Not built: mapping the runtime's shape through the runtime's indirect command buffer. Its
trigger is a guest count. No guest reaches an indirect command buffer today, because the
consumer refuses the creation. The row's doc records the trigger.

Versions: the classifier's analyzer_version goes from structural-triage-v85 to v86 (the
meaning of a replayed module's case changes: only the Metal oracle executes it). requirement.rs
and executor_contract.rs are classifier inputs, so the key changes with them too. The
executor ABI does not move: no committed case reaches the deleted arms.

Expected census moves, at the next named pin, not run here: none.
- Authoring-capability census: the row comes from a case's literals alone, never from a
  source's structure, so no census row carries it. The full reclassify that the version bump
  forces should give the same counts.
- Authored compile census: none of the 29 command buffers in the committed cases has the
  runtime's shape (all 25 cases with one already carry a runtime-limit row, see
  committed_command_buffer_and_pipeline_state_cases_refuse_by_their_requirements), so no cell
  moves.

Tests: requirement::the_runtime_s_indirect_command_shape_stops_the_candidate_as_a_tooling_gap,
and case::tests::indirect_commands::the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate.
The second checks that the shape carries the row alone, that the checker names it as an
evidence gap, and that compute_case refuses it typed. It also checks that leaving the shape
(buffers inherited, or draws of primitives) carries the runtime-limit row instead.

Verified: m3-max-65550 (these two commits on the pre-enables base 7e080082cf): fmt,
signatures, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings
green, validation 1333/1333; m3-max-65585 at 9e3e484a8a on af97fa1bee: the same compile steps
green, validation 1332/1333, the one red the opened-chains pin left by the enables move.
2026-11-21 19:40:54 -08:00
Anees Iqbal a2ad41850e Validation enables what the runtime enables, from the runtime's own tables
What: one definition of the enabled set. The runtime gains one public function,
`metal2vulkan_runtime::floor::enable_set()`: every feature and extension of the
translator's vocabulary that device creation enables on some device (its ENABLED
groups' named features and its creation extensions), and `shader_enables` reads the
same iteration. Validation's `engine::runtime_enables(description)` keeps of a
description what that set holds (plus the features that have no member at the
runtime's Vulkan version and the extensions exposing kept features) and
`engine::runtime_description(stem)` reads a committed profile at the runtime's
version restricted to it. The engine context's list (`engine_list`) is that set;
NOT_ENABLED, the old executor's list, `Enables::copy`/`expose` and the unnamed
members loop are deleted. The authored-compile census, `corpus-pipeline` and
`load_device` compile for `runtime_description`.

Why: validation executed, and the census reported, forms the runtime never ships:
the ordered framebuffer fetch on lavapipe, ray query and acceleration structures
with deferred host operations, float atomic add, OpFmaKHR, buffer robustness and
others the runtime's floor tables do not enable.

Tests: a runtime test that `enable_set()` equals what `shader_enables` derives on a
device with every ENABLED feature and every creation extension; a validation test
that no committed profile's context (device and restricted) enables a member or
extension outside the set, ray query, acceleration structure and deferred host
operations named. docs/VALIDATION.md states the four places where the census's
reading differs from the runtime's own answer for a device.

ENGINE_EXECUTOR_ABI vulkan-engine-v209 -> v210.

Verification: none at this commit; its compile, suite and census jobs follow.
2026-11-21 19:23:41 -08:00
Anees Iqbal bebd518dfb validation: delete runs_through_runtime, always true for a mapped kernel case
The predicate answered true for a Threads or Threadgroups dispatch. Every kernel case the engine
maps comes from compute_case, which dispatches by threads (a case has no indirect dispatch to map),
so it was true for every case it was asked about. Its one product caller, run_on_context, now
routes every mapped kernel case through the runtime when no profiles-layer restriction is
requested, as before. The runtime run's own match still refuses any dispatch but threads or
threadgroups.

Deleted with it: the predicate's own test (a_plain_kernel_case_and_only_one_runs_through_the_runtime)
and its plain_kernel helper, which nothing else used. The doc references are rewritten
(ComputeRun::spv_sha256, runtime_fingerprint, run_on_runtime, runs_render_through_runtime,
platform::runtime, engine_textures' runs, docs/VALIDATION.md).

Search: `git grep -n runs_through_runtime` at 3d2b846caa gives 19 hits (the definition, 1 caller,
8 doc references, 9 test asserts); after, 0. The crate is unpublished, so no consumer calls it.
No version bump: routing and rows do not change for any case.

Verified: m3-max-65445 (fmt, signatures, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace
Rustdoc -D warnings, 51 engine tests) and m3-max-65449 (two public kernel cases, gated-bias-on and
one-d-array-reads-and-width-queries-at-32-and-16-bit-coordinates, Match through runtime-compute on
lavapipe).
2026-11-21 18:23:39 -08:00
Anees Iqbal 78a19891d5 docs/VALIDATION.md: a bound texture buffer runs on both executors
The authored-case requirements section still said a bound texture buffer carries texture_buffer, which
the runtime does not make. Texture buffers (817463704e) are made by the runtime, and ed4f8976a5 retired
the texture_buffer and texture_buffer_member requirements; 49eebb4d7f made the census compile the
argument-buffer member. Doc only; found by lane censustb.
2026-11-21 08:58:23 -08:00
Anees Iqbal dc03c9e1b5 Validation: delete the own context's indirect-command-buffer and pipeline-state arms
What: since 01ed696846 the engine candidate refuses every committed case with an indirect command
buffer or a pipeline state in an argument buffer before it maps the case (the five runtime-limit
requirements). This commit deletes what only those cases reached:
- platform/compute/{replay,device_replay,device_replay/generated,draw_replay}.rs: the host, device
  and draw replays.
- platform/generated_commands.rs and the context's VK_EXT_device_generated_commands loader.
- The children/registered parameters of execute_engine and execute_engine_render, and the replay
  passes in the render recording.
- engine.rs:
  - PreparedCase.templates and replay_templates, with ReplayTemplate, TemplateCase, ChildCommand
    and CompiledChild.
  - replay_variants, replay_regions, region_sizes and edge_sizes.
  - the replay requests, the run-allocation list and the resident state.
  - compile_child, record_child and replay_variant_request.
  - ComputeCase.objects and ComputeCase.command_buffers.
- graphics.rs: StageResources.objects and command_buffers, RenderCase::objects and
  command_buffers, records_ids, and replayed_draw_in_class.
- argument_buffers.rs: embed_objects, EmbeddedObjects, validate_records, records_ids and
  records_storage. field_words and synthetic_addresses take no records or objects.
- variants.rs: compile_replay_for_shape and DrawForm (the large-buffer and replay forms).
- PipelineRequest::BoundCompute.replay and VertexDraw.form.
- artifact.rs: CompileSubject (its one subject is still labelled "case"), the replay module and
  the uncovered note. case_compiles becomes case_compile: one pipeline per run.
- ToolingRequirement::ReplayedTemplateResources, which only replay_templates raised.
- plan_resources Guest.status is a buffer, not an Option: only the device replay passed none.
A case of the runtime's form (kernel-encoded indexed draws that inherit the pipeline state, no
host-encoded commands) raises no requirement. compute_case and stage_resources now refuse it, and
a pipeline state, as not implemented (executor_not_implemented), rather than drop the command
buffer from the mapping. No committed case is of that form.
Object and mesh cases have no own-context execution arm: engine/mesh.rs serves only the authored
compile census (prepare_compile), so nothing of it is deleted.

ABI: no bump. Every case the deleted code ran has been refused since v207, so no recorded row can
observe the change. The artifact digest of a compiled case is unchanged: same label, same
compile digest. The context still enables VK_EXT_device_generated_commands where supported. That
switch has no consumer now; it is the next commit's (with its ABI number).

Tests: removed the tests of the replays, the templates, the replay variants and regions, the
replay fault verdict, records validation and the replay request. The routing test now keeps an
indirect dispatch on the own context. The artifact, argument-buffer member, graphics, census and
device test call sites follow the new signatures.

Verified:
- Probe m3-max-63595 (homelab-um870-1) on 20b4721524, a tree equal to this commit's, passed:
  fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, and validation nextest
  (1332 tests).
- m3-max-63628 (homelab-um870-1) ran the own context's device tests (candidate::tests) on
  lavapipe at this commit: 54 passed.
2026-11-21 07:13:17 -08:00
Anees Iqbal 01ed696846 Validation: requirement rows for indirect command buffers and pipeline states
What: five new ToolingRequirement variants for what the runtime does not build of an indirect
command buffer, and for a pipeline state an argument buffer holds. Each one stops only the engine
candidate (Limit::Runtime), so the Metal oracle still runs and qualifies these cases.
executor_contract::case_requirements raises them from the case literals:
- indirect_compute_commands: a command buffer of compute commands.
- indirect_draw_types: a render command buffer whose descriptor allows draws other than indexed
  ones alone (non-indexed, patch, indexed patch or mesh draws).
- indirect_command_inheritance: a render command buffer that does not inherit the pipeline state,
  or that inherits buffers.
- host_encoded_indirect_commands: commands the host encodes into a command buffer.
- argument_buffer_pipeline_state: a pipeline state in an argument buffer (the runtime's pipeline
  states have no gpuResourceID).
The runtime builds kernel-encoded indexed draws that inherit the pipeline state and bind their own
buffers (Device::new_indirect_command_buffer). A case in exactly that form raises none of these.
Object and mesh cases already stop the candidate by mesh_render_pipeline
(executor_contract::mesh), so no new row is needed for them. IndirectCommandBuffer (an authoring
requirement about unobserved contents) means something else and is not reused.
ENGINE_EXECUTOR_ABI goes to vulkan-engine-v207, because these cases' recorded rows came from the
executor's own context. executor_contract is a classifier input, so triage recomputes the census.
In the authored compile census, these cases' cells become their requirement refusals; the census
is re-blessed on development.

Routed: none. No committed case is in the runtime's form:
- indexed-draws-a-kernel-and-the-host-encode has host-encoded commands (and point draws, which the
  translator refuses to encode).
- a-vertex-function-whose-only-effect-is-an-indexed-draw-runs-it inherits buffers.

The 27 committed cases with a command buffer or a pipeline state, by requirement (a case can raise
several):
- indirect_compute_commands: 12
- indirect_draw_types: 12
- host_encoded_indirect_commands: 10
- indirect_command_inheritance: 7
- argument_buffer_pipeline_state: 4

Tests:
- requirement.rs: the new variants are in ALL, stop only the candidate, and are the runtime's
  limit.
- engine_case_families_follow_the_case_literals: the runtime's form raises nothing, and each other
  form raises exactly its own requirement.
- committed_command_buffer_and_pipeline_state_cases_refuse_by_their_requirements (new): eight
  committed cases refuse at preparation, with no device, by exactly their requirements. It
  replaces five tests of the own context's replay and pipeline-state mapping, which these cases no
  longer reach.
- the_census_refuses_command_buffer_cases_by_their_requirements (new integration test): it
  replaces the census test of replay variants.
- The case-literal tests and the argument-buffer-member tests now assert the refusal, or drop the
  command buffer and pipeline state they used to map.
docs/VALIDATION.md names the five requirements.

Verified: gate m3-max-63557 (homelab-um870-1) at c38044230b, the tree of this commit: fmt, clippy
(all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc and doctests of metal2vulkan-validation
passed, and its nextest suite passed (1337 tests). Earlier runs on the same branch (m3-max-63495,
m3-max-63532) found the tests fixed above.
2026-11-21 06:58:13 -08:00
Anees Iqbal 1d79c26b7a Validation: a render case's argument buffers draw through the runtime
What: runs_render_through_runtime no longer keeps a vertex or fragment case whose function takes
an argument buffer of buffers, textures or samplers on the executor's own context, and it routes a
case that observes an argument-buffer buffer or texture. runtime_render makes each stage's
argument-buffer members the way a kernel's run makes them (platform/runtime.rs):
- each member buffer is a Shared buffer of its bytes;
- each member texture and sampler comes from runtime_textures, with the usage the function
  declares of its field (RuntimeDraw.member_usages, engine::runtime_member_usages);
- each owner holds every member's gpuAddress or gpuResourceID at its field
  (argument_buffers::owner_bytes);
- the render encoder uses each member buffer and texture for reading and writing
  (use_resource).
An argument-buffer buffer output reads back through RenderFinals.argument_buffer_buffers, and an
argument-buffer texture output reads back through runtime_textures::read_back. An argument
buffer's pipeline state or indirect command buffer still keeps the case on the own context.
ENGINE_EXECUTOR_ABI goes to vulkan-engine-v205, because these cases' recorded rows came from the
own context.

What moves: 5 committed fragment cases.
- Public (4): sixteen-overlapping-triangles-update-a-raster-ordered-argument-buffer-member,
  sparse-sample-of-an-argument-buffer-texture-returns-its-value-where-resident,
  sparse-sample-of-an-argument-buffer-texture-states-it-resident,
  sample-in-a-fragment-through-a-sampler-held-beside-its-texture-in-an-argument-buffer.
- Private (1): sample-the-slice-a-runtime-index-picks-from-an-argument-buffer-texture-array.
The other 23 render cases with argument buffers carry visible_function_table (22) or
texture_buffer (1) and run on Metal alone.

Verified on lavapipe, each case through corpus-vulkan against the committed Apple M3 Max macOS
27.0.1 row. Before: own context at b192b89fa1, m3-max-63462 (homelab-gem10-1); each stored row's
executor was engine-render. After: this tree, m3-max-63474 (homelab-um870-1); each stored row's
executor was runtime-render.
- The 4 public cases match Metal on both paths, with the same candidate output digests (ea785a60,
  ebc81c32, 67c145ea, e7e4c872).
- The private case did not run on either node, which has no local source shard for it. It is
  unverified here.

Tests:
- a_plain_draw_and_only_one_runs_through_the_runtime now routes a fragment case with an
  argument-buffer buffer and texture, observed through either. Before, it kept that case on the
  own context.
- The new device test a_fragment_samples_the_texture_an_argument_buffer_holds_through_its_sampler
  draws tail_argument_samplers' argument_sampler_fragment (m.t.sample(m.s, in.uv)) on the own
  context and through the runtime. Both give the texture's rows swapped into the 2x2 target, the
  bytes the committed Metal row holds for the same case. It passed on lavapipe in m3-max-63474.

Gate, m3-max-63474 at this tree: fmt; validation clippy with all features, with --cfg m2v_gpu
and with --cfg m2v_cpu_icd; Rustdoc; the validation suite, 1342 passed, 3 skipped; the two
lavapipe device tests above.

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).
2026-11-21 06:29:32 -08:00
Anees Iqbal e6e70666ed Validation: delete the own-context arms of the nine refused families
What: since the refusal rows (d1266e5a5a, a1a47cb9c5), compute_case and render_case refuse a
case of kernel_function_table, kernel_imageblock, texture_buffer, fragment_imageblock,
sparse_texture, kernel_acceleration_structure, kernel_stage_input, rasterization_rate_map or
dynamic_vertex_stride before anything maps it. The executor's own-context code for these
families is reached by no case, so it goes:
- function tables: engine/tables.rs, ComputeCase.function_tables, StageResources.function_tables,
  CompiledCase (the compile functions now return the pipeline), CompileFailure::Tables,
  VariantRequest, the table allocations of compute_shape, and the tables hash of
  CaseArtifact::record;
- imageblocks and tile functions: engine/imageblock.rs, ComputeCase.imageblock,
  RenderCase.imageblock, RenderOutput::Imageblock, RenderFinals.imageblock,
  variants::compile_tile_for_shape, and the tile attachments of plan_resources;
- texture buffers: texel_guard_reach, buffer_target, the texel-buffer views and guards of
  plan_resources, and texel_buffer_bytes;
- sparse textures: platform/sparse_images.rs, device::SparseImages, the sparse paths of
  create_slot_image, the tile-map emulation of executor_contract::sparse, and the executor's
  sparseBinding, sparseResidencyImage2D and sparseResidencyImage3D enables (ExecutorFeature);
- acceleration structures: platform/acceleration.rs and their plan_resources arms;
- kernel stage inputs: the stage-input fetch, stage_in_region and Fetch::of_stage_input;
- rate maps: rate_map_regions, rate_map_pass_census and the per-region draw (a draw now covers the
  whole target in one recording);
- dynamic vertex strides: VertexBuffer.dynamic, DynamicRecord::Strides and
  bind_vertex_buffers2.
runtime_texture was always true after the rows and the cube-array route, so it goes too, and
runs_through_runtime and runs_render_through_runtime take the mapped case alone.
ExecutedCensus.rate_map_pass stays (deny_unknown_fields keeps old rows parsing); every writer
sets None. Enables' Member.registry is now read by the tests alone, so it is cfg(test).

ENGINE_EXECUTOR_ABI goes to vulkan-engine-v204: every artifact digest drops the tables hash, and
the own context no longer enables the three sparse members. opened_chains.txt is re-blessed for
that: each committed profile's chain has 3 members fewer.

Tests removed with the code they held: a_kernel_calls_through_its_visible_function_table,
a_tables_words_are_its_size_and_the_handles_of_its_functions, the_cells_follow_the_reflected_master,
a_plane_must_be_a_master_member_of_its_size, cells_lay_planes_out_at_master_offsets,
the_cells_are_capped, a_guarded_texture_buffer_is_exactly_its_view,
a_texture_buffer_written_past_its_end_is_guarded, texel_buffers_read_one_view_and_write_the_other,
a_tile_map_emulation_maps_exactly_the_cases_texels,
the_new_list_enables_sparse_images_where_the_device_supports_them,
an_oracle_instance_mask_is_refused_typed, a_rate_mapped_pass_is_planned_region_by_region,
a_dynamic_vertex_layout_takes_the_bound_stride and the region and pass tests of
platform/render (now a_draw_covers_the_whole_target). The visible_table fixtures stay: the
runtime's and the conformance suite's tests use them.

No classification moves: executor_contract/out_of_bounds.rs and sparse.rs lose only functions
nothing called. The compile census's executor key moves with the ABI (bless on development).

Verified: gate m3-max-63421 (homelab-um870-1) at this tree before the bless: fmt, validation
clippy with all features, with --cfg m2v_gpu and with --cfg m2v_cpu_icd, Rustdoc, the ignored
bless_opened_chains (its file is the one committed here), and the validation suite, 1342 passed,
3 skipped. Earlier gates m3-max-63393 and m3-max-63412 listed the compile errors fixed here.
2026-11-21 06:12:04 -08:00
Anees Iqbal cf87db0fb7 Validation: a fragment case of no attachment draws through the runtime
What: runs_render_through_runtime no longer keeps a fragment case with no color target and no
depth/stencil attachment on the executor's own context. runtime_render draws it in the oracle's
pass of no attachment (metal::platform): renderTargetWidth and renderTargetHeight 1, and
defaultRasterSampleCount the case's raster samples. The runtime builds such a pass as one
dynamic rendering of no attachment, its area and samples from those three fields. The routing
function's stale comment ("the runtime makes no pass without one") goes, along with the matching
VALIDATION.md sentence. ENGINE_EXECUTOR_ABI goes to vulkan-engine-v203, because these cases'
recorded rows came from the own context.

Executor code removed: multisampled::attachmentless_support and its call in the own context's
Targets::make, the framebufferNoAttachmentsSampleCounts check of a multisampled pass without
attachments. Nothing else reaches it now. The translator already refuses such a pipeline itself
(pipeline/graphics.rs sample_count_properties: RasterSampleCount needs
FramebufferNoAttachmentsSampleCount(N)), and the own context compiles before it makes targets,
so a --profiles-layer run still refuses typed.

What moves: 16 committed cases.
- Public (15): coverage-loop-records-each-sample-at-2x and -at-4x,
  coverage-loop-sample-varying-at-2x, coverage-loop-union-of-runs-at-2x and -at-4x,
  fragment-device-and-constant-pointer-integer-differences, msl-4-1-fragment-seq-cst-atomics,
  coverage-and-pixel-center-read-by-each-run-at-4x, coverage-beside-a-sample-varying-at-2x and
  -at-4x, coverage-beside-the-pixel-center-ored-over-its-runs-at-4x,
  coverage-read-by-each-run-of-a-memory-writer-at-2x and -at-4x,
  coverage-read-by-each-sample-run-at-2x and -at-4x.
- Private (1): void-fragment-no-writes.
- The 17th attachment-less fragment case, gaussian-splat-blended-over-an-authored-imageblock,
  has an explicit imageblock and stays on the own context.

Verified on lavapipe (msi, no GPU), each case through corpus-vulkan against the committed
Apple M3 Max macOS 27.0.1 row, before at a8c2bfbfae (own context, m3-max-63297) and after at
48b14d9dc0 (this tree plus a runs-through-both-contexts edit of the engine_textures cube test that
the cube-array commit does not carry; m3-max-63285, m3-max-63306). Every run after logged through
the runtime path's own validation log; the before-run logged none. Every case gives the same
result on both paths.
- 7 match Metal: coverage-loop-union-of-runs-at-4x,
  fragment-device-and-constant-pointer-integer-differences, void-fragment-no-writes,
  msl-4-1-fragment-seq-cst-atomics, coverage-and-pixel-center-read-by-each-run-at-4x,
  coverage-beside-the-pixel-center-ored-over-its-runs-at-4x,
  coverage-read-by-each-run-of-a-memory-writer-at-4x.
- 3 differ from Metal with the same output digest on both paths (lavapipe's own 4x coverage):
  coverage-loop-records-each-sample-at-4x, coverage-beside-a-sample-varying-at-4x,
  coverage-read-by-each-sample-run-at-4x.
- 6 are refused not_supported{device_capability_missing:RasterSampleCount needs
  Property(FramebufferNoAttachmentsSampleCount(2))} on both paths. lavapipe rasterizes no 2-sample
  pass without attachments, a device gap: coverage-loop-records-each-sample-at-2x,
  coverage-loop-sample-varying-at-2x, coverage-loop-union-of-runs-at-2x,
  coverage-beside-a-sample-varying-at-2x, coverage-read-by-each-run-of-a-memory-writer-at-2x,
  coverage-read-by-each-sample-run-at-2x.

Tests: engine/tests.rs's a_plain_draw_and_only_one_runs_through_the_runtime routes a fragment
pass of no attachment at 1 and 4 samples, which it refused before. engine_render's new
a_fragment_pass_of_no_attachment_runs_each_sample_once draws the owned coverage_natural
nat_sample with no attachment at 1 and 4 samples: each sample runs once and reads its own
coverage bit on the own context, and through the runtime the words are equal (passed on lavapipe
in m3-max-63306).

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).

Landed after the nine refusal rows (v201) and the cube-array route (v202), so the bump is v203 here (v200 on the lane's branch).
2026-11-21 05:42:30 -08:00
Anees Iqbal cb6d9e8b1b Validation: a cube array texture runs through the runtime
What: engine::runtime_texture no longer keeps a cube array texture off the runtime, so a kernel
or render case binding one runs through metal2vulkan-runtime's public API like any other routed
case. runtime_textures already makes cube arrays as the oracle does: arrayLength counts cubes, and
each face slice is written with replaceRegion. A texture buffer still keeps its case on the
executor's own context. ENGINE_EXECUTOR_ABI goes to vulkan-engine-v202, because these cases'
recorded rows came from the own context.

Why: the runtime makes cube-array images and views (imageCubeArray is in its floor), so the
executor kept them on its own context only by its own choice.

What moves: 13 committed cases.
- Public (12): explicit-cube-gradient-combination-table,
  explicit-cube-gradient-component-combination-by-ratio,
  explicit-cube-gradient-component-combination-fine,
  explicit-cube-gradient-turning-points-and-threshold,
  explicit-cube-gradient-minification-threshold-per-face-and-axis,
  gradient-samples-and-comparisons-of-3d-cube-and-depth-textures,
  lod-queries-of-2d-array-3d-cube-and-depth-textures,
  anisotropic-cube-gradients-along-face-columns, anisotropic-cube-gradients-along-face-rows,
  sample-and-query-an-argument-buffer-cube-and-count-a-cube-array,
  depth-cube-and-cube-array-reads-at-32-and-16-bit-coordinates, cube-depth-and-comparison-gathers.
- Private (1): sample-the-second-probe-of-a-cube-array-whose-slices-disagree.
- The two other cases with a cube array also bind a texture buffer and stay on the own context:
  size-queries-of-multisampled-buffer-and-depth-cube-textures and its -at-four-samples.

The own context's cube-array code stays: the CubeArray arm beside Cube that makes an image
cube-compatible (plan_resources). A --profiles-layer run still reaches it, because a restricted
run keeps every case on the own context, and so do the two texture-buffer cases.

Verified on lavapipe (msi, no GPU), each case through corpus-vulkan against the committed
Apple M3 Max macOS 27.0.1 row, before at a8c2bfbfae (own context, m3-max-63297) and after at
7969eaeddd (this tree less the engine_textures revert noted below, m3-max-63281). Every run after
logged through the runtime path's own validation log (metal2vulkan-validation-runtime-PID.log);
the before-run logged none.
- 6 match Metal on both paths with the same output digest: the private case,
  explicit-cube-gradient-combination-table,
  gradient-samples-and-comparisons-of-3d-cube-and-depth-textures,
  lod-queries-of-2d-array-3d-cube-and-depth-textures, cube-depth-and-comparison-gathers,
  explicit-cube-gradient-minification-threshold-per-face-and-axis.
- 5 differ from Metal with the same output digest on both paths (lavapipe's own cube gradients):
  the explicit-cube-gradient component-combination-by-ratio, component-combination-fine and
  turning-points-and-threshold cases, and both anisotropic-cube-gradients cases.
- 2 matched Metal on the own context and are refused by the runtime's identity domains
  (Unsupported{IdentityDomains}, both forms in the runtime README's known gaps).
  sample-and-query-an-argument-buffer-cube-and-count-a-cube-array: "state of a bound texture or
  sampler beyond its resource ID (HeapNumericType ... Cube, arrayed)".
  depth-cube-and-cube-array-reads-at-32-and-16-bit-coordinates: "texture argument ... a type the
  identity arrays hold no element of, or state of the bound texture beyond its resource ID". They
  are runtime bugs, reported by name, and carry no refusal row.

Tests: engine/tests.rs's a_plain_kernel_case_and_only_one_runs_through_the_runtime routes a cube
array texture, which it refused before. engine_textures' cube test stays on the own context: its
texture_ops cube_faces kernel reads a plain cube by face, which the runtime's identity domains
refuse on slot 0 the same way (m3-max-63306). Plain cubes already ran through the runtime.

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).

Landed after the nine refusal rows (v201), so the bump is v202 here (v199 on the lane's branch).
2026-11-21 05:42:16 -08:00
Anees Iqbal d1266e5a5a Validation: nine families the runtime does not build are refusal rows naming their requirement
The family map's first commit (the planner's GO): every committed case either runs through the
runtime or is a refusal row naming its requirement. Nine families of the cases the executor still
ran on its own context have no runtime call, or a runtime refusal at creation on every device. Each
is now a ToolingRequirement of Limit::Runtime that stops only the engine's candidate and keeps its
cases Metal-qualified. Each is raised from the case's literals in executor_contract::case_requirements,
by the template of SeparateDepthStencil and RenderFunctionTable, so no census row carries one:
- kernel_function_table (303 cases): no setVisibleFunctionTable:atBufferIndex:; the make is
  Gap::KernelInput of Slot, held by rt's device test
  kernel_input::a_visible_function_table_kernel_is_refused_as_a_slot;
- kernel_imageblock (51, every tile-pass case among them): no setImageblockWidth:height:; the make
  is Gap::KernelInput of RuntimeFact ImageblockSize (rt's
  an_explicit_imageblock_kernel_is_refused_as_its_named_runtime_fact); no tile function is built;
- texture_buffer (28): new_texture refuses one (Gap::TextureBuffer), held both ways by
  engine_compute::a_texture_buffer_is_refused_where_a_2d_texture_is_made;
- fragment_imageblock (21): refused at creation on every device (Imageblocks, NotImplemented);
- sparse_texture (15): the texture descriptor has no sparse form;
- rasterization_rate_map (12: 8 render-pass maps, 4 kernel cases whose buffers hold map data):
  rt makes no rate map and its pass takes none;
- kernel_acceleration_structure (10): rt makes no acceleration structure and binds neither it nor
  an intersection-function table;
- kernel_stage_input (9): Gap::KernelInput of StageIn (rt's a_stage_in_kernel_is_refused_as_stage_in);
- dynamic_vertex_stride (1): setVertexBuffer:offset:attributeStride:atIndex: is not built.
The nine raise on 450 committed cases with no overlap. No case is deleted.
ToolingRequirement::qualifies_on_metal is now exactly Limit::Runtime (it listed the same eight).

The compile census (authored-compile.tsv) is due a bless here: every cell of the 450 cases moves to
its requirement. All read `compiled` today except 6 texture_buffer cases already
`ulong_texture_atomic` (now `ulong_texture_atomic,texture_buffer`) and 6 kernel_acceleration_structure
cells that read RayTracing device_capability_missing. 4 ICB cases replay a template of these
families, which compute_case/render_case now refuse before the replay check: their
`replayed_template_resources` becomes the template's family:
a-kernel-encodes-the-stage-in-regions-of-its-dispatches and
host-encoded-stage-in-regions-and-attribute-strides-of-executed-commands (kernel_stage_input),
a-kernel-encodes-the-imageblock-sizes-of-its-dispatches (kernel_imageblock),
host-encoded-vertex-attribute-strides-of-executed-draws (dynamic_vertex_stride).
The authoring-capabilities census is untouched: Limit::Runtime rows close without a candidate, and
executor_contract.rs is a classifier input, so cached triage recomputes.

Tests that mapped these families through the own context now meet the refusal. They are rewritten
to assert it: the requirement and case-literal tests, the_case_maps_onto_the_binder_or_names_the_gap,
references_link_and_function_tables_are_typed_gaps, the sparse and rate-map case tests, and the
public argument-buffer case, which now selects the cases with no requirement. Or they are removed
with the mapping they held: stage inputs, acceleration structures, the tile pass, fragment
imageblock cells, the public stage-input, ray, tile and fragment-imageblock cases, the kernel
table's integration case, and the dynamic-stride device test. The device-worker test's case is
now single-thread-store-constant: its acceleration-structure case is refused before the digest
check it holds. The own-context arms these families used are deleted in the next commit.

Owed answer: of the cases that route today, 0 render into one combined depth-stencil texture
using both aspects. The case files hold only Depth32Float textures, the 5 both-aspect attachments
carry separate_depth_stencil, and the route takes one aspect.

Verified: probe at a0f86a2efc, job m3-max-63255, listed the 16 tests the requirements failed. All
16 are fixed in m3-max-63274: fmt, validation clippy plain and --cfg m2v_cpu_icd, Rustdoc, and the
validation suite, 1352 passed. This commit is that tree on a8c2bfbfae.
2026-11-21 05:29:40 -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 b0e351ffbc Validation: multisampled passes and textures run through the runtime
Family H of the executor's move onto metal2vulkan-runtime: a render
case of more samples (raster_sample_count), and any case binding a
multisampled texture, now runs on the runtime's public API, filled and
read back as executor_contract::multisample states for both executors.

Metal uploads and copies no multisampled texture, and neither does the
runtime. So runtime_multisample fills each slice with one draw of the
owned sample_fill fixture (fixtures/public/engine/sample_fill.metal,
compiled by scripts/regen-air-fixtures), whose fragment runs once per
sample (sample_id) and writes that sample's texel from a buffer: a
color texel through an unsigned-integer view of its texel size (the
texture made with PixelFormatView usage), so its bits cross
unconverted, a Depth32Float one as depth(any) under an always-passing
depth test that writes (a depth outside [0, 1] refused as
depth_outside_unit_range, as runtime_depth refuses it). A multisampled
stencil aspect holds one value in every sample (uniform_stencil), which
the case's pass clears it to. After the draw a dispatch of the
fixture's sample_read kernels reads every sample, one threadgroup each,
as whole words in the attachment layout (unpack_words), unresolved,
as the oracle's sample_readback does.

runtime_textures makes a multisampled texture Private (Metal keeps none
Shared), for rendering and, if color, for views of another format, and
fills it by those draws. runtime_render makes each attachment of a
multisampled pass a Private Type2DMultisample texture of the pass's
samples, with a texture index for its read's view, and reads every
sample back for the comparison. engine::runtime_texture no longer keeps
a multisampled texture off the runtime, and
runs_render_through_runtime takes any sample count. An attachment of
both aspects still carries separate_depth_stencil.

What moves: of the committed cases, 49 multisampled passes (all
public; 2 with both aspects keep the requirement) and 8 cases with a
multisampled input texture (7 public kernel cases, 1 private fragment
case).

ENGINE_EXECUTOR_ABI to vulkan-engine-v197. The new owned fixture adds
rows to the golden tables, re-blessed on development.

Tests: engine/tests.rs routes a multisampled pass, multisampled depth
and stencil attachments and a kernel's multisampled texture through
the runtime; engine_render.rs's
each_sample_of_a_multisampled_target_holds_its_own_invocation draws
sample_rate_mask_in into 4 samples and checks each sample's index, on
Linux through the runtime too, bytes equal to the executor's own;
engine_textures.rs's depth_and_multisampled_textures_read_their_authored_texels
runs through the runtime on Linux. Built and run in the lane's compile
job (ids sent with the sha); not yet built when committed.
2026-11-20 21:59:48 -08:00
Anees Iqbal 6593e998d1 Validation: tessellation cases draw their patches through the runtime
Family I of the executor's move onto metal2vulkan-runtime. A
post-tessellation vertex case's patch draw, which the Metal oracle
encodes as setTessellationFactorBuffer: at executor_contract::
tessellation's offset and instance stride and drawPatches: with no patch
index buffer, now draws through the runtime's public API the same way:
the factors a Shared buffer bound by set_tessellation_factor_buffer at
FACTOR_OFFSET and FACTOR_INSTANCE_STRIDE, then draw_patches with the
case's control points, patch start, patch count, instance count and
base instance and no index buffer.

engine::runs_render_through_runtime takes an Assembly::Patches case
whose draw is DrawCall::Patches with neither a patch index buffer nor a
control-point index buffer (the runtime's patch index buffer is
Gap::Draw of PatchIndexBuffer); the authored TessellationDraw spells
neither, so every committed tessellation case meets the structure.
runtime_render's drawn() encodes the patch draw; a patch draw that
reached it with an index buffer fails the run, never draws other
patches.

What moves: the 25 committed tessellation cases (23 public, 2
private), one of them with attribute-buffer out-of-bounds targets of
control-point form, whose facts runtime_bounds::drawn reads as before.

ENGINE_EXECUTOR_ABI to vulkan-engine-v196: these rows' executor
changes.

Tests: engine/tests.rs a_plain_draw_and_only_one_runs_through_the_runtime
routes a patch draw without an index buffer and keeps one through a
patch index buffer, and a patch draw of a primitive assembly, on the
executor's own context; engine_render.rs's
a_back_culled_patch_and_its_mirror_leave_exactly_one_drawn draws each
of its patch draws through the runtime on Linux and compares the
executor's own bytes. Built and run in the lane's compile job (ids sent
with the sha); not yet built when committed.
2026-11-20 21:59:48 -08:00
Anees Iqbal 6af76cf309 Validation: separate depth and stencil attachments are the runtime's limit
A fragment case whose depth/stencil attachment holds both aspects is
drawn by the Metal oracle into Metal's separate Depth32Float and
Stencil8 textures, attached to one pass: plain Metal on every Mac. The
runtime does not build that form yet. It renders into no separate depth
and stencil textures in one pass (Gap::RenderPass of DepthStencilViews,
and its pipeline state Gap::RenderPipeline of DepthStencilFormats), both
among the known gaps its README states. The planner's ruling: record
these rows as the runtime's limit with that typed gap, by the
function-table mechanism; the doc comment states the gap as unbuilt in
the runtime, not as Metal's.

ToolingRequirement::SeparateDepthStencil ("separate_depth_stencil"):
Limit::Runtime, it stops the engine's candidate and keeps its cases
Metal-qualified (qualifies_on_metal). The case checker raises it from
the case's literals (executor_contract::case_requirements: a vertex or
fragment case's depth/stencil attachment with both initial aspects),
never from a source's structure, so no census row carries it.
executor_contract.rs is a classifier input, so every cached triage
recomputes. If the runtime builds the form, the requirement goes in the
same commit.

What lost execution: of the committed cases, 5 fragment cases hold
both aspects: the 3 of family G (one sample, observing stencil) and 2
multisampled ones (family H), all of which ran on the old executor
until now.

Tests: requirement.rs's
a_separate_depth_stencil_attachment_stops_only_the_candidate and both
requirement lists; executor_contract's case test (a fragment case's
attachment of one aspect raises nothing, of both raises it alone).

Verified: cargo fmt; the compile gate follows as a potluck job.
2026-11-20 21:27:21 -08:00
Anees Iqbal cca476549f Validation: a draw's depth/stencil attachment of one aspect runs through the runtime
Family G. A render case with a depth/stencil attachment stayed on the
executor's own context. A vertex or fragment case whose attachment has
one sample and one aspect now draws through the runtime
(engine::runs_render_through_runtime), observing a buffer, a texture, a
color target, the attachment's aspect or nothing; a fragment case with
the attachment and no color target renders, as the attachment is the
pass's.

The attachment is made as the oracle makes it (Metal's separate
Depth32Float and Stencil8, Shared, of RenderTarget usage):
- a Depth32Float is filled by a draw of its depths (runtime_depth), as a
  32-bit float depth texture is, since the runtime takes no upload of one
  (Gap::FloatDepthUpload); a depth outside [0, 1] stays
  DepthOutsideUnitRange;
- a Stencil8 is written from its bytes with replace_region.
The pass loads and stores it; the draw's depth-stencil state, stencil
references and pipeline depth and stencil formats were already the
oracle's. The final aspect is read back with get_bytes into the run's
RenderFinals, from which the depth or stencil output is selected.

An attachment of both aspects is the oracle's two textures, which the
runtime renders into in no one pass (Gap::RenderPass of
DepthStencilViews; its pipeline Gap::RenderPipeline of
DepthStencilFormats): such a case, and one of more samples (family H),
stays on the executor's own context.

Rows: of the committed cases, 21 fragment cases are family G's (one
sample, the rest of E/F's structure): 16 stencil-only observing stencil,
2 depth-only (one observing depth, one, private, a color target), and 3
of both aspects observing stencil, which stay where they were. Expected:
the 18 one-aspect cases run through the runtime; the family G proof reads
them.

ENGINE_EXECUTOR_ABI to vulkan-engine-v195.

Tests: a_plain_draw_and_only_one_runs_through_the_runtime (a depth or a
stencil attachment, observed or not, routes; one of both aspects or of 4
samples does not); the device test
a_fragment_case_writes_its_depth_and_stencil_attachment draws each
aspect alone through the runtime on Linux (depth 0.5 over 1.0, stencil 7
over 0xab).

Verified: cargo fmt; the compile gate and the family G proof follow as
potluck jobs.
2026-11-20 21:27:21 -08:00
Anees Iqbal 9a28de4736 Validation: an indexed draw past its index buffer is the runtime's limit
The runtime refuses an indexed draw whose indices leave its index buffer
as Refusal::IndexBufferOffset, as Metal's validation stops the draw
(render_encoder's draw path checks offset + count * size against the
buffer's length; the runtime's README states the refusal among those
Metal's validation makes). A case that declares a draw's index buffer an
out-of-bounds target is such a draw, so no run through the runtime draws
it. The planner's ruling: record these rows as the runtime's limit with
that typed refusal, by the function-table precedent.

ToolingRequirement::IndexBufferPastEnd ("index_buffer_past_end"):
Limit::Runtime, it stops the engine's candidate and keeps its cases
Metal-qualified (qualifies_on_metal). The case checker raises it from the
case's literals (executor_contract::case_requirements: an out-of-bounds
target of OutOfBoundsResource::IndexBuffer), never from a source's
structure, so no census row carries it. executor_contract.rs is a
classifier input, so every cached triage recomputes.

What lost execution: of the committed cases, the 2 public index-buffer
cases d900a10225 and da4185d2a2, which ran on the old executor's padded
copy until now. The old executor's padded index copy is now reached by
no committed case; it goes with the old executor's tables.

Tests: requirement.rs's an_index_buffer_past_its_end_stops_only_the_candidate
and both requirement lists; executor_contract's case test (a vertex
case's index-buffer target raises it alone, an attribute-buffer target
raises nothing).

Verified: cargo fmt; the compile gate follows as a potluck job.
2026-11-20 21:27:21 -08:00
Anees Iqbal 4e465d811a Validation: a draw's attribute-buffer out-of-bounds target runs through the runtime
A render case with an out-of-bounds target stayed on the executor's own
context. A vertex or fragment case whose every out-of-bounds target is
an attribute buffer now draws through the runtime
(engine::runs_render_through_runtime), and its facts are read before the
state is made (runtime_bounds::drawn): the translator's compile of the
state's descriptor on the runtime device's own translator
(Device::compile_render_pipeline, whose stage inputs are the ones the
runtime lowers each stage under, render_pipeline_key of the variant key
its state takes), read by engine::draw_out_of_bounds_run, which now takes
the translator Device for its policy.

The runtime's floor enables no buffer robustness: its README states that
a vertex fetch outside its buffer returns what the device gives. So
fixed-function vertex input on a profile without buffer robustness is
contained as vertex-input:unchecked (Check::Unchecked; it was an Err,
"which contains nothing"), and the case is refused before the make as
not_supported{uncontained:unchecked vertex_input}. A contained target of
such a draw would need guards around its vertex buffers, which the draw
does not place, so it is refused as executor_not_implemented; no routed
case reaches that.

Rows: of the 4 render out-of-bounds cases, 01b45f7c10 (a vertex
attribute fetched past its vertex buffer) is expected to move from the
old executor to not_supported{uncontained:unchecked vertex_input}. The 2
index-buffer cases (d900a10225, da4185d2a2) stay on the executor's own
context: the runtime refuses indices past the buffer
(Refusal::IndexBufferOffset), as Metal's validation does, which the
facts do not state yet. The control-point case a95f41be73 is a
tessellation draw, which stays there too. On the old executor, the
robustness-off leg's fixed-function attribute target is now the same
refusal instead of a failure.

ENGINE_EXECUTOR_ABI to vulkan-engine-v194.

Tests: a_draws_targets_are_contained_by_their_fetch (every committed
profile contains the fixed-function attribute, unchecked exactly where it
checks buffers in the shader, which a committed profile does);
a_plain_draw_and_only_one_runs_through_the_runtime (an attribute target
routes, an index-buffer target does not).

Verified: cargo fmt; the compile gate and the family D proof follow as
potluck jobs.
2026-11-20 21:27:20 -08:00
Anees Iqbal 00e254ac29 validation: an out-of-bounds target is contained as its module's domains decide
containment read a module's facts as if every device took the resident
table and the handle table. The runtime's device takes the identity
domains (DevicePolicy), so a kernel case through the runtime whose target
is a buffer an argument buffer points to, or an argument buffer's texture
array, failed: the module has no resident roots and no handle table.

ModuleFacts now carries the policy of the device the module was compiled
for (Device::policy: the runtime's translator, the executor's own device,
and DevicePolicy::default() for the committed tier profiles, which are
made with it).

- Under the identity pointer domain a pointer loaded from memory is the
  address it holds, used as given: the runtime's README states that an
  access through a pointer loaded from memory is not checked. Such a
  target is contained as device-address with the new Check::Unchecked,
  and out_of_bounds_run refuses every case with an unchecked target
  before the make, as NotSupported::Uncontained with the new `unchecked`
  forms (serde default):
  not_supported{uncontained:unchecked loaded_pointer}.
- Under the identity handle domain an argument buffer's texture-array
  index is the resource id's index masked onto the descriptor arrays
  (the new Medium::ResourceId, resource-id:shader), whose elements no
  live texture owns are null descriptors: its read rule is
  ResidentTexels, as the handle table's.

ENGINE_EXECUTOR_ABI to vulkan-engine-v193.

Rows: the family D proof at 846f7c1428 (m3-max-61319) failed 5 cases
through the runtime on these facts. Expected at this commit: the 4
loaded-pointer cases 22f5d8ab9c, 570c5673f8, 85c504e02e and ad528203ee
move from failed to not_supported{uncontained:unchecked loaded_pointer};
the texture-array case a937d43a67 runs, contained as resource-id:shader.
The family D proof at this commit reads them.

Verified: unit tests the_identity_domains_leave_a_loaded_pointer_unchecked_
and_mask_a_resource_id (containment under both policies, the refusal's
label and text, the masked target's run), the in-layout read-rule test
over the resource-id medium, and the bless round trip of the new refusal;
the gate job is named on landing.
2026-11-20 21:27:20 -08:00
Anees Iqbal 34c8f0e67c Validation: a kernel out-of-bounds case runs through the runtime, its facts every lowered variant's
A kernel case with out-of-bounds targets now routes through the runtime like any other kernel
case of its structure (engine::runs_through_runtime no longer excludes one). Before the state is
made, platform::runtime_bounds lowers each KernelVariant of the case's kernel on the runtime
device's own translator (rt::Device::translator), under LoweringInputs::kernel_variant of the
inputs kernel_inputs_read gives the descriptor's: the inputs the state lowers each of its modules
under, which the runtime's own test pins. A variant the translator refuses is one no dispatch runs.
Each lowered module's facts (its slots, fetches, resident roots, handle table and strategy
census) give the run's out-of-bounds facts through engine::out_of_bounds_run, as the executor's
own context reads its module's. Where two variants give different facts, which module a dispatch
runs would decide the case, so it is refused before anything is made:
NotSupported::Uncontained now carries the variant that differs (None for the device's robust
forms, as before), "not_supported{uncontained:variant PartialThreadgroups}".

Each guarded target (a buffer, or an argument buffer's) is a buffer at the runtime's placement
alignment inside a Shared block of its own, between guards of its declared reach (at least
MIN_GUARD), every guard byte GUARD_FILL, read back through a buffer over the whole block after
the dispatch: GuardCount::escaped, and past_end 0 (the buffer is all its bound memory). The
row's census records the facts with the counts.

Texture-buffer cases stay on the executor's own context (the runtime makes no texture buffer),
and so do the render out-of-bounds cases (vertex fetches); stage inputs do not route.

Tests: the routing test asserts an out-of-bounds kernel case routes; the device test
a_device_buffer_accessed_past_its_end_is_contained_through_the_runtime runs the public
ob1_storage_buffer case through the runtime (loads past the source read zero, stores past the
output do nothing, no guard byte changes, each target DeviceAddress / Shader). ENGINE_EXECUTOR_ABI
vulkan-engine-v192. docs/VALIDATION.md says how the facts are read.

Verified: cargo fmt; the compile gate and lavapipe suites, then the family's proof, follow as
potluck jobs.
2026-11-20 21:27:19 -08:00
Anees Iqbal 1687f8fc38 Validation: a 32-bit float depth texture is filled by a draw through the runtime, and a depth outside [0, 1] is the runtime's limit
The runtime takes no upload of a 32-bit float depth (Gap::FloatDepthUpload, which its own texture
and blit tests hold both ways). Kernel and render cases that bind a Depth32Float texture stayed
on the executor's own context. Now they run through the runtime: the run fills each such texture
by a draw, as a guest fills one.

The fill:
- The owned fixture depth_fill.metal is regenerated with scripts/regen-air-fixtures on the M3
  (m3-max-61107). It holds a fullscreen vertex function and a fragment function that writes
  depth(any) from a buffer of texels by pixel.
- platform::runtime_depth draws one pass per level and slice into the texture's depth
  attachment, under an always-passing depth test that writes. The texture is made with
  RenderTarget usage beside its declared usage.

DepthOutsideUnitRange becomes the runtime's limit (Limit::Runtime) and qualifies on Metal, as
ruled. A draw writes depths clamped to the viewport's [0, 1], so no runtime call puts a NaN, a
negative value or a value above 1 where Metal's texel holds it. The case checker now raises the
requirement from the case's literals on every device (executor_contract::case_requirements, via
depth_range::depth_range_requirement). The literals checked are each Depth32Float texture, each
texture-array element, each argument buffer's texture, and the depth attachment's initial depth.
The old executor's device-gated check (plan_resources::require_depth_range, which read
VK_EXT_depth_range_unrestricted) and its two call sites are deleted. The fill refuses such a depth
too, typed, so it never clamps one silently. No source fact carries the requirement, so the
source census is unchanged. Of the committed public cases, 7 kernel cases close as runtime-refused
(4ac0d4322d, 5d9f284f87, 70064cea52, f04e9b48c8, 59b3a9a43e, 6955da3062, b3d8e09b92). Their Metal
rows stay as committed.

ENGINE_EXECUTOR_ABI goes to v191.

Tests:
- Unit: the requirement from each literal kind, and its limit, stops and evidence gap.
- The Runtime and qualifies_on_metal lists.
- Routing: a Depth32Float texture now routes.
- Device: a_float_depth_texture_is_filled_by_a_draw_and_reads_back_as_authored. Both runs read
  eight depths of a 4x2 texture back exactly, and through the runtime a depth of 2.0 is refused
  as depth_outside_unit_range.
- The device test of the old gate is deleted with the gate.
2026-11-20 19:06:55 -08:00
Anees Iqbal 8528603a73 Validation: a vertex or fragment case of one sample draws through the runtime
A render case of one sample now draws through metal2vulkan-runtime's public API on Linux, in the
stated leg and with no profile restriction, as a consumer draws it. That covers its own stage's
buffers, bound textures and samplers, function constants and linked functions, and its generated
companion. It also covers vertex buffers at static strides, Shared 2D color targets loaded and
stored by the pass, the oracle's depth-stencil state, cull mode and winding, and one direct or
indexed draw of primitives. The case observes a buffer, a texture, a color target or nothing. A
rasterization-disabled vertex case renders into the oracle's 1x1 R8Unorm attachment, which its
pipeline declares at index 0, as the oracle's does.

engine::runs_render_through_runtime decides the route from the case's structure alone, naming
every RenderCase and StageResources field. These keep a case on the executor's own context:
- a depth/stencil attachment;
- more samples;
- layered rendering;
- a dynamic vertex stride;
- an argument-buffer member, object or command buffer;
- a function table;
- tessellation;
- an imageblock;
- a rate map;
- an out-of-bounds target;
- a fragment pass with no color target (the runtime makes no pass without an attachment,
  Gap::RenderPass).

The kernel route's attempt, validation log, device, ceilings, sampler numbering, buffers,
submission and row are now shared helpers in platform::runtime. runtime_textures makes one
function's textures and samplers at the run's next indices, so both stages of a draw take
disjoint ones. ENGINE_EXECUTOR_ABI goes to v190: render rows of the routed shape now record the
runtime's answer.

Tests:
- a unit test pins the routing both ways;
- three device tests (the passthrough fragment, the observed vertex at its varying and its
  position, and the rasterization-disabled vertex store) run the runtime arm on Linux against
  the same expected bytes.
2026-11-20 18:29:45 -08:00
Anees Iqbal dc21cd66c7 Colour groups go: no render variant draws a group of a pipeline's color attachments
A device draws to at most the lesser of its maxColorAttachments and maxFragmentOutputAttachments
color attachments at once. A pipeline with more (or one at an index at or past that count) was
compiled as color groups: a variant per group (VariantKey::color_group) whose fragment function
wrote the group's colors at locations 0.., with the group's attachments alone in its graphics
state, and the runtime drew each group in a pass of its own. The runtime's floor requires 8 of both
limits (floor.rs), Metal's count, so no device it runs on takes a group, and it asks for every
render variant with VariantKey::new(); nothing in it reads GraphicsState::color_group. The groups,
their inputs and their note are deleted. Such a pipeline is now refused where it was already
refused without a group: InterfaceComponents at MaxColorAttachments (link) or at
MaxFragmentOutputAttachments (the fragment's outputs).

Removed:
- pipeline/compile/color_group.rs (group, descriptor, entry, refusal) and the compile layer's use
  of it: FragmentPass::color_group, InputsFrom::color_group, grouped_entry, and the grouped
  descriptor in compile_render_pipeline_keys and render_pipeline;
- the inputs and keys: ColorGroup (with of, width_on, colors, groups, location),
  VariantKey::color_group, LoweringInputs::color_group and its key bytes, the pipeline key's
  " color_group N" field (variant_fields);
- link: RenderLinkInputs::color_group, LinkInputs::render_variant's group parameter, and link's
  group check (a fragment stage of another group, and the per-group refusals);
- the state: GraphicsState::color_group and StageIo::color_group;
- the invariance: the stage plan's invariant_fragment_outputs and its Invariant decorations of
  FragDepth, SampleMask and FragStencilRefEXT; the module builder now decorates Position and
  ClipDistance alone, the outputs nothing else made invariant;
- PrecisionNote::ColorAttachmentGroups, its conformance Degradation, its comparison allowance and
  its catalogue entry in docs/API.md;
- validation: the census's color_groups and color_limit, which translated a fragment function of
  more colors than the profile draws as one module a group, and with them PendingL3::groups,
  PendingModule and the L3 stage's later modules: an attempt is one module again.
  ENGINE_CENSUS_VERSION 8;
- the runtime's translator_fields row for color_group.

Tests:
- engine_color_groups goes, and engine_primitive_ids' color_groups_share_the_vertex_function_s_id.
- validation's a_fragment_function_of_more_colors_than_the_floor_translates_in_color_groups becomes
  a_fragment_function_of_more_colors_than_the_device_draws_is_refused: on a four-color profile
  cg_five, cg_seven, cg_sparse and cg_counts keep their limit refusal; on lavapipe each translates.
- the builder's invariance test: FragDepth is refused like PointSize.
- api_tests, api_surface and the variant key's debug text lose their rows.
The color_groups and color_groups_fetch fixtures stay (engine_dead_reads, pass_attachment_pairs
and the fixture tables read them).

docs/API.md's paragraph on groups now states the two limit refusals; docs/VALIDATION.md's census
row loses its sentence. api_signatures is blessed; docs/REFUSALS.md is regenerated.

SEMANTICS_VERSION 2228, ARTIFACT_FORMAT_VERSION 573 (placeholders; main renumbers). SEMANTICS: a
pipeline that took groups is refused, and the note goes. ARTIFACT: the codec loses ColorGroup,
StageIo's and GraphicsState's fields and a PrecisionNote variant. RUNTIME_VERSION stays: the
binder never read a group, and the runtime pin does not move.

Consumer check (consumer-uses.sh, consumer development 0140a12682, 60 refs): 0 hits (code) for
ColorGroup, color_group, width_on, render_variant and color_groups. ColorAttachmentGroups: 0 on
development; used in crates/reims-vgpu-vulkan/src/answer.rs on 37 of the consumer's steelbrain/*
branches, a crate its development no longer has.

Verified: m3-max-61080 (msi) at the tree before the import fix: nextest of metal2vulkan,
-conformance, -validation and -runtime, 5878 of 5879 passed; the one failure is
the_old_render_descriptor_key_keeps_its_value, which moves with SEMANTICS_VERSION (main pins it at
a named pin). Its clippy step found validation's InternalError import unused; m3-max-61112 (um790)
at this commit's tree: fmt, clippy and Rustdoc green. States-only plays on lavapipe of the probe
player built at the change (steelbrain/cutxlate-cgplay, m3-max-61082): m3-max-61087 to 61091, 61
runs over the 36 streams, render 502920 states made and 0 refused, compute 108189 made and 0
refused, the counts of the plays before the change.
2026-11-20 18:21:24 -08:00
Anees Iqbal 5b653bc1d4 Validation: a kernel case's argument buffers of buffers, textures and samplers run through the runtime
What: runs_through_runtime now routes a kernel case whose argument buffers hold buffers, textures
the runtime makes (`runtime_texture`) or samplers, observing a buffer, a texture, an
argument-buffer buffer or texture, or nothing. A pipeline state, a command buffer or a
rasterization-rate map in an argument buffer still keeps the case on the executor's own context.

How, as the Metal oracle does (metal::platform::argument_buffers):
- Each argument-buffer buffer is a Shared buffer of its bytes.
- Each argument-buffer texture is made as a bound one, with the usage its AIR member declares
  (runtime_member_usages), at an index of the run's texture grant after the bound textures.
- Each argument-buffer sampler is its argument_sampler_descriptor at an index of the sampler
  grant below the bound samplers.
- The owner's bytes hold each member's gpu_address or gpu_resource_id().to_bits() at its field
  (engine::argument_buffers::owner_bytes), written before the owner is made, as a program writes
  them.
- The encoder uses each member buffer and texture for reading and writing (use_resource).
- An argument-buffer buffer output reads the member's final bytes; an argument-buffer texture
  output is read back as a bound texture's.

ENGINE_EXECUTOR_ABI is now vulkan-engine-v189. docs/VALIDATION.md's "Through the runtime" names
argument buffers.

Tests:
- The routing test routes a case of all three member kinds under both member outputs, and keeps
  a texture-buffer member off the runtime.
- Three device tests run on the executor's own context and, on Linux, through the runtime:
  - selected_member_texture: two argument-buffer textures chosen per thread;
  - argument_sampler_sample: an argument-buffer sampler sampling its member texture;
  - ob2_loaded_pointer, in bounds: an argument-buffer buffer loaded into `out` and stored
    through, observed in the member.

Verified: in the lane's report (the compile gate and the family's proof, its 20 committed cases
on lavapipe against committed Metal, before and after).
2026-11-20 17:44:53 -08:00
Anees Iqbal 47d782f3a5 Fix forward of 14dca89bf9: lint, a float depth stays on the executor's context, a format the device lacks is not_enabled
What: the compile gate m3-max-60907 at 14dca89bf9 failed clippy twice and Rustdoc twice:
- `usage = usage | ...` becomes `usage |= ...`;
- `dispatched` takes its dispatch and threadgroup size as one argument;
- the public docs of `runs_through_runtime` and `RuntimeKernel` named private items as links.

The family's public proof (m3-max-60908, 218 cases on lavapipe against committed Metal, before
and after) showed 17 rows failing through the runtime:
- 15 bind a Depth32Float texture, whose bytes the runtime takes no upload of
  (Gap::FloatDepthUpload). The executor cannot fill one, and a guest fills one by drawing.
  `runtime_texture` now keeps such a texture on the executor's own context, where these rows
  ran before.
- 2 bind R8Unorm_sRGB, which lavapipe's format query lacks. The runtime refuses it as
  Gap::TextureFormat; before, the executor's own context recorded not_supported{not_enabled}.
  `runtime_error` now maps that gap to NotSupported::NotEnabled with the gap's text. Every
  other runtime gap still fails the row.

ENGINE_EXECUTOR_ABI is now vulkan-engine-v188. docs/VALIDATION.md's "Through the runtime" now
names textures and samplers, what keeps a case off the runtime, and the not_enabled mapping.

Tests: the routing test adds a Depth32Float texture, which is not routed. A new unit test
covers runtime_error's two mappings.

Verified: in the lane's report (compile gate and the focused rerun of the 17 rows).
2026-11-20 17:33:49 -08:00
Anees Iqbal fd924dd9c8 Census: a requirement the runtime refuses is the runtime's limit, closed without a candidate run
The authoring-capability census stayed open on 66 rows, every one a
requirement whose shape metal2vulkan-runtime refuses: seq_cst_fence (14),
texture_buffer_member (6) and mesh_render_pipeline (46). Each was a tooling
gap (Limit::Tooling), which keeps a row unresolved, though no tooling the
executor could build would run them: the product refuses them.

The ruling is a third limit beside Limit::Metal. Limit::Runtime is the limit
of a requirement whose shape the runtime answers with a typed refusal, or for
which it has no call and the consumer refuses it itself. Its rows are closed
without a candidate run and counted apart: runtime_refused beside
metal_refused, in the summary line and in each executor's stops line. They
stay unresolved only where a tooling gap of their own keeps them open. What
the runtime runs and the executor cannot drive stays Limit::Tooling. This
replaces the first lane's "no new Limit" ruling.

- seq_cst_fence: the runtime refuses the pipeline at its make as
  Unsupported{IdentityDomains}. Both ways on lavapipe: the existing
  a_seq_cst_fence_is_refused_through_the_runtime_as_its_requirement_says,
  and the new a_fence_of_another_order_is_made_through_the_runtime (the same
  two stores around an acq_rel fence, made and run, its words checked).
  One-off over the census's 14 rows (m3-max-60840, a probe that never
  lands): each row's own make through the runtime on lavapipe, with no
  input, is the named refusal, not_implemented IdentityDomains, 14 of 14.
- texture_buffer_member: two device tests, each both ways.
  a_texture_buffer_is_refused_where_a_2d_texture_is_made: new_texture
  refuses a texture buffer as Gap::TextureBuffer and makes a 2D texture of
  the same format.
  a_texture_buffer_member_is_refused_at_the_make_where_a_2d_member_is_made:
  the make of a kernel reading an argument buffer's texture buffer is
  refused as Unsupported{IdentityDomains}, and the same read of a 2D member
  is made.
- mesh_render_pipeline: the runtime has no mesh call, and the consumer
  refuses mesh itself (the runtime README's known gap). Without a call there
  is no device test; that README sentence is the guard. The requirement's doc
  says the limit flips when a guest's mesh pipeline is built.
- The new owned fixture rlm_runtime_limits (regenerated with
  scripts/regen-air-fixtures on the M3, m3-max-60866) holds the acq_rel
  fence and the two member reads. A triage test checks the classifier
  takes each shape and not its pair.
- The platform's runtime device opening is factored out (opened), so the
  device tests can make a texture or a pipeline alone under the validation
  layer (on_runtime_device, make_kernel; both test-only).
- The analyzer version is now structural-triage-v85. docs/VALIDATION.md
  states the closure. AGENTS.md's census bullet stays true as written.

Verified: the compile gate and the census, both named in the lane's report.
2026-11-20 17:11:50 -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 ba63cf58ca Policy arms: the enables tests import DevicePolicy themselves (clippy 59962); docs name what is bounded
The enables module no longer names DevicePolicy, so its tests import it. API.md and
VALIDATION.md say the default domains' bounds, and an unbounded threadgroup access, instead of
containment and isolation. api_signatures.tsv is regenerated (signatures.py --bless); REFUSALS.md
is unchanged.

Verified: clippy follows as a potluck job.
2026-11-20 14:30:50 -08:00
Anees Iqbal 6750bb3c74 validation: run plain kernel cases through the runtime's public API
The engine candidate's Vulkan executor runs a kernel case of buffers (device buffer arrays
included), threadgroup memory, function constants and linked functions, dispatched by threads
or threadgroups and observing a buffer, through metal2vulkan-runtime as a consumer runs it
(engine::runs_through_runtime decides it from the case's structure; platform::execute_runtime
runs it): Instance, the loader's first device of the kind, Device with the default options,
the library and function from the row's AIR with the case's constants and linked functions,
one compute pipeline state, one Shared buffer per binding as the oracle makes it (a bound
buffer padded to its declared size), one compute encoder, one dispatch, the bounded wait and
the readback. Only on the native backend, in the stated leg and without a profile restriction;
every other case keeps the executor's own context until its family's landing.

The device worker enables VK_LAYER_KHRONOS_validation for the run through the loader's and
the layer's variables (core and synchronization validation, every message, one log per
process); a device with no active validation tool fails the run, and so does any logged
message. The pipeline state's make is held to 500 MiB of peak live allocations
(worker::alloc::bounded: an allocation past it ends the process with exit 87 and a stderr
line) and 20 s; the driver's creation to the case's bound; every pipeline is made before the
submission (prepare_dispatch).

The row keeps what the runtime answers: the state's precision notes and the runtime
fingerprint (engine::runtime_fingerprint: the product, SEMANTICS_VERSION and the runtime
crate's sources, METAL2VULKAN_RUNTIME_CRATE_FINGERPRINT from build.rs). spv_sha256, the
status, the census module's subgroup shape, containment and artifact are absent (Option, serde
default); the index's staleness accepts the runtime fingerprint as this build's.

ReductionOrder: the comparison keeps the note's per-operation allowance. The census strategies
of a runtime row are the simdgroup float sums and products the case's AIR calls
(check::interface::float_reductions, from the entry's module and each linked module), under
the names the translator's strategy census gives them, so ComparisonClass::derive bounds the
same operations with the same reorder table as before; a note no such operation explains
(a simdgroup matrix's) stays unbounded, as before.

ENGINE_EXECUTOR_ABI v185: rows of these cases record another environment and census.
2026-11-20 13:39:18 -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