Commit Graph
10374 Commits
Author SHA1 Message Date
Anees Iqbal fa59fd319e Byte copies test: the rows' buffers take a block of their size
The all-codes row's 128 KiB of units did not fit the 64 KiB block the helper takes by default
(lavapipe job m3-max-84567... 84570: BufferPastBlock); the 8 x 8 rows passed there, stencil and
16-bit depth, whole and the region at (2, 1).
2026-12-03 09:59:40 -08:00
Anees Iqbal 960030016b Byte copies: a helper invocation outside the region reads its first unit
Lavapipe job m3-max-84567 ended in SIGSEGV at the row whose region starts at (2, 1): a quad the
region's edge cuts runs helper invocations outside it, whose pixel below the origin wraps the
offset, and lavapipe performs their loads. The fragment now reads the region's first unit where its
pixel lies outside the region (the block gains the region's rows, SampleBytes::HEIGHT_AT; BYTES
40 -> 48), so no invocation reads outside the region's bytes on any device.
2026-12-03 09:59:40 -08:00
Anees Iqbal b8c560adb9 Byte copies test: name each row as it starts
Lavapipe job m3-max-84564 ended in SIGSEGV after the first row; the next run says which row.
2026-12-03 09:59:40 -08:00
Anees Iqbal bcd605b407 Byte copies test: read the counts before the command buffer records
The copies count as they record, so the count taken between recording and commit missed them
(lavapipe job m3-max-84558: the Stencil8 row copied back bit for bit, its count read 0).
2026-12-03 09:59:40 -08:00
Anees Iqbal 2d63c60193 Byte copies: ARTIFACT_FORMAT_VERSION 608, past the 607 another change holds
The orchestrator gives 607 to a change landing first; this branch's codec member takes the next.
2026-12-03 09:59:40 -08:00
Anees Iqbal fa2598d76f Byte copies: ARTIFACT_FORMAT_VERSION 606 -> 607, RUNTIME_VERSION 2564 -> 2565
The codec gains a PrecisionNote member (RoundedSampleDepthCopy), and a run of an unchanged artifact
now copies a buffer into and out of a multisample texture's stencil or 16-bit depth where it was
refused (Gap::TextureBytes, which now also carries a cause).
2026-12-03 09:59:39 -08:00
Anees Iqbal 4ccbde14e0 Byte copies: the sample enums are exhaustive, the draw key derives no Debug; REFUSALS.md, basis and signatures regenerated; the replay counts the copies; the conformance case declares the note
The second build (lavapipe job m3-max-84547) stopped on a match over SampleAspect in the runtime,
which #[non_exhaustive] forbids across crates, and on a Debug derive over ash's Format, which has
none without its debug feature. SampleAspect and SampleWrite become exhaustive (class E in
api_surface): a runtime handles each aspect and makes a draw of each write. The replay's per-frame
metrics gain stencil_bit_draws and sample_copies. The conformance side announces
Texture::SAMPLE_DEPTH_COPY_NOTE for a copy into a multisample Depth16Unorm, which the
buffer-depth-samples d16 rows declare; the case's doc states the current form and its refusal of a
32-bit float depth instead of the old form's -0 difference.
2026-12-03 09:59:39 -08:00
Anees Iqbal b337c83e25 Byte copies: the kernel's heap slot is the kernel stage's; the draw's docs, the README's and API.md's lines, and the device test's all-codes row and counts
The translator's sample kernel named its heap slot under a stage that does not exist (Stage::Kernel
is the compute stage's); fixed with the other error the first build (lavapipe job m3-max-84536)
reported. The runtime README states the measured layout, the form, the refusals left with their
causes, and names this caller on the stencil-export known gap; API.md documents own_draw and
SamplesToBytes and catalogues PrecisionNote::RoundedSampleDepthCopy. The device test gains a
128 x 128 Depth16Unorm row at 4 samples whose 65,536 units are every code once, checks every unit
of the copy back out, and asserts the counts: 2 sample copies a row, and 8 stencil bit draws for a
stencil row on a device without stencil export, else none.
2026-12-03 09:59:39 -08:00
Anees Iqbal cfe1e81775 Byte copies: a blit copy between a buffer and a multisample texture's stencil or 16-bit depth, as the runtime's own draw and kernel (first build)
The form the planner approved: into the texture, one rendering of its attachment view over the
region (load, store) of the runtime's own draw, every sample shaded, each fragment reading its unit
at the buffer's device address and writing it (FragDepth for a 16-bit depth, FragStencilRefEXT
where the device exports stencil, else 9 draws by bits); out of it, one dispatch of the runtime's
own kernel reading each sample through the texture's element of set 1's sampled-image array. No
intermediate image and no staging buffer either way. Gap::TextureBytes carries a typed cause
(TextureBytesCause); the new static note PrecisionNote::RoundedSampleDepthCopy
(Texture::SAMPLE_DEPTH_COPY_NOTE); Metrics::sample_copies.

Not yet compiled: this commit is the first build's input; the next commits fix forward what the
build and the red test report.
2026-12-03 09:59:39 -08:00
Anees Iqbal 73eaffdaaa Runtime test: the multisample byte-copy test grants its texture indices
What. The test made its textures at indices 4096 onward without granting them, so on lavapipe it
stopped at "Texture index 4096 is not granted" before reaching the copy it is red on (job
m3-max-84432). It now grants ROWS.len() texture indices from 4096 on each device, as the other
device tests that name an index do.

Verified: the red run named in the hand-off stops at the copy in.
2026-12-03 09:59:39 -08:00
Anees Iqbal 8f67854ca0 Runtime test: a buffer copied into and out of each sample of a multisample depth or stencil texture
What. A device test (tests/multisample_bytes.rs, under --cfg m2v_gpu or m2v_cpu_icd), red on
every device today. On each device it copies a buffer into a Private 8 x 8 multisample texture
through the plane option, Stencil8 with StencilFromDepthStencil and Depth16Unorm with
DepthFromDepthStencil. The rows are the whole texture at 4 and at 2 samples, where the device
makes a texture of that count, and a 4 x 3 region at (2, 1) at 4. The owned rt6_samples kernels
then read every sample, and the texture is copied back out into a buffer that holds 0xee. The test
asserts Metal's answer: copy unit i lands at texel (x, y) of the region, sample s, where
i = (y * width + x) * samples + s, rows bytesPerRow apart; samples outside the region keep the
clear; and the copy back out returns the buffer bit for bit. Today the runtime refuses the copy in
on every device (Gap::TextureBytes: "bytes are not copied to or from this texture of Stencil8"),
so the test fails at its first copy.

Why. Plain Metal does this copy, and a program has no way to ask whether it may, so a guest can
meet our refusal. The planner ranked this row BUILD.

What Metal does here is measured, not documented. Apple's pages for
copyFromBuffer:...toTexture:...options:, copyFromTexture:...toBuffer:...options:, MTLBlitOption and
its two plane options, and MTLBlitCommandEncoder.h say nothing of a multisample texture or of a
sample layout. The options' pages name only a combined format: depthFromDepthStencil "copies the
depth portion of a combined depth and stencil texture to or from a buffer", and
stencilFromDepthStencil "...the stencil portion...". bytesPerRow "needs to be: A multiple of the
source texture's pixel size, in bytes", and no page says what a pixel is at several samples. The
documentation is silent here, which is not the same as calling the result undefined. The answer
was measured:
- The conformance recordings buffer-depth-samples-s8-54-4, -s8-54-2, -s8-part-4, -d16-54-4 and
  -d16-54-2 (Apple M3 Max, macOS 27.0.1, 3 runs each). Their validated field is "ran": Metal's API
  validation let each case run. A script checked all five against the rule above with 0 samples
  off it, the copy back equal to the input, and the part-4 row's other samples at 0x5a.
- A probe of our own (one Objective-C file of plain Metal on our own data, 54 x 54 at 4 samples,
  each of the two formats and options), run plainly and under MTL_DEBUG_LAYER=1, with no
  validation message, command buffer status completed and no error:
  - Apple M3 Max, macOS 27.0.1: job m3-max-84400.
  - Radeon Pro 5300M and Intel UHD Graphics 630, macOS 26.7.1 (25G241), run by the consumer: job
    m3-max-84413.
  All three devices agree exactly: 0 of 11664 (s8) and 23328 (d16) bytes differ on the copy back,
  11664 of 11664 kernel reads follow the layout above (sample-minor), the copy back's sha256 is
  the input's (42384bfd... s8, 852b4489... d16), and the reads' sha256 are the same on the three
  devices (e63212e0... s8, 6d3cc97c... d16).

Verified: red on the job named in the hand-off.
2026-12-03 09:59:39 -08:00
Anees Iqbal 27c53f0b06 Translator tests: the imageblock tests no longer import LowerFamily
The red commit's expectation of Imageblocks in the_imageblock_parameter_value_is_refused_where_it_is_read
took away the module's last use of LowerFamily, and -D warnings then failed the build on the unused
import (clippy, job m3-max-84479).

Verified: the next job's clippy and test lines.
2026-12-03 09:53:05 -08:00
Anees Iqbal 722503da23 Translator: the imageblock parameter's value is refused as Imageblocks(ParameterValue) where the planner meets it
The memory planner refused every read of the imageblock parameter's value before
access::select_param's ParameterValue arm, as Lowering(Access) PointerSource or PointerStore, so
that cause was never named. The planner now decides by the root, the parameter whose ABI role is
ParamRole::Imageblock, at its two sites:

- A pointer read out of an argument's aggregate (provenance resolve_walk): the imageblock
  parameter's value is Imageblocks(ParameterValue). Any other argument's aggregate stays
  PointerSource.
- A store of an aggregate that holds a pointer: when the stored value is built from the imageblock
  parameter (through insertvalue, extractvalue, freeze, select and phi, each value visited once,
  metered), Imageblocks(ParameterValue). Otherwise it stays PointerStore.

The PointerSource, PointerStore and ParameterValue docs say so. SEMANTICS_VERSION 2358: a
refusal's kind changes. REFUSALS.md regenerated, unchanged. No public type changes.

Verified, CPU-only potluck jobs at the pair's tip before its rebase onto development:
- m3-max-84488: the two red tests at the red commit, 0 of 2 passed (RED EXIT=100), and at the
  tip 2 of 2 passed; metal2vulkan and metal2vulkan-air 3480 tests run, 3480 passed, 22 skipped;
  metal2vulkan-validation 1349 passed, 3 skipped; conformance and runtime 1280 passed, 2
  skipped; each EXIT=0.
- clippy --workspace --all-targets --all-features -D warnings: plain m3-max-84494, --cfg m2v_gpu
  m3-max-84493, --cfg m2v_cpu_icd m3-max-84495, each EXIT=0.
- m3-max-84482: rustdoc -D warnings EXIT=0, the API reference check EXIT=0.
2026-12-03 09:53:05 -08:00
Anees Iqbal 742e497f4b Translator tests: every read of the imageblock parameter's value names ParameterValue (red)
The planner's ruling for a multi-cause refusal: name its typed cause. The imageblock parameter's
value is refused by the memory planner before access::select_param's ParameterValue arm, as
Lowering(Access) PointerSource or PointerStore (job m3-max-84446), so a walk's counts could not
tell it from any other pointer source or store.

every_read_of_the_imageblock_parameter_s_value_names_it covers the six shapes that job read,
each checked by Unsupported::cause on every committed profile:
- extractvalue of the parameter;
- extractvalue through a freeze;
- the extracted pointer through ptrtoint;
- a store of the struct;
- a round trip through an alloca;
- insertvalue on the struct, then a store.

the_imageblock_parameter_value_is_refused_where_it_is_read now expects Imageblocks with that
cause, at the same place.

Expected red: all six give Access PointerSource or PointerStore today.
2026-12-03 09:53:05 -08:00
Anees Iqbal f7b02f917a Engine inventory: re-blessed on the M3 after the resident core's deletion
G1 (0ce2f39b71 and the stack through 848acada38) deleted the resident tables,
so every fixture now compiles under the one form the runtime ships. The
inventory still held the resident policy's answers. This bless records the one
form's: 252 rows, 2405 cells.

- ok -> refused: 1581 cells (forms only the resident tables built)
- refused -> ok: 588
- NeedsInput -> ok: 169
- NeedsInput -> refused: 67

The .ll rows match the moves devpolicy's comparison listed before the land
(job m3-max-84210). The .air.ll twins, which need metal-as, only the M3 covers.
Spot check against the golden table: the intersect kernels it already
refuses under IdentityDomains, and the ICB encode it already compiles, now
read the same here.

Verified: job m3-max-84596 (Apple M3 Max, macOS) ran bless_engine_inventory
at 848acada38: 1 passed, EXIT 0; the patch is this commit's whole diff.
2026-12-03 09:51:42 -08:00
Anees Iqbal 848acada38 Conformance ledger: the read-through heap rows hold the refusal G1 names with its cause
What: the six read-through rows of known-gaps-rt.tsv (a8, heap-border,
heap-sampler, r32f, rgba8, rgba8-swizzled; venue *) take the answer the
translator now gives at their pipeline site, the identity refusal with
its cause: "...unreadable: false })): HeapResource; needs
NotImplemented" where the rows held "...unreadable: false })); needs
NotImplemented". Each row's gap names the cause too (IdentityDomains,
cause HeapResource: a texture handle that reads its table entry beyond
its element). No other file holds the old text (grep over the tree's
.tsv, .md, .rs and .json files). docs/CONFORMANCE-COVERAGE.md does not
move (coverage.py --check: as derived).

Why: G0 makes an identity-domains refusal name the form it met
(IdentityCause), so the six rows no longer matched the replay: the
lavapipe replay at da29ee6b55 (job m3-max-84580) reported 12 ledger
drift lines, each of the six "refused ... does not list it" and "no
longer refuses ... still lists it", and EXIT=1.

Verified by job m3-max-84585 at this commit's tree, on lavapipe
(llvmpipe, LLVM 23.1.1, 256 bits; Mesa 26.2.4): the conformance binary
builds (EXIT=0), and `LP_NUM_THREADS=1 conformance replay --cpu` reports
0 ledger drift lines and EXIT=0.
2026-12-03 09:46:56 -08:00
Anees Iqbal da29ee6b55 Translator docs: the nine private links G1 left unresolved say what the one form does
What: rustdoc's private pass (cargo doc -p metal2vulkan --all-features
--no-deps --document-private-items, -D warnings) found nine links to items
G1 deleted. Each sentence is rewritten to what is true now; nothing is
re-added or re-exported.
- lower/access/dynamic.rs: the module doc's wide pointers are the device
  address they hold (a u64, their Metal address), a wide parameter its
  slot's address read where it is needed; the root table, resident-set
  search, sink and containment paragraphs go, and loads, stores, compares,
  null constants, atomics and memory intrinsics through a wide pointer are
  described at the address, unchecked. param_value's doc says it reads the
  slot's address (emit_entry is gone).
- lower/access/handle.rs: a heap texture handle is the resource ID's index
  masked below the set-1 arrays' length, with the alpha flag and the
  texture-buffer word bits where the function uses them, and a heap
  sampler handle is its resource ID with an out-of-range index replaced by
  0; no handle or sampler table is searched (HandleTable::lookup is gone).
- lower/access/psb.rs: Reach::Rounded is the 4-aligned address PsbMem::at
  takes, for a wide pointer's access and a function table's entry
  (psb::prepare is gone).
- lower/sampler/bicubic.rs: an 8-bit sRGB texture's bicubic taps are the
  device's decode through the slot's sRGB view (the raw-code path behind
  Bicubic::raw is gone).
- lower/texture/emit.rs: the three swizzle helpers name swizzle_lanes,
  whose doc now states the swizzle word's fields (swizzled is gone).

runtime-sources.sha256 does not move: none of these files is a pinned
runtime source.

Verified by job m3-max-84530 at this commit's tree: the private pass
(RUSTDOCFLAGS=-Dwarnings, CARGO_TERM_COLOR=never, cargo doc -p <crate>
--all-features --no-deps --document-private-items) is EXIT=0 with 0
diagnostics for each of metal2vulkan, metal2vulkan-air,
metal2vulkan-runtime, metal2vulkan-validation, metal2vulkan-conformance,
metal2vulkan-devtools and metal2vulkan-harness, and the public rustdoc
(cargo doc --workspace --all-features --no-deps, -D warnings) is EXIT=0.
At the parent, job m3-max-84501 listed the nine (metal2vulkan EXIT=101,
9 diagnostics; every other crate 0).
2026-12-03 09:35:53 -08:00
Anees Iqbal 7e0f98c09d Runtime tests: the typed-atomic select test takes the device's answer for 64-bit buffer atomics
every_device_loads_through_a_select_of_a_typed_atomic_s_slot_and_another made the
ADDRESSED_AND_VIEWED state on every device, but its `ulong` add is a 64-bit buffer atomic, which
Vulkan's shaderBufferInt64Atomics answers (a rule 2 query). KosmicKrisp on the M3 Max does not
offer the feature, so the translator refuses the state there, Int64Atomics needing
ShaderBufferInt64Atomics, and the test panicked in its state helper (pin T's Mac leg, job
m3-max-84350: "Apple M3 Max: plain: refused: unsupported: Int64Atomics; needs
AnyOf([[Feature(ShaderBufferInt64Atomics)]])", then "the translator made no pipeline of
addressed_and_viewed").

The test now reads the feature from the translator's profile (what device creation enabled).
Without it, it asserts the state's refusal, Error::Translation of Unsupported Int64Atomics needing
AnyOf([[Feature(ShaderBufferInt64Atomics)]]), and runs nothing; with it, it runs today's value
checks. The 64-bit add stays: a typed atomic (a u64 one, or a native f32 add, which needs a feature
too) is what moves its slot to its device address, the shape under test. A third leg opens each
device without shaderBufferInt64Atomics (without_int64_atomics), so every device, lavapipe in CI
included, runs the refusal branch, and each device that has the feature runs the value checks in
its own form and in the address form.

The same assumption elsewhere: no other device test in the runtime, harness or conformance crates
uses a 64-bit atomic (searched for `atomicrmw ... i64`, `air.atomic.*.i64`, `atomic_ulong` and
`atomic<ulong>` in their sources, and in the 58 engine and example fixtures their tests load).

Verified: the observed red is pin T's Mac leg, job m3-max-84350 (KosmicKrisp 26.3.1 on the M3
Max), quoted above. Green on lavapipe (llvmpipe, LLVM 23.1.4, 256 bits), job m3-max-84503: the
test passed, printing its own form and the address form reading both slots, and the leg without
shaderBufferInt64Atomics "the state is refused, Int64Atomics". Green on the Iris Xe (RPL-P, ANV),
job m3-max-84505: the same, its own form the bound form. The M3's proof comes from the next
round's Mac leg.
2026-12-03 09:29:02 -08:00
Anees Iqbal 4ec2663ba9 Translator tests: the Layout and CellPointer imageblock causes, and the front end's multisample names
Three tests check refusals by Unsupported::cause, the field, not the text:

- an_imageblock_of_no_cell_layout_is_refused_naming_its_layout: a kernel's explicit imageblock
  whose air.arg_type_align_size is 3, not a power of two, is Imageblocks(Layout) on every
  committed profile.
- a_cell_pointer_not_made_by_imageblock_data_is_refused_naming_it: an imageblock-space pointer
  made by inttoptr in a kernel is Imageblocks(CellPointer).
- the_front_end_s_imageblock_refusals_are_the_multisample_operations: the front end refuses by
  the Imageblocks feature exactly four undecoded names (air.get_imageblock_samples,
  air.get_imageblock_num_colors, air.get_color_coverage_mask, air.store.implicit_imageblock.mask.),
  and the translator names each MultisampleOperation. A name outside that list
  (air.get_imageblock_coverage) is already a refusal of its own, Feature::UnknownIntrinsic with
  no cause. So the test asserts that, and no fix is needed. A fifth name added to the list fails
  the test, so its cause is decided then.

ParameterValue has no test here. Six IR shapes that read the imageblock parameter's value were
each refused first by the memory planner as Lowering(Access) PointerSource or PointerStore:
extractvalue, freeze, ptrtoint, a store of the struct, a round trip through an alloca, and
insertvalue. None reached access::select_param's ParameterValue arm.

Evidence for two commits already on development:
- 71a5393966 (its body says "Verified: pending"): job m3-max-84253 (CPU). In the red tree, all
  crates at 97426a89e4, 3 tests ran and 3 failed; at the tip c5affc2ae8, 3 passed.
- e498cbaa54 ("the field check's run follows"): the same job, m3-max-84253, and the audit lane's
  m3-max-84368 (94 tests, nextest exit 0).

Verified: job m3-max-84446 (CPU) passed the three tests at the same test code, and printed each
probed shape's refusal.
2026-12-03 09:25:15 -08:00
Anees Iqbal 5715c0a161 Tests: three pointer tests take the one form's answer
What, in tests only:
- a_slot_bound_inside_an_allocation_stores_its_metal_address keeps its
  form assertion on all three profiles and runs its allocation arm only
  where slot 0 is at its device address. The harness places a slot
  inside an allocation only there; a bound view's buffer is the binder's
  to place.
- stored_pointers_are_guest_addresses_that_resolve_back tests the null
  pointer it reads back before reading through it. Under the one form a
  loaded pointer is used as given, so a read through null is Metal's
  undefined read; development's zero came from the resident tables. Its
  volatile counts follow b2's planned form: two words through a view,
  one u64 at a device address.
- static_pointers_convert_to_their_metal_addresses counts each stored
  address the same way, by b0's planned form.

Why: each was hidden in the G1 runs by an earlier census assertion in the
same test, and failed in its translator suite once those were ported.

Verified by job m3-max-84364 at this commit, on G1's stack over
development ed75c57d5d: the three tests fail at the commit before (3 of
3) and pass here (3 of 3); clippy plain, m2v_gpu and m2v_cpu_icd EXIT=0;
translator 2617 run, 2608 passed, 9 failed (the golden table and the 8
inventory parts, which wait for their bless), 20 skipped;
air/rt/devtools/harness 872 passed, 4 skipped; validation 1348 passed,
2 skipped; conformance 1053 passed; doctests 2 passed; rustdoc clean.
2026-12-03 09:15:34 -08:00
Anees Iqbal 6dd147bafb Translator: the store sink weighs its work as the rest of a lowering, whoever asks
Under the one form every order key orders nothing, so order_specialized runs
lower::access::quad::sink after the lockstep pass. The lockstep pass and the
specialization weigh their work explicitly (weights::LOCKSTEP, ::SPECIALIZE);
the sink took the weight of its caller. A compile asks for the order under
compile_bounded's weights::REST (10 sixteenths a unit); a creation's partition
check (kernel_observes_partition) asks outside it, at a whole unit a tick. The
check's StageEntries keeps the order with what it charged, and the compile that
finds it spends that charge, so the shared compile paid the sink's work at 16
where its own compile pays 10: library_entries_decode_once's
a_partition_check_and_the_kernels_compile_order_its_entry_once read 30535 work
units through the kept order against 30510 alone (job m3-max-83989, moltenvk-m3).
On development the resident form ordered, the sink did not run, and the two
agreed.

The sink now weighs weights::REST wherever it runs: a lone compile's charge is
unchanged, and a check's sink is charged as a compile's. No output changes, so
no SEMANTICS bump.

Verified: pending (the test above, in the next G1 job).
2026-12-03 09:15:34 -08:00
Anees Iqbal 53175c937e Translator: a coherent access at a device address needs the Vulkan memory model
lower::sync::memory_model's contract says a coherent access through a device address has no
variable to decorate, so it needs the Vulkan model on every profile. A wide pointer's coherent
access selected the model itself, and an interlocked body that reaches a slot at its device address
did once the slots were placed (finish_interlock), but a function whose `*_coherent` accesses took
the GLSL450 form on a profile without vulkanMemoryModel and its device scope, and that reaches a slot
at its device address, kept GLSL450: its storage buffers decorated Coherent and its device-address
accesses plain, with no coherence at all.

The slot rule now covers both: finish_coherent_slots (finish_interlock renamed) selects the Vulkan
model for an interlocked body or a function whose coherent accesses took the GLSL450 form, where a
slot is reached at its device address, and check refuses it on a device without the model,
Unsupported{CoherentMemory, AnyOf[[VulkanMemoryModel]]}, as for the interlocked body. One rule, the
documented one; no decoration form beside it. Floor devices are unchanged: the floor requires
vulkanMemoryModel and its device scope, where coherent_access already takes the Vulkan model.

The refusal is an existing variant and text: refusal_surface.py --check passes with no change
(run locally). The stack's SEMANTICS 2351 covers the changed outcome.

Verified: (jobs named in the READY).
2026-12-03 09:15:33 -08:00
Anees Iqbal 047638e250 Tests: a coherent access at a device address needs the Vulkan memory model (red)
Without the Vulkan memory model a function's coherent accesses take the GLSL450 form: plain
operands through resources decorated Coherent. A PhysicalStorageBuffer access has no variable to
decorate, so where a kernel reaches its buffers at their device addresses (every buffer argument
of a kernel without the bound form) such an access had no coherence and still compiled, though
lower::sync::memory_model's contract says it needs the Vulkan model on every profile, as an
interlocked body that reaches a device address does (finish_interlock).

volatile_under_the_vulkan_model_adds_only_volatile runs its GLSL450 arm on a below-floor profile
whose kernel binds its buffers (amd-780m-hawkpoint-radv without vulkanMemoryModel and its device
scope; lavapipe binds none, its maxStorageBufferRange) and now asserts that one reaching its
buffers at their addresses ("runtime-floor without vulkanMemoryModel") is refused,
Unsupported{CoherentMemory, AnyOf[[VulkanMemoryModel]]}.

Red at this commit: the runtime-floor arm compiles (job m3-max-83747, before the change, met it
as "Load through %86: not Coherent under GLSL450"; the run at this commit is named in the READY).
2026-12-03 09:15:33 -08:00
Anees Iqbal 4c903ea617 Translator: a switch over texture buffers is named by the check its arms take
Switch::name named a switch-at-use by its first arm's strategy, matching only the plain read,
write, atomic, query, null test, sampling and absent-argument strategies. Under the identity
domains a texture buffer's read, write and width query are lower::texture::words accesses
(TextureStrategy::Words), so a switch over texture buffers fell to "texture.null.switch", a name
that says nothing of the check its arms take. It now looks through a Words arm to its access
through its own view (Words::native), whose check it takes: texture.read_clamped.switch,
texture.write_guarded.switch and the others as for a plain texture buffer. One form: no words
family of switch names.

What the name reaches: the census only (FunctionArtifact::strategies, the validation coverage
report's strategy names). No SPIR-V word and no cache key carries it, so golden hashes do not
move; a cached artifact carries its census, and the (a) landing's SEMANTICS and ARTIFACT_FORMAT
bumps already invalidate every cached artifact, so no bump of its own. Coverage moves
texture.null.switch counts of texture-buffer switches to their read and write names.

Verified: (job ids added at the READY).
2026-12-03 09:15:33 -08:00
Anees Iqbal 14d99c8e48 Tests: a switch over texture buffers is named by the check its arms take (red)
Under the identity domains a texture buffer's read, write and width query are
lower::texture::words accesses (TextureStrategy::Words), and Switch::name matches only the
plain strategies on its first arm, so a switch-at-use over texture buffers falls to
"texture.null.switch". a_switch_is_named_by_the_check_its_arms_take now collects every wrong
name before it fails, so its TexelRead and TexelWrite rows both show, and its doc says a texture
buffer's access is named by its access through its own view.

Red at this commit: the TexelRead row on runtime-floor without image robustness reads
[("texture.null.switch", 1)], not texture.read_clamped.switch (job m3-max-83747, lavapipe ICD,
compile only, the row the test met first before this change).
2026-12-03 09:15:33 -08:00
Anees Iqbal 0ce2f39b71 Translator: the resident core deleted; every device compiles the one form, and the tests run it
Every device now compiles the identity domains, the one form: a kernel's
buffer arguments are bound as storage buffers of set 0 where the device
binds them (DeviceProfile::binds_kernel_buffers) and are reached at their
device addresses elsewhere, as every other stage's are; vertex attributes
are fetched by fixed-function vertex input; textures and samplers are
elements of the identity arrays of set 1, named by their resource IDs.
What the one form does not lower is a typed refusal,
Unsupported{IdentityDomains, NotImplemented} with the IdentityCause the
previous commit names.

Deleted, with everything only they reached:
- the device policy (device/policy.rs) that chose the resident-table
  domains, and the resident root table, handle table and their facts;
- the heap raw reads (lower/sampler/heap_raw.rs, lower/texture/heap_raw.rs),
  sampler footprints, bind/texel_parts.rs and bind/status.rs;
- the lockstep orders' barrier tiers, which no order key adds now
  (OrderKey::of orders nothing).

Tests: 274 tests that only the resident-table policy compiled (development's
DevicePolicy::RESIDENT_TABLES, which only tests built) are deleted, among
them 15 whole files (argument tables, cross-class, device replay, dynamic
roots, two extended-range files, image shapes, mesh barriers, profile F,
separate samplers, sparse unmapped, tile, wide, sweep and the footprint
tests); each deletion's reason is listed with the READY. The others are
ported to what the one form compiles and names today: census names,
push fields, refusals with their causes, and run values. A new interpreter
harness (tests/identity_harness.rs) binds a dispatch's buffers at device
addresses and its textures as identity-array elements. Census naming is
unchanged. The validation tests that read compiled modules (coverage,
companions, the authored compile census, specialization) assert the one
form's present strings. The extended-range levels and volume tests, whose
mip filters development built under the resident tables, become two tests
of the one form's answer, which is development's default policy's: a 2D or
3D sample of an extended-range slot texture is refused, TextureState
(lower::texture::identity_class holds no class for it); a padded form's 3D
sample stays the lowering's NotImplemented(Format). Development's new
thread-local test binds through the one form's harness, and its
handle-web test (every_handle_web_an_instruction_observes_is_refused)
compiles on the default profile.

SEMANTICS_VERSION 2355 and ARTIFACT_FORMAT_VERSION 607 (cached
translations and artifacts change). docs/REFUSALS.md is regenerated and
runtime-sources.sha256 is pinned at this tree.

Verified at the stack's tip, which differs from this commit only by the
five commits after it; the jobs and their results are named in the READY.
2026-12-03 09:15:33 -08:00
Anees Iqbal dec0ca173a Interpreter: a sampler is a stateless value, and OpSampledImage is its image
The one form samples through the identity domains' sampler arrays: a
function loads a sampler (or an element of a sampler array) and combines
it with an image by OpSampledImage, which the interpreter reported as
unmodelled, so no test could run such a module. The image model reads no
sampler state, so a sampler global (or an array of them) is now
GRoot::Sampler / Root::Sampler: loading it or indexing it yields the
stateless sampler, a byte access to it is malformed, and OpSampledImage
of an image and a sampler is the image, as OpImage of a combined image
sampler already was. Sampling itself is still not modelled; an exact
fetch through a sampled image runs.

Test-only (crate::spirv::interp); no product output moves. Verified by the
G1 suites that run the sampled modules through it (jobs m3-max-83989,
m3-max-84055, translator nextest).
2026-12-03 09:13:23 -08:00
Anees Iqbal a8ccda7cc6 Translator: an identity-domains refusal names the form it met
Feature::IdentityDomains with Needs::NotImplemented covered every form the
identity domains do not lower behind one name; only a diagnostic symbol
said which, and slot.rs's refusal of a storage texture access without its
bound format named nothing. An identity refusal now carries
Cause::Identity(IdentityCause), one variant per refused family, the way an
access or tessellation refusal names its cause; sites that refuse the same
family share a variant, none is named by a file, a line or a string of its
own:

- ObjectOrMeshStage: a function of a stage other than a kernel, vertex or
  fragment function (select.rs identity_refusal).
- Descriptor: a buffer argument not reached through its device address, or
  a descriptor beyond a bound kernel's storage views (identity_refusal).
- EncoderValue: a push field the identity window does not carry
  (identity_refusal).
- HeapResource: an argument buffer's texture of a type or handle class the
  identity arrays hold no element for, read as raw extended-range texels,
  decoded, read through another numeric type, or through a handle that
  reads its table entry beyond its element (identity_refusal; link.rs's
  handle-class binding).
- TextureState: a texture argument of a type the identity arrays hold no
  element of, or state of a bound texture or sampler beyond its resource
  ID (identity_refusal; sampler/mod.rs's identity sampling of a type with
  no identity class).
- SamplerState: a sampler the identity sampling does not take, a minimum
  level or emulated filter the function specializes, a 1D bicubic filter
  (identity_refusal), and a reached anisotropic slot sample
  (sampler/anisotropic.rs).
- ConstantBlob: constant data past the module's bound read through memory.
- SeqCstFence: a sequentially consistent fence (sync/barrier.rs).
- StorageTextureFormat: a storage texture access the device takes only
  with a declared format, whose bound format no input names
  (texture/slot.rs, which named no form before).

The diagnostic symbols stay. The device-level refusal of a device without
bufferDeviceAddress and shaderInt64 (derive.rs) names its needs and no
cause. Feature stays IdentityDomains, so validation's outcome key and the
census are unchanged, and the golden and engine table cells (feature and
needs only) do not move; no version bump.

Tests: the error module's Display test of an identity refusal with and
without a symbol; the cause asserted at the 1D bicubic, the storage texture
without its format, the constant blob, the seq_cst fence and the texture
argument refusals (engine_identity) and the replay variant's encoder value
(pipeline/compile tests).

api_signatures blessed (IdentityCause, Cause::Identity), api_surface lists
the enum, REFUSALS.md regenerated (the sites are built through
error/mod.rs's Unsupported::identity), docs/API.md's error table and the
identity domains' paragraph name the cause. runtime-sources.sha256
unchanged: no runtime input is edited.

Consumer uses (consumer-uses.sh, read-only, over the consumer's
development 90214271ed and its lane tips of the last day): IdentityCause,
Cause and IdentityDomains, 0 hits. The consumer reads Unsupported::cause
only through its Display (rt_platform diag.rs refusal_name, unbuilt.rs),
so an identity refusal's name there now carries its cause.
2026-12-03 09:13:23 -08:00
Anees Iqbal c708eaa754 Runtime docs: the identity domains' known gaps name a tile memory fragment function, a sparse status on a plain texture, an extended-range bicubic repeat offset and a 4.1 sampler read of an argument buffer's texture
The README's list of the forms the identity domains do not lower named none of four structures the
golden table refuses with Unsupported{IdentityDomains} on every profile, so a reader of the known
gaps could not tell they are refused. Each now has its entry, beside the form it is nearest:

- a fragment function over its tile's threadgroup memory (`engine/cfit_fragment_tile_memory`, four
  entries). Its entry says no guest of the consumer's can ask for one: Metal's feature set tables
  give tile shaders and imageblocks from the Apple4 family, and the consumer's guest device answers
  no Apple family on both its guests (reims-vgpu's graphics/device_info.rs at bb8738f7eb:
  `cap_apple_families`, "today no for every one", and `supportsTileShaders` and
  `supportsImageBlocks` answered no);
- the residency of a sparse operation on a texture that is not sparse (`engine/a2_sparse_status`);
- a bicubic sample of an extended-range texture through repeat with a constant texel offset
  (`engine/xr_bicubic`'s `xrb_repeat_offset`, the only refused entry of that fixture);
- Metal 4.1's read(sampler, coord) of an argument buffer's texture (`engine/kernel_read_through`'s
  `rt_heap_zero`, `rt_heap_ow` and `rt_heap_arg`).

The refusals are the golden table's cells at this commit's parent (15 of 15 profiles for each
entry). Which form each one's symbol names is not asserted here, so each entry cites the golden
table and quotes no symbol.

Verified on the CPU with no device, job m3-max-84445 at this commit's tree: cargo fmt --check 0
and the workspace's rustdoc with -D warnings 0. The golden cells are read from
crates/metal2vulkan/tests/golden_hashes.tsv at the parent; the consumer's answers from its
development branch, read-only.
2026-12-03 09:11:46 -08:00
Anees Iqbal ed55748644 Docs: the runtime README, API.md, REPLAY-STREAM.md and VALIDATION.md state each measurement by its card and driver, not by our job id
The planner widened the job-id rule from the published crates' rustdoc to the four prose docs a
reader takes measurements from. Each lab job id (m3-max-NNNN, and the bare job numbers beside
them) and each commit sha comes out; the ids stay in the commit messages that already carry them.
A measurement keeps the card, driver and OS its sentence names. Where an id was the only basis a
sentence named, the sentence now says what was measured and on what:

- the runtime README's identity-domains paragraph cited five plays of recorded streams; it now
  states what the states-only plays of the 26 kept replay streams on lavapipe show: each makes
  every pipeline state its stream makes, and none of their render or compute states is refused,
  a refusal under the identity domains among them (the plays of jobs m3-max-83458, -83494, -83695,
  -83889 and -83954, each printing refused 0);
- the probe lists name the cards ("probes on the RTX 3090, the Iris Xe, lavapipe and the RX 7900
  XTX"; "probes on a Radeon Pro 5300M and a UHD Graphics 630, both macOS 26.7.1");
- sentences that compared runs by id compare them by order ("failed in one run and passed in two
  others"), and "the same job" is "the same run";
- "rt at <sha>" and "players built from <sha>" become what that build was ("a build of the runtime
  that copied a texture over any import"), or go where the card and driver already say it;
- VALIDATION.md's harness count reads "the harness on lavapipe".

Two README tables lose their Job column (the import-cost table and the guest-buffers table). The
edited paragraphs are rewrapped at 100 columns; a token diff against the parent shows only the
ids, the shas, the two columns and the rewordings above.

submit.rs's three citations of two probe commits (06860a3848 and b15b306d2f) become "measured
with a probe build of the runtime" (and, for the split probe, "that timed each command buffer");
the IN_FLIGHT and infos comments are rewrapped at 100 columns.

So it does not grow back, scripts/api-docs first fails when the four docs name a job id
(`m3-max-NNNN`, or `job NNNN`); CONTRIBUTING.md, API.md's description of the script and ci.yml's
comment on its step say so.

docs/CONFORMANCE-COVERAGE.md is unchanged: its generator has no job column. Its 1772 lines with an
id are all in its last section, The ledger, which quotes the last field of known-gaps-rt.tsv; the
ids are in the ledger's own sentences, which the ruling keeps out.

Not widened, per the ruling: the ledger, known-gaps-rt.tsv, results.py, test comments and the
unpublished crates. The OS is not added to measurements whose sentence named a card and driver
but no OS.

Verified on the CPU with no device, job m3-max-84430 at this commit's tree: cargo fmt --check 0;
the workspace's rustdoc with -D warnings 0; scripts/api-docs 0, and 1 with a job id planted in
docs/VALIDATION.md, naming the planted line (the tree clean after its restore); the refusal
surface's --check 0; the 13 tests that read these docs passed (feature_enables, the floor, the
accepted differences, the precision-note catalogue, the consumer's objects and the guide's
example). Before the commit, no line of the four docs matched the check's pattern, and rustfmt
--check passed on submit.rs.
2026-12-03 09:10:35 -08:00
Anees Iqbal a14a6e362b Translator tests: the observed-webs test counts the analysis's webs, so it is red without the fix
What: every_handle_web_an_instruction_observes_is_refused
(src/tests/engine_handle_words.rs) also counts the word webs the memory
analysis finds (`memory::plan::analyze_memory`'s `words`, through a new
helper `webs`, built as engine_word_phases.rs's `proven` builds its
plan): two in the control, where no instruction observes the two webs,
and none in each form that observes them (a compare of the two words
either way round, their difference, one web's word compared with a raw
resource ID).

Why: the test b5f7a1b805 added passes with and without that commit's
fix (its own message: 8 of 8 both ways), as AGENTS.md's "add a test or
a measurable check that fails without the fix" asks otherwise. The
refusal cannot tell one web spoiled from both: whichever web the old
loop left planned, the other's sink refuses the module with the same
Lowering(Access) / HandleUse. The analysis's count can: the old loop
spoiled only the web of an instruction's last operand, so each
two-web form left one web.

Verified on the CPU with no device. Job m3-max-84234, at this commit
on its first base (c887b9b7e9): the test at the fix's parent's
memory/provenance/words.rs red (1 failed, EXIT 100), green at this
commit (the 8 engine_handle_words tests passed); fmt, signatures, clippy
in the three configurations, rustdoc, private rustdoc, api-docs and the
refusal surface 0; the product suites 3756 passed, 24 skipped, 1 failed:
the golden table, which that base's blessed table did not match before
pin U's bless (this commit changes no product source); validation 1349
passed, 3 skipped; conformance 1053 passed; doctests 0. Job
m3-max-84368, at this commit rebased onto ed75c57d5d: the observed-webs
test, the L156 tests and the golden table, 94 tests, none failed. No
product source changes, so no SEMANTICS_VERSION bump and
runtime-sources.sha256 is unchanged.
2026-12-03 09:06:46 -08:00
Anees Iqbal 5db315e226 Conformance ledger: a pixel sampler under mirrored repeat is undefined in Metal
What. The 28 rows of pixel-samplers-rgba8-linear-mirror and -rgba16f-linear-mirror at their
`slot` and `arg` sites (four sites on each of the seven venues) gain one sentence: Metal leaves
the sample undefined, so the difference is no wrong answer against documented Metal (rule 1).

Why. Apple's MTLSamplerDescriptor normalizedCoordinates page, as fetched: non-normalized
coordinates "should only be used with 1D and 2D textures with the following conditions;
otherwise, the results of sampling are undefined": the clampToEdge or clampToZero address mode,
the notMipmapped mip filter, equal minFilter and magFilter, and a maxAnisotropy of 1. MTLSampler.h
names ClampToEdge alone. These cases sample a pixel sampler under mirrored repeat. Of group C's 22
KosmicKrisp sites, the 18 pixel-downscales sites (clamp to edge, linear, not mipmapped) stay a
wrong answer of ours; these 4 are not one.

docs/CONFORMANCE-COVERAGE.md re-run with coverage.py: unchanged (its table shows each row's first
words).

Verified: 28 rows changed by script, 4 a venue on seven venues; the conformance suite runs on this
commit (job named in the hand-off).
2026-12-03 08:50:41 -08:00
Anees Iqbal 6521f16ed5 Conformance ledger: the pixel-sampler quotient at group C's sites is ours on the six other venues
What. The KosmicKrisp venue (Apple M3 Max) reads 22 sites as ours, not the device's
(5eeeb8d752): pixel-downscales frac/slot head, tail and digest at seven sizes (18), and
pixel-samplers-rgba8/rgba16f-linear-mirror slot and arg (4). The texture slot's runtime pixel
sampler hands the device's normalized sampler the pixel coordinate over the size, and that
quotient's rounding moves the linear filter's weights. KosmicKrisp's filter is Metal's, so its
controls isolate the quotient: `norm` (and `const`) give Metal's answer there, `slot` (and `arg`)
do not. The same 22 sites on lavapipe, NVIDIA, the RX 7900 XTX, the 780M, the RX 550 and the Iris
Xe still said "The device's own answer (rule 1)". This commit rewrites those 132 rows' words; no
row's case, venue, verdict, site or answer changes.

- pixel-downscales, 18 sites a venue (108 rows): "Ours, on top of the device's filter". On every
  one of the six venues `slot`'s frac digest is not `norm`'s, where Metal answers the two alike,
  and `norm` differs from Metal's by the device's own filter. Each venue keeps its own bounds
  (lavapipe 2/255; NVIDIA 1.19/255 slot, 0.83/255 norm; RADV 0.88/255 slot, 0.031/255 norm; Iris
  Xe 0.95/255 slot, 0.031/255 norm, and its grid/ulp one-ulp element).
- linear-mirror on the three RADV venues (12 rows): ours, on top of the device's filter; there
  `arg` and `slot` share one digest and `norm` has its own.
- linear-mirror on lavapipe, NVIDIA and the Iris Xe (12 rows): left the device's answer, with one
  sentence added. On those venues `slot` and `arg` answer `norm`'s digest, so the controls show
  nothing of ours there; the quotient KosmicKrisp shows to be ours does not move these devices'
  answers. Calling these rows ours would claim more than the controls show.

The frac/slot sites KosmicKrisp answers as Metal does (1000x1080 tail, 1366x1080 head and tail)
are not group C's and keep their words.

Why. A row's words say whose difference it is; a stale reading hid that this one is a wrong
answer of ours against documented Metal (planner, L371 group C: first the truth, then the fix).

docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py); --check
reports it as derived.

Verified: the 132 rows found by case and site from the KosmicKrisp replay's 22 lines (job
m3-max-82685's kept output) and rewritten by script, 22 a venue; the conformance suite runs on
this commit (job named in the hand-off).
2026-12-03 08:50:41 -08:00
Anees Iqbal b54d8d46bc Docs: the published crates' rustdoc states each measurement by its card and OS, not by our job id
What: every lab job id (m3-max-N) in a doc comment of the three
published crates' product sources is removed: 91 ids, and one list
written as a range and bare numbers, on 72 lines over 17 files. The
card, driver, OS and probe each sentence already names stay. Each
changed sentence is rewrapped at 100 columns from the id's line to its
paragraph's end. docs/REFUSALS.md is regenerated: its Basis column
carries those doc lines' evidence (14 rows).

Why: the planner's rule. Docs say the measurement (card, OS), not our
job numbers. The ids stay in the commit messages that already carry
them. A token comparison of each file against its parent shows only id
phrases removed: "(job m3-max-N)", ", job m3-max-N", "potluck job
m3-max-N", "(m3-max-N)" and id lists of the same forms. One line that
held only "(job m3-max-49358)." in submit.rs is folded into the line
above it.

Not changed here: the runtime README (217 lines with ids), docs/API.md
(20), docs/REPLAY-STREAM.md (2), docs/VALIDATION.md (1),
docs/CONFORMANCE-COVERAGE.md (1772, generated from the conformance
ledger), plain // comments (blit.rs 3, conformance cases 3, tests 5),
test modules' and unpublished crates' doc comments.

Verified: refusal_surface.py --check passes. basis.rs regenerates
unchanged. runtime-sources.sha256 is unchanged (44066e69...): none of
the files is its input. rustfmt --check passes on each file. Rustdoc,
private rustdoc and api-docs in the job the READY names.
2026-12-03 08:50:04 -08:00
Anees Iqbal ed75c57d5d Runtime docs: a heap texture in an imported block is Gap::HeapTexture with unified memory, an image of its own without
What: new_heap_texture's Err list, heap_source's, and Gap::HeapTexture's
own doc name imported blocks (Device::import_host_memory, and on Unix
the dma-buf imports) beside exported ones, by form. On a device with
unified memory a texture in an imported block is Gap::HeapTexture. On
one without it, an imported block is Shared, so its texture is an image
of its own, as in any Shared heap.

Why: heap_source makes a Shared block's texture an image of its own on
a device without unified memory before it tests whether the block's
memory is its own. An import is a Shared block with memory of its own
(memory.rs: Own::Import is MemoryClass::Shared). So since 71b5a07856 an
imported heap's texture is made on a discrete card and refused on an
integrated one. The docs named only exported blocks for
Gap::HeapTexture, which left the import case unsaid in both forms. The
consumer makes heaps over the host's memory.

Verified: docs only; job m3-max-84317, on the CPU with no device: fmt,
workspace rustdoc, the runtime's private rustdoc, scripts/api-docs and
refusal_surface.py --check, all EXIT=0. docs/REFUSALS.md and basis.rs
regenerate unchanged. runtime-sources.sha256 is unchanged (44066e69...):
texture.rs and error.rs are not its inputs.
2026-12-03 08:41:16 -08:00
Anees Iqbal bac1ab1bd9 Docs: metal-measured covers Metal's validation stop; the bound form's evidence is the real cards
What: the `metal-measured` basis (refusal_surface.py's vocabulary, and
`RefusalBasis::MetalMeasured`'s doc, which states it for the API) now
says that Metal's API validation stopping the call counts: documented
Metal then defines no answer to it, whatever plain Metal does without
the validation. docs/REFUSALS.md is regenerated with it.
docs/VALIDATION.md's device-test part gains one sentence: the bound form
of a compute function's buffer arguments has its evidence in the device
tests on real cards whose query takes it (each test's `M2V-FORM` line,
`tests::pool_reach`'s assertion of the form the query chose), and CI's
lavapipe legs take the address form, since lavapipe's
`maxStorageBufferRange` of 128 MiB is below the 2 GiB and 15 bytes the
query needs there.

Why: the definition said "Metal itself refuses the input", while
runtime refusals declare `metal-measured` on the strength of Metal's
validation layer stopping the call (in error.rs, among them
IndexedPatchDrawWithoutIndexType, PatchIndexBufferOffset,
ViewportNotFinite and StencilAttachment), and the
conformance allowances say a validation stop "is not Metal refusing it"
for their own verdict. The two answer different questions; the
definition now says which one the basis answers. The lavapipe sentence
records that CI's lavapipe legs never run the bound form, so a reader
of a green lavapipe leg does not take it as that form's evidence.

The numbers: job m3-max-84123 (lavapipe, release, three runs a
workload) printed `bound_dispatches_per_run` 0 for all 48 harness
workloads, and `address_dispatches_per_run` above 0 for the 43 that
dispatch. lavapipe's limits are those of the committed lavapipe
profiles (maxStorageBufferRange 134217728, minStorageBufferOffsetAlignment
16, so the query needs 2^31 + 15).

Verified: refusal_surface.py --check passes, and the regenerated
basis.rs is unchanged; runtime-sources.sha256 unchanged (error/mod.rs is
not an input: 44066e69...). Rustdoc in the docs job the READY names.
2026-12-03 08:41:16 -08:00
Anees Iqbal e498cbaa54 Translator tests: the integer heap slice's refusal is checked by its cause field
an_imageblock_slice_writes_an_argument_buffer_texture checked for the text "Imageblocks:
SliceWrite;", but a refusal that names its intrinsic prints it after the feature ("Imageblocks
(air.write_imageblock_slice_to_texture_2d.i16.v4i16): SliceWrite; needs NotImplemented"), so
the text check failed on a refusal whose cause was SliceWrite. The test now compares
Unsupported::cause with Cause::Imageblocks(ImageblockCause::SliceWrite).

Verified: job m3-max-84245 (CPU) printed the refusal above, cause SliceWrite, with the text check
failing; the field check's run follows.
2026-12-03 08:40:39 -08:00
Anees Iqbal 71a5393966 Translator: an imageblock refusal names its cause (ImageblockCause)
Feature::Imageblocks covered about ten structures with one untyped refusal, so a walk's counts
could not tell them apart. Each site now names the structure it met, in Unsupported::cause
(Cause::Imageblocks), as Cause::Access and Cause::Tessellation do:

- MultisampleOperation: the front end's undecoded multisample operations (get_imageblock_samples,
  get_imageblock_num_colors, get_color_coverage_mask, the masked implicit store), set where the
  front end's refusal converts;
- Stage: an explicit imageblock or an imageblock intrinsic outside a kernel or tile function, or
  an imageblock view outside a fragment function (param_family, use_imageblock);
- TwoImageblocks, DataSize, Layout: why the planner gives the kernel's explicit imageblock no
  region (more than one; no or zero data size; an alignment that is not a power of two, cells past
  4 GiB, or an unaliased explicit one beside the implicit one). The planner's imageblock() returns
  the cause and ArenaLayout keeps it (imageblock_refused) for use_imageblock to refuse with;
  Missing where the kernel declares no imageblock at all;
- DataOperands: air.imageblock_data operands other than (coord, 0, 0);
- ParameterValue: the imageblock parameter's value selected (access::select_param);
- CellPointer: an imageblock-space pointer that air.imageblock_data does not make, outside a tile
  function (the planner);
- FragmentData: a fragment function's [[imageblock_data]] input (fragment::select_param) or
  output (stage_io);
- SliceWrite: a slice write of a shape not modelled (texture::select, texture::slice).

Golden tables are unchanged (their outcome text names no cause). REFUSALS.md regenerated, the
signatures table blessed (ImageblockCause, Cause::Imageblocks), the api_surface list and
docs/API.md's Unsupported row name the new enum. SEMANTICS_VERSION 2354 (main renumbers at
landing): a refusal's text changes. runtime-sources.sha256 follows from the job.
Verified: pending (the red tests and the suites).
2026-12-03 08:40:39 -08:00
Anees Iqbal b0afeddc79 Translator tests: each imageblock refusal names its cause (red)
The planner's rule for a refusal kind of several causes: it carries a typed cause, by the
structure met, so a walk's counts tell them apart. Feature::Imageblocks covers about ten.

each_imageblock_refusal_names_its_cause reads the cause from the refusal's Display (the form the
consumer's counts line keys on): a kernel's explicit imageblock of data size 0 (DataSize), two
explicit imageblocks (TwoImageblocks), an air.imageblock_data index operand of 1 (DataOperands),
air.get_imageblock_samples (MultisampleOperation), and the owned fixture's fragment imageblock
entries (FragmentData). imageblocks_are_refused expects Missing (a query with no imageblock), and
the integer heap slice SliceWrite.

Expected red: no Imageblocks refusal names a cause yet.
2026-12-03 08:40:39 -08:00
Anees Iqbal b19bb1bd50 Runtime README: the Iris Xe's Shared heap texture stays in its heap
The known-gaps row of Shared heap textures gains the integrated card's line beside the RX 7900 XTX
and RTX 3090 lines: on a device with unified memory the form is unchanged, the texture placed in
its heap.

Verified: Iris Xe Graphics (Mesa 26.2.6) job m3-max-84238, the build before the form alternated
with this one: the shared-heap device test fails before (the two-copies view) and passes with it,
in both views; the texture-buffer heap test passes in both trees; sampling a 4096x4096
RGBA16Float texture took 24.697 and 28.540 ms in a Shared heap against 24.673 and 28.533 ms in a
Private heap (before, 31.107 and 24.650 against 31.164 and 24.671), each a median of 7 command
buffers.
2026-12-03 08:40:29 -08:00
Anees Iqbal 22335aaa56 Runtime README: a Shared heap's own image measured on the RX 7900 XTX and the RTX 3090
The known-gaps row of Shared heap textures gains the form's measured speed beside the earlier
system-memory row: the same 4096x4096 RGBA16Float sampling kernel, Shared heap against Private
heap, the build before the form alternated with this one in one job.

Verified: RX 7900 XTX (RADV, Mesa 26.2.6) job m3-max-84221: before 203.355 and 203.266 ms against
2.093 and 2.096 ms (97x); with it 2.107 and 2.104 against 2.108 and 2.106 ms. RTX 3090 (NVIDIA
620.70.06) job m3-max-84144: before Gap::HeapTexture; with it 1.907 and 1.913 against 1.912 and
1.912 ms. Each a median of 7 command buffers, two rounds.
2026-12-03 08:40:29 -08:00
Anees Iqbal 69033afcd4 rt: a Shared heap's texture on a device without unified memory is an image of its own
The L21 ruling, the third use of rule 2's unified-memory query (Vulkan's device type). On an
integrated or CPU device a Shared heap's image texture lies in its heap, as before. Elsewhere it is
an optimal image of its own in device memory, made as new_texture makes one but not zeroed (Metal's
heap textures are not), and its heap range is left unused. Before, a discrete device either
refused the placement (Gap::HeapTexture where its optimal images take no Shared type: the RTX 2080
and 3090 on NVIDIA 620.70.06) or bound the image in system memory, which every read crossed the
link for (97 times a Private heap's time on an RX 7900 XTX, job m3-max-79841).

How: heap_source decides by core.unified_memory() and the block's class. The own form checks the
placement against heap_texture_size_and_align's answers by the same rule the in-heap form uses
(heap_place, factored out of make: a heap range past its block, a texture past the heap's end, a
byte off the alignment are Refusal::HeapTexturePlace), then makes Source::HeapOwn: Bind::Pooled
(a place in a texture block or an allocation of its own, which spills as a texture's does), the
heap's hazard id kept, no alias Placement, and Under::Heap with at None, so use_heap still covers
it (heap_block) and blits see no shared span (bound). Texture buffers and textures over heap
buffers are untouched.

Docs: AGENTS.md rule 2's unified sentence gains the clause (the count stays fourteen); the
runtime README's heap text and known gaps (the device memory sum beside the heap's block, where it
runs out, and the earlier speed row); new_heap_texture(_for_views), heap_texture_size_and_align,
has_unified_memory and Gap::HeapTexture docs; docs/API.md and the conformance heap-size side's
step 2; docs/REFUSALS.md regenerated (HeapTexturePlace's site is heap_place).

RUNTIME_VERSION 2564 (renumbered at landing: development held 2563). runtime-sources.sha256 unchanged (guard PASS, m3-max-84127).
Verified: red FAIL / new PASS on the RTX 3090 (build m3-max-84138, run 84144), the RX 7900 XTX (84137, 84221; rt suite under m2v_gpu 993 passed, 4 skipped, 84222) and the Iris Xe (84227, 84238); CPU suites 84127 (conformance + rt 1279 passed, 2 skipped); clippy plain 84180, m2v_gpu 84172, m2v_cpu_icd 84181, rustdoc + api-docs 84182, all EXIT=0; states-only play on lavapipe 84256 equal to the base (gb-3090-r2 10643 render / 15299 compute, windrag-780m-b4-um790 8972 / 225, 0 refused). The consumer's arm64 guest walk on the RTX 3090 at pin S (m3-max-84046) asked for no texture on a Shared heap, so the evidence is the device tests and timing.
2026-12-03 08:40:29 -08:00
Anees Iqbal d35283294c rt test: a Shared heap's texture on a device without unified memory is an image of its own (red)
The L21 ruling: rule 2's unified-memory query picks the form of a Shared heap's image texture.
On an integrated or CPU device it lies in its heap, as today; elsewhere it is an optimal image of
its own in device memory, its heap range left unused. Today a discrete device either refuses the
placement (Gap::HeapTexture where the image does not take the Shared type, an RTX 2080) or
binds the image in system memory, which every read crosses the link for (97 times a Private
heap's time on an RX 7900 XTX).

every_device_samples_textures_placed_in_a_shared_heap now runs in both forms (the two-copy view
answers no unified memory). Without unified memory it expects each texture made whatever the
Shared-type query answers, in no alias placement and in the heap's use_heap block, the heap's
placement refusals at the size query's answers, and the source's texels kept after the host
writes 0xff over its heap range through a buffer placed there. In both forms: the size query
answers alike (what the consumer's heap accounting reads), and a linear texture over a buffer
placed in the Shared heap reads the host's bytes there. The heap texture-buffer test runs in both
forms too, unchanged.

Expected red: the two-copy run on an integrated device finds the image placed in the heap, and a
device whose image does not take the Shared type is refused Gap::HeapTexture.
2026-12-03 08:40:29 -08:00
Anees Iqbal f0a229f143 Translator: every handle web an instruction observes is spoiled, not only its last
What: Search::run's last loop (memory/provenance/words.rs) collects every
web whose integer an instruction reads otherwise than as a merge or a
sink, and spoils each one. It kept one Option that each operand
overwrote, so an instruction that read two webs (an icmp eq of two
joined handle words, or their sub) spoiled only the web of its last such
operand, and the other stayed a web: planned as handle indices while an
integer instruction read its words. The collection is one working
vector for the loop, grown through grow_working and charged to the
meter, as the loop above charges its operands.

Why: an analysis that marks a web usable while an integer instruction
reads its words is wrong where it stands. Today no output shows it: the
spoiled web "is no web, and stays refused" (lower/access/handle.rs), so
its handle use refuses the module whichever web was left planned. That
rests on a property nothing states, which the next refusal change could
remove.

Test: every_handle_web_an_instruction_observes_is_refused edits
sampler_word_select of the owned fixture kernel_handle_word_joins (as
the other refusal tests there do, so the fixture's AIR, which four
authored cases name by hash, is unchanged): a second web of the same
class beside the first, whose sampler samples too (its sink), then an
icmp eq of the two words either way round, their sub, and one web's word
compared with a raw resource ID. Each is refused: Lowering(Access) with
the cause HandleUse. A control compiles the same two webs with no
instruction observing them, so each refusal is the observation's and
both webs are webs. It guards that a module whose instruction observes
a web stays refused.

No SEMANTICS_VERSION bump: no module's output changes (the test is 8 of
8 with and without the fix). runtime-sources.sha256 unchanged
(pin-compute, 44066e69...).

Verified: job m3-max-84060 (msi): engine_handle_words 8 of 8 at the test
alone and 8 of 8 with the fix; clippy in the three configurations,
rustdoc and the suites as the lane's READY names.
2026-12-03 08:40:29 -08:00
Anees Iqbal e730fbddbb Runtime: AttachmentPlace's basis is Metal's own refusal, measured on the M3 Max
What: Refusal::AttachmentPlace's Basis line said `ours`. It now says
`metal-measured` and cites the committed probe resolve_depth_planes.m
(conformance crate, Apple M3 Max, macOS 27.0.1, job m3-max-73495). With
Metal's validation layer on, a resolve into slice 3 of a 2D texture ends
the process at the encoder ("Slice is 3, but the texture has only 1
slices"), and so does a resolve at depth plane 3 of one ("depth plane is
3, but the texture has a depth of 1 at mip level 0"). With the layer off,
plain Metal writes slice and plane 0 instead. A level past the texture's
was not run, and the line says that part is ours. docs/REFUSALS.md and
error/basis.rs are regenerated by scripts/refusal-surface/refusal_surface.py.
AttachmentPlace's basis() now answers MetalMeasured, and the Refusal
table's counts move one row from ours to metal-measured.

Why: the bug row said plain Metal (layer off) takes resolveSlice 3 into a
2D texture, and the planner's 11-25 ruling was that it needed a read
first, with rule 1 applying if Metal's layer refuses it. The read is the
probe above: the layer refuses it, so the refusal stands under rule 1,
and its basis now cites that evidence. Behaviour is unchanged.

Verified: refusal_surface.py --check exits 0 on this tree. The
runtime-sources fingerprint, recomputed from the tree, is unchanged
(44066e69): the runtime crate's sources are not inputs to it. No
signature changes, so api_signatures.tsv is untouched.
2026-12-03 08:40:29 -08:00
Anees Iqbal 16ab60e417 Runtime docs: the floor's public items, Limit and HOST_DOMAIN say they have no Metal counterpart
AGENTS.md asks every public runtime item's doc to name its Metal counterpart and what differs or is
refused. These public items named neither a counterpart nor its absence: floor::VERSION,
INSTANCE_EXTENSIONS, OPTIONAL_INSTANCE_EXTENSIONS, TIME_DOMAINS, MAINTENANCE8, BUFFER_USAGE,
IndirectCommandLimits, Features and Missing; Limit; and HOST_DOMAIN (its three cfg forms). Each is
Vulkan's side or the runtime's own, so each now opens "No Metal counterpart:", as the runtime's
other such items do (IndexClass, BlockId, DeviceExtension).

Found by the audit lane's read of the public runtime items' docs (392 pub items in non-test
sources; the rest name a Metal selector or type, or say they have no counterpart, on the item or
its type). Doc comments only: the API signature table and the runtime-sources pin do not move.
2026-12-03 08:40:28 -08:00
Anees Iqbal ce7d6a1c87 Runtime docs: shadows and their copies arise on every device for an in-place texture without the feedback usage
Metrics::attachment_read_copies and Gauges::shadows said they arise on a device without the
attachment feedback loop. A texture in place over a buffer, a surface plane among them, reads its
own pass's attachment through a shadow on every device where its linear image took no feedback
usage: Texture's making takes the loop from the plan's linear_loop for an image laid over a buffer
and from the device for one of its own (texture.rs, the looped match before Shadowing), and every
shadowed read's copies count in attachment_read_copies (render_encoder.rs, shadow_copies). The
runtime README's render encoder section already says so ("Through a copy, on a device without the
feedback loop, and for a surface plane or a texture in place over a buffer whose image took no
feedback usage"). The two fields' docs now say the same, so a reader of a nonzero count on a
device with the loop knows it is that case.

Found by the audit lane reading the counts the consumer folds. Doc comments only; the
runtime-sources pin does not move (counters.rs is not among its inputs).
2026-12-03 08:40:28 -08:00
Anees Iqbal 4a36a54747 Runtime README: the 780M's in-place frame at one draw is 536 us, its median of six
The host-memory texture row for the Radeon 780M (job m3-max-81673) read 696 against 537 us a
frame at one draw. The job's six alternating runs put the in-place arm's frame p50 at 529.3,
534.0, 536.1, 536.8, 537.9 and 542.9 us, a median of 536.45, so 536; the copy arm's median is
696.25, and the stated ratio 0.770 is 536.45 / 696.25, which stands. The four-draw pair (1025
against 793) and its 0.774 match the job.

Found by an audit of the docs' cited job numbers against the jobs' logs. Docs only.
2026-12-03 08:40:28 -08:00
Anees Iqbal 3142bd9ac6 Runtime: an over-copy of a kind the counters did not keep counts under its cause
Once the counters hold their 256 over-copy kinds, a copy of a new kind counted only in
Metrics::over_copies_unkept_kind, one number for every cause, so a consumer reading it (138 in
one arm of four of a walk on the Radeon 780M) could not say which cause's kinds went unnamed.
Such a copy now counts in its cause's field, over_copies_unkept_kind_<cause>, one for each of the
14 causes, named as the cause's pair is: host_memory, host_memory_restore, dma_buf, dma_bufs,
dedicated, surface, spilled, linear, linear_features, view_storage, pitch, render_reach,
alignment and image_memory. The aggregate stays and is now the causes' sum, read from the same
counters, so it cannot disagree with them. The kinds the counters keep, and their bound, are
unchanged.

The runtime README's over-copy paragraph names the fields. RUNTIME_VERSION 2563: what a run
records moves (the per-cause fields). The runtime-sources pin does not move (counters.rs is not
among its inputs).

Red: the_counters_name_each_copied_kind_once_up_to_their_bound, which the commit before this one
extended, read 0 for every cause against 2, 1 and 1; green with this.
2026-12-03 08:40:28 -08:00
Anees Iqbal 269e501b4f Runtime test: an unkept over-copy kind counts under its cause too (red)
Metrics::over_copies_unkept_kind counts the over-copies whose kind the counters did not keep,
the 256 kinds being full, as one number, so a reader cannot say which cause those copies had:
a consumer's walk on the Radeon 780M showed 138 of them in one arm of four, and nothing named
their cause.

This adds one field a cause, over_copies_unkept_kind_<cause>, beside the cause's pair
(over_copies_<cause> and over_copy_bytes_<cause>), and extends
the_counters_name_each_copied_kind_once_up_to_their_bound: filled past the bound with kinds of
the causes in turn, the three unkept kinds (dedicated twice, surface and spilled once each) must
count under their causes, and the causes must sum to the aggregate. The fields are read from
counters that nothing moves yet, so the test fails: every cause reads 0 against 2, 1 and 1.

The API signature table is blessed for the 14 fields. The runtime-sources pin does not move
(counters.rs is not among its inputs).
2026-12-03 08:40:28 -08:00