Commit Graph
8693 Commits
Author SHA1 Message Date
Anees Iqbal 54cf60e29a replay: the visibility play test reads the occlusion pools in the backend's gauges
What: the rt_replay stream of a Reset pass's visibility results now presents after its check, so
the frame ends, and its test plays it on a backend it ends itself: the frame's end gauges (`live`)
read `occlusion_pools` 1, the pool the command buffer took, and the device's drop gauges
(`NewRuntime::end`, the matrix's `@drop` records) read it 0.

Why: the last commit added the gauge to both printouts with no run that read it.

Verified: cargo fmt; the lavapipe job on this commit is named in the lane's report.
2026-11-21 07:09:57 -08:00
Anees Iqbal 215ee0125b replay: the player plays visibility results through rt; the occlusion pools' gauge in its printouts
What: the replay player on the runtime plays a pass's visibility results instead of stopping at
them. `m2v.setPass` carries `visibilityResultType` (Reset, Accumulate) into the runtime's
`RenderPassDescriptor::visibility_result_type` beside the `visibilityResultBuffer` it already
carried, and a render encoder's `setVisibilityResultMode:offset:` plays as
`RenderCommandEncoder::set_visibility_result_mode` (Disabled, Boolean, Counting), whose counts rt
writes into the buffer at the pass's end. What rt does not build is skipped and counted as every
render command gap is (`skipped_render_commands`, a line per kind with its first frame and call):
a mode in an `Accumulate` pass is `Draw { kind: AccumulatedVisibilityResults }`, and a mode rt
refuses as Metal's validation does (no buffer, an offset off 8 or past the buffer, an allocation
byte off 8, an offset taken before) is `Refused(KIND)`, keyed by the refusal's kind alone, the
encoder's mode unchanged. Any other runtime error still ends the play. The player's two gauge
printouts, the frame-end `live` set and the at-drop list the matrix holds at 0
(`M2V-MATRIX gauge replay-rt/device/GAUGE@drop`), add `occlusion_pools`.

rt: a test runs 200 command buffers one after another, each a pass that sets `Counting` and draws;
the occlusion pools read 1 after the 100th and the 200th (a command buffer gives its pools back
before `wait_until_completed` returns), the word 64, and 0 once the device drops. The README's
visibility section says what the gauge counts.

Docs: docs/REPLAY-STREAM.md says the backend plays visibility results, lists the two skipped forms
under the skipped render commands, drops the visibility result buffer from the pass properties the
runtime does not hold (a skipped one still skips the encoder), and names the query pools among the
frame-end gauges.

Why: the planner's ruling for the visibility follow-ups: the player plays the visibility calls a
stream records through rt, counts what rt refuses, and the occlusion pools get the leak gauge
every resource kind has.

Verified: cargo fmt. rt_replay (lavapipe): a Reset pass's Counting and Boolean words (16 and 16 for
a 4 by 4 target, the untouched word's bytes kept), an offset taken twice counted as
Refused(VisibilityResultOffsetTaken) at its call, and an Accumulate pass's two modes counted by
their gap with the buffer's bytes kept; the compile and lavapipe jobs are named in the lane's
report.
2026-11-21 07:09:56 -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 5a04298008 rt: the count kernel's shape call takes the state's compiled content; the refusal beside Accumulate; as_chunks in the new word readers
What: RenderCommandEncoder::execution_part passes the compiled content by reference
(&**compiled), as Indirect::shape takes it; the tuple built before the call took no coercion. The
runtime README's known gaps of render encoders name the execution over a held range refused while
a visibility query counts (VisibilityResultInterrupt) beside Accumulate's refusal: both need a
count carried across two queries with the parts added; the visibility section lists it among the
commands that end the rendering. The count kernel's interpreter test and the runtime's visibility
cell read their words with as_chunks, which the dated nightly's clippy asks for.

Why: job m3-max-63533 on d245bab9d1 failed clippy plain and --cfg m2v_gpu with E0308 at
render_encoder.rs:2801 (expected &RenderCompiled, found &Arc<RenderCompiled>).

Verified: by this commit's compile job (named in the lane's report).
2026-11-21 06:53:05 -08:00
Anees Iqbal d245bab9d1 rt: an execution over a range the GPU writes counts its parts with a kernel; parts bounded at 2 MiB of preprocess bytes
What: an execution of an indirect command buffer runs in parts of the most commands whose
preprocess bytes, as vkGetGeneratedCommandsMemoryRequirementsEXT answers with the inherited
pipeline, stay at or under 2 MiB (indirect::PART_BYTES), one rule on every device, in place of
parts of 64 commands. The device is asked from one command up, doubling while the answer stays at
or under the bound, then again at fewer in proportion to the last answer until it is, so no answer
at far more commands than a part takes is trusted (lavapipe's grows with the square of the count
and wraps at 32 bits). An execution over a range a buffer holds (executeCommandsInBuffer:
indirectBuffer:indirectBufferOffset:), location 0 included, ends the rendering, runs the
translator's new count kernel (pipeline::own_kernel(OwnKernel::ExecutionCounts), one workgroup a
part, its parameter block pipeline::ExecutionCounts in the ring), one global barrier, and begins
the rendering again; each part's vkCmdExecuteGeneratedCommandsEXT reads its count at
sequenceCountAddress: its commands through the range's last, none past it or wholly before its
location. A CPU-given range runs no kernel. While a visibility result's query counts the draws,
the execution is refused (Gap::Draw VisibilityResultInterrupt, counted), as the rendering cannot
end inside the query. The runtime makes its own kernels once a device, at first use, through the
pipeline cache and layout (runtime src/own.rs), and destroys them with the device. The idle
preprocess pool's bound goes from 128 to 64 MiB: one frame of the sample now takes about 27 MB of
commands' bytes plus at most one part an execution.

Why: an execution over a GPU range ran the buffer's whole capacity, every command past the range
costing its vertex work. Parts of 64 commands cost 61 times one execution's GPU time on the 2080.
RADV fails past about 4 MiB of generated commands in one execution (draws nothing on a 7900 XTX,
loses the device on a 780M): it chains by sequence count, not bytes. The 2 MiB bound is half that.

Verified: on the probe branch (d59701c670), jobs 63460 and 63481 measured the frame of Apple's
rendering sample: at the 2 MiB bound 931.8 us of GPU time on the 2080 (920.0 at whole capacity)
and 588.5 on the XTX. This commit: compile job and the lavapipe rt suite, reported with the sha.
Tests: the count kernel against a brute-force count on the interpreter and valid on every
committed profile; held ranges at 0, past a part, past the commands, and a CPU range across
parts; a held range in a Boolean visibility mode before and after its first draw; the widest
layout's part at or under the bound on every device.
2026-11-21 06:47:06 -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 03d898aac0 Bless at the pin 7c1baad228: golden semantics line, compile census, render key, opened chains
The pin 7c1baad228 (stage size, SEMANTICS 2257, ARTIFACT 588; the
overlapping copy) named by the planner, blessed as it ruled: the render
key, the opened chains and the compile census; nothing else is
bless-owned.

- golden_hashes.tsv (bless job m3-max-63499 on the M3 at 7c1baad228,
  inventory 0, golden 0, printouts 0): the semantics line moves 2256 ->
  2257; no cell moved.
- authored-compile.tsv (census m3-max-63500 at 7c1baad228, exit 0): the
  product key moves (SEMANTICS 2257) and the executor key v203 -> v205
  (e6e70666ed's v204, 1d79c26b7a's v205). All 1,778 changed rows move
  their artifact digests only; no row changes state, none added or
  removed.
- the render descriptor key 73d3fa75... -> 78157ab4... (SEMANTICS 2257;
  the value stagesize's check 63426 and viscut's 63488 printed).
- opened_chains.txt, blessed at development's tip 0c352506a5 (job
  m3-max-63513 on msi: the check failed with 2 contexts moved, the bless
  wrote this): runtime-floor's device and restricted chains each gain one
  member (48 -> 49, 56 -> 57). Both fe6ed10162 (pipelineCreationCacheControl)
  and b5ac9fd07b (occlusionQueryPrecise) edit runtime-floor.json since the
  last bless at e6e70666ed; the chain moved by one member and this bless
  does not split which. No other profile's chain moved.

Due at the next pin, not here: the golden cells under the runtime-floor
profile's new fingerprint from b5ac9fd07b (1,860 cells, after the pin).
2026-11-21 06:41:16 -08:00
Anees Iqbal 0c352506a5 Translator: ARTIFACT_FORMAT_VERSION 588 -> 589 for the PrecisionNote tag DeviceOcclusionCount
What: the cache codec's PrecisionNote enum gained the tag DeviceOcclusionCount in this branch's
first commit, which bumped the format version 587 -> 588. development's c3f9f55e63 bumped it
587 -> 588 too, for its own change, and the rebase onto it kept one 588 for both encodings. This
bumps it again, so an entry that holds the new tag never shares a format version with a build that
cannot decode it.

Why: cache/mod.rs's rule: bump whenever a variant or tag is added to an encoded type.

Verified: the check job on this commit runs the cache:: tests (the frame layout test reads the
constant) beside the compile gate (named in the lane's report).
2026-11-21 06:30:15 -08:00
Anees Iqbal 02320ca135 rt: the visibility family's test allows a Boolean word's count; as_chunks in the word reader; the coverage document after the ledger's rows
What: the conformance visibility family's table test asserted that no case loosens a word, which
the accepted difference "a Boolean visibility result is the count of samples that passed" now
does for each Boolean offset. It is renamed every_case_is_tabled_and_loosens_only_a_boolean_word
and asserts that every allowance is Loosening::Nonzero under that accepted difference, at an
offset some pass of the case sets Boolean: a Counting word, or any other loosening, still fails
it. The runtime's visibility test reads its words with as_chunks::<8>, which the dated nightly's
clippy asks for in place of chunks_exact(8). docs/CONFORMANCE-COVERAGE.md is regenerated
(python3 -I scripts/conformance-coverage/coverage.py) after the ledger rows the last commit
rewrote: 19 old VisibilityResults rows out, 9 refusal rows in.

Why: check job m3-max-63470 on 3f5c41675b failed these three: clippy under --cfg m2v_gpu and
--cfg m2v_cpu_icd (clippy::chunks_exact_to_as_chunks at tests/visibility.rs:67), the conformance
coverage check, and the visibility table test.

Verified: by the next check job on this commit (named in the lane's report).
2026-11-21 06:37:13 -08:00
Anees Iqbal 275be5c367 rt: occlusionQueryPrecise stays out of the translator's profile; the floor test's 61 cases; the ledger's visibility rows
What: the floor requires occlusionQueryPrecise without naming it to the translator (no shader reads
it), so shader_enables, and with it the translator profile rt's Device::new derives and every key
it makes, stay as they were; the_translator_sees_only_what_device_creation_enables asserts it. The
floor test's missing-feature cases are 61 with occlusionQueryPrecise's. known-gaps-rt.tsv drops the
19 rows of the old VisibilityResults gap (the visibility cases that now draw and the
host-page-writes-visibility-writable sites) and lists the cut's refusals: the offset taken twice
(Metal's own refusal) in the four revisit cases, and Accumulate in its five sites.

Why: check m3-max-63457 on b5ac9fd07b read clippy's E0308 at the floor test's case array, and the
lavapipe replay m3-max-63459 listed the ledger's drift (28 lines, all visibility rows).

Verified: cargo fmt; the compile and lavapipe jobs on this commit are named in the lane's report.
2026-11-21 06:21:11 -08:00
Anees Iqbal b5ac9fd07b rt: visibility results, one precise occlusion query per mode, copied into the buffer at the pass's end
What: `setVisibilityResultMode:offset:` builds `Boolean` and `Counting`. Each such mode set is one
segment counted by one precise occlusion query (`VK_QUERY_CONTROL_PRECISE_BIT`), begun in the
pass's rendering before the segment's first draw and ended there at the next mode set or the
encoder's end; a segment with no draw begins and ends its query as it ends, so its word is 0.
After `vkCmdEndRendering` the pass copies the counts (`vkCmdCopyQueryPoolResults`, 64-bit, WAIT)
straight into the visibility result buffer's `VkBuffer` at place+offset, one copy for each run of
consecutive offsets in one pool, before the pass's second barrier (recorded or owed), which orders
them before every later command; a Shared buffer's segment end barrier reaches the host, and a
Managed buffer's write and a texture over the buffer in an image of its own are kept as a blit's
write is. `Boolean` writes the count too, nonzero exactly where a sample passed (Metal documents a
nonzero word; the M3 Max writes 1): an accepted difference in docs/API.md section 10, and the
conformance cases compare a `Boolean` word as nonzero alone.

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

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

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

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

Verified: cargo fmt; scripts/api-signatures --bless/--check, refusal_surface (0 without reach or
basis), metal-coverage and conformance-coverage regenerated, check_device_profiles (0 findings).
The compile job (fmt, signatures, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace
Rustdoc -D warnings) and the lavapipe rt suite, with tests/visibility.rs (Boolean and Counting
against the CPU's counts, pool reuse and the 16-pool bound past 17, Metal's refusals, Accumulate,
the barrier and attachment-read interrupts), are named in the lane's report.
2026-11-21 06:16:57 -08:00
Anees Iqbal 7c1baad228 rt: overlapping regions of one texture copy in slabs, as from the source before the copy
copy_from_texture refused a copy whose regions overlap in one level and slice of one image (a
texture into itself, or a texture and its view) as Gap::TextureCopy, and the program's copy was
skipped. Metal does not refuse the call; it leaves the result undefined, and an Apple M3 Max gives
each destination texel what the source held before the copy (the conformance crate's
buffer_texture_blits case, which recorded it).

No vkCmdCopyImage may read a texel it writes (VUID-vkCmdCopyImage-pRegions-00124), so
texture_copy now cuts such a copy into slabs along one shifted axis, the one of fewest slabs. Each
slab is no thicker than the shift there, so its two regions lie apart, and the slab at the end the
shift points to goes first, so no slab reads a texel an earlier one wrote: the result is memmove's.
Each slab is one vkCmdCopyImage in the general layout, with an execution barrier (COPY to COPY)
between two slabs, every hazard between slabs being a write after a read. Each extra barrier is
counted. Regions apart remain one slab and one command, and the same region still records nothing.
A shift of 20 texels over a 21-texel row is 2 commands; the worst case, a shift of one texel, is one
command per texel of the region's extent on that axis. No scratch image, no cap.

Gap::TextureCopy keeps its other arms (a multisample texture, depth and stencil both, one pixel
format in two Vulkan formats, 1D with another type); its doc, the rt README's blit section and
docs/REFUSALS.md (regenerated) drop the overlapping arm. The conformance ledger's row for
buffer-texture-blits-overlapping goes, since the rt side now answers that case, and
docs/CONFORMANCE-COVERAGE.md is regenerated.

Tests: overlapping_regions_copy_in_slabs_the_far_end_of_the_shift_first checks the slabs' regions
and order (a 21x1 row shifted by 20, a shift toward lower y, a diagonal shift on the axis of fewer
slabs, regions apart as one slab); the 3D/array host test now expects slabs where it expected the
gap. On a device, every_device_copies_overlapping_regions_from_the_source_before_the_copy copies
toward higher and toward lower x and y, from a view into its texture, along a 3D texture's depth,
and by whole BC1 blocks where the device makes them. Each case expects the source's bytes from
before the copy, one submission, 2 + slabs barriers and no byte copied of the runtime's own.
2026-11-21 06:24:22 -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 ba428c4f4b rt: a stage fill answers the helper's own device-creation and compile times (StageSpans)
The planner asked for the helper's cost as a number: the 2080's fill read 129.3 s in one probe
and 104.3 s in another, and no line timed the compile alone. serve_stage now times its
Device::new and its one vkCreateComputePipelines call (host_time) and sends both in its reply;
Device::fill_stage answers them as Ok(StageSpans { device_nanos, compile_nanos }) in place of
Ok(()), so the consumer logs them with each fill. The reply's layout changed, so the wire is
version 2 (a helper of the old build is answered StageFill::Version); the stage key holds the
wire version, so entries kept under version 1 are misses.

Consumer: let spans = device.fill_stage(&request, to, from)?; log spans.device_nanos and
spans.compile_nanos.

The device test asserts both spans are nonzero and prints them; the README's fill_stage line and
the api signature table name StageSpans.
2026-11-21 06:20:20 -08:00
Anees Iqbal b192b89fa1 Validation: the compile exchange carries no table handles
What: acceptance::LinkedHandles, CompiledRequest, PipelineRequest::check_handles, the handles
linked_functions returned, the worker's Compiled<P> and CompileResult::Compiled's handles go.
compile_pipeline returns the AcceptancePipeline, a worker compile's result is the pipeline
itself, and linked_functions returns the LinkedFunctions alone.

Why: the handles were the words of the own context's visible-function tables (engine/tables.rs).
Since the deletion of the refused families' arms (e6e70666ed), nothing reads them: every reader
was a check that the worker's handles matched the request, or a test of that check.

Tests: a_request_function_links_the_functions_of_its_libraries,
a_linked_function_is_made_with_the_request_functions_constants and
a_linking_request_crosses_the_exchange_with_its_linked_libraries keep their pipeline and
constant checks and lose the handle-word ones. The product's own tests of
LinkedFunctions::function_handle (engine_tables, engine_argument_tables, engine_recursion,
engine_chosen_pointers) stay.

Nothing an executor enables, binds, submits, reads back or records changes, so the ABI stays
v204: the worker's JSON reply between a parent and its child of one build is all that moved.
2026-11-21 06:14:51 -08:00
Anees Iqbal fe6ed10162 rt: the floor profile requires pipelineCreationCacheControl, and the module digest reads its page as 4-byte chunks
Check m3-max-63418 on 2686094aaa: the runtime-floor profile's m2v_runtime_floor block, which
the_floor_profile_states_exactly_the_floor holds equal to floor.rs, lacked the new
pipelineCreationCacheControl row (added to RUNTIME_FLOOR in regen_device_profiles.py and to the
block it writes; the device's own Vulkan 1.3 features already stated it; check_device_profiles 0
findings, the script's 41 unit tests pass), and clippy's chunks_exact_to_as_chunks asked for
as_chunks_mut in the digest's page fill. The lavapipe rt suite otherwise read 573 of 574.
2026-11-21 06:09:05 -08:00
Anees Iqbal d8facd6c77 rt README: the stage helper form as measured, on a Radeon 780M and an RTX 2080
One kernel of entry weight 842,031 (its request 15,969,892 bytes), each step in a process of its
own, the drivers' disk caches off (probe jobs m3-max-63420 on the 780M, RADV Mesa 26.2.6, and
m3-max-63401 on the 2080, NVIDIA 620.70.06): the make refused unfilled; the helper's fill through
serve_stage and fill_stage 53.6 s and 129.3 s, entries of 5,866,121 and 7,594,869 bytes; a make in
a new process with the device's blobs removed made the pipeline from the entry alone
(pipelines_from_stage_fills 1) in 3 ms and 33 ms of driver creation; with the entry removed, the
make was refused unfilled again. An empty cache's flagged create was answered compile-required on
both (jobs m3-max-63309 and m3-max-63308).
2026-11-21 06:07:27 -08:00
Anees Iqbal 2686094aaa rt: a heavy kernel's module is hashed and sent a page at a time, with no copy of its words
The module of the kernel measured past the stage bound (entry weight 842,031) is 15,969,892 bytes
of request (job m3-max-63401). Its stage key's digest read a byte copy of the words, and the
request's payload a second copy beside the payload it grew into. The digest now reads the words a
4 KiB page at a time, and the payload is made once at its size with the words written into it.
2026-11-21 06:05:30 -08:00
Anees Iqbal f0ec7ee823 rt: the stage bound's tests compile on every cfg: the hand-made kernel holds no heavy module, the floor's 60 rows, no clone of a Copy answer
The check job m3-max-63391 on c3f9f55e63 stopped at three compile errors: the test-only
ComputePipelineState::for_test built a Kernel without the new heavy field (m2v_gpu and
m2v_cpu_icd), the floor test's case array still declared 59 rows after the
pipelineCreationCacheControl row, and the rewritten stage-bound translator test cloned a Copy
answer (clippy clone_on_copy).
2026-11-21 06:04:17 -08:00
Anees Iqbal c3f9f55e63 rt: a kernel past the stage bound is made from its helper's compile alone, never compiled in the process
A driver's compiler takes memory that grows faster than the stage, in the process that creates the
pipeline. The translator refused every stage past COMPILED_STAGE_WEIGHT (99,109, the heaviest
measured to compile within host-sized memory, ANV on the Iris Xe of RPL-P), where Metal makes it.
Now the translator states the weight and the runtime compiles such a kernel only in a helper
process the consumer starts, caps and times.

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

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

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

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

Tests: tests/stage.rs: the directory past capacity on both bounds, oldest use out first, a hit
outliving older entries, a breach under the same bounds; cut, foreign-key, other-header and
unknown-breach entries a miss and removed; the wire's version and cut frames; the request's
joinable bounds; and on a device (m2v_gpu, m2v_cpu_icd), with the bound lowered for the test, the
refusal with no directory, lavapipe's NoPipelineCache, and elsewhere refused unfilled, filled by
serve_stage over two pipes, made from the entry alone with the shared cache's data unchanged,
then refused by a recorded breach.
2026-11-21 05:55:29 -08:00
Anees Iqbal 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 78a5c1346b Bless at the pin ce998742d7: the authored compile census
The compile census re-run at the named pin ce998742d7 (job m3-max-63361 on
the M3, census exit 0). The executor key moves vulkan-engine-v197 -> v203
(the nine refusal rows' v201, the cube-array route's v202, the
attachment-less route's v203). Every changed row moves into one of the
nine families' tooling requirements, 450 cases, matching d1266e5a5a:

  303 compiled -> kernel_function_table
   33 IdentityDomains -> kernel_imageblock
   22 IdentityDomains -> texture_buffer
   21 Imageblocks -> fragment_imageblock
   18 compiled -> kernel_imageblock
   15 IdentityDomains -> sparse_texture
   12 compiled -> rasterization_rate_map
    8 compiled -> kernel_stage_input
    6 ulong_texture_atomic -> ulong_texture_atomic,texture_buffer
    6 RayTracing capability -> kernel_acceleration_structure
    3 IdentityDomains -> kernel_acceleration_structure
    2 replayed_template_resources -> kernel_stage_input
    1 compiled -> dynamic_vertex_stride
    1 compiled -> kernel_acceleration_structure
    1 IdentityDomains -> kernel_stage_input
    1 replayed_template_resources -> kernel_imageblock
    1 replayed_template_resources -> dynamic_vertex_stride

No row was added or removed, and no row moved outside those families.
The product key is unchanged (no translator source moved since the last
bless).
2026-11-21 05:51:51 -08:00
Anees Iqbal ce998742d7 rt: a release waits for the submission that carried its own commits, never a later one
What: Work::settled(n), once every command buffer committed up to n is
submitted, answers the progress value of the last submission that carried
one of them, or 0 where each was seen complete. It answered the progress of
the last submission made at the moment it was asked. The answer comes from a
record of each command buffer's place in the commit order and its
submission's value, added as the submission closes and dropped as the submit
thread sees it complete, so it holds at most the command buffers the queues
hold at once. The pool notes a release's mark (and an import's or export's
free's) under its lock, so the marks rise along its FIFO: no entry behind one
that holds is over, and the block-maker thread, taking each ripe head in
turn, hands on every entry whose wait is over in one round.

Why: the block-maker checks only the FIFO's head, and the head's Commits(n)
became Progress(the newest submission at the check). On a GPU that never
idles each entry bound itself to a submission committed after it, and left
one submit-to-complete latency after the one before it: the backlog grew at
the program's release rate and drained only when the GPU idled. The consumer
measured it on an RTX 3090 (walk m3-max-63277: releases_waiting 129,428 then
400,454 a minute later, live textures 65,729 then 201,339, until
vkCreateImageView failed), and its repro on the runtime's API failed on an
RTX 2080 (m3-max-63291: 2,986 of 3,000 released textures held under three
1 GiB fills in flight). It is neither vendor- nor ICB-specific: a GPU that
idles each frame drains the FIFO at each idle. A release still waits for
every command buffer committed before it, and only for those; nothing is
capped or freed early. The same holds for imported and exported blocks'
frees (the `owned` FIFO) and idle allocations' frees.

Tests:
- rt (argument_tier): a texture released under a command buffer held at an
  event wait; the event is set and that command buffer completes; a second
  command buffer, committed after, is held between its close and its submit
  by its scheduled handler. The release's mark must answer a completed
  submission, and the texture must go while the second is held. The order is
  forced, with no timing in it.
- harness: own row releases_under_work, the standing check for a busy GPU.
  200 iterations each make 8 Private 64x64 textures and a view of each,
  commit a command buffer that writes 1 GiB, release them, and wait for the
  command buffer two before, so three are in flight. releases_waiting, live
  textures and texture block bytes are read with that work in flight at
  iterations 100 and 200, and none may grow by more than eight iterations'
  worth. A harness test runs the row on the cfg's device.

How verified (tree of c4d09750ef on fb466b4519; development since then
changed only the validation crate and docs/VALIDATION.md):
- Before, at fb466b4519 with only the tests (probe 628da990ea / fd2050cfa8,
  lavapipe, m3-max-63330 and m3-max-63336): the rt test fails with "the mark
  answers Some(2), with 1 completed".
- After, lavapipe suites of metal2vulkan-runtime and metal2vulkan-harness
  under m2v_cpu_icd (m3-max-63335): 605 passed. The rt test passes ("2
  releases gone under a later submission"), and so does the harness row
  (releases_waiting 41 -> 32, textures 21 -> 16).
- Lint (m3-max-63334): fmt; clippy -D warnings plain, under m2v_gpu and
  under m2v_cpu_icd; workspace Rustdoc -D warnings.
- The harness row also passed before the fix on lavapipe (m3-max-63336:
  releases_waiting 64 -> 32), so lavapipe does not exercise the busy GPU this
  row is for. Its before/after on a GPU is a separate run.
2026-11-21 05:47:13 -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 a1a47cb9c5 Validation: the engine executor ABI is vulkan-engine-v201, for the nine families' refusal rows
What: ENGINE_EXECUTOR_ABI moves from vulkan-engine-v197 to vulkan-engine-v201 (v198 to v200 are
taken by other lanes' commits).

Why: the previous commit makes the executor refuse 450 cases it ran on its own context before
(kernel_function_table, kernel_imageblock, texture_buffer, fragment_imageblock, sparse_texture,
rasterization_rate_map, kernel_acceleration_structure, kernel_stage_input, dynamic_vertex_stride).
Rows recorded at v197 hold the own context's run of those cases, which the executor no longer
records, so they are stale: a change recorded rows can observe needs the bump. The compile census
keys on the ABI too and is due its bless at the next pin, as that commit says.

Verified: a one-line constant change; no test or file other than authored-compile.tsv names the
string (grep). No build was run for this commit on its own; the gate of its parent's tree is
m3-max-63274 (fmt, validation clippy plain and --cfg m2v_cpu_icd, Rustdoc, the validation suite).
2026-11-21 05:38:21 -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 fb466b4519 rt_replay: the compute-state gap line carries the indirect command buffer's kind
Since 22ae7df766 (rt: indirect command buffers of indexed draws) the
IndirectCommandBuffers gap carries a kind, and the player's skipped-state
line reads 'IndirectCommandBuffers { kind: ComputeCommands } 1, ...'.
The compute-state test still expected the kind-less form and failed on
lavapipe (suite m3-max-63296; m3-max-63310 shows the same failure at
a0f86a2efc). The render-state test already expects the kind form.

The new string is the line job 63310 printed.
2026-11-21 05:35:00 -08:00
Anees Iqbal fc021c92d8 replay: a released index is kept back until every commit before its release has retired
The runtime leaves its consumer the duty never to place at an index pending work may use: a
placement writes the index's set-1 elements, which Vulkan does not define while a pending
command buffer uses them, and a consumer keeps a released ID back until every command buffer
committed before the release has retired (runtime README, "An index has one owner"). The player
stands in for that consumer, but owed an index only to the commits of command buffers that named
its object. A command buffer that reached the object through an ID in memory, and the play's own
blits and copies, owed nothing, so a play could make the undefined write.

Indices::give now owes the released object's index to every commit so far, in commit order. The
naming path stays for command buffers not yet committed at the release, and for a live object a
later one displaces.

A placement owed to a commit held on records not yet played (its command buffer waits for an
event only a later record signals, or is behind one that does on its queue) cannot wait for it
without a deadlock. It used to take the index anyway, counted. It is now kept back: the object
takes the highest free index of its class that no commit in flight is owed, outside the
program's sequence, counted on 'indices kept back N: ...' (it replaces 'indices given while a
commit they owe is held N'). The held buffer reads the object it bound. The kept object's ID
differs from the one the program saw, and the id lines report it. A placement waits only where
no owed commit is held, so every wait can end.

An index the player chooses itself skips one still owed instead of waiting or ignoring it: a
constexpr sampler's (the highest free sampler index; it never waited before) and a texture's
outside the program's IDs (place_outside). A sampler state equal to the one placed last at its
index still takes it without waiting: the runtime writes no element for it.

Tests:
- rt_replay an_index_released_after_a_held_commit_is_kept_back_though_it_names_nothing is the
  forced-order test. Held command buffer #6 binds nothing and was committed before #5's
  release, and its event holds it past #8's placement. #8 must take the highest sampler index,
  counted.
- a_placement_a_held_commit_owes_is_kept_back_and_counted replaces the old take-without-waiting
  test.
- The Indices unit tests cover a release owing every commit before it, and top skipping an owed
  index.

Docs: docs/REPLAY-STREAM.md section 5 (resource IDs, textures outside the program's IDs) and the
backend's report paragraph; the indices.rs module doc.

Verified by the compile and suite jobs named in the hand-over.
2026-11-21 05:28:13 -08:00
Anees Iqbal 49b964f808 rt README: a texture buffer is refused at both makes and in a pipeline, so a consumer that offers them hands the guest nil
The known gap said only that texture buffers are not built. What a guest sees is the mismatch:
the consumer answers an alignment and formats with buffer usage, and the make returns nil
(Gap::TextureBuffer at texture.rs, both Device::new_texture and Buffer::new_texture), while a
pipeline whose function declares a texture_buffer is refused at creation under the identity
domains. The gap now says so, as the planner asked, until texture buffers are built.

Docs only.
2026-11-21 05:28:00 -08:00
Anees Iqbal a8c2bfbfae Bless at the pin a0f86a2efc: engine inventory, golden hashes, printouts, compile census and the render key
The tables re-blessed at the pin the planner named (development a0f86a2efc, SEMANTICS 2256), on its
quick m3-max-63237 and suites m3-max-63238 (only the bless-owned tests red). Bless job m3-max-63243
on the M3 (inventory=0, golden=0, printouts=0: golden refuses an output changed under an unchanged
key, so every change here is a bless due); census m3-max-63253; render key m3-max-63244.

Every moved cell, read against the planner's classes:
- Inventory, 4,200 cells (each fixture counts as .ll and .air.ll):
  - NeedsInput{FramebufferFetch} -> ok: 1,860;
  - ok -> Unsupported{GpuEncodedIndirectCommands; NotImplemented}: 1,536 (96 entries, every one an
    indirect-command kernel encoder by its source, mesh_commands and resident_draws included);
  - ok -> Unsupported{Imageblocks; NotImplemented}: 675; Imageblocks needing PixelInterlock ->
    NotImplemented: 45;
  - ok -> StencilExport naming only the extension: 51; StencilExport naming the extension or the
    interlock -> only the extension: 21;
  - NeedsInput{FramebufferFetch} -> StencilExport naming only the extension: 12, the fixture
    dsx_fetch_returned_stencil (fetch_returned_stencil, fetch_returned_stencil_mask) on the three
    NVIDIA profiles, a function that both fetches and writes stencil: its own class.
- Golden, under the default policy (the identity domains):
  - 35,766 cells re-keyed by the SEMANTICS moves;
  - 3,800 hash -> Unsupported{IdentityDomains; NotImplemented}, plus 92 from
    NeedsInput{StorageTextureFormat} and 12 from DescriptorCount;
  - 1,860 NeedsInput{FramebufferFetch} -> a module; 120 NeedsInput{StorageTextureFormat} -> a
    module; 6 DescriptorCount -> a module;
  - 1,232 hash -> Unsupported{GpuEncodedIndirectCommands; NotImplemented}, across 40 encoder
    subjects. Each encodes what the runtime's indirect command buffers do not build (points or
    lines, draws without indices, a primitive type chosen at run time, a strided vertex setter,
    compute commands, pipeline-state, stage-in, mesh, patch or copy operations). Every encoder of
    indexed triangle draws still compiles (icb_indexed_16 and _32, ima_indexed, dio_encode, the
    icb_extras kernels);
  - 675 hash -> Imageblocks NotImplemented, 45 PixelInterlock -> NotImplemented; 51 + 21 + 12
    StencilExport as in the inventory;
  - rows: 10 new, engine/icb_indexed_extras (.ll and .air.ll: icb_extras_back_fragment,
    icb_extras_back_vertex, icb_extras_fragment, icb_extras_reset, icb_extras_wide_vertex); 2 gone,
    engine/tob_renders.ll "snapshot tob_read as Half" and "snapshot tob_read as Unorm8" (the
    snapshot form's rows).
- Printouts: air_input/icb_indexed_extras.txt added.
- Compile census, 1,853 status moves: 1,454 compiled -> IdentityDomains NotImplemented and 10
  refusals -> IdentityDomains (7 from RasterSampleCount, 3 from PixelCoverageAtSampleRate); 210
  compiled -> Imageblocks NotImplemented; 130 compiled -> GpuEncodedIndirectCommands (13 cases); 48
  compiled -> StencilExport naming the extension; and, its own named class, one cell:
  per-sample-integer-read-modify-writes-at-4x on amd-rdna3-radv, compiled -> RasterSampleCount needs
  FramebufferIntegerColorSampleCount(4) or ColorAttachmentSampleCount(R32G32B32A32_UINT, 4). Its
  cause is read separately; no guest reaches it today (guests answer no Apple family).
- The render key: 73d3fa751a244ac52d5c2c1ecbf5b094bb7ef0b64b521383442d8a1d5308391e (was
  c2e3aa7731405eaa..., blessed at 58bea6ca1c), moved by the SEMANTICS commits since: d9ba8d0e72,
  2a054f7785, c9b2534d4f, 1b256352b2, 20ae73f152.
2026-11-21 05:22:40 -08:00
Anees Iqbal a0f86a2efc Conformance ledger and rt README: the computed write over a fetch's own read is not built, worded as the translator now refuses it
What:
- known-gaps-rt.tsv: the 127 rows of the 22 cases whose fragment function computes a write over
  its own read of the attachment (17 padded-blend-*, 4 xr-masked-bgr10xr-*,
  argb8-targets-destination-alpha; every venue that ran them) take the refusal as the translator
  states it since the storage forms' removal, "needs AnyOf([[Feature(RasterizationOrderColorAttachmentAccess)]])"
  in place of "needs AnyOf([[Feature(FragmentShaderPixelInterlock)], [Feature(...)]])", and their
  reason says the form is not built: the translator builds it only over rasterization-order access
  to an input attachment, and the runtime enables no such access and binds no input attachment.
  The three NVIDIA stencil-output rows (pass-sequence-aspect-actions, stencil-output,
  stencil-output-loaded) take "needs AnyOf([[Extension(ExtShaderStencilExport)]])", the
  translator having no other form. The fetch rows' block comment drops the interlock.
- crates/metal2vulkan-runtime/README.md: the fetch known-gap bullet names these computed writes
  as not built, refused at creation on every device, and why; the floor table's logicOp row stops
  naming fragment interlock.
- rotated_targets.rs: the destination-alpha case's doc says the same.

Why: the lavapipe conformance replay at development b8f5cff550 (quick m3-max-63182, lvp_conf
EXIT=1) listed 44 drifts: the 22 llvmpipe rows still listed under the old wording and the 22
refusals not listed under the new. These cases were refused on every venue before the storage
forms' removal too (63159 at a449642cc7 read the ledger's 22 refusals); only the wording moved.
The planner ruled the make-with-note form not built (it would run 1 of the 22 under the identity
domains: the 21 extended-range cases are held by the runtime's Gap::TextureFormat).

No translation change, so no SEMANTICS bump.

Verified: m3-max-63234 at this tree, fmt and the lavapipe conformance replay (conformance replay
--cpu, as CI runs it): 0 lines of "known-gaps ledger does not list" or "still lists", rc 0;
the 4,796 rows are exactly the open gaps the ledger expects on that venue.
2026-11-21 05:01:11 -08:00
Anees Iqbal 60daf7b201 rt README: an execution's slot cap is the push bytes, and the token form's timed cost
A command's slot words must sit in the state's 256 push bytes, and the README said the token count
capped them (13 on lavapipe, 29 on NVIDIA's driver, 125 on RADV). Only lavapipe reaches its token
count: on every other device the push bytes run out first. The consumer measured on an RTX 3090 and
a Radeon RX 7900 XTX (jobs m3-max-63155, 63163, 63164, the runtime at 173861f4f7): a vertex function
reading N buffer slots with a fragment function reading 1 draws for N up to 24 and is refused as
DrawInput for N from 25 to 29.

The known gaps now state the translator's placement (lower/push.rs window, floor, tail_layout;
PushField's order in pipeline/sym.rs; access/mod.rs note_variable). The vertex window runs from 0
to 248. It holds the block address once the function spills, then any leading address, the
execution range, sequence and base words, the slot words, then the other fields, then a 24-byte gap
and a tail. That gives 25 slot words only where nothing but one 4-byte word or one bounds field
follows them, and 24 once the function spills. A slot read at a variable offset adds its bounds and
the zero range's address after the slot words, which is what makes 25 spill. The fragment
function's room past one lone slot word is stated from code and marked unmeasured. The refusal list
no longer gives NVIDIA's and RADV's token limits as reachable.

The token bullet's "only preprocess bytes were measured" gives way to rung 1's timed check, job
m3-max-63201 on the XTX. One execution of 512 commands of (3,1) in parts of 64 took 338,352
user-space instructions in the execute call against 339,490 with one token per run of words, 0.34%
fewer. The GPU time was 271.6 us against 280.3 us, read as not worse because the runs-of-words arm
ran first in the hold. The probe never lands (probe/icbcut-cost on 511f1819b3, probe/icbcut-cost-a
on 64fa6a7a9a).

Docs only: no public item's doc changes, since error.rs's Tokens and DrawInput docs and
execute_commands_in_buffer's do not state the token limits, so the refusal surface is unchanged.
2026-11-21 04:48:19 -08:00
Anees Iqbal c8326dedf8 Validation guard: four files no runtime input reaches leave the not-runtime list
What: candidate/engine/artifact/tests.rs's not_runtime list drops lower/fragment/fetch.rs,
lower/stage_io/mod.rs, lower/sync/memory_model.rs and spirv/requirements/mod.rs.

Why: the_runtime_sources_are_the_committed_ones failed on development b8f5cff550 (suites
m3-max-63183): "listed, but no runtime input reaches them" for exactly these four (the test alone,
m3-max-63216, printed the list). bind/graphics.rs, a runtime input, called
crate::lower::fragment::interlock_forms(profile), which fetch.rs defines, for the snapshot form;
the storage forms' removal took that call with the snapshot rows, and fetch.rs no longer imports
stage_io, sync::memory_model or spirv::requirements. The list holds every reached file that is
not an input, so an unreached one leaves it.

The runtime-sources pin is unchanged: the list is in a test module, which the guard's hash
excludes.

Verified: m3-max-63216 at b8f5cff550 printed the four; the test at this commit runs in the job
named in the report.
2026-11-21 04:55:12 -08:00
Anees Iqbal b8f5cff550 Re-pin the runtime sources after the encoder-operation lowering goes
What: crates/metal2vulkan-validation/runtime-sources.sha256 moves from 802e40e1c742... to
b59c642638b8c4486cb60a54c781e41abd18de250f28c1bb7a220a8105137d52.

Why: indirect_commands.rs, a runtime-guard input, drops CommandEncoderOperation's per-operation
policy table. The value is the one the guard test computed at 4606692494 (m3-max-63040), whose
tree is this commit's parent's less the runtime README edit below it, which the guard does not
read. RUNTIME_VERSION is not bumped: the table served only the encoder operations whose lowering
now refuses, so an unchanged artifact runs as before.

Verified: m3-max-63040 (the validation suite at 4606692494): 1359 of 1360 passed, the one failure
this guard naming the value above.
2026-11-21 04:39:28 -08:00
Anees Iqbal 20ae73f152 Translator: the resident-table domains' encoder-operation lowering goes; object words stay
What: lower/access/encode.rs goes. It lowered a function's indirect-command encoder operations
under the resident-table domains, writing the binder's records and their written flags. What it
held that is still used moves to lower/access/object.rs:
- an argument buffer's command-buffer or pipeline-state member read as its word (ObjectWord);
- the plan that admits such a load only as an encoder operand.

Every encoder operation is now refused, `Unsupported{GpuEncodedIndirectCommands,
NotImplemented}`, except those the identity domains' icb.rs lowers: a render command's buffer
setters, its indexed triangle draw and a reset. icb.rs is selected first, as before. The other
deletions follow from that:
- indirect_commands.rs drops CommandEncoderOperation's per-operation policy table;
- lower/access/dynamic.rs drops the resident-set search and address helpers only encode.rs
  called (plan_search, plan_address, search_start, plain_base);
- the error doc of the depth-stencil argument names the setters' refusal;
- engine_indirect_commands.rs keeps two tests: every encoder operation refused under the
  resident-table domains on every committed profile and Profile F, and a depth-stencil member
  compiled unread and refused read. engine_handles.rs expects the refusal where a pipeline-state
  member is a command's operand;
- the command-writes interface test now takes icbcut's indexed kernel (icb_indexed_16) under the
  identity domains, plus the template that takes no command buffer;
- the authored census integration test expects the encoding case's refusal on both forms;
- docs/API.md's indirect-command section says which domain refuses what;
- docs/REFUSALS.md is regenerated.

Why: rule 4 (small) and rule 2 (one form). The runtime compiles under the identity domains, where
this lowering never ran. Under the resident-table domains, the validation executor's alone, it was
a second form of GPU-encoded commands that no consumer path takes.

No public item changes (indirect_commands is pub(crate); api_signatures.tsv is unchanged).
Versions: SEMANTICS_VERSION 2255 -> 2256 (a placeholder; the landing sets the number), because the
resident-table domains refuse what they lowered. Under the identity domains no output changes.

Verified (jobs at this commit's tree less the runtime README edit below it, 4606692494, or at the
next commit's, the runtime-sources pin, 4e9e857f8c):
- m3-max-63058 at the pin: fmt, clippy, clippy --cfg m2v_gpu, clippy --cfg m2v_cpu_icd, Rustdoc
  -D warnings and scripts/api-docs, all rc 0 (peak 7.5 GiB);
- m3-max-63040, the validation suite at this commit: 1359 of 1360 passed, the one failure the
  runtime guard, which the next commit pins;
- m3-max-63057, the metal2vulkan and metal2vulkan-runtime suites and doctests at the pin: 3349 of
  3360 passed. The failures are the render key, the AIR printout and the golden table (bless due
  at development's next pin) and the engine inventory's 8 parts: 2,142 cells moved, 0 rows new or
  gone, of which 1,342 are the storage forms' removal below this commit (ilock, m3-max-63032) and
  800 are this commit's, the resident-table encoder operations now refused: m3-max-63151, the
  parts with every difference printed, names them as 50 entries on all 16 profiles, each
  ok -> Unsupported{GpuEncodedIndirectCommands; NotImplemented}, in 31 fixtures, every entry a
  kernel that encodes indirect commands (26 engine/icb_* and 3 kernel_icb_* fixtures,
  resident_draws.ll's rd_encode and mesh_commands.ll's six enc_* kernels); the other 1,342 are
  ilock's, class for class. The inventory compiles under RESIDENT_TABLES
  (spirv::testing::committed_profiles), and its bless runs on macOS only (bless_engine_inventory
  refuses without every assembler, m3-max-63084);
- docs/REFUSALS.md regenerated by scripts/refusal-surface/refusal_surface.py;
- no states-only play: the runtime compiles under the identity domains, whose output this commit is
  expected not to change. That is read from the code: icb.rs, the identity lowering, is untouched
  and still selected first. It is not measured, because the golden table's every cell is re-keyed
  until development's bless. ilock and this commit report the same staleness: 29,792 cells,
  m3-max-63032 and 63057.
2026-11-21 04:39:28 -08:00
Anees Iqbal cbb1922b4d Re-pin the runtime sources after the storage forms' removal
What: crates/metal2vulkan-validation/runtime-sources.sha256 moves from 38223c0cc84f... to
802e40e1c7427ac3add55f6922da680b0bf20ce8800f6ffb7d2c883eebfacc46.

Why: the stack removes binder and fragment items that are runtime-guard inputs: the sample
planes' split and merge, the stencil shadow's split, the snapshot texels, and the depth-stencil
copy's storage arms. The value is the one the guard test computed at 3e85eb14f2 (m3-max-63021),
whose inputs equal this tree's; 173861f4f7 changes only a runtime test file, which the guard does
not read. RUNTIME_VERSION is not bumped: what the binder did with those items served only
pipelines whose lowering now refuses, so an unchanged artifact runs as before.

Verified: m3-max-63021 (the validation suite at 3e85eb14f2): 1359 of 1360 passed, the one
failure this guard naming the value above.
2026-11-21 04:39:18 -08:00
Anees Iqbal 1b256352b2 SEMANTICS_VERSION 2254 -> 2255: the storage forms' removal (2254 is the link fix's)
What: SEMANTICS_VERSION moves to 2255. The stack's first commit bumped 2253 -> 2254 before the
link fix c9b2534d4f took 2254 on development. Rebased onto it, that commit bumps nothing, and
removing the storage forms changes translator output (an imageblock fragment function, a stencil
output without VK_EXT_shader_stencil_export, and fetch without rasterization-order access are
now refused). 2255 is a placeholder; the landing sets the number.

Verified: cargo fmt --all.
2026-11-21 04:39:18 -08:00
Anees Iqbal b9fb893701 Fragment: what only the storage forms read goes
What:
- coverage::finish no longer returns whether the function loops over its samples: its one reader,
  the snapshot plan of the interlocked storage forms, went with them.
- The extended-range planned blend's reads_second goes: its readers were the storage forms' fetch
  arms.

Why: lint m3-max-62859 at 9d9998df5d failed clippy with -D warnings on both (an unused variable,
lower/fragment/mod.rs:267, and a method never used, lower/arith/extended_range/blend.rs:987).

Verified: cargo fmt --all.
2026-11-21 04:39:18 -08:00
Anees Iqbal 15e0c18db3 Validation: the executor's storage-form, imageblock-storage and shadow-stencil arms go
What. The Vulkan executor's arms for the forms the previous commit deleted go: the sample planes'
split and merge (candidate/platform/render/planes.rs), the stencil shadow's copies
(render/shadow.rs), the storage attachments and snapshot texels of the plan's resources, the
imageblock's storage image, and their tests; UnmeasuredFetchBlend leaves the comparison
allowances; the runtime-fingerprint list drops lower/fragment/stencil.rs. The render test of a
fragment function's stencil output now expects what the runtime does after the previous commit:
on a device that lists `VK_EXT_shader_stencil_export` (lavapipe lists it, so its lane runs this
branch) the runtime makes the state and stores the function's 7, as the executor's own context
does; on one that does not (the NVIDIA drivers listed in the runtime README) the state is refused
naming `StencilExport`. The test assumed the second answer everywhere, so it failed on lavapipe
at the previous tip (m3-max-62532).

Why. The previous commit removed the product forms these arms executed; they have nothing left
to run.

The four conditions:
1. Authored cases whose execution changes, and what each now answers:
   - the 21 fragment imageblock cases answer `Unsupported{Imageblocks, NotImplemented}` on every
     profile (was: the interlocked storage image where the device had the interlock): public
     5ace7e79fd30, bf468ac9f634, 766afa452232, a7d89dc6ca99, 7debbea02a76, b61f8daffd7a,
     8ac104f9535a, 7efeec508c4d, a90c077c334b, 016f1ade568b, 16710ba4c132, cbd1efc83c42,
     885e02049bc4, f1724a9dd299, aafcd52e68e4, 60930b287c5a, f8e051efac1f, 73def91c2599,
     edba03337a0a, f1e6d2b452ba; private c1f88f1d5476;
   - 5 both-aspect stencil cases the runtime does not route, 685a8d8466a4, b1f193ddc2ae,
     ac45bf66e216, fdc0de425307, 3c9a5c1d5327, change on the NVIDIA profiles only (no stencil
     export): shadow-stencil execution becomes the `StencilExport` refusal; the routed ones go
     from the runtime's set-0 refusal to the translation's;
   - the 30 framebuffer-fetch cases are all routed through the runtime and answer as before.
2. The census stays closed: no requirement changed (requirement.rs and executor_contract/ carry
   no vocabulary change; executor_contract.rs's one edit is its doc). Expected, not rerun: the
   authoring-capability census needs the M3, which this stack did not use for it.
3. No executor or census version bump: classification does not change.
4. The validation suite at the stack's tip: see below.

Verified (jobs at 3e85eb14f2, this stack before its rebase onto 173861f4f7, whose tree is the
stack's fourth commit's less 173861f4f7's rt test file and the runtime README edit of the first
commit; and at 53609aa505, the stack's fifth commit, the runtime-sources pin, before that README
edit):
- m3-max-63020, and m3-max-63158 at the pin: fmt, clippy, clippy --cfg m2v_gpu, clippy --cfg
  m2v_cpu_icd, Rustdoc -D warnings and scripts/api-docs, all rc 0;
- m3-max-63021, the validation suite: 1359 of 1360 passed, the one failure the runtime guard,
  which the fifth commit pins;
- m3-max-63032, the metal2vulkan, metal2vulkan-runtime, metal2vulkan-devtools,
  metal2vulkan-harness and metal2vulkan-air suites and doctests: 3996 of 4007 passed. The
  failures are the render key, the AIR printout and the golden table (bless due at development's
  next pin; the golden table names 29,792 cells: 80 new, 32 gone, the snapshot rows, and 29,680
  under a changed profile fingerprint) and the engine inventory's 8 llvm-as parts;
- m3-max-63150 at the pin, those 8 parts with every difference printed: 1,342 cells moved, 0 rows
  new or gone:
  - 930 NeedsInput{FramebufferFetch} -> ok;
  - 345 ok -> Unsupported{Imageblocks; NotImplemented}: 23 entries on 15 profiles;
  - 23 Unsupported{Imageblocks; needs FragmentShaderPixelInterlock} -> Unsupported{Imageblocks;
    NotImplemented}: the same 23 entries on runtime-floor;
  - 27 ok -> Unsupported{StencilExport; needs ExtShaderStencilExport}: 9 entries on the 3 NVIDIA
    profiles;
  - 11 Unsupported{StencilExport; needs the extension or FragmentShaderPixelInterlock} ->
    Unsupported{StencilExport; needs the extension}: runtime-floor;
  - 6 NeedsInput{FramebufferFetch} -> Unsupported{StencilExport; needs the extension}:
    dsx_fetch_returned_stencil's two entries on the 3 NVIDIA profiles.
  The inventory compiles under RESIDENT_TABLES, and its bless runs on macOS only
  (bless_engine_inventory refuses without every assembler, m3-max-63083);
- states-only plays of the 35 replay streams on lavapipe at the pin, with a player built from a
  probe commit on top of it that never lands (m3-max-63104): none of their render or compute
  states refused (m3-max-63105 to 63108, and for the two streams past those jobs' 300-second
  limit, m3-max-63132 and m3-max-63156);
- not run: the conformance suite and the authoring-capability census.
2026-11-21 04:39:18 -08:00
Anees Iqbal 7e8b93d953 Fetch: the interlocked storage forms go; one input-attachment form, ordered by ROA where the device has it
What. The pixel interlock's storage forms of framebuffer fetch, of the fragment imageblock and of
the shadow stencil are deleted, with their snapshot reads, the sample planes' split and merge
modules, the stencil shadow's copies and the binder, pipeline and runtime items that served them.
A color input now has one form on every device: its input attachment, ordered by
rasterization-order attachment access where the device has it, and elsewhere ordered between
draws alone, noted `PrecisionNote::UnorderedFetchWithinDraw`. The pixel interlock serves raster
order groups only; on a device without rasterization-order access a group on a color input or a
read output does not interlock. What had no other form is refused, typed:
- a fragment function's imageblock use, `Unsupported{Imageblocks, NotImplemented}`;
- a `[[stencil]]` output on a device without `VK_EXT_shader_stencil_export`, naming
  `StencilExport`;
- a merge, a rotated blend or a logic operation that reads the attachment, on a device without
  rasterization-order access, naming `FramebufferFetch` and
  `RasterizationOrderColorAttachmentAccess`.

Why. Rule 2 (one form per Vulkan capability) and rule 4 (small): the storage forms were a second
form of fetch, imageblocks and stencil output chosen by the interlock feature, outside the eight
allowed second forms. The runtime never took them under the identity domains.

Versions: ARTIFACT_FORMAT_VERSION 586 -> 587 (a placeholder; the landing sets the number).
SEMANTICS_VERSION moves in this stack's fourth commit and the runtime-sources pin in its fifth.
RUNTIME_VERSION is not bumped.

Removed public items (crates/metal2vulkan/tests/api_signatures.tsv): pipeline::StorageAttachmentUse,
ShadowStencilUse, FragmentImageblock, ImageblockMechanism, SnapshotForm, SnapshotRefusal,
StorageAttachmentView; bind::PlanesSplitModule, PlanesMergeModules, StencilSplitModule,
planes_split_module, planes_merge_modules, stencil_split_module, CopySource, FragmentTests;
RuntimeFact::{FragmentImageblock, InterlockedFramebufferFetch, MovableStorageWrites,
ShadowStencil, TestedStorageWrites}; PushField::{ShadowStencilState, SnapshotPhase,
StorageKeptChannels}; ResourceKind::SnapshotTexels, BindingSource::SnapshotTexels,
WriteSource::{ShadowStencil, SnapshotTexels}, PushHole::SnapshotPhase,
DrawReplayRule::{FragmentImageblock, ShaderStencil}, PlanesCopy::Alpha8,
ExtendedRangeBlend::OneColorChannel, PrivateRenderField::SampleMask,
PrecisionNote::UnmeasuredFetchBlend (translator and runtime), runtime
RenderPipelineKind::{Imageblock, ShaderStencil}. Changed: FramebufferFetchInputs::of(read, colors),
DepthStencilCopy::{StencilExport, StencilPlane}, WriteSource::TileAttachment.

Runtime README, known gaps: a new bullet names a fragment function with imageblock data (an input
or output declared [[imageblock_data]]) as refused on every device, and the stencil output bullet
says the runtime has refused it on a device without the extension all along. Both say why: the
forms deleted here bound a storage image through a descriptor, which the identity domains the
runtime compiles under hold none of. The raster order group bullet already names its refusal.
docs/REFUSALS.md is unchanged (scripts/refusal-surface/refusal_surface.py leaves it as it is).

Consumer check (~/.cache/m2v-orch/consumer-uses.sh, consumer development e76e2ffeb4 plus its 49
steelbrain/* tips younger than a day): 0 code hits on development for every removed name above
(Imageblock appears there only in rt_platform/diag.rs comments); UnmeasuredFetchBlend and
OneColorChannel hit only crates/reims-vgpu-vulkan on unlanded lane branches, none on development.

This commit does not build crates/metal2vulkan-validation alone: its executor still names the
removed pipeline items until the next commit, which removes its storage-form arms.

Verified: in the stack's second commit, which states every job; this commit alone does not
build the validation crate.
2026-11-21 04:39:18 -08:00
Anees Iqbal a449642cc7 rt docs: placing at an index pending work may use is the consumer's duty, not the program's
The sentence said no work in flight may read a displaced object through the index, "the program's
duty, as it is Metal's". It was wrong on both counts:
- A placement at an index a released object still holds for an unretired command buffer writes
  set-1 elements with one vkUpdateDescriptorSets (arrays.rs place_texture, place_samplers_locked).
  Under UPDATE_UNUSED_WHILE_PENDING with PARTIALLY_BOUND, the spec allows that only where no shader
  invocation dynamically uses the element (vkspec 1.4.366, the binding flags' text), so Vulkan
  does not define it.
- Metal hands a released ID out again at once on a Radeon Pro 5300M (oracle job m3-max-63074), so
  a program may be given an ID that work in flight still reads. Keeping the write away from pending
  work is the consumer's duty: it keeps a released ID back until every command buffer committed
  before the release has retired.

The placement is not refused (form (ii), not built). Between the last holder's retirement and the
block-maker's deferred vacate the index is still the released object's, and a placement then is
defined; a refusal would meet a guest there. The displaced form stays for that window, and the docs
say so.

Docs only: the runtime README's index paragraph and sampler line, docs/RESOURCE-ID.md, the replay
player's rationale in docs/REPLAY-STREAM.md, and the safety contracts of place_texture,
place_samplers and hold_samplers and new_texture's doc. Verified: cargo fmt, the API signatures
check; Rustdoc runs in the quick check after the land.
2026-11-21 04:34:13 -08:00
Anees Iqbal 6800559b22 rt tests: the event chain sets its held link's value only once the submit thread holds it
The chain test set the shared event's value for its last link (a wait no submitted signal
promises) as soon as the links had completed, and then asserted one hold in
Metrics::event_holds. The submit thread counts a hold only for a segment it found not ready on a
pass with nothing left to stage (WorkState::mark_holds), and counts it when it stages that
segment. Its first pass after the link's commit decides, and nothing orders that pass before the
host's set. On a loaded host the thread can still be waiting to run when the floor is raised. Its
first look then finds the wait met and stages the link at once, with nothing held, and the test
read 0 (msi-laptop lavapipe, the full rt suite, job m3-max-62988; the test alone passed,
m3-max-62993). Both orders are correct Metal behaviour, and the counter is true in both: the
assertion assumed an order the runtime does not promise.

The test now parks the submit thread in a scheduled handler of a command buffer with nothing for
the GPU, committed on the other queue just before the last link, so every run commits the link,
opens the busy work and completes the links before the thread first looks at it. It then releases
the thread, waits until the thread holds the link (Work::holding, a device-test accessor beside
Work::pending, reading the FIFO's held_since against its head), and only then sets the value.
No product behaviour changes.
2026-11-21 04:01:56 -08:00
Anees Iqbal eb77b326a0 rt: a block of no buffer is not noted among the fault places (fix forward of the fault places)
An opaque handle's surface allocation (memory::export_surface) holds only the surface's plane
images: its block's buffer is null and its address 0. Block::new noted it, so the book held an
"export [0x0, +len)" keyed by the null buffer: a second such surface overwrote the first, the
free of either moved the one left to the freed ranges, and an address below every other range
was placed in it. The book now skips a range of no buffer at make (Spans::made, which note() and
every other noting site call), so nothing of no address is placed; its free finds nothing.

Test: tests::fault::a_block_of_no_buffer_is_placed_nowhere notes two such blocks and an import,
then places an address in their first bytes: no holder and nothing below without being noted,
the import above, and the null free keeps nothing. Without the fix it fails on the holder.
No consumer-visible change but the places' content.
2026-11-21 03:49:13 -08:00
Anees Iqbal 173861f4f7 rt tests: a part's live commands draw after its empties, ten cells, a test each
The leading-reset test the landing of the token per slot word owes: the kernel encodes 64 commands,
each drawing band i % 4 with its own mark; some are made to draw nothing, by a blit's reset, by
0 instances or by 0 indices; one execution of at most a part must leave each band with the mark of
its last command that draws, compared pixel for pixel through the marks of the drawn rows. The
cells: no empties; commands 0..31, 0..15, {0}, 16..31 (0..15 live) and 32..63 reset in a part of
64; 0..15 reset in a part of 32 and 0..7 in a part of 16; 0..31 of 0 instances and of 0 indices.
Each cell is a test of its own, so each runs in a process of its own and a device fault stops at
its cell. Under runs of slot words in one token, NVIDIA's driver (620.70.06, an RTX 2080) drew
nothing in the second cell's execution.

Verified: cargo fmt only, locally; the matrix legs on each device that lists
VK_EXT_device_generated_commands follow.
2026-11-21 03:42:54 -08:00
Anees Iqbal bc43cfb68a Tests that asked for the resident-table domains take them; the venue toys state device addresses
What and why: (b)'s reds after DevicePolicy::default() became the identity domains (2bbf157668),
each classed. The class is one of:
- A: a test that asked for the old domains and now names DevicePolicy::RESIDENT_TABLES. It tests a
  mechanism of the executor's own context or of the binder, which the identity domains refuse or
  never run. It goes with (c), which deletes that mechanism.
- B: a test whose own input lacked what the default policy now needs.
No red was a product defect under identity beyond the binder's, fixed in the previous commit.

Product crate (A):
- engine_profile_f::profile_f_functions_reach_every_buffer_through_a_descriptor: Profile F has no
  device addresses, so Device::from_queries refuses it under the identity domains.
- engine_air_2_1::a_status_less_reads_alpha_is_observed_only_where_the_function_uses_it: its one
  checking profile is runtime-floor without robustImageAccess2, below the runtime's floor. It asks
  for the out-of-bounds alpha fact under the resident-table domains. Under the default policy no
  profile asked for it (asked == 0, m3-max-62870).
- spirv/verify/tests.rs:958 takes the same policy as the test it serves.

Validation crate (A):
- acceptance::a_stage_input_kernel_row_compiles_under_its_implied_descriptor: stage input is an
  own-context family, and the identity binder refuses its encoder values.
- candidate::platform::acceptance::descriptor_pools_hold_every_binding_of_the_layout: set 1's heap
  arrays are the handle table's. Under identity, set 1 holds the identity arrays, whose sampler
  count is 4,000, not the heap capacity.
- companion::generated_companions_link_with_their_cases_in_the_engine: mesh and object stages,
  refused under identity.
- coverage: a_compile_records_the_containment_it_compiled_under, a_vertex_case_compiles_under_its_
  vertex_descriptor, the_out_of_bounds_fixtures_contain_each_target_as_declared, the_ob2_ and
  the_ob3_fixtures_contain_each_target_...: the tier table (coverage/tier_table.rs, test-only)
  checks the resident-table containment mechanisms: the root table, descriptor views and
  in-shader checks. committed_profiles and compile_module's ModuleFacts take RESIDENT_TABLES, as
  do the two devices the coverage tests derive beside it. Under identity a storage buffer is
  reached at its device address, a loaded pointer is unchecked and vertex input is unchecked.
  This is what executor_contract/out_of_bounds.rs states for PointerDomain::Identity; those tests
  already used RESIDENT_TABLES for their module facts.
- specialization::attempt: a_storage_texture_is_supplied_the_widest_format_of_its_class and
  a_tile_function_is_supplied_its_members_formats. The storage-texture format and the tile member
  formats are inputs the binder supplies. Under identity the first is refused and the second is a
  resource bound through a descriptor. A resident_tables helper derives the profile.
- worker::compile::a_bound_compute_request_crosses_the_exchange_with_its_shape: the texture's
  format input and the plan are the binder's.
- integration authored_compile_census::case_compiles_lists_the_replay_variants_where_the_device_
  replay_runs: executed command buffers are an own-context family, and the no-device-address floor
  device cannot take the identity domains. Both of its devices take RESIDENT_TABLES.
- integration authored_compile_census::the_census_compiles_the_mesh_pipelines_no_candidate_draws:
  mesh pipelines, as above.
- integration compile_worker::a_constant_blob_crosses_the_worker_without_a_copy: a 4-MiB constant
  blob, which identity refuses past 64 KiB.
- integration engine_linked_cases::a_case_with_a_visible_function_table_binds_the_products_table_
  words: visible-function tables are an own-context family, and the test plans through the binder.

Validation crate (B):
- c3::a_venue_profile_states_its_identity and the two index venue tests,
  a_venue_record_is_current_only_under_its_venue_profiles_key and
  a_venue_record_of_another_build_is_current_while_it_executed_this_builds_artifact. Their toy
  vulkaninfo documents now state shaderInt64 and bufferDeviceAddress. The index toy stated
  bufferDeviceAddress false.
- Venue keys stay derived under the default policy (acceptance::derived_profile), as (b) left them.
  The committed venue records re-keyed at (b), when the fingerprint's policy moved. The rekey path
  (corpus-status --venue-keys / --rekey) moves records whose artifacts stayed byte-identical.
  The alternative was to derive keys under RESIDENT_TABLES, which would make the committed records
  current again until (c) deletes that policy. It was not taken: the executor's opened-profile
  check and the C3 Apple reading derive through the same function.

Not here: the_runtime_sources_are_the_committed_ones, re-pinned in the previous commit, and the
four bless-owned product reds: the render key, the golden table's staleness, the engine
fixtures' printout and the public-fixture inventory part 4.

Verified, at the same change on f61383d22b (development's commits since then touch none of
these files):
- cargo fmt --all;
- m3-max-62975, the validation suite at 34ec190bc1: 1363 passed, 3 skipped, 0 failed (it was 19
  failed at ef03053e2d, m3-max-62869);
- m3-max-62968: fmt and clippy of metal2vulkan and metal2vulkan-validation (all targets, all
  features), rc 0;
- m3-max-62965: the product tests above pass.
2026-11-21 03:42:29 -08:00
Anees Iqbal 7503407108 Binder: the identity domains' texture, sampler and runtime-owned push fields are refused typed
What: the translator's binder (bind/plan/compute.rs, bind/graphics.rs) now answers
Unsupported{IdentityDomains; NotImplemented} for every push field that only the identity domains
emit and that no binding state holds:
- a texture's or sampler's resource ID, PushField::SlotGuestBase of a Texture or Sampler slot;
- PushField::ConstexprSampler;
- on the render side also PushField::FetchedColor, TessellationFactorAddress, IndirectRange,
  IndirectSequence and IndirectBase, and PrivateArenaAddress beside ZeroAddress and BicubicTexels.
Before this, a compute plan of an identity pipeline that samples a texture failed with the internal
invariant "a compute push field SlotGuestBase(SlotRef { stage: Kernel, class: Texture, index: 0 })".

Why: one of (b)'s reds, api_preview_example::the_api_preview_example_runs. The example planned
an identity-domain pipeline through the binder, which plans only the resident-table domains.

Can rt's make reach it: no. metal2vulkan-runtime never calls the binder: it has no
pipeline.plan, BindState or BindShape call; it pushes these fields itself. The refusal is reached
only by a consumer of the translator's binder who plans an identity-domain pipeline. That is why
the form is in docs/API.md, the binder's guide, and not in the runtime's known gaps.

The example and the guide:
- examples/api_preview.rs opens a runtime_device, the default policy, and prints its profile.
- Its tour device, committed_device, takes DevicePolicy::RESIDENT_TABLES, because its binding plans
  are the binder's.
- docs/API.md says so after the Device paragraph and lists the refused fields.

The golden storage pair: golden_hashes_match_the_table's check_storage_pair reads the observed
cells, so a bless alone does not satisfy it. Its rule changes to what the identity domains answer.
On the 7 profiles whose bgra8 is not storage-capable (amd-rdna2-apu-radv, intel-arl-anv,
intel-irisxe-anv, intel-irisxe-rplp-anv, intel-uhd770-rpls-anv, nvidia-pascal-linux,
runtime-floor):
- The bgra8 cell is Unsupported{IdentityDomains; NotImplemented} on all 7. Its choice is
  StorageImageClass::SwizzleBgra, state of the bound texture beyond its resource ID. This is not
  the formatless storage row.
- The rgba8 cell is that refusal on 4: intel-irisxe-anv, intel-irisxe-rplp-anv,
  intel-uhd770-rpls-anv and runtime-floor. These lack shaderStorageImageReadWithoutFormat, so the
  read-write choice there declares the format, a storage image the identity arrays hold no
  element of.
- On amd-rdna2-apu-radv, intel-arl-anv and nvidia-pascal-linux, which read and write storage
  without a format, the rgba8 choice declares none and compiles.
Both refusals have the symbol "texture argument S: a type the identity arrays hold no element of,
or state of the bound texture beyond its resource ID", a form the runtime's known gaps list. Each
cell arises only because the golden table supplies a storage_images input that names the bound
format. The runtime never gives one: its slot stays the write that the floor's
shaderStorageImageWriteWithoutFormat takes. So a guest meets neither refusal.

Tests (engine_identity.rs), each failing without the change:
- the_binder_refuses_a_texture_and_sampler_slots_resource_ids_typed: sample_level on moltenvk-m3
  under the identity domains, planned with a buffer, a texture and a sampler bound, answers
  BindError::Unsupported (IdentityDomains, NotImplemented), not an internal error.
- a_storage_choice_the_identity_arrays_hold_no_element_of_is_refused_naming_the_texture_argument:
  on every committed profile, for bgra8 and rgba8, the storage_texture_write compile under the
  identity domains, given the format's storage choice, compiles where the choice is the format's
  own image declared without a format. Elsewhere it is refused naming the texture argument and
  "beyond its resource ID". It asserts at least one compiled, one swizzled and one declared case.

Runtime sources re-pin: the binder is a runtime input of the validation crate's guard, so
runtime-sources.sha256 moves from 47fe413580a9... to 38223c0cc84f17c0bc78a52f216dba49f5bf27655911b528c9cde82d6dcff0b6. The value is
the one the guard test computed at this tree's inputs (m3-max-62914), and development's commits
since then touch none of them. No run's behaviour changes and RUNTIME_VERSION stays:
- the new arms answer only fields that identity-domain compiles push;
- the validation executor plans through the binder only on its own context, under
  RESIDENT_TABLES (candidate/platform/compute.rs), whose compiles hold none of them.

Verified, at the same change on f61383d22b (development's commits since then touch none of
these files):
- cargo fmt --all;
- m3-max-62965, the metal2vulkan suite and doctests at 34ec190bc1: api_preview_example,
  engine_identity's binder test and every other test passed except the four bless-owned reds:
  the render key, the AIR printout, the public-fixture inventory part 4 and golden_hashes;
- m3-max-62991 at 2f29bccef0, which adds this commit's check rule and the generalized storage test:
  fmt and clippy rc 0, and 5 of 6 targeted tests passed (the storage-choice test, the binder test,
  api_preview, engine_profile_f, engine_air_2_1). golden_hashes_match_the_table passes
  check_storage_pair on all 7 columns and stops at the table's staleness, the bless due
  (29,712 cells under a changed profile fingerprint, 80 new);
- m3-max-62914 computed the runtime-sources value above.
2026-11-21 03:42:29 -08:00
Anees Iqbal d1f0339dd3 rt README: the NVIDIA line of an execution whose leading commands draw nothing goes
Its symptom was the token bug the token per slot word avoids. Reduction 2 through rt at that change
(probe 177fa4aca2, never lands; commands 0 to 31 reset by a blit, then executions of commands 0 to
63, 0 to 127 and 0 to 255, and executions of 0 to 127 and 0 to 511 before the reset) drew each
band's last live command on the RTX 2080 (m3-max-62983) and on the RX 7900 XTX (m3-max-62984),
with every rt indirect device test passing on both, 8 of 8. With runs of slot words in one token,
the 2080 drew nothing for the reset-then-0..64 execution.
2026-11-21 03:37:30 -08:00
Anees Iqbal 505475a98a rt docs: the token per slot word's cost, in preprocess bytes, on each driver measured
The README's known-gaps line of the token per slot word carries its cost on the three drivers the
standalone program measured: a part of 64 commands of three vertex words and one fragment word
takes 69,888 preprocess bytes on the RTX 2080 against 57,600 with the vertex words in one token
(21% more a command), 567,808 against 557,568 on lavapipe, and 19,712 either way on the RX 7900
XTX (m3-max-62928, 62960, 62909, 62959, 62912, 62961). It names the Tokens refusal past
maxIndirectCommandsTokenCount less 3 slots. The pool paragraph says its sizes are those of the
per-word form.

Only preprocess bytes were measured. Rung 1's 3% check is frame time, read when the unpatched
rendering sample walks against its patched variant on one card per vendor; it has not been read,
and this change claims nothing about it.
2026-11-21 03:37:30 -08:00
Anees Iqbal 511f1819b3 rt: an execution pushes each slot word of a command through a token of its own
On NVIDIA's driver (620.70.06, an RTX 2080) a 24-byte PUSH_CONSTANT token in an execution of 96
sequences or more carried sequence 31's bytes in every later sequence, while the SEQUENCE_INDEX
token stayed right. A standalone program found it with rt's own push layout: a 256-byte
VK_SHADER_STAGE_ALL range, the 24-byte token at push 0, an 8-byte token at 112 and the sequence
index at 104. Halving the program's other properties placed it in that layout (m3-max-62928, 62938
and 62947). Its first bisect run, the 24-byte token described as three 8-byte tokens of the same
bytes, drew right in every cell on the 2080 (m3-max-62960) and the XTX (m3-max-62961), and on
lavapipe under the validation layer (m3-max-62959).

tokens() no longer merges a run of slot words at consecutive offsets into one token: each slot
word the content pushes is its own 8-byte token, on every device, and Tokens::pushes holds
(command offset, push offset) pairs. Parts of 64 stay.

The cost: a command takes one token per buffer slot plus three, so maxIndirectCommandsTokenCount
caps its slots at 13 on lavapipe, 29 on NVIDIA's driver and 125 on RADV
(IndirectCommandsKind::Tokens). On the 2080 the standalone program's part of 64 commands of three
vertex words and one fragment word takes 69,888 preprocess bytes against 57,600. The README's
known gaps say both, and its execution sentence and the Tokens refusal's doc say one token per
slot.

Test: an_executions_tokens_are_a_token_per_slot_word (was ..._are_its_runs_of_slot_words) expects
five tokens for the five slot words that used to share two.
2026-11-21 03:37:30 -08:00