Commit Graph
3733 Commits
Author SHA1 Message Date
Anees Iqbal 07103eb809 Runtime: a pool's blocks made ahead are summed in place, so a creation call's keep_room allocates no list of them
Memory::keep_ahead, which a creation call's keep_room runs for a pool that grew lately or is
near its next block, read the pool's blocks made, being made and still to make as a Vec of their sizes
(memory/ready.rs's Readying::held) only to sum them. The heap's kept-block budget read the same
Vec through outstanding_bytes. outstanding_bytes now sums them under the readying's lock, and
both callers ask it. held is gone, and lacking takes the sum.

Why: once host_ab settles the device's checks before its workloads, each of the RTX 5080's
texture_256_shared calls found a pool growing (memory.rs's ready_if_growing) and read the list:
one allocation a call. texture_256_shared allocs went from 25.312 to 26.312 a call in every run
(bound 32). An allocation trace of the group's counted window
(base against the settled tree, 2 runs each) named held <- keep_ahead <- ready_if_growing <-
keep_room <- new_texture_now as the only site that differed, 1.000 a call.

Verified (release host_ab against development 58c3147007):
- RTX 5080 Laptop, 16 runs each: texture_256_shared allocs read 25.312 in every run, as at
  base (26.312 without this commit). Every row is the same as at base, apart from
  heap_texture_256 allocs (15.25 -> 12.25, the previous commit) and buffer_texture_256 (within
  its bound in 16 of 16 runs; base over it in 4 of 16).
- lavapipe: texture_256_shared allocs 31.312 -> 29.312 (base 32.312); every row within its
  bound, 6 of 6 runs.
- 780M PHOENIX: texture_256_shared 29.312 (base 30.312); no row moved up.
- tests::memory, tests::host_memory, tests::host_image_room, tests::device_memory_overflow,
  tests::blocks_ahead and tests::zeroed_start: RTX 3090 56 passed (2 ignored), PHOENIX 56 passed
  (2 ignored), lavapipe 57 passed.
- clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) and rustdoc -D warnings clean on Linux.
2026-11-11 06:16:11 -08:00
Anees Iqbal 88a5b95f7a Runtime: a class's memory types are read in place, so a host-copied texture's making allocates no list of them
class_types, which host_image_types asks for every texture whose texels the host copies (since
399e8d6d17), collected candidates() into a Vec only to fold it into bits: one allocation per
texture made. On lavapipe, host_ab's percall texture_256_shared read 32.3125 allocations a call
at development, against its bound of 32, in 6 of 6 runs. An allocation trace of the call named
candidates <- class_types <- host_image_types <- placed_image_starting as the site, one a call.
That trace came from a host_ab build that recorded every allocation in one group's counted
window.

ranked() yields each usable memory type with its rank, in Vulkan's order, and collects nothing.
class_types folds it into bits. candidates collects it and stable-sorts it by rank as before, so
both answer the same types in the same order: the system-memory branch for unified Private and
Memoryless, and the required, preferred and avoided flags otherwise.

Verified (release host_ab at this tree, with the settle commit before it and the test commit
after it, against development 58c3147007, 6 runs each unless named):
- lavapipe: texture_256_shared allocs 32.312 -> 31.312 (base over its bound in 6 of 6 runs, this
  tree in 0 of 6), heap_texture_256 allocs 14.25 -> 12.25; every row within its bound.
- RTX 5080 Laptop (40 runs each): heap_texture_256 allocs 15.25 -> 12.25.
- 780M PHOENIX: texture_256_shared 30.312 -> 29.312, heap_texture_256 79.25 -> 75.25 (over its
  17.25 bound at both: the heap-tiled path, handed to the orchestrator).
- tests::memory, tests::host_memory, tests::host_image_room and tests::device_memory_overflow
  pass on the RTX 3090 and PHOENIX (47 each, 2 ignored) and on lavapipe (48).
- percall.rs's account of a heap texture's allocations now reads the counts measured here
  (lavapipe and the 5080, 12.25 a call). The M3 Max's was not measured at this tree.
- clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) and rustdoc -D warnings clean on Linux.
2026-11-11 06:16:11 -08:00
Anees Iqbal f3aee27ec8 host_ab: the runtime's device's checks answer before any workload, so no call's window holds their work
host_ab's runtime side now opens the device, times the open, and then waits for the device's
in-place, submission and queue-switch checks (Runtime::settle_checks) before the first workload.
It reports that wait as `meta device_checks` (ms), apart from `meta device_open`. A check that
does not answer within 30 s is named on stderr, and the run goes on.

Why: the RTX 5080's percall failed about one run in three. Row buffer_texture_256 read
rt_vk_images_made_at_call and rt_vk_image_bindings_at_call at 1.0625 or 1.125 against their bound
of 1. The maker is the device's in-place check (in_place_check.rs, thread m2v-in-place-check).
On the 5080 the first texture over a buffer in exported memory starts it: buffer_texture_256's
first warm call, whose Buffer::new_texture over the group's buffer asks a pending verdict
(texture.rs's exported_takes). The check then makes and binds its probe images on its own thread
(in_place_image.rs) for as long as it runs. The device counts that work as its own
(Counted::AsTheDevice), so the group's counting window read it whenever the two overlapped. A
probe build that named the thread of every making off the program's threads, and marked each
window, showed the check's images inside buffer_texture_256's counting window in 5 of 8 runs.
Only some runs fail because it depends on where the check's run falls against that window.

host_ab's shader cache is a new directory each run, so the check ran in every run. A consumer's
device reads the verdicts from its cache's records as it is made and runs no check; settling the
checks first measures that device. The calls after the verdicts can take another path than the
calls before them. On the 5080, each texture_256_shared call then found a pool growing and
read the list of its blocks made ahead (memory/ready.rs's held), one allocation a call. A later
commit sums those bytes in place.

Verified (release host_ab, the same metallib, development 58c3147007 against this tree with the
later commits of this branch):
- RTX 5080 Laptop (nvidia ICD, three b5080 entries, base and this branch in turn in each):
  base failed 11 of 40 runs (buffer_texture_256 images and bindings 1.0625 to 1.125 a call).
  This branch failed 0 of 40: 24 runs without the held-bytes commit and 16 with it. Every
  other row was within its bound in every run.
- lavapipe and the 780M PHOENIX (radeon ICD, 1002:15bf!), 6 runs each: no row moved up, and
  every row is within its bound on both, except PHOENIX heap_texture_256 allocs. That row is
  over its bound at base and here (79.25 and 75.25 a call against 17.25): the heap-tiled path,
  handed to the orchestrator.
- device_checks: 5080 606 to 793 ms, lavapipe 532 to 2954 ms, PHOENIX 490 to 540 ms.
- clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) and rustdoc -D warnings clean on Linux.
2026-11-11 06:16:11 -08:00
Anees Iqbal d95f5c099d Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 06:15:00 -08:00
Anees Iqbal 27b9cedd7a Pipeline creation log: a state's first line names its descriptor; METAL2VULKAN_DUMP_PIPELINES writes each pipeline's SPIR-V
A live pipeline the log names could not be made again from its library: the line names the
state's functions and its key, not the constant values the functions were made with, nor the
blend and write masks, nor which library's bitcode. A state's first line now names the descriptor
(`StateDescriptor::logged`): each function's name, the SHA-256 of its bitcode
(`FunctionInfo::air_hash`; a precompiled function's key) and its constant values by index and by
name as type and bytes, each color attachment's format, blend and write mask (the notices' words,
`blend_text`, which `draw_at` now shares), the depth and stencil formats and the raster samples.

METAL2VULKAN_DUMP_PIPELINES names a directory (made where missing) each device writes every render
pipeline's SPIR-V modules into, one file per module, `<hash>.spv`, the hash the line names it by,
each written once; a failed write is named in the line. Setting it turns the log on too. Both are
default-off diagnostics: no pipeline, key or path changes with them.

Test: tests::pipeline_dump (device test) runs a child process that makes one state with a
constant and a blended color: with the dump directory set and the log variable unset, the first
line names each function's bitcode hash, the constant's type and bytes, the color's format, blend
and mask, and every module a line names is in the directory as SPIR-V of the words the line
counts; with the dump variable empty and the log unset, no line and no file.
2026-11-11 06:14:20 -08:00
Anees Iqbal 22749e28d6 FAST-PATHS: the RADV plain-making hold's cause, size and why no allocation avoids it
What: the known gap "On RADV, a command buffer submitted while the runtime makes a block of
plain memory waits for that making" now states the hold's cause and size, and why the runtime
has no allocation route around it.
- Cause: the kernel fills a plain block's pages in runs of up to 4 MiB, and a 2 MiB run (the
  order amdgpu names beneficial) may reclaim and compact until it succeeds or fails, under the
  reservation every submission of the process takes (Linux 7.3.3 ttm_pool.c, amdgpu_gem.c's
  VM_ALWAYS_VALID create path).
- Size: beside a consumer's guest scroll on a Radeon 780M short of free memory, one making held
  the submissions 228 ms, 222 ms of it one compaction for one 2 MiB run; so no block size of
  2 MiB or more bounds the hold below one run's.
- No route: RADV (Mesa 26.2.6) makes every memory neither exported nor imported a local buffer
  object (radv_device_memory.c PREFER_LOCAL_BO -> VM_ALWAYS_VALID), and asks a dedicated
  allocation of every image made for an external handle type in other than linear tiling
  (radv_device.c), so blocks of optimal images or of the DRM_FORMAT_MOD_LINEAR images over
  padding-unobserved buffers can be neither exportable nor imported pages; a dedicated
  exportable allocation per image puts each in RADV's global BO list, which every submission
  names (about 1 us each); and Vulkan reports neither the carve-out's size nor its room.

Why: the consumer's 780M scroll traces (host ftrace + perf compaction events) put every long
submission wait on a block making's order-9 compaction under the VM root reservation; the
ledger said the making holds submissions but not how long, nor why no other allocation helps.

Verified: the 228/222 ms figures parsed from the traces' compaction events per making thread;
the kernel and Mesa statements read from linux-stable v7.3.3 and the mesa-26.2.6 tag; the
carve-out sizes read from sysfs on two 780M hosts (2 GiB full, 4 GiB). Docs only; cargo fmt.
2026-11-11 05:59:14 -08:00
Anees Iqbal 332e32b09b runtime_lane::discard_fetch_groups: the store-dropping defect's trigger shapes, kept-apart arithmetic in straight-line code, a discarded-only branch and an edge-helper-only branch
The lane drew one fetching function whose arithmetic is all fast math, so its module held no
`NoContraction` operation, which SPIRV-Cross writes as the `optnone` calls the defect needs: it
could not meet the defect with the workaround off either. Three more fragment functions compute
under `contract(off)` (as a module without the `contract` flag does): `sfd_line` in straight-line
code after the sample, `sfd_dropped` in a branch only the discarded fragments enter (the measured
trigger), `sfd_edge` in a branch only the helper invocations past a rectangle's edges enter. The
globals carry the cell's sides for `sfd_edge`. The lane prints each function's discard and helper
strategies and its `NoContraction` count.

Verified on the M3 Max (macOS 27, MoltenVK 1.4.2), job m3-max-15413, 512 passes per arm, every
pass clean in each arm: the workaround as it is (deferred discards; helper guard on sfd_dropped,
guard and 4 fences on sfd_edge), and, through probe arms never landed, the deferral off, the helper
guard and fences off, and both off.
2026-11-11 05:56:32 -08:00
Anees Iqbal cd5eca2f53 runtime_lane::discard_fetch_groups: does every live fragment's write land in a discarding fetch?
A widget's compositing fragment (in a guest) fetches its color, reads and
samples a texture, discards, samples again, takes a derivative and writes;
through the pixel interlock its write is a storage write at the entry's return.
On MoltenVK on an Apple GPU, Apple's compiler drops the storage writes of a
simdgroup's live threads (8x4 pixels) holding a discarded thread in some
shapes (DriverWorkaround::DiscardDropsSimdgroupStores), and the widget loses
pixels in 8x4 groups along its edges.

The owned fixture sfd_discard_fetch draws that shape of our own: sfd_fill,
then sfd_alpha over a fullscreen triangle or 32 rectangles whose edges cut
quads, discarding on a pixel pattern ((x + 3y) % 5 == 0) or never. The lane
checks every pixel (live: fetched + texel + 1; discarded or uncovered: the
fill), prints the live pixels lost by 8x4 groups and how many groups lost every
live pixel, and prints the fragment stage's discard, helper and interlock
strategies and precision notes as the device's compile profile lowers it.
split_fetch_order's readback helpers are shared.

Not yet run on a device.
2026-11-11 05:56:32 -08:00
Anees Iqbal f891a2d20b tests::engine_typed_clamp: the resources of a kernel that reads its grid position take a zero dispatch region
The new sized-array fixture test's kernel reads [[thread_position_in_grid]], so its
plan declares a DispatchRegion push field, which the shared resources helper
refused (the translator suite at 26d6ebe604 failed that test at the helper's
panic, before any run). Zero push bytes are one region at the grid's origin, as
engine_absent_value_arguments fills it.
2026-11-11 05:51:46 -08:00
Anees Iqbal e7a959befb Check a typed alloca's out-of-range index again: a store past its array is dropped, a load reads 0
The authored case loads-and-stores-past-a-thread-local-array (fixture
ob2_sized_array, case 877bd99b152c) matched Metal on all six venues at its rows'
build and mismatches on the 780M (RADV, Mesa 26.2.6) and lavapipe now: threads
2 to 6 store past their Frame's array[4] (indices 4, 11, -1, -4, 7), and the
store lands on array[3], a word Metal never writes (Metal's store lands past
the array, in the frame's other members); thread 3 then loads array[3] and
threads 4 to 7's declared out-of-bounds loads read array[3] where the
validation contract's read rule for a typed thread-local object is zero.

The change that moved it: b8dcbe21bc (development's packet of c033c6b7ce,
"Hold every plain static threadgroup array as a typed object, indexed by its
GEP's own operands and clamped by min", SEMANTICS 1805). For m2vbench's
threadgroup tiles it replaced the typed objects' check (select(idx < len, idx,
0) per level, select(ok, v, 0) on a load, if_(ok) around a store) with
min(idx, len - 1) on every typed object, threadgroup, alloca and constant
alike. Its message names ob2_sized_array in the golden drift and calls the
new answer contained undefined behaviour, not a speed-for-accuracy choice; the
validation side (the case's array words compared with Metal, ReadRule::Zero
for a typed object) was not changed with it. The CLI's translation of the
fixture for amd-780m-radv and lavapipe, built at each commit: at a81fe9a689
(its parent) no UMin, one OpBranchConditional (the store's guard), five
OpSelect; at b8dcbe21bc two UMin, no branch, two OpSelect; at this branch's
base the same as b8dcbe21bc.

A thread's own object takes the check again (TypedAccess::checked: a contained
access whose home is an alloca): a load past a level reads zero and a store
past one is dropped, so a store never changes an element it does not address.
Threadgroup and constant typed objects keep min(idx, len - 1), the form
b8dcbe21bc measured for the tiles; this change does not touch them.
memory::alloca's Clamps contract and lower::access::local's docs say both.

Tests: engine_typed_clamp's an_out_of_range_index_stays_inside_its_object (the
typed alloca's dropped store and zero load; the threadgroup and constant
answers unchanged) and the new
a_store_past_a_thread_local_array_changes_none_of_its_words (the fixture on
amd-780m-radv, lavapipe, moltenvk-m3 and vk12-floor through the CPU
interpreter: the array's words Metal's, the loads past it zero, no word before
or past it changed); engine_arena's typed_alloca_indices_are_clamped_under_isolation
and typed_allocas_index_nested_levels_dynamically back to the checked answers.
Each fails on the min form.

SEMANTICS_VERSION 2027.
2026-11-11 05:51:46 -08:00
Anees Iqbal 02dcb7cd1a Record amd-780m-radv and intel-irisxe-rplp-anv at Mesa 26.2.6, product 8d548d2c56a1
Rows and refusals recorded by one build (executor vulkan-engine-v182, product
8d548d2c56a199af1c1f15027409f596dc4d19a561e3d0a1daf40760a061f50e, semantics 2025,
oracle metal-literal-resources-v49), installed at abb7ee9845 by
scripts/rerecord-commit --no-commit in a potluck job (job m3-max-15328, every out
directory's --batch-report this_build=yes), its changed shards copied here. Only
candidate and refusal shards change, so the product, and every row installed here,
stays current.

- amd-780m-radv stated (Radeon 780M PHOENIX, um790): 2266 rows, 5 refusals
  (2025 match, 241 mismatch)
- amd-780m-radv robustness-off (Radeon 780M PHOENIX, gem10): 2266 rows, 5 refusals
  (2024 match, 242 mismatch)
- intel-irisxe-rplp-anv stated (Iris Xe RPL-P, ms01): 2262 rows, 9 refusals
  (1993 match, 269 mismatch); 2261 from the round at cf35d7a7ff and case
  0a0b12b81f56 from its retry at abb7ee9845 (the first run's pipeline creation
  took 5145 ms, past the 5 s ceiling; the retry matched in 2.7 s)
- intel-irisxe-rplp-anv robustness-off (ms01): 2262 rows, 9 refusals
  (1994 match, 268 mismatch)

Every row and refusal records its venue's identity at driverVersion 109060102,
driverInfo "Mesa 26.2.6-arch3.1"; no run recorded a device its venue does not
allow. The mismatches stay recorded as the mismatches they are.
2026-11-11 05:50:39 -08:00
Anees Iqbal 2a44c53833 Recapture the Hawk Point 780M's profile at Mesa 26.2.6
amd-780m-hawkpoint-radv (no venue names it) documents itself as the 780M of
Phoenix under another deviceID, captured under the same RADV build; with
amd-780m-radv now captured at 26.2.6 that held only after recapturing it too.
Captured on the cluster's Hawk Point 780M (1002:1900, radeon ICD,
MESA_VK_DEVICE_SELECT=1002:1900!): vulkaninfo reports "AMD Radeon 780M
Graphics (RADV PHOENIX)", driverInfo "Mesa 26.2.6-arch3.1", deviceID 0x1900;
packages mesa and vulkan-radeon 26.2.6, vulkan-icd-loader and vulkan-tools
1.4.363.0.

Regenerated with regen_device_profiles.py --offline from that capture and its
corpus-vulkan --capture-formats supplement (sources pinned in SOURCES). The
document changes only in its identity, provenance and the two fragment
shading rate limits the 780M's own recapture moved
(maxFragmentShadingRateCoverageSamples 32 -> 16, ...RasterizationSamples 8 ->
4), which no translation reads. Against the 26.2.6 capture of the Phoenix
780M, the Hawk Point capture differs in deviceID, the DRM minors, the PCI bus
and deviceUUID only; its formats supplement in device_id only.
2026-11-11 05:50:37 -08:00
Anees Iqbal 1d65ed0fa3 tests::one_intel_venue: the RPL-S's identity differs from the RPL-P's in its driver build too
The Iris Xe (RPL-P) capture is now ANV 26.2.6 while the UHD 770 (RPL-S) capture
stays at 26.2.4 (no RPL-S node is reachable to recapture it). A venue allowing
the RPL-P alone therefore stops the RPL-S on its name, device ID, driver version
and driver info; with both allowed, the RPL-S still proceeds (its identity is
allowed and both captures derive the venue's translation key).

Verified: the two committed profile documents differ only in identity fields and
maxMemoryAllocationSize (a JSON walk of both); the validation suite at cf35d7a7ff
(job m3-max-15075) failed only this test, on the last assertion's stop list.
2026-11-11 05:50:37 -08:00
Anees Iqbal 4db0484a9d Recapture the Iris Xe venue's profile at Mesa 26.2.6 and declare its identity
The cluster's Iris Xe (RPL-P, 8086:a7a0, homelab ms01) runs Mesa 26.2.6-arch3.1 now, so every
intel-irisxe-rplp-anv run was refused as a venue mismatch against the 26.2.4 profile and
identity.

intel-irisxe-rplp-anv.json is regenerated from a vulkaninfo --json capture and its
corpus-vulkan --capture-formats supplement taken on the venue's device (intel ICD; vulkaninfo
printed deviceName "Intel(R) Iris(R) Xe Graphics (RPL-P)", driverInfo "Mesa 26.2.6-arch3.1",
apiVersion 1.4.354; mesa and vulkan-intel 26.2.6, vulkan-icd-loader and vulkan-tools
1.4.363.0), and c3-venues.json declares the RPL-P's identity at driverVersion 109060102 and that
driverInfo. Against the 26.2.4 capture only the driver version and info and
maxMemoryAllocationSize (24955668480 -> 24950464512, sized from the host's memory, no profile
field) differ; the formats supplement is unchanged in content.

The venue's second device, the UHD Graphics 770 of RPL-S (intel-uhd770-rpls-anv), stays as
captured under ANV 26.2.4: no cluster host has that GPU, so it cannot be recaptured here. Its
capture still derives the venue's translation key (the only difference from the RPL-P's
description is still maxMemoryAllocationSize). The regen script's comment and the two-device
test's doc say which build each capture is of. c3::tests' driver-drift case declares a driver
the profile does not state (now 26.2.7 against the profile's 26.2.6).

Verified: check_device_profiles.py (19 profiles, 0 findings).
2026-11-11 05:50:37 -08:00
Anees Iqbal fc82c1def7 Leave a render pipeline's synthesized geometry stages out of its census
A vertex function whose [[viewport_array_index]] or [[render_target_array_index]] can differ
among a primitive's vertices stores it through the geometry stages link synthesizes, on every
device whose driver does not take Metal's first-vertex indices (all but MoltenVK): Vulkan takes
Layer and ViewportIndex only where every vertex of a primitive stores the same, Metal takes the
first vertex's. The executor's census (ModuleCensus::of_pipeline_modules_under) mapped every
linked module to a Metal stage and had none for GEOMETRY, so each such case failed with "the
linked module's stage VK_SHADER_STAGE_GEOMETRY_BIT has no authored stage" and recorded nothing:
on the Radeon 780M under Mesa 26.2.6, both legs, the four authored vertex cases
07f125464dac (constant-zero-position-observation), a013a2bcbe56 (the same over another AIR),
434e73e03189 (rotate-a-normal-in-a-vertex-stage-that-also-writes-a-clip-distance) and
7ce6dea0475e (clip-away-every-vertex-of-a-triangle-with-a-negative-clip-distance).

Metal has no geometry function, so a geometry stage is always one link made; the census now
leaves it out, as it leaves out a tessellation pipeline's synthesized vertex and control stages.

The executor's enables were checked first and are not the cause: its map names the same 166
features as the product's exposure table (device/enables.rs), shaderOutputViewportIndex and
shaderOutputLayer included, and the 780M rows record them enabled (output_viewport_index: true).
The stage is the product's own choice there (lower/stage_io/plan.rs own_index_store: an index not
uniform over a primitive goes through the stage unless the driver takes
MetalFirstVertexIndices), the one the runtime makes too.

ENGINE_EXECUTOR_ABI stays: no recorded row can observe the change, since every run of a
pipeline with a geometry stage failed before recording a row or a refusal (the constant's own
rule for a case kind no earlier executor ran).

Test: coverage::tests::a_render_pipeline_census_leaves_out_its_geometry_stages compiles the
owned fixture engine/rt6_first_vertex on the amd-780m-radv capture (vertex, three geometry
stages, fragment) and holds the census to the vertex and fragment modules; without the fix
of_pipeline_modules returns the GEOMETRY error and the test fails.
2026-11-11 05:50:37 -08:00
Anees Iqbal 6caa5a3924 Recapture the 780M venue's profile at Mesa 26.2.6 and declare its identity
The cluster's Radeon 780M (PHOENIX, 1002:15bf) nodes run Mesa 26.2.6-arch3.1 now, so
every amd-780m-radv run was refused as a venue mismatch against the 26.2.4 profile and
identity, and no row of the venue could be recorded.

amd-780m-radv.json is regenerated from a vulkaninfo --json capture and its
corpus-vulkan --capture-formats supplement taken on the venue's device (homelab
um790's 780M, radeon ICD, MESA_VK_DEVICE_SELECT=1002:15bf!; vulkaninfo printed
deviceName "AMD Radeon 780M Graphics (RADV PHOENIX)", driverInfo
"Mesa 26.2.6-arch3.1", apiVersion 1.4.354), and c3-venues.json declares the venue's
identity at driverVersion 109060102 and that driverInfo. Against the 26.2.4 capture
the profile differs in the driver version and info and in two fragment shading rate
limits (maxFragmentShadingRateCoverageSamples 32 -> 16,
maxFragmentShadingRateRasterizationSamples 8 -> 4 samples), which no translation
reads; the formats supplement is unchanged in content (240 queried, 169 stated).

The venue's rows of 26.2.4 now read stale_device; they are re-recorded on the device
in the commits that follow.

Verified: check_device_profiles.py (19 profiles, 0 findings), the regen script's 41
unit tests.
2026-11-11 05:50:37 -08:00
Anees Iqbal 9fdada1fd7 Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 05:46:39 -08:00
Anees Iqbal 7a2221ccf7 NativeMinMax: state fast::median3's two-NaN answer in the recorded bound
What: the recorded bound of PrecisionNote::NativeMinMax (artifact.rs,
docs/API.md's catalogue, lower::arith's docs) now names the answer it left
out. A fast::median3 whose first two operands are NaNs and whose third is a
number answers the number. Metal's fast form answers the second operand, a
NaN. New test lower::arith::tests::specials::
median3_of_two_nans_beside_a_number_answers_the_number.

Why: the 780M venue re-record of nan-model-min-max-of-nan-operands-under-fast-math
(27f7c2fd) differed from the M3 Max in 50 of 1024 words under NativeMinMax.
42 fall inside the stated ties (two NaNs, signed zeros, a denormal). The 8
outside are median3 of two NaN operands beside +0: the device answers 0x0
where Metal answers the second NaN ([486] 0x0/0xffeaaaaa, [494]
0x0/0x7fc00001, ...). The 0 comes from the lowering's composition
min(max(c, min(a, b)), max(a, b)) of NMin and NMax, introduced by 9afdb1e150
(rule 1: the device's min and max). NMin and NMax answer the number beside a
NaN, so any composition of them answers c here; answering b would take a select
that emulates Metal's NaN pick, which rule 1 forbids. The answer is no
translator fold: it is precise median3's own answer on Metal (the twin
55bca0fd answers 0 at the same eight lanes), and MSL leaves a NaN operand
under fast math undefined (section 8.1), so Metal's fast NaN is one reading of
an undefined answer. The bound said "the one Metal answers but at three ties",
which these lanes broke. It now states the fourth difference.

Verified: the new test runs both forms on the interpreter over the four
two-NaN rows of MEDIAN3 and the case's eight lanes. Each answers the number,
which is precise Metal's answer. The table's fast answers are the second
operand in exactly the ten rows whose first two operands are NaNs.
2026-11-11 05:45:58 -08:00
Anees Iqbal 1e1a17581d FragmentSimdgroupGrouping: a discarding function's helper ballots over a quad, where Apple's GPU splits quads
What: a fragment function that discards, asks quad_is_helper_thread or
simd_is_helper_thread, and runs a group operation over other lanes now records
PrecisionNote::FragmentSimdgroupGrouping on every profile that does not take
DriverDeviation::MetalFragmentSimdgroups (lower::simd::finish,
discarding_quads_observed). The note's text (artifact.rs, docs/API.md, the
runtime's reason, C3's deferred bound, the comparison table, the deviation's
docs) now covers this case. SEMANTICS_VERSION 2028: these functions' artifacts
record the note.

Why: the 780M venue re-record (RADV PHOENIX, Mesa 26.2.6) differed from the M3
Max's Metal rows on four public cases with no note to explain it:
helper-threads-after-a-discard-over-full-quads (18/256 words),
-over-cut-quads (10/140), helper-threads-asked-before-a-discard (14/140) and
helper-threads-after-a-terminating-discard (10/140). The translation is right:
MSL 2.3+ and the MSL 2.2 discard followed by a quad operation demote, the query
is OpIsHelperInvocationEXT, and the entry declares RequireFullQuadsKHR
(engine_helper_threads pins the forms). The difference is in Metal's rows. On
the M3 Max (macOS 26.7 and 27.0.1 alike, and MoltenVK there word for word),
a function that discards has some 2x2 quads shaded as several partial quads
from the function's start, each run holding the quad's other covered pixels as
helpers. So a live pixel's quad_ballot of the helper query names covered
pixels as helpers: 3 of 16 quads at 8x8, 2 of 12 at 7x5 after the discard,
4 of 12 when asked before it. The same function without the discard
(helper-threads-in-a-fragment-function-*) runs every quad whole on Metal and
matches on the 780M. RADV shades a primitive's covered pixels of a quad as
one quad. Metal permits a partly occupied quad and does not fix which quads
it splits, so the device's answer is one Metal allows. Nothing in Vulkan pins
Apple's split, so no exact path exists. The note's existing family is
FragmentSimdgroupGrouping: which pixels Apple's rasterizer packs together,
gated by MetalFragmentSimdgroups, and deferred in C3. Its text claimed "a quad
is the same 2x2 pixels on every device", which these rows disprove for
discarding functions. A helper computes what its covered pixel would, so only
a helper query tells the runs apart. The predicate therefore needs the
discard, the query, and an operation over other lanes.

Verified: tests::engine_helper_threads::
a_discarding_function_s_helper_ballots_record_the_grouping_where_the_driver_is_not_metal_s
(the 780M's profile records it for all three discarding functions, MoltenVK's
for none; the no-discard function and the discard-with-query-but-no-quad-op
function record none anywhere).
2026-11-11 05:45:58 -08:00
Anees Iqbal 7693d56ba9 Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 05:37:51 -08:00
Anees Iqbal 3cbc726b7e RUNTIME_VERSION 2030: a dma-buf import tries the dma-buf's other memory types after its class's
NVIDIA (RTX 3090, 620.70.06) answers a udmabuf's memoryTypeBits 0x11 and refuses the import into
the host-visible type 4 the Shared class asks (VK_ERROR_OUT_OF_DEVICE_MEMORY) but takes type 0;
the import now tries the class's candidates, then every other allowed type, so no-copy buffers and
a guest RAM's chunks lie in dma-buf imports there instead of copies.
2026-11-11 05:37:13 -08:00
Anees Iqbal addc45b2e1 Dma-buf imports fall back to the dma-buf's other memory types; NVIDIA imports a udmabuf as its type 0
On NVIDIA (RTX 3090, 620.70.06; RTX 5080 Laptop, 615.71.09) every
import of a udmabuf failed, so a no-copy buffer over sourced memory on a
device that imports no pointer was a copy ("their import failed"), and a
guest RAM's chunks there were never imported (the RAM not listed, its
objects copies): host_ram_dma_buf::without_pointer_imports_a_ram_s_chunks_are_its_dma_bufs
and no_pointer_import::without_pointer_imports_a_sourced_no_copy_buffer_lies_in_its_dma_bufs
failed on both GPUs in the round at b4cd0f9f91.

Cause, from a probe on the 3090 (job m3-max-15245, branch
steelbrain/hkhostmem-2-probe, not for landing): vkGetMemoryFdPropertiesKHR
answers memoryTypeBits 0x11 for a udmabuf of a sealed memfd, types 0
(heap 1, no property flag) and 4 (heap 1, host-visible, coherent and
cached). The import into type 4 answers ERROR_OUT_OF_DEVICE_MEMORY with
or without a dedicated allocation and the device-address flag; into
type 0 it succeeds in all four forms, for one page and for 16. The
runtime asked only the class's types (Shared requires host-visible
coherent memory), so it tried type 4 alone.

Fix: import_dma_buf tries dma_buf_candidates: the class's candidates
first, unchanged, then every other type the dma-buf and the resource
allow that the runtime may allocate and that is neither protected nor
lazily allocated. The runtime never maps a dma-buf import (the CPU uses
the caller's mapping), so a type the host does not map serves it. On
drivers whose class types import the dma-buf (RADV, lavapipe, ANV) the
order and the result are as before.

The docs that said NVIDIA refuses every udmabuf now speak of a driver's
refusal; the tests' stand-in for one is unchanged.

Tests: tests::memory::dma_buf_imports_try_the_class_s_types_then_the_dma_buf_s_others
(the 3090's types). The two device tests are unchanged: they hold on
NVIDIA once its driver imports the udmabuf.
2026-11-11 05:37:06 -08:00
Anees Iqbal bcb2d3190e Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 05:19:32 -08:00
Anees Iqbal c7b385ad3a attachment_stand_in: the last taker's handle is CommandBuffer::finished (Finished), a name of its own
Completion is already command_buffer's completion module's type (E0255,
m3-max-15240).
2026-11-11 05:18:50 -08:00
Anees Iqbal cdc251d9a2 split_fetch_order: the fetching draw reads the second color, which holds each pass's own number; pooled takes counted by the taker's completion
The in-flight test could not see a race on the second color's pooled backing:
no draw read that color. sfo_filter now fetches it too and adds the number the
plane wrote there (the plane draw's base instance, a number per pass), so a
pass that reads what another pass left in a shared backing, or a zero, holds
other codes. The fixture is regenerated (regen-air-fixtures).

The pool's last-taker handle was a weak command buffer, which made the
queue -> pool -> command buffer -> queue type cycle deep enough that the
auto-trait checks overflowed compiling metal2vulkan-validation (m3-max-15228).
It is now the command buffer's completion gate (CommandBuffer::completion),
which holds nothing else.

Not yet run on a device.
2026-11-11 05:18:50 -08:00
Anees Iqbal cc0c2770c2 Count pooled backings taken, and those taken while another taker is in flight; run split passes in flight together
WorkCounts gains pooled_backings_taken (a pass handed a backing its queue
kept, beside pooled_backings_made for one made) and
pooled_backings_taken_in_flight (of them, those taken while another command
buffer that took the backing had not completed). attachment_stand_in's pool
keeps a weak handle on each backing's last taker to tell.

runtime_lane::split_fetch_order gains a test that runs the split passes in
flight together: each pass over a target, second color and stencil of its own,
its readback in its command buffer, committed with no wait between passes
(each as encoded, or all once encoded) on one queue or two, the targets new
(fetched through scratch) or already in their storage form (fetched in place).
Nothing orders one pass after another but the second color's pooled backing,
which the hazard tracker orders as any texture. Each round prints its passes'
wrong pixels beside the backings each was handed and took in flight; every
pixel must hold its code and the queues must have reused kept backings.

pass() is now encode_pass + encode_readback, shared by both tests.

Not yet run on a device.
2026-11-11 05:18:50 -08:00
Anees Iqbal b9b489f0f7 runtime_lane::split_fetch_order: a split pass's draws read the stencil and colors the draws before left
A device without rasterization-order color access fetches through the pixel
interlock, which leaves the fetched color out of the draw's subpass, so a pass
with plain draws around a fetching draw runs as several Vulkan render pass
instances. This lane draws one such pass of our own MSL (sfo_split_fetch): a
plane that sets the stencil, four draws of rectangles that increment it and
write codes, a fetching draw of overlapping rectangles tested on the stencil
(a map that does not commute), and a cover tested on the stencil, over a
loaded and stored BGRA8 color with a second color and a Stencil8 both
DontCare, private or memoryless, the target kept (storage form) or new each
pass (scratch), at 224x128 and 61x37. Every pixel must hold the code its
draws in order give; wrong pixels are printed with their 8x4 groups, and each
pass prints its split causes, storage forms, placeholders and memoryless
backings, and asserts a split where the fetch takes the storage form.

Not yet run on a device.
2026-11-11 05:18:50 -08:00
Anees Iqbal 58c3147007 Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 05:13:15 -08:00
Anees Iqbal cf8467e140 RUNTIME_VERSION 2029: a fetch ordered between draws takes its barrier on every driver, no interlocked split
The MoltenVK race split (DriverFact::InterlockedDrawsRaceUnderLoad) now checks only interlocked
storage kinds; a framebuffer fetch ordered between draws takes its by-region barrier there too,
as on every other driver, instead of a new render pass instance per draw.
2026-11-11 05:12:37 -08:00
Anees Iqbal 871c5954e9 public fetch cases without an ordered form: a multisampled one may need sample-rate shading
public_framebuffer_fetch_cases_plan_input_attachments_without_an_ordered_form
failed on vk12-floor for per-sample-integer-read-modify-writes-at-4x. The
product refuses it as Unsupported{FramebufferFetch, AnyOf[[SampleRateShading]]}:
each invocation reads its own sample, which needs sample-rate shading, and
vk12-floor lacks the feature. That is the device's lack, so the test now
accepts this refusal for a multisampled case, and only where the profile
lacks SampleRateShading.

Verified: whole metal2vulkan-validation suite on lavapipe at this tip
(see the hkfbfetch-2 report).
2026-11-11 05:12:37 -08:00
Anees Iqbal 394da4cefb pipeline_selection: a fetch without an ordered form compiles, noted
The integration test a_fetch_without_an_ordered_form_is_refused expected
corpus-pipeline --profile vk12-floor --compile-only to refuse
exf_fetch_blend as FramebufferFetch. Since the between-draws form, the
product compiles it through input attachments and records
PrecisionNote::UnorderedFetchWithinDraw. The test, renamed
a_fetch_without_an_ordered_form_compiles_noted, now asserts the one row
is COMPILED and names the note. The --accept-unordered-fetch check is
gone: it guarded against a switch that compiled the fetch unordered, and
the unordered compile is now the device's only form, noted, with no
switch.

Verified: the whole metal2vulkan-validation suite on lavapipe at this tip
(see the hkfbfetch-2 report).
2026-11-11 05:12:37 -08:00
Anees Iqbal 4575273972 Fetch between draws: the barrier on every driver, and the executor's barriers
On the M3 (MoltenVK 1.4.2) the runtime lane's
fetches_between_draws_read_every_earlier_draw_and_note_the_draw_itself
counted 3 fetch barriers for 4 draws. The cause: the race split
(DriverFact::InterlockedDrawsRaceUnderLoad, held by MoltenVK on Apple's
GPUs) tested InterlockedStorage::meets, which since the between-draws form
includes the fetch kinds. So on the M3's withheld venue each draw after
the first went into a new render pass instance (Split::InterlockedWrites)
instead of after the barrier. The white write took no barrier at all, and
each later fetch took the split plus the new instance's BEGUN barrier.
That ordered the draws twice.

The race is the interlock's. The fact's measure is of interlocked storage
images, which MoltenVK encodes as raster order group 0 with no barrier
inside its Metal render pass. Input attachments ordered between draws are
not interlocked, and their barrier is by region with INPUT_ATTACHMENT_READ
in its destination. MoltenVK's MVKCmdPipelineBarrier::encode (v1.4.2, on a
tile-based GPU) ends its Metal render pass and begins another for exactly
that barrier. The split now tests only the interlocked kinds
(InterlockedStorage::meets_interlocked). The fetch kinds take the Whole
barrier on every driver: one barrier per draw, as on lavapipe and the
RX 550. The lane test now asserts (barriers, interlocked splits) = (4, 0),
(3, 0) and (1, 0). Without the fix the M3 gives (3, 3) in the first section.

The second fallout is the validation executor's planner test
a_framebuffer_fetch_case_plans_its_ordered_input_attachment. It expected a
device with neither ordered form to refuse the fetch, which the product no
longer does. The executor is a consumer of that contract
(GraphicsState::rasterization_order_attachment_access): a pipeline with
input attachments and no rasterization-order access must be ordered between
draws by a barrier of the subpass's dependency on itself.
- The executor's render pass self-dependency now covers both directions:
  color writes to input attachment and color reads, and fragment-shader
  reads to color writes (FETCH_SELF_DEPENDENCY).
- It records that barrier before each of its draws where
  fetches_between_draws holds, after the load operations too, as the
  runtime does.
- The planner tests now plan the neither device: input attachment 0, no
  rasterization-order access, neither ordered feature required, the note
  on the fragment stage. Every public fetch case on lunarg-2023 and
  vk12-floor plans the same way; a multisampled one may be refused as on
  every device.
- The executor's device test of the halving fetch expects one instance
  exact and three (one draw) each texel at some order's 2^-k on a device
  with neither form, where it used to expect the refusal.

Verified: see the hkfbfetch-2 report (M3 lane module, lavapipe whole
validation suite, RX 550 module and executor fetch test, clippy).
2026-11-11 05:12:37 -08:00
Anees Iqbal 3b9e504e85 Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 05:11:04 -08:00
Anees Iqbal d6fe1fbd56 RUNTIME_VERSION 2028: a dma-buf texture whose driver answers another plane offset binds at the texels' offset
Where the driver lays an explicit DRM_FORMAT_MOD_LINEAR plane at another offset than asked, the
texture's image takes a plane at offset 0 bound at the texels' offset of a non-dedicated import
of the pages, where the driver requires no dedicated allocation and its alignment divides the
offset, instead of a shadow. Honeykrisp (Mesa 25.3.6, Apple M2 Pro, 16 KiB pages) answers offset 0
for every explicit plane offset; there the route reads the texels in place before and after a CPU
write (Asahi host, the plane-offset probe).
2026-11-11 05:10:23 -08:00
Anees Iqbal 68d70b6bda Tests: dma-buf import cycles of one import freed once the device is idle
A variant of the one-import cycle: its copy waited for, then each queue the
runtime submits to waited idle under its lock and its staging queue's last
submission waited for, then the buffer released, so the import's vkFreeMemory
follows a device-idle wait. For the kernel-side leak probe: whether the frees
a driver keeps are the ones that race a GPU job.
2026-11-11 05:10:16 -08:00
Anees Iqbal 82b0ce1237 Tests: dma-buf import cycles of an import released while idle and imported again from its kept dma-buf
What: tests::dma_buf_import_cycles gains the residency's way: a no-copy buffer made once, each cycle
read by a copy, its import released while idle through Device::release_idle_host_imports (as the
residency thread releases it), the dma-buf's descriptor kept, and imported again from it by the
next cycle's copy; counted (host_imports_released, host_imports_reimported) and checked freed.

Why: the consumer's guest releases idle imports and imports the same dma-bufs again, a pattern the
other ways never run, and the kernel's kept imports may follow it.
2026-11-11 05:10:16 -08:00
Anees Iqbal 94514c4cfc dma_buf.rs: the check's dma-buf class judges an image bound at its texels' offset; which drivers take one
What: the module docs say why the in-place check's dma-buf verdicts (images at their pages' first
byte, dedicated imports) cover an image whose plane starts at 0 bound at the texels' offset (the
same texels and row padding in its subresource; the bytes before the binding outside it), and
what the probe found: lavapipe (Mesa 26.2.6) takes such a binding at 64-byte alignment, RADV
(Mesa 26.2.6, PHOENIX) requires a dedicated allocation of every such image.

Verified: tests::dma_buf_plane_offset on lavapipe and RADV PHOENIX (gem10).
2026-11-11 05:10:16 -08:00
Anees Iqbal ac0fcfa7fd Docs: a texture over dma-buf pages bound at its texels' offset, where the driver answers another plane offset
What: HOWTO's dma-buf section and API.md's in-place and shadow-cause paragraphs say when a texture
over dma-buf pages takes an image of a plane at offset 0 bound at the texels' offset (a driver
that lays the explicit plane out at another offset, Honeykrisp's answer; an image that requires
no dedicated allocation, which RADV requires, and whose alignment divides the offset), counted in
WorkCounts::dma_buf_images_at_offset; WorkCounts::dma_buf_image_memories_live says such an import
is no dedicated one.

Verified: tests::dma_buf_plane_offset on RADV PHOENIX (requires a dedicated allocation: the
forced route is refused, the texture a shadow that reads its texels) and on lavapipe (Mesa
26.2.6: the forced route binds at offset 2048, in place, and reads its texels and the CPU's later
bytes).
2026-11-11 05:10:15 -08:00
Anees Iqbal 815d982c7e Tests: cycles of each way the runtime imports and frees dma-bufs of host pages
What: tests/dma_buf_import_cycles.rs (device cfgs, Linux), one test per way, each runnable alone
by name for a consumer that reads the kernel's dma-buf account before and after: a no-copy
buffer over one dma-buf import (used by a copy, and unused), over several imports bound sparsely
(one chunk per granule of the device's sparse buffers), an image's dedicated import (a texture in
place over a buffer made once), and one import released while other work is in flight on the
queue, or while its own use is (freed by that use's completion). DMA_BUF_CYCLES names the cycles
(200 by default). Each prints the imports made and freed (WorkCounts) and checks that every import
was freed and that its way ran.

Why: a consumer on Honeykrisp (kernel 6.19.14 asahi) finds the kernel keeping about a quarter of
the dma-buf imports the runtime freed; these isolate which userspace pattern does it.
2026-11-11 05:10:15 -08:00
Anees Iqbal 2e28ce467b dma-buf textures: where the driver answers another plane offset, bind a plane at 0 at the texels' offset
What: a texture over dma-buf pages whose texels lie past their first page's first byte takes,
where the driver lays the explicit DRM_FORMAT_MOD_LINEAR plane at that offset out at another
offset (vkGetImageSubresourceLayout), an image whose plane starts at offset 0 bound at the texels'
offset of an import of the pages that is no dedicated allocation, before the shadow. It is tried
only on that answer, so every driver that answers the explicit offset keeps its dedicated import;
the image must require no dedicated allocation (VUID-vkBindImageMemory-image-01445, -02628), its
memory's alignment must divide the offset (-None-10735), and the image format query must not take
dma-bufs for it in a dedicated allocation alone. Counted: WorkCounts::dma_buf_images_at_offset (of
dma_buf_images). Where it is not made the shadow's notice names both reasons.

Why: Honeykrisp (Mesa 25.3.6, M2 Pro, 16 KiB pages) answers offset 0 for a plane 8192 bytes into a
page, so every such texture was a shadow, where the owner's rule keeps textures over the
consumer's memory in place wherever in place is possible.

Test: tests/dma_buf_plane_offset.rs (device cfgs, Linux) is also the probe: it prints the driver's
answers for explicit planes at several offsets and the dma-buf features, then makes the texture by
the product's route, by the explicit plane unchecked (what such an image reads), and by the plane
at 0 bound at the offset forced on a driver that answers the offset (PlaneRoute, a test-only
DeviceShared field), each read back through a blit before and after a CPU write.
2026-11-11 05:10:15 -08:00
Anees Iqbal 43bddd649a Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-11-11 04:58:49 -08:00
Anees Iqbal b3532a452e RUNTIME_VERSION 2027: MoltenVK pushes set 0 for a fragment stage writing a set-0 storage buffer in its interlock
Metal leaves a raster-order-grouped device buffer unordered inside an argument buffer whose other
buffer member the function reads; MoltenVK packs a bound set 0 into one argument buffer, a pushed
one discretely. Such pipelines now push set 0 there (RuntimeDriverDefect::InterlockedBoundBuffersUnordered),
and announce interlocked-buffer-order where they cannot.
2026-11-11 04:58:08 -08:00
Anees Iqbal 88e45b574f tests::interlocked_writes: a synthetic instruction's word count is its opcode and operands 2026-11-11 04:57:58 -08:00
Anees Iqbal 95136c87e9 binds_unordered_interlocked_buffers: name the private rule it reads without a link 2026-11-11 04:57:58 -08:00
Anees Iqbal 26440eaa22 Push set 0 on MoltenVK for a fragment stage that writes a set-0 storage buffer in its interlock
MoltenVK, binding through Metal argument buffers (the state device/argument_buffers.rs reads
from the limits; a device without them is refused at open), makes a bound set 0 one Metal
argument buffer, and marks each storage buffer a fragment stage reaches inside its interlock as a
member in raster_order_group(0). Metal leaves such a member unordered where the function also
reads another buffer member of the same argument buffer. A pushed set is discrete in either of
MoltenVK's modes, and Metal orders a discrete [[buffer(n), raster_order_group(0)]].

RuntimeDriverDefect::InterlockedBoundBuffersUnordered names it, on every MoltenVK GPU (keyed on
the driver, as the push holds however the device binds). There a render variant whose fragment
stage writes a storage buffer of set 0 inside its interlock pushes set 0, read from its words
(pipeline/interlocked_writes.rs: an interlock execution mode, a StorageBuffer variable of set 0
not decorated NonWritable). PushedBufferSizesUnset stays: such a variant pushes only where no
stage reads a buffer's length (OpArrayLength, OpUntypedArrayLengthKHR) and no binding of set 0
lists a stage the pipeline adds; otherwise it binds set 0 as before and announces the new
Degradation::InterlockedBufferOrder (`interlocked-buffer-order`, precision), as it does on a
device without the push command or with a set 0 no push layout takes. Nothing is refused.

Every other path is unchanged: the device now loads the push command on MoltenVK too (and primes
it), but pushes_set_zero there admits only those variants; runtime kernels stay bound
(OwnedKernel::pushed requires pushed sets that hold their sizes); every other driver decides as
before. No new DriverFact or WorkCounts field: the lane reads draws_pushing_set_zero.

Tests:
- tests::interlocked_writes: the translator's own modules of ipo_primitive_order for the
  committed MoltenVK profile (only ipo_rog_buffer's fragment stage interlocks with a writable
  set-0 buffer; no stage reads a length), and synthetic words for each fact.
- runtime_lane::interlocked_primitive_order: a RogBuffer draw must push set 0 where the device
  pushes it (draws_pushing_set_zero), and on a driver whose pushed sets lose their sizes no other
  draw may push; a_bound_set_of_interlocked_buffers_is_announced_once, the bound form with
  VK_KHR_push_descriptor withheld, the degrade site BOUND_INTERLOCKS.
- tests::driver_defects lists the defect for the MoltenVK profile; api_signatures.tsv blessed
  (two rows); docs/REFUSALS.md regenerated: unchanged. docs/API.md: section 5's pushed set 0 and
  the catalogue entry.

Evidence so far, Apple M3 Max, macOS 27.0.1, MoltenVK 1.4.2: Metal itself, our own MSL, 96 passes
each: a raster order group buffer member beside a buffer member the function reads lost writes in
96 of 96, with the width read elsewhere 0 of 96, a texture member 0 of 96, the member alone 0 of
96; MoltenVK's own Metal for the lane's stage 48 of 48, the same with the buffer discrete 0 of 48.
Through the runtime at 83d2d86519 (set 0 bound) the lane's RogBuffer lost writes in 96 of 96
passes (m3-max-14866); with every set 0 pushed (a probe arm) 0 of 96 (m3-max-14930). The fix's
own lane run is reported with the tip.
2026-11-11 04:57:58 -08:00
Anees Iqbal 87e717bb4b ipo_primitive_order: companions of the raster order group variants
From regen-air-fixtures on the M3 (job m3-max-14818).
2026-11-11 04:57:58 -08:00
Anees Iqbal cb440b7259 interlocked_primitive_order: the same draws through raster order group 0
Beside the fetch, ipo_rog_texture and ipo_rog_buffer apply the same maps to
a texture's texel and a buffer's word of the pixel in raster order group 0,
which the translator runs in the pixel interlock as it does the fetch's
storage form. A device without the interlock must refuse them typed
(ROG-SKIP). Companions to regenerate on macOS.
2026-11-11 04:57:58 -08:00
Anees Iqbal 063c83ee1b interlocked_primitive_order: show the interlock ran by its storage placeholders
storage_forms_taken counts only a target made again with STORAGE, and the
lane's R32Uint targets have it from the start (0 on the M3, m3-max-14735).
Each pass that fetches in the interlock leaves the target out of its
subpass for a placeholder; the lane prints those attachments per target
and requires some where the device's fetch takes the storage form.
2026-11-11 04:57:58 -08:00
Anees Iqbal a10e67315a A lane measurement: overlapping fetching primitives of one draw in order
interlocked_primitive_order draws, in one draw, 64 overlapping primitives
whose fragments read color attachment 0 and write it back through one of
two maps that do not commute (ipo_primitive_order's ipo_mix), as fullscreen
triangles or as rectangles from stepped corners, one instance or one per
primitive, over 1920x1080, 64x36 and 61x37. Every texel must hold the
in-order composition; the wrong ones are printed per pass with the 8x4
groups they fall in, and the storage forms each target took. This is the
within-draw counterpart of interlocked_draw_order: the runtime records
nothing between a draw's primitives in the pixel interlock, and Vulkan
orders them by rasterization order.

Companions from regen-air-fixtures on the M3 (job m3-max-14725).
2026-11-11 04:57:58 -08:00
Anees Iqbal d23a5549b9 ipo_primitive_order: an owned fixture of overlapping fetching primitives in one draw
One fragment function reads color attachment 0 and writes it back through
3c + 1 or 5c + 3 by the parity of its primitive's number, so a draw of
overlapping primitives leaves the in-order composition only where each
fragment read what the primitive before it wrote. Companions follow from
regen-air-fixtures on macOS.
2026-11-11 04:57:58 -08:00