Commit Graph
8729 Commits
Author SHA1 Message Date
Anees Iqbal 49eebb4d7f Validation: an argument-buffer texture buffer binds as a used texture, so the authored compile census compiles it
The authored compile census failed one case, 2631f2da (the public fragment
case reading abt_frag_texel_buffer's texture_buffer member), on every
profile with "argument-buffer texture 2 is a texture buffer, which no heap
array holds" (census job m3-max-63908 at d274b0b474). Since ed4f8976a5
retired texture_buffer_member, the case is no longer refused by a
requirement; a run draws it through the runtime
(runs_render_through_runtime), which makes texture buffers, and the Metal
oracle's observation of it is committed. Only the census still reached the
executor's own bind state: case_compile builds its request's bind shape
with graphics::render_shape -> bind_state -> argument_buffers::used_texture
(argument_buffers.rs:279-283), which refused a texture buffer untyped.

The member is now what Metal's useResource makes resident: a used texture of
Metal's TextureBuffer type and its pixel format
(resources::texture_facts, which bound_texture now uses for image
textures), with its resource id. The translator already plans such a used
resource: bind::heap's members make no heap member of a texture buffer
(heap.rs:931-934), and under the identity domains the census compiles for
(DevicePolicy::default, the runtime's) a texture-buffer member is a set-1
texel-buffer element (817463704e). The executor's own context still
refuses a case holding one, typed, before it binds
(own_context_refuses_members), since its resident-table heap holds no such
member; its docs now say why there rather than in used_texture.

No version moves: ENGINE_EXECUTOR_ABI's rule exempts a change no recorded
row can observe. The runtime route builds no bind state, the own context
refuses the case before binding, and the census never caches a failed
cell, so no recorded row or cached cell held this shape. The case's census
cells change from failed to what the compile gives when main blesses.

Tests: argument_buffer_members_are_written_into_their_owner asserts the
texture buffer member's used texture (type, format, token, resource id)
and that compute_shape plans it (it asserted the refusal before);
the_census_compiles_a_texture_buffer_an_argument_buffer_holds compiles
every committed case holding one through compile_case on lavapipe under
the identity domains, expecting one compiled cell each (the failed cell
before).
2026-11-21 08:47:55 -08:00
Anees Iqbal 5ccd158e6d Bless for the pin: golden hashes, engine expectations, opened chains, the old render key
What moved, each from a commit since the pin 5a04298008, none blessed in its change:
- golden_hashes.tsv (100 lines) and public_fixture_expectations_engine.tsv (6 cells, runtime-floor
  Unsupported{ArgumentBufferTextures} -> ok: rlm_member_texture_buffer and abt_descriptor_sets' texel-buffer
  entries): texture buffers (817463704e) and the runtime-floor profile's texel-buffer features.
  Bless job m3-max-63907 on the M3 at d274b0b474 (inventory=0 golden=0 printouts=0).
- opened_chains.txt, 22 contexts: 20 from 3d841759a8 (the engine contexts no longer enable
  VK_EXT_device_generated_commands; each of the ten profiles listing it loses one member and one
  extension), 2 runtime-floor contexts from 817463704e (four texel-buffer descriptor-indexing members).
  Job m3-max-63909 (bless_opened_chains) at d274b0b474.
- the_old_render_descriptor_key_keeps_its_value: 78157ab4... -> 8f9bcf94..., the value job m3-max-63918
  printed at 3a6d244ae2; the device key moves with the runtime floor's texel-buffer features.

Not here: the authored compile census. At d274b0b474 (m3-max-63908) it has one case failing on every
profile (the validation executor's argument-buffer encoder refuses a texture-buffer member untyped since
ed4f8976a5 retired texture_buffer_member), so it writes nothing; its fix and re-bless follow.
2026-11-21 08:37:38 -08:00
Anees Iqbal b64e3e9f7b Harness: the device tests' module doc says the busy-GPU row's reads stay bounded
The row now asserts an absolute bound at both reads (881f559999), not that
its gauges stay flat between them; the module doc said flat.

Verified: rides the compile job of 881f559999's stack.
2026-11-21 08:32:08 -08:00
Anees Iqbal 881f559999 Harness: the busy-GPU row bounds each gauge at both reads, not their growth
releases_under_work allowed each gauge to grow by eight iterations' worth
between its reads at iterations 100 and 200. A leak of one texture per
iteration passes that. The row now asserts an absolute bound at both reads,
in what the first iteration added:

- releases_waiting and textures: IN_FLIGHT + 1 = 4 iterations' worth (128
  and 64), one for each command buffer in flight and one for the one being
  made;
- texture_block_bytes: 2 * IN_FLIGHT - 1 = 5 iterations' worth (655360 for
  8 images of 16 KiB). In today's runtime an image is held by the upload
  that zeroed it until its own command buffer retires, then its release is
  queued against every command buffer committed so far, so images stay 5
  iterations where views stay 3. A runtime that frees the image sooner only
  lowers the reads.

The row's line prints each gauge's two reads and its bound.

Checked against every recorded read of the row (rounds 5a04298008 and
7c1baad228, 17 legs): the highest were textures 56, releases_waiting 96
(hawkpoint and the Iris Xe) and texture_block_bytes 557056 (34 images; the
2080 and the 3090), all within the new bounds. A four-iteration bytes bound
would have failed those two. The test keeps its name; the round selects it.
2026-11-21 08:31:27 -08:00
Anees Iqbal f380459946 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-21 08:35:39 -08:00
Anees Iqbal 3a6d244ae2 Translator: runtime-floor's recommendation leaves out its texel-buffer update-after-bind pair, and a device made from it refuses texture buffers naming the feature
Texture buffers (817463704e) made runtime-floor the first committed profile that lists texel-buffer
update-after-bind features with robustBufferAccess and without robustBufferAccessUpdateAfterBind,
so recommended_enables keeps robustBufferAccess and leaves those two out by
VUID-VkDeviceCreateInfo-robustBufferAccess-10247. recommendations_are_closed_fixed_points_on_every_
committed_profile asserted the recommendation left out nothing on any committed profile, an
observation over the profiles, which no longer holds; it now names runtime-floor's pair. The
runtime enables those features and never robustBufferAccess (floor.rs), so no product change.

recommended_enables' doc said the core does not read the buffer update-after-bind features. Since
texture buffers it reads the two texel-buffer ones; the doc and docs/API.md now say a device made
from the recommendation on such a device gets no texture buffers, each refused naming the feature,
and how to have them. A new test builds runtime-floor's device from its own recommendation and
shows the typed refusal (Unsupported ArgumentBufferTextures, needs
DescriptorBindingUniformTexelBufferUpdateAfterBind), and the same member compiling once the
features are enabled without robustBufferAccess, as the runtime does.
2026-11-21 08:33:22 -08:00
Anees Iqbal d274b0b474 Conformance ledger: the texture-buffer and held-texture routes of norm-storage-codes on the NVIDIA cards and the Iris Xe
What: 20 rows in known-gaps-rt.tsv, at case/hsw_buffer/texels and case/hsw_held/texels of
norm-storage-codes-{rgba8unorm, rgba8snorm, rgb10a2unorm, rgba16unorm, rgba16snorm}: ten on
NVIDIA, ten on the Iris Xe. Each carries its card's hsw_write row's reason, with one more
sentence:
- the route answers as `hsw_write` does: the same count, the same largest difference, the same
  first differing element;
- the case's pipeline records `device-color-conversion` and `device-nan-encoding` on that card.
docs/CONFORMANCE-COVERAGE.md is regenerated.

Why: texbuf (817463704e onward) builds texture buffers, and the case's `hsw_buffer` route reaches
the device. Its `hsw_held` route answers on the GPU cards too. Their lavapipe rows came with
b7e3247961; the GPU cards' rows did not.
- The bytes are the card's own normalized conversion at a tie (rule 1), the conversion the
  texture route already ledgers:
  - NVIDIA stores the lower code at a unorm tie: Metal 0x1010101, ours 0x0 (rgba8unorm).
  - At an snorm tie NVIDIA stores the code toward zero: Metal 0x81818181, ours 0x82828282.
  - ANV rounds ties to even.
- The RX 7900 XTX (m3-max-63842) and the 780M (63840) answer Metal's bytes on all four routes.
- The store lowering is the texture's own (lower/texture/mod.rs, `ImageDim::Buffer` included):
  it calls `norm_storage_facts`, which records `DeviceColorConversion` for a slot whose storage
  choice is a normalized format of the identity class, or that has none.

Verified: the compile job and the replays on the 3090 and the Iris Xe, named with the sha.
2026-11-21 08:19:35 -08:00
Anees Iqbal 04b76d9dfe Conformance ledger: the sRGB8 blend's one-one-subtract row on lavapipe is keyed by the host's ISA
What: blend-interaction-format-srgb8's case/blended/one-one-subtract row ("81 elements differ (U8),
the largest difference 3") is re-keyed. Its venue was "llvmpipe (LLVM 23.1.1, 256 bits)" and is
now "256 bits) on x86-64 AVX2", the same key the fetch-ordered sRGB x3 rows use. Its reason gains
one sentence saying the count follows the ISA.

Why: ms01's lavapipe (LLVM 23.1.4 on an AVX2 host, Mesa 26.2.6) answers 81 elements, max 3
(m3-max-63645), the AVX2 answer. No row named that venue:
- the 81 row named LLVM 23.1.1, msi's AVX2 lavapipe;
- the 78 row is "on x86-64 AVX-512", the um790 and gem10 hosts at LLVM 23.1.4.
99b3fc685c had moved the old "LLVM 23.1.4" row to the AVX-512 key when only AVX-512 hosts ran
23.1.4. The answer is the device's own (rule 1) under `device-color-conversion`, which the row
already cites. Not a drift: no earlier full lavapipe conformance replay on ms01 is in the job logs.

Verified: the coverage document is unchanged (--check passes; the row count is the same). The
lavapipe replays on msi (AVX2, LLVM 23.1.1) and ms01 (AVX2, LLVM 23.1.4) are named with the sha.
2026-11-21 08:13:37 -08:00
Anees Iqbal c1b0a6d5e2 Conformance ledger: the GPU cards' rows of the pixel-sampler, downscale and vertex-format cases, each with its reason
What: 696 rows in known-gaps-rt.tsv, one per surprise the tip's replays printed:
- NVIDIA: 227 rows (m3-max-63788, RTX 3090). The round at ce998742d7 printed the same rows on the
  2080 and the 5080.
- RX 7900 XTX and 780M: 102 rows each. The two replays (m3-max-63791, 63789) printed the same
  rows, and so did the round's HawkPoint, which the 780M venue also names.
- RX 550: 112 rows (m3-max-63806).
- Iris Xe: 153 rows (m3-max-63801).
These were replayed at 5cd74cc440, the red-3 tip before its rebase onto 583684ebeb. The rows
cover:
- pixel-downscales-* (all seven sizes), pixel-samplers-* and pixel-samplers-subnormal-*:
  - The device's sampler and filter (rule 1), under `device-sampling`, `pixel-sampler-scaling`
    and, for the subnormal coordinates, `device-denormals`.
  - Each row states how our sources' digests split against Metal's, and the measured bound at
    each coordinate set (NVIDIA's `frac` within 1.19/255; RADV's, the RX 550's and the Iris
    Xe's within 0.95/255).
- vertex-format-* and integer-vertex-attributes, each with its first differing element:
  - A NaN in the device's encoding: `device-nan-encoding`, on every card.
  - NVIDIA's compiler folding the `half` round trip: `native-half-conversion`.
  - On the RX 550, which has no `shaderFloat16` (RADV enables it on GFX8 only by drirc),
    `OpQuantizeToF16`: `native-half-quantize`.
    - Four rows (MTLVertexFormatFloat to Float4, the largest difference 0) differ only in a
      zero's sign. Their reasons cite the note's zero-sign sentence.
    - The other 13 rows flush a value below the smallest normal `half` to zero, the note's
      first clause.
- indirect-range-* on the Iris Xe (3 rows, cases from 2614118ccf): the device does not list
  `VK_EXT_device_generated_commands`, so the execution is refused typed
  (`IndirectCommandsKind::Extension`), a known gap in the runtime's README.

docs/CONFORMANCE-COVERAGE.md is regenerated (scripts/conformance-coverage/coverage.py; --check
passes).

Why: red 1 of the round at ce998742d7. Its GPU replays failed on rows no card had. Each row
here gives that card's true reason, which every row's evidence (digests, the first differing
element, the largest difference) supports. No row was copied from another venue's wording
without its own card's evidence.

Verified: the compile job and the replays on each affected card, named with the sha.
2026-11-21 08:08:15 -08:00
Anees Iqbal d20c812bed rt: the idle preprocess bytes' doc names the pool's 64 MiB bound and its quarter-second free
Gauges::preprocess_idle_bytes said at most 128 MiB and zero only once the device is dropped. The
bound is indirect::IDLE_BYTES (64 MiB), and the block-maker thread frees each idle region after
memory::IDLE_AGE_NANOS (250 ms), so the gauge falls to zero at rest. Found from code by the
consumer's gauge lane; read against indirect.rs:58-67 and memory.rs:64. Doc only.
2026-11-21 08:23:43 -08:00
Anees Iqbal 793d321e7e rt tests: the several-parts execution sizes its scene's block from the part, its arms in order
What: the test of an execution of several parts takes its scene's buffers from a block sized from
the device's part (`Buffers::sized`, 64 bytes a command past a 64 KiB floor), prints the part and
its parts, and runs its arms in this order, each printed as it passes: (a) a CPU range across three
parts; (b) a held range at location 0 through all but the last command, every part's count above
0; (c) a held range at location 0 across two parts, later parts' counts 0; then the whole
execution, a held range from inside the second part, one past the commands, and one of length 0,
every part's count 0.

Why: real cards take 1316 to 1784 commands a part against lavapipe's 117, so the scene outgrew
its 64 KiB block and the test failed in its own setup on every GPU leg of the round at
5a04298008 ("BufferPastBlock { offset: 256, length: 449440, block_len: 65536 }"): the multi-part
held-range path never ran on a real card. The order puts the CPU range first and the held ranges
with and without zero counts next, so a run that loses its device still shows which arms passed.

Verified: compile and lavapipe jobs, then one 3090 and one XTX leg, reported with the sha.
2026-11-21 08:16:46 -08:00
Anees Iqbal 70dfe08320 rt: every compute pipeline a command buffer binds goes through one bind that binds set 1 first
What: `Building::bind_compute` binds a compute pipeline where another or none is bound, and set 1
at the compute bind point before the command buffer's first compute pipeline. Both compute bind
sites use it: a dispatch's (encoder.rs `record_dispatch`) and the count kernel's of an execution
over a range a buffer holds (render_encoder.rs `execution_counts`). `Building::unbound` and
`Building::bind` go.

Why: the count kernel bound its pipeline through `Building::bind`, which marked the compute bind
point bound without binding set 1, and `record_dispatch` binds set 1 only before the command
buffer's first compute pipeline. Where a held-range execution came before a command buffer's
first dispatch, every dispatch after it in that command buffer ran with set 1 unbound, its
texture and sampler reads through a descriptor pointer the driver never set. The consumer's walks
of its rendering sample's ICB variant at the pin 5a04298008 lost the device on an RTX 3090 (an MMU
fault in warps on every GPC, a read at 0x4d000) and a 7900 XTX (a scalar data read, client SQC,
in no live range). With one bind for both sites no compute pipeline is bound without set 1.

Verified: the previous commit's test (a dispatch reading a texture through set 1 after held
executions in one command buffer) fails before this fix on lavapipe by a CRASH, not by value: job
m3-max-63866 ran it alone at that commit (then 6b0126de8a, on 583684ebeb) and the test process
died with SIGSEGV (signal 11) in 1.6 s, lavapipe reading the unbound set's descriptors; the
validation layer's VUID-vkCmdDispatch-None-08600 is recorded at the dispatch, but the crash ends
the process before the test's guard reads the layer's log. The compile and lavapipe jobs on this
commit, and one 3090 and one XTX leg, are reported with the sha.
2026-11-21 08:16:46 -08:00
Anees Iqbal fa38eaf92a rt tests: a dispatch after executions over held ranges in one command buffer reads set 1
What: a device test that records, in one command buffer, a pass executing an indirect command
buffer over ranges a buffer holds (all four commands, a range of length 0, and the first record
again), then a compute dispatch of `rows_read` that reads a texture of texels no zero, no other
texel and no earlier contents hold into a buffer. It checks the pass's marks and the texels.

Why: the count kernel of a held-range execution is a compute pipeline the render encoder binds
through `Building::bind`, which marks the compute bind point bound without binding set 1; the
compute encoder binds set 1 only before the command buffer's first compute pipeline
(`unbound()`), so a later dispatch in the same command buffer runs with set 1 unbound. The
consumer's walks of its rendering sample's ICB variant lost the device on an RTX 3090 and a
7900 XTX at the pin 5a04298008, both faulting on shader reads through an unset descriptor
pointer. No test dispatched after a held-range execution in the same command buffer.

The test fails before the fix on every leg through the validation layer every device test runs
under (VUID-vkCmdDispatch-None-08600 in its log), and by value where the unbound read returns
other texels. This commit is the test alone; the fix follows.
2026-11-21 08:16:36 -08:00
Anees Iqbal 3d841759a8 Validation: engine contexts no longer enable VK_EXT_device_generated_commands
The own context enabled VK_EXT_device_generated_commands where its device
supported it so that the device replay of an indirect command buffer could
take the extension's token stream. --without-generated-commands turned that
off so the other replay path could be measured. The replays are gone
(dc03c9e1b5), and nothing the executor runs reads the extension now. In the
translator, only the device replay reads a description's generated-commands
facts (Device::generated_commands). This change removes the enable and its
switch:

- enables.rs: GeneratedCommandsFeatures, Structure::GeneratedCommands (with
  its chain field, link and requirement arms), the deviceGeneratedCommands
  member, the extension's EXTENSIONS row, and enable_generated_commands.
- device.rs: the context never enables the extension. Its opened description
  states no generated-commands facts (description.generated_commands = None,
  now unconditional: with_enabled leaves that field alone).
- candidate.rs: the GENERATED_COMMANDS setting, run_without_generated_commands,
  decide_generated_commands and requested_generated_commands.
- corpus-vulkan (candidate_common.rs): --without-generated-commands, its
  usage text, and its "not stored" line.
- engine::execute_prepared: a row and a refusal on an opened device are
  always stored.
- The device worker: the generated_commands field of its input and report,
  and the parent's check that they agree. One unit test is deleted
  (a_worker_run_on_another_generated_commands_path_is_refused); the
  integration test serve loop and the restriction test drop their no-DGC
  arm.
- The profile bounds over a description's generated_commands facts stay
  (profiles.rs): a queried description still states them, and a restricted
  context compares them.

ENGINE_EXECUTOR_ABI v208 -> v209 (development's number + 1 at this rebase,
after texture buffers took v208).
Why: on a device that lists the extension (lavapipe, RADV, ANV ARL, NVIDIA
RTX 50), the context's enabled extension list and its opened description
change. A row records both, and the row's translator fingerprint derives from
the opened profile.

The member table loses deviceGeneratedCommands, so the members the vocabulary
does not name go from 11 to 10
(a_member_the_vocabulary_does_not_name_carries_its_registry_name).

The pinned opened chains (enables/opened_chains.txt) are blessed at the next
named pin. A bless run at this change (m3-max-63862, bless_opened_chains)
moves 22 of the 32 contexts:
- 20 are the device and restricted contexts of the ten profiles that list the
  extension (amd-780m-radv, amd-780m-hawkpoint-radv, amd-rdna2-apu-radv,
  amd-rdna3-radv, gate-lavapipe, gate-lavapipe-x86_64, intel-arl-anv,
  lavapipe, nvidia-rtx50-linux, nvidia-rtx5080-laptop). Each loses exactly
  one member and one extension.
- The other 2 are runtime-floor's device and restricted contexts, which gain
  4 members (49 -> 53 and 57 -> 61) with the same extensions. That move is not
  from this change, which only removes. It comes from 817463704e (texture
  buffers), which added six texel-buffer descriptor-indexing features to
  profiles/runtime-floor.json after the last chains bless (03d898aac0). Four
  of them are expected to be the ones the engine enables, the update-after-bind
  and non-uniform-indexing members that device/derive.rs lists; that is read
  from the code, not checked.

Verified:
- m3-max-63797 (gem10, at f6f4c015dd, this change before the count fix, on
  b7e3247961): fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd)
  and Rustdoc green. Validation nextest failed only the unnamed-member count,
  now fixed, and the opened-chains pin.
- m3-max-63862 (um870, at f8479dd1cf, with the fix): fmt and clippy green.
  Validation nextest ran 1328 tests: 1327 passed, and the opened-chains pin
  failed as accounted above. bless_opened_chains passed.
- m3-max-63796 (gem10, at f6f4c015dd): the own context's device tests
  (candidate::tests) on lavapipe passed, 54 tests. Every context opens without
  the extension.
- This commit is the same patch rebased onto 0f2067150f. The commits since
  b7e3247961 touch rt, conformance and one translator file
  (pipeline/artifact.rs), and no validation file.
2026-11-21 08:18:51 -08:00
Anees Iqbal 0f2067150f rt: a draw of lines carries DeviceLineRasterization on every device; the raster test holds the diamond-exit rule's cells
What:
- RenderCommandEncoder::LINE_NOTE (PrecisionNote::DeviceLineRasterization)
  is the static note of a draw of lines or a line strip, and of a draw of
  triangles under the Lines fill mode, on every device.
- A render pipeline state no longer carries the note; it carried it only
  under alpha to coverage or alpha to one.
- The note's text (artifact.rs, docs/API.md's catalogue, its items list
  and the accepted difference on a line's tie-break, the runtime's README)
  names its grounds, and keeps what it said of a state with alpha to
  coverage or alpha to one: there the device's default line rule draws,
  not Bresenham's mode. One note, both facts.
- The conformance side announces LINE_NOTE for each line draw and each
  Lines fill mode set. The note is among replay's NATIVE_NOTES, so it
  loosens the notices site alone.
- known-gaps-rt.tsv: the 12 primitive-type-restart-indices rows (NVIDIA,
  RX 550, Iris Xe) cite the note. Their lines run through the boundary
  point (3.5, 1.0).
- api_signatures.tsv gains the const's two rows
  (scripts/api-signatures/signatures.py --check passes).
- Tests:
  - raster.rs's Lines pass draws the triangle (-0.65, -0.675), (3, -0.675),
    (-0.65, 3) through the target's own viewport. Its edges at x 1.4 and
    y 6.7 lie inside the target with a pixel on each side, and strictly
    inside the clip volume and the viewport.
  - The pass holds the diamond-exit rule's cells exactly, column 1 and
    row 6, on every device. A device that draws another cell fails with
    the target drawn. It does not read the corner where the two lines'
    ends meet.
  - draw.rs's alpha-to-coverage test now holds that no state carries the
    note, and that LINE_NOTE is it.

Why the note: a card draws a line pixel that differs from Metal's. The 12
ledgered rows are lines through the boundary point (3.5, 1.0): Metal on an
Apple M3 Max covers the lower pixel there, NVIDIA's driver the upper. The
runtime draws lines with VK_LINE_RASTERIZATION_MODE_BRESENHAM. Its diamond
is open, so no Vulkan control decides that pixel. The Vulkan
specification's section "Bresenham Line Segment Rasterization" also lets an
implementation's fragments "not deviate by more than one unit in either x or
y framebuffer coordinates from a corresponding fragment produced by the
diamond-exit rule", with a fragment count within one. Rule 1: a line's pixels
are the device's answer, so the operation carries a static note.

Why the test changed: the old Lines pass put its bottom edge at y 7.7 through
a viewport of y -0.3 and height 8. The Iris Xe drew none of row 7 there
(m3-max-63429 at ce998742d7, m3-max-63507 at 7c1baad228). With both edges
strictly inside the clip volume and the viewport, the Iris Xe draws the
diamond-exit rule's cells, as the other cards do. The fractional viewport's
cut row is a separate item, not a line rule.

Verified, column 1 and row 6 at the test's geometry:
- Iris Xe: m3-max-63735
- RTX 2080: m3-max-63736
- lavapipe: m3-max-63737
- RX 7900 XTX: m3-max-63707, at the same edges
The exact-cell form's legs are named with its sha.

Not a regression: the Lines pass came with a5fac6fa9b (11-20 22:51), and its
viewport moved at 2a36291a80 (23:32). No Iris run of the old pass passed.
2026-11-21 08:02:39 -08:00
Anees Iqbal 1fbe4eacdb Conformance ledger: the GPU rows of the fetch and stencil-export cases go; those cards lack the feature
What: 91 refused rows leave known-gaps-rt.tsv: the NVIDIA, 780M, RX 7900 XTX and
Iris(R) Xe rows of the 17 padded-blend-* cases, xr-masked-bgr10xr-{red,blue-green,
srgb-red,srgb-blue-green} and argb8-targets-destination-alpha's refusal at
case/pipeline/argb8, and the NVIDIA rows of stencil-output, stencil-output-loaded and
pass-sequence-aspect-actions. The llvmpipe and UHD Graphics 630 rows stay. The fetch
block's comment says which devices read lacks-feature. docs/CONFORMANCE-COVERAGE.md
regenerated (scripts/conformance-coverage/coverage.py).

Why: round ce998742d7's eight GPU replays (m3-max-63423, 63431, 63464, 63447, 63444,
63446, 63468, 63453) read each of these 141 case-card-site triples as "no longer
refuses ... the ledger still lists it": every one of those cases reads lacks-feature
on those cards (NVIDIA 24 of 27 such cases, the others 21). Since 7e8b93d953 the
translator's refusal names RasterizationOrderColorAttachmentAccess alone for the
computed write over a fetch's read, and ExtShaderStencilExport alone for a stencil
output, and none of these devices reports either, so the case cannot run there. A
lacks-feature reading is never a ledger row. a0f86a2efc had reworded these GPU rows
after the lavapipe replay alone (where the feature is reported and the refusal
stands), so no GPU replay saw them since. These are not fixes: the cards still cannot
run the cases. The UHD 630 rows are left: no replay on it read them.
2026-11-21 08:02:12 -08:00
Anees Iqbal 7e1d69c4c5 Conformance: the replay's summary says which kind each ledger surprise is
What: an unlisted gap names the venue's row at the same case and site where one
exists (Expectation::Unlisted's `listed`: "the row for this card differs: it expects
... with ..."), and says "no row for this card" where none does. A row the venue no
longer holds says what the venue answers there now (Expectation::NoLongerHeld's `now`,
known_gaps::Now): it now lacks the feature (the case read lacks-feature), it now
matches, or it now answers otherwise. `conformance replay` prints its surprises
grouped by that class (Expectation::class), each group under its count. The first
line of each surprise keeps its words, so the tools that read it are unchanged.

Why: the planner's reading of round ce998742d7. Its eight GPU replays listed 1,249
unlisted divergences, every one with no row for its card (the cases' rows were
lavapipe's alone), and 163 stale rows, every one a case the card now lacks the
feature for (the framebuffer fetch and stencil export refusals since 7e8b93d953),
none a fix. Telling those apart took reading each verdict by hand.

Test: a_refusal_at_a_step_of_a_program_is_refused_and_the_ledger_holds_it holds the
four classes: no row, row differs (the same program refusing at another step), now
matches (the program run), now lacks the feature (a lacks-feature verdict), and now
answers otherwise.
2026-11-21 08:01:36 -08:00
Anees Iqbal 895b3f845a PrecisionNote::NativeHalfQuantize: a zero may round to the other zero
What: the note's text (its doc comment and the docs/API.md catalogue)
says what may differ: where a half rounding's input is a zero or too
small for a normal half, the result may be either zero, so a negative
zero may come out positive; and what a program sees of it: a
reciprocal's or atan2's sign, the bits written to a half target or
buffer. The catalogue names the form not taken (copying the input's
sign bit into the result by integer operations, about 4 instructions
per half rounding on every device without shaderFloat16) and its cost.
No code changes; the planner ruled the note (11-21).

Why: the 11-21 round at ce998742d7 read the RX 550 (RADV, Polaris)
answering +0 for a -0 float attribute rounded to a half parameter
(vertex-format cases), where Metal answers -0. The SPIR-V specification
defines OpQuantizeToF16 so: "If the magnitude of Value is too small to
represent as a normalized 16-bit floating-point value, the result must
be either +0 or -0." A zero's magnitude is in that range. So the answer
is the quantize's own, documented, and rule 1 gives it a static note.
The note already covered a denormal rounding to a zero of either sign,
but its text did not name a zero's own sign. SignedZeroInfNanPreserve
is not the fix: it only restrains optimizations ("does not perform
optimizations on floating-point instructions that do not preserve sign
of a zero") and does not narrow what the instruction may answer.

How verified: a text change only. The RX 550's vertex-format rows go to
the ledger under native-half-quantize with the per-card rows.
2026-11-21 08:01:36 -08:00
Anees Iqbal 0bb8804321 rt: the image copy's slab regions borrow the copy for as long as they live 2026-11-21 07:59:23 -08:00
Anees Iqbal 44a1c864c8 rt: no copy command whose source and destination share memory: buffer copies over a texture in place cut in slabs, heap aliases refused
A copy between a buffer and a texture in place over its bytes (copy_from_buffer into it,
copy_from_texture_to_buffer out of it, and their options forms) recorded one
vkCmdCopyBufferToImage or vkCmdCopyImageToBuffer whose region's bytes could be the texture's own,
which Vulkan forbids (VUID-vkCmdCopyBufferToImage-pRegions-00173,
VUID-vkCmdCopyImageToBuffer-pRegions-00184). And a copy between two textures placed in one heap
whose ranges meet, or between a heap buffer and a heap texture whose ranges meet, recorded one
command over memory one image lays out as the device chooses (VUID-vkCmdCopyImage-pRegions-00124
and the same two). Metal leaves both undefined.

Buffer and texture over it: buffer_copy now compares the region's rows (its offset and
bytes_per_row in the VkBuffer shaders reach) with the texture's rows (Side::rows, from bufcopy)
where both lie in one VkBuffer, and feeds every meeting pair of rows to bufcopy's meeting/cut:
one slab form for every copy whose bytes meet. A BufferCopy carries its slabs; each slab is its
own vkCmdCopyBufferToImage / vkCmdCopyImageToBuffer, with the COPY->COPY execution barrier between
two slabs that copy_from_texture's slabs take (now one fn, between()). The region on the
texture's own texels copies nothing; regions whose bytes do not meet stay one command. The answer
is the source's bytes from before the copy, as an Apple M3 Max gives between two textures over one
buffer (conformance buffer_texture_blits); between a buffer and its texture it was not recorded on
a Mac.

Heap aliases: a texture names where its image's memory lies that other resources may share
(TextureObject::bound: a heap texture's range, from Under::Heap's block and offset; a texture in
place, from its rows). copy_from_texture between two textures (not one image) whose memory meets
where either has no rows, and a buffer copy whose region's bytes meet a heap texture's memory, are
refused: nothing records, and nothing is emulated.

Both refusals have their own kind, Gap::OverlappingCopy { pixel_format }, which also takes over
bufcopy's two shapes no one-axis cut orders (a destination row across the end of its own source
row and the start of the next; rows of two pitches meeting at their starts), until now under
Gap::TextureCopy. Every one counts in the new Metrics::overlapping_copies_refused.

Docs: the rt README's blit section describes the buffer slabs and the heap refusal, and a new
"Known gaps of blit encoders" names the two shapes (built, cut on two levels, when a replay stream
or a walk counts one) and the heap refusal. docs/REFUSALS.md regenerated; api_signatures.tsv
blessed (the variant and the Metrics field).

Tests: a_buffer_copy_over_its_texture_s_own_bytes_copies_in_slabs_or_in_no_order (slabs a row on
into and out of the texture with their order, two texels on both ways, a one-row region, whole rows
two texels on unordered, a region after the texture and one in another buffer one slab, the
texture's own bytes nothing, a heap texture's memory met or not);
textures_whose_memory_meets_where_one_is_laid_out_by_the_device_copy_in_no_order (heap/heap both
ways, in place/heap, touching ranges, another buffer, a texture of its own, two slices of one heap
texture). On a device: every_device_copies_between_a_buffer_and_a_texture_over_it_from_the_source_before_the_copy
(a row on and back into and out of the texture, within the rows both ways, apart; whole buffer
bytes as from the source before the copy, one submission, 2 + slabs barriers, no byte copied; whole
rows a memory alignment on refused, counted, nothing recorded) and
every_device_refuses_a_copy_between_heap_resources_whose_memory_meets (texture onto its alias, into
and out of a heap buffer over its bytes: refused, counted 3, nothing recorded; copies between heap
resources apart run, the bytes back as they went in, one submission). bufcopy's device test now
expects Gap::OverlappingCopy and its count.
2026-11-21 07:59:23 -08:00
Anees Iqbal 583684ebeb rt tests: a fence wait's submissions are counted where no completion round runs, each named
every_device_runs_a_wait_on_a_fence_never_updated_at_once failed once in 35 lavapipe runs
(m3-max-63660 at abb3c82247: 2 submissions where it counted 1). By the code the second could only
be queue A's held group. The test's command buffer on B with nothing for the GPU retires in a round
of the completion thread, which marks Done::busy for the round, and the submit thread sends a held
group in any pass that sees busy (WorkState::unheld). That command buffer reads Completed inside the
round, so the count could begin while the round still ran, and a late pass sent A's group inside
the counted window. That is the submit thread's rule (a group is held only while the completion
thread waits on the GPU), not a broken order: nothing orders B's wait on a fence never updated
after A's update of another fence. The planner accepted a test-only fix.

The test now counts the wait's submissions first, in a window no completion round can run in, and
runs the encoder that only waits on a third queue after the count. A precondition reads A's busy
work in flight with its group held and nothing of B's. The failure names each submission after
the wait's commit: all of them; B's; A's group's, and whether A still holds it; the runtime's own
uploads sent alone; the runtime's own command buffers in them; and the completion thread's rounds,
so a real leak reads differently from a round's send. Two accessors compiled only for the device
tests give it that: Work::in_flight (a queue's submissions not seen complete, and whether it holds
a group) and Pool::rounds. No product behaviour changes.

Verified by the lane's compile job (fmt, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd,
workspace Rustdoc -D warnings) and the whole runtime suite on lavapipe with this test passing, on
this commit; the job ids are in the lane's report.
2026-11-21 07:51:05 -08:00
Anees Iqbal 68eec69fb1 rt tests: a release wait that times out says what the device did during it
wait_until, the 120 s wait the import tests use for a release or a free, now takes the device's
counters. On a timeout its message prints the submissions and the command buffers that completed
with GPU times during the wait (and those recorded untimed), when the last completion was seen
and whether one came in the wait's last 10 s, and the gauges' releases_waiting and imports.

Why: on the Windows host's UHD 630, every_device_times_a_host_memory_import_by_part timed out
"waiting for the release" three times between 06:36 and 07:13 (m3-max-63502, 63619, 63631),
each time in the 17 MiB anonymous import's arm beside the busy thread, and has passed in every
run since (63638, 63646, 63674, 63697, 63717, the last on 63619's own archive). The host's
event log holds nothing in that span, and the failures printed no count. The next occurrence
then tells the GPU's completions stopping (host or driver) apart from a release that did not
follow completions that came.

The completions are Metrics::gpu_run's count, read every 100 ms rather than at each 1 ms poll,
because Counters::metrics takes the allocation sites' locks. Every caller of this wait_until
(import, import_time, import_overs, dma_bufs, imported_aliases, over_causes) passes its device's
counters. The tests' other waits of the same name (heap, copy_over, places, upload, memory,
spill) are their own functions and are unchanged.

Verified: the compile job named with the sha (fmt, clippy in the three cfgs, Rustdoc). The
timeout path itself did not run: no card stalls today.
2026-11-21 07:44:46 -08:00
Anees Iqbal b7e3247961 Conformance: the known-gaps ledger's texture-buffer rows after the runtime makes texture buffers
From the lavapipe replay of d7f0a88fd9 (job m3-max-63634 on msi: 298
lines of ledger drift, 132 rows no longer held and 166 gaps unlisted):

- dropped the 132 rows of 'texture buffers are not built' and of the
  translator's IdentityDomains refusal of a texture buffer slot, which no
  longer hold on lavapipe: read-through-buffer,
  buffer-textures-cpu-access and norm-storage-fields-rgb10a2unorm now
  compare equal;
- 98 rows (every venue): Device::new_texture and the heap size of a
  texture buffer's descriptor are Refusal::TextureBufferNotOverBuffer,
  the consumer's contract;
- buffer-textures-made: the made texture buffers' cpuCacheMode,
  hazardTrackingMode and allowGPUOptimizedContents are the consumer's, as
  the 2D rows are (every venue, but offsets 4, 8 and 20, which are
  scoped to llvmpipe, NVIDIA, Intel and RADV, and are
  Refusal::TextureBufferAlignment of 16 bytes on Apple M3 Max, whose
  KosmicKrisp states no single-texel alignment); offset 33 is
  TextureBufferAlignment of 4 bytes (16 on Apple M3 Max); and a texture
  buffer over a Managed buffer states Shared where Metal answers Managed
  on a device of one copy (llvmpipe, 780M, Intel, Apple M3 Max), as a
  2D texture over one does;
- buffer-tails-texture-buffer: texels past the buffer are
  Refusal::BufferTextureLayout;
- norm-storage-codes-*: hsw_buffer and hsw_held diverge on llvmpipe as
  hsw_write does (the device's conversion);
- texel-swizzles-*: a swizzled texture buffer is Gap::TextureBufferSwizzle,
  a view of one Gap::TextureView, and llvmpipe's unorm8 read is one ulp
  high (the device's conversion);
- texture-buffer-fill-*: this side answers no fillTexture yet.

The llvmpipe rows are verified by that replay. The rows of other venues
are expected from each venue's texel-buffer offset alignments and device
type in its vulkaninfo, not run; the replay matrix holds them.

docs/CONFORMANCE-COVERAGE.md regenerated after the ledger
(scripts/conformance-coverage/coverage.py).

Verified: the lavapipe replay's drift lines, classified by
~/.cache scratch; the conformance suite and replay follow in the next
job.
2026-11-21 07:27:48 -08:00
Anees Iqbal fc6e71af24 Validation: the executor's own context refuses a texture buffer member typed
1ecdfd8ca4 let the mapping keep a texture buffer an argument buffer
holds, which a run through the runtime makes; the own context's bind
state still cannot (the binder's planned heap holds no texture buffer
member) and failed it untyped, which
public_render_cases_plan_or_refuse_typed met on the public fragment
case that holds one (lavapipe job m3-max-63634 on msi: 'argument-buffer
texture 2 is a texture buffer, which no heap array holds').

engine::own_context_refuses_members decides it from the members' texture
type; run_on_context refuses such a case NotImplemented once the runtime
routes have passed it by (a profiles-layer restriction), and the public
render test counts it as the typed refusal it is.

Verified: rustfmt; the suite follows in the next job.
2026-11-21 07:27:48 -08:00
Anees Iqbal 8f797a923d Conformance: the texture-buffer rows' comments name the runtime's refusals; the coverage document after the texture-buffer alignment query
The runtime makes texture buffers now (c2a8f4527c), so the comments that
named Gap::TextureBuffer say what it answers at those sites: the stride
row's texture buffer (bytesPerRow below its width's bytes) and the
tails case's (texels past its buffer) are Refusal::BufferTextureLayout,
as a 2D texture's are.

docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/
coverage.py): minimumTextureBufferAlignmentForPixelFormat: is implemented
and no case exercises it yet (reachable not exercised 76 -> 77), and
textureBufferDescriptorWithPixelFormat:...'s note is coverage.tsv's
generic one.

The known-gaps ledger's texture-buffer rows follow from the lavapipe
replay in a later commit.

Verified: rustfmt; the generator's output.
2026-11-21 07:45:35 -08:00
Anees Iqbal ed4f8976a5 Validation: texture buffers run through the runtime; the texture_buffer and texture_buffer_member requirements are retired
The runtime makes texture buffers (Buffer::new_texture over a buffer's
bytes), bound and as argument-buffer members, so neither requirement
stops the engine's candidate any more:

- requirement.rs: TextureBuffer and TextureBufferMember are gone (ALL
  39 -> 37), with their stops, limit, docs and tests; the retired-names
  test holds that neither name parses.
- executor_contract.rs: case_requirements no longer names a bound
  texture buffer, and the reflection no longer marks a texture buffer
  member; the tests assert a bound texture buffer's case carries none.
- runtime_textures::made_texture makes a texture buffer as the Metal
  oracle does: a Shared buffer of the case's bytes (Placed::new) and
  Buffer::new_texture at offset 0 with one row of every byte; the
  texture holds its buffer.
- argument_buffers::embed_textures maps a texture buffer member; the
  executor's own context still refuses one at its bind state
  (used_texture), which the member test now asserts.
- engine_compute: the two refusal tests become runs through the
  runtime: ob1_texel_buffer's bound texture buffers read and write their
  texels (and past them, zero and dropped), read back through the
  texture; rlm_member_texture_buffer reads as rlm_member_texture does.
  platform::on_runtime_device and make_kernel, which only those tests
  used, are deleted.
- triage: rlm_member_texture_buffer carries what rlm_member_texture
  carries.
- ENGINE_EXECUTOR_ABI vulkan-engine-v208 (main: development's v207 + 1).

The authored compile census rows of the 29 texture-buffer cases move
when it is re-blessed on development.

Verified: rustfmt; the compile job and the validation suite follow on
the rebased tip.
2026-11-21 07:27:47 -08:00
Anees Iqbal 418494f380 rt: a texture's image accessor no longer shadowed by TextureObject::image; the texture buffer's docs
TextureInner's Option-returning image() lost method resolution to the
TextureObject trait's image() -> vk::Image on Arc<TextureInner>, so
ae747745df did not compile (compile job m3-max-63551 on msi: E0599 at
nine call sites). It is image_of() now. texel_form asked
supports_format with the ash format; it takes the translator's.

Docs for the texture buffers of ae747745df: RESOURCE-ID.md's arrays
paragraph names set 1's bindings 5 and 6 (uniform and storage texel
buffers, 65,536 each) and the null elements of the other kind; API.md's
identity forms list texture buffer reads, writes and atomics, slots and
members alike, and keep refusing the parts or rows forms; the runtime
README's known gaps of textures add the swizzle, the view and blit
copies, and the both-usages format rule.

Verified: rustfmt; the compile job follows on the rebased tip.
2026-11-21 07:27:27 -08:00
Anees Iqbal 817463704e rt: texture buffers are buffer views of their buffer's bytes in set 1's two texel-buffer arrays
What: Buffer::new_texture of a texture buffer's descriptor makes one VkBufferView of the bytes
shaders reach (a Managed buffer's device copy where it has one), from the offset, its width's
texels long: no image, no copy, no new push field. Set 1 gains two arrays of 65,536 elements,
binding 5 (uniform texel buffers, the read ones) and binding 6 (storage texel buffers, the written
ones), at the same index class as textures; a texture buffer's index is the same element of both,
and placing a texture or a texture buffer over the other's index nulls the other's elements. The
translator's identity domains classify a texture_buffer slot or argument-buffer member as a texel
buffer of that array (no TexelBufferRange fact, no swizzle under identity), so a pipeline that
declares one is no longer Unsupported{IdentityDomains}. SEMANTICS_VERSION 2258.

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

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

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

Checked by: tests::texture_buffers (lavapipe: R32Uint read at a buffer offset and written, out of
bounds read zero and dropped, atomics through read_write, every refusal), engine_identity's
a_texture_buffer_is_the_texel_buffer_element_its_resource_id_names (L3 on lavapipe and moltenvk-m3),
the floor tests, the signatures table and REFUSALS.md regenerated; the lane's compile job reports
the runs.
2026-11-21 07:27:27 -08:00
Anees Iqbal 838b6f0260 Validation: the authored compile census holds no uncovered count
A cell's uncovered count counted a case's command buffers whose pipelines the
census did not compile because the host or device replay built them on the
device. The own context's replays are gone (dc03c9e1b5): a run compiles only
its case's own pipeline (engine::case_compile), and the deletion already set
every CellResult.host_replayed to 0. This removes the count:

- Cell is {outcome, artifact}; Cell::covered becomes Cell::bare; a cell's text
  is its outcome, then ` artifact=SHA256` on a C3 venue's profile for a
  compiled case. The ` uncovered=N` word, its parse, and the refusal-label
  check against it are gone.
- CellResult.host_replayed and the cache table's host_replayed column are
  gone. A cache table of census version 6 or older (one with that column) is
  dropped and made again at open: its cells are under older keys, so none
  would be read.
- AUTHORED_COMPILE_CENSUS_VERSION 6 -> 7, so every cached cell is computed
  again.
- The committed authored-compile.tsv takes the new comment header, which is
  exactly what Expectations::render writes (the_committed_expectations_parse
  pins it byte for byte). Its cells are unchanged: the census bless at
  637feee982 left no ` uncovered=` cell, so this commit blesses nothing.
- corpus-triage's usage text no longer names device-replay variants or
  uncovered host-replayed command buffers.

No ENGINE_EXECUTOR_ABI bump: nothing the executor runs or records changes;
only the census's own cell format and cache do.

Verified: m3-max-63711 (gem10, at 9f2508192c: the same patch on 637feee982;
the commits since then touch only conformance, one rt file and a doc):
fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, and
nextest -p metal2vulkan-validation all green, 1330 passed. The earlier gate
m3-max-63676 (at 47cb07a8cd) failed only the_committed_expectations_parse,
which the header rewrite fixes.
2026-11-21 07:31:17 -08:00
Anees Iqbal dd1f8acc46 rt: an execution of an indirect command buffer does not check the encoder's own buffer bindings
What: RenderCommandEncoder::draw checks each bound buffer's address against the state's argument
alignment (Refusal::BufferOffsetAlignment) except for an execution of an indirect command buffer,
whose commands bind their own slots; the facts stay unheld after an execution, so the next draw
checks the encoder's bindings.

Why: the conformance row indirect-range-written-by-an-earlier-draw (job m3-max-63647, d362164e47,
lavapipe) was refused: the earlier draw left the range buffer at offset 8 bound at vertex slot 1,
and the execution checked it against the commands' state's slot-1 argument (a float4, 16-byte
alignment), which reads no encoder binding. Plain Metal and Metal's API validation ran the row.

Verified: the row on the next check job's lavapipe replay.
2026-11-21 07:21:51 -08:00
Anees Iqbal d362164e47 conformance: the three GPU-range rows carry Metal's timings
What: conformance times --runs 8 --write over the three rows on the M3 Max (job m3-max-63614,
e51906ea43): encoded_range 9.8 ms of wall time a call over 3 calls, the call's own command buffer
and its read-back included.

Why: times::every_case_is_timed::every_case_carries_its_timing asks every case for its timing.

Verified: job m3-max-63614 (STEP times EXIT=0, 3 cases carry their timing).
2026-11-21 07:14:27 -08:00
Anees Iqbal 2614118ccf conformance: the three GPU-range rows' Metal recordings; Watching forwards encoded_range; the coverage document
What: recordings/indirect-range-gpu-written-at-zero.json, -past-zero.json and
indirect-range-written-by-an-earlier-draw.json, recorded on the M3 Max (macOS 27.0.1, 26A434), three
runs each folding into one outcome, the validated leg run clean. Metal draws commands 0 to 2, 5 and
6, and 2 to 5: each execution reads the range the GPU wrote, the third after the earlier draw's
write behind the in-pass barrier. watch::Watching forwards encoded_range. docs/CONFORMANCE-COVERAGE.md
regenerated (python3 -I scripts/conformance-coverage/coverage.py): 180 case modules, 1322
recordings, executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: and the indirect command
buffer's gpuResourceID now exercised.

Why: job m3-max-63598 on f2d20e177e failed the conformance tests on the missing recordings, the
wrapper's forwarding (the_announcing_side_forwards_every_call) and the coverage document.

Verified: recording job m3-max-63599 on f2d20e177e. The timings and the lavapipe replay follow.
2026-11-21 07:14:27 -08:00
Anees Iqbal d4b0b69256 conformance: the Metal side's encoded_range binds its functions before it makes the states
What: the kernel's, the vertex and fragment functions' and the writer's MTLFunction are bound to
typed locals first; the closure that finds one names its return type.

Why: job m3-max-63589 on 4a8dca2391 failed to build the Metal side: E0308, the ? operator's
Retained<ProtocolObject<dyn MTLFunction>> against the &ProtocolObject the call expected.

Verified: by the next M3 build job.
2026-11-21 07:14:27 -08:00
Anees Iqbal 741111d98b conformance: an execution over a range the GPU writes, kernel-encoded, on both sides
What: one Side call, encoded_range (case.rs: EncodedRange, RangeWrite), run whole on both sides
in one command buffer: an indirect command buffer of DrawIndexed commands that inherit the
pipeline state and bind their own buffers, encoded by the owned icb_merged_indexed fixture's
icb_indexed_16 kernel through its gpuResourceID in an argument buffer; the range written by the
GPU (a blit's copy before the pass, or an earlier draw of the same pass by
icb_render_replay_template's rasterization-disabled vertex function, then a memory barrier of
buffers); one pass that makes the commands' buffers resident and runs
executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: at offset 8 over a stale range of
every command; the target read back. Three rows (cases/indirect_ranges.rs):
indirect-range-gpu-written-at-zero (0 for 3, copied), indirect-range-gpu-written-past-zero (5 for
2, copied), indirect-range-written-by-an-earlier-draw (2 for 4, drawn).

Why: the runtime's execution over a held range now counts its parts with a kernel that reads the
range (the previous commits); these rows compare what it draws with Metal's. The suite's other
indirect rows encode commands on the host, which the runtime does not build, so no refused row
becomes obsolete: none is dropped.

Verified: recordings and the lavapipe replay follow in the next commits.
2026-11-21 07:14:27 -08:00
Anees Iqbal 637feee982 Bless at the pin 5a04298008: golden runtime-floor profile line, compile census
What: the golden table's runtime-floor profile fingerprint (42f0aaf70682836e -> cb1326eae1b08f5f, from the
visibility work's floor change); its 1,860 runtime-floor cells keep their hashes, so no translation under that
profile changed. The authored compile census: its header (product digest, executor vulkan-engine-v205 -> v207)
and 27 cases now refused by the requirement rows for indirect command buffers and pipeline states (01ed696846).

Why: tables are re-blessed on development at named pins.

Verified: bless job m3-max-63642 on the M3 at 5a04298008 (inventory 0, golden 0, printouts 0; the patch is the one
profile line); census job m3-max-63643 at 5a04298008 (exit 0, 28 lines changed).
2026-11-21 07:18:22 -08:00
Anees Iqbal abb3c82247 rt: a copy between two textures over one buffer whose bytes meet copies in slabs
copy_from_texture recorded one vkCmdCopyImage when its source and destination were two
different textures in place over one buffer (each a linear image on the buffer's bytes) whose
regions' bytes meet, which Vulkan forbids (VUID-vkCmdCopyImage-pRegions-00124: no memory both a
source and a destination of one command). Only regions of one subresource of one image were
cut into slabs. Metal leaves such a copy undefined; an Apple M3 Max gives each destination texel
what the source held before the copy (the conformance crate's buffer_texture_blits rows
within-buffer-a-row-on and -reversed).

A texture in place now names where its texels lie: the VkBuffer commands reach the buffer's bytes
through (one per allocation, spanning it), the first texel's offset there and the row pitch the
device reports for the linear image (Rows, Side::rows). Where both textures of a copy lie in one
VkBuffer, texture_copy finds every pair of a destination row and a source row whose bytes meet
(meeting: a source row meets at most the two destination rows whose starts lie nearest it, as a
pitch is at least a row; nothing to look at where the two regions' spans of bytes do not meet)
and feeds their shifts to the slab chooser of 7c1baad228, generalized to take several shifts
(cut): an axis every shift moves along, all one way, is cut no thicker than the least shift in
whole texels (bytes along x, rows along y), the end the shifts point to first, so no slab's
source and destination share a byte and no slab reads a byte an earlier one wrote; the axis of
fewest slabs wins, as before. One subresource of one image is the one-shift case and cuts as
before. Regions on the same bytes copy nothing. Regions whose bytes do not meet, interleaved rows
included, stay one command.

Where along each axis the rows meet shifted both ways, or not shifted (a destination row across
the end of its own source row and the start of the next, or rows of two pitches meeting at their
starts), no cut along one axis keeps the order: Gap::TextureCopy names that arm now, its doc,
docs/REFUSALS.md (regenerated) and the rt README's blit section with it, instead of an invalid
command. No scratch image, no cap, no copy of the runtime's own.

Tests: regions_of_two_textures_over_one_buffer_copy_in_slabs_where_their_bytes_meet checks the
slabs (a row on both ways with the regions' order, two rows on, two texels on within the rows
both ways, a row and two texels on), the gap (whole rows two texels on; two pitches meeting),
one slab for interleaved rows of one pitch and of two and for another buffer, and nothing for
the same bytes. On a device, every_device_copies_between_textures_over_one_buffer_from_the_source_before_the_copy
makes four RGBA8 textures in place over one Shared buffer at the device's own pitch (asserted in
place) and copies a row on and a row back, a memory alignment on within the rows on and back,
and apart, each expecting the whole buffer to hold the source's bytes from before the copy and
everything else kept, one submission, 2 + slabs barriers, no byte copied; the gap case is refused
and records nothing.
2026-11-21 07:08:04 -08:00
Anees Iqbal 54cf60e29a replay: the visibility play test reads the occlusion pools in the backend's gauges
What: the rt_replay stream of a Reset pass's visibility results now presents after its check, so
the frame ends, and its test plays it on a backend it ends itself: the frame's end gauges (`live`)
read `occlusion_pools` 1, the pool the command buffer took, and the device's drop gauges
(`NewRuntime::end`, the matrix's `@drop` records) read it 0.

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

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

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

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

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

Verified: cargo fmt. rt_replay (lavapipe): a Reset pass's Counting and Boolean words (16 and 16 for
a 4 by 4 target, the untouched word's bytes kept), an offset taken twice counted as
Refused(VisibilityResultOffsetTaken) at its call, and an Accumulate pass's two modes counted by
their gap with the buffer's bytes kept; the compile and lavapipe jobs are named in the lane's
report.
2026-11-21 07:09:56 -08:00
Anees Iqbal dc03c9e1b5 Validation: delete the own context's indirect-command-buffer and pipeline-state arms
What: since 01ed696846 the engine candidate refuses every committed case with an indirect command
buffer or a pipeline state in an argument buffer before it maps the case (the five runtime-limit
requirements). This commit deletes what only those cases reached:
- platform/compute/{replay,device_replay,device_replay/generated,draw_replay}.rs: the host, device
  and draw replays.
- platform/generated_commands.rs and the context's VK_EXT_device_generated_commands loader.
- The children/registered parameters of execute_engine and execute_engine_render, and the replay
  passes in the render recording.
- engine.rs:
  - PreparedCase.templates and replay_templates, with ReplayTemplate, TemplateCase, ChildCommand
    and CompiledChild.
  - replay_variants, replay_regions, region_sizes and edge_sizes.
  - the replay requests, the run-allocation list and the resident state.
  - compile_child, record_child and replay_variant_request.
  - ComputeCase.objects and ComputeCase.command_buffers.
- graphics.rs: StageResources.objects and command_buffers, RenderCase::objects and
  command_buffers, records_ids, and replayed_draw_in_class.
- argument_buffers.rs: embed_objects, EmbeddedObjects, validate_records, records_ids and
  records_storage. field_words and synthetic_addresses take no records or objects.
- variants.rs: compile_replay_for_shape and DrawForm (the large-buffer and replay forms).
- PipelineRequest::BoundCompute.replay and VertexDraw.form.
- artifact.rs: CompileSubject (its one subject is still labelled "case"), the replay module and
  the uncovered note. case_compiles becomes case_compile: one pipeline per run.
- ToolingRequirement::ReplayedTemplateResources, which only replay_templates raised.
- plan_resources Guest.status is a buffer, not an Option: only the device replay passed none.
A case of the runtime's form (kernel-encoded indexed draws that inherit the pipeline state, no
host-encoded commands) raises no requirement. compute_case and stage_resources now refuse it, and
a pipeline state, as not implemented (executor_not_implemented), rather than drop the command
buffer from the mapping. No committed case is of that form.
Object and mesh cases have no own-context execution arm: engine/mesh.rs serves only the authored
compile census (prepare_compile), so nothing of it is deleted.

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

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

Verified:
- Probe m3-max-63595 (homelab-um870-1) on 20b4721524, a tree equal to this commit's, passed:
  fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, and validation nextest
  (1332 tests).
- m3-max-63628 (homelab-um870-1) ran the own context's device tests (candidate::tests) on
  lavapipe at this commit: 54 passed.
2026-11-21 07:13:17 -08:00
Anees Iqbal 5a04298008 rt: the count kernel's shape call takes the state's compiled content; the refusal beside Accumulate; as_chunks in the new word readers
What: RenderCommandEncoder::execution_part passes the compiled content by reference
(&**compiled), as Indirect::shape takes it; the tuple built before the call took no coercion. The
runtime README's known gaps of render encoders name the execution over a held range refused while
a visibility query counts (VisibilityResultInterrupt) beside Accumulate's refusal: both need a
count carried across two queries with the parts added; the visibility section lists it among the
commands that end the rendering. The count kernel's interpreter test and the runtime's visibility
cell read their words with as_chunks, which the dated nightly's clippy asks for.

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

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

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

Verified: on the probe branch (d59701c670), jobs 63460 and 63481 measured the frame of Apple's
rendering sample: at the 2 MiB bound 931.8 us of GPU time on the 2080 (920.0 at whole capacity)
and 588.5 on the XTX. This commit: compile job and the lavapipe rt suite, reported with the sha.
Tests: the count kernel against a brute-force count on the interpreter and valid on every
committed profile; held ranges at 0, past a part, past the commands, and a CPU range across
parts; a held range in a Boolean visibility mode before and after its first draw; the widest
layout's part at or under the bound on every device.
2026-11-21 06:47:06 -08:00
Anees Iqbal 01ed696846 Validation: requirement rows for indirect command buffers and pipeline states
What: five new ToolingRequirement variants for what the runtime does not build of an indirect
command buffer, and for a pipeline state an argument buffer holds. Each one stops only the engine
candidate (Limit::Runtime), so the Metal oracle still runs and qualifies these cases.
executor_contract::case_requirements raises them from the case literals:
- indirect_compute_commands: a command buffer of compute commands.
- indirect_draw_types: a render command buffer whose descriptor allows draws other than indexed
  ones alone (non-indexed, patch, indexed patch or mesh draws).
- indirect_command_inheritance: a render command buffer that does not inherit the pipeline state,
  or that inherits buffers.
- host_encoded_indirect_commands: commands the host encodes into a command buffer.
- argument_buffer_pipeline_state: a pipeline state in an argument buffer (the runtime's pipeline
  states have no gpuResourceID).
The runtime builds kernel-encoded indexed draws that inherit the pipeline state and bind their own
buffers (Device::new_indirect_command_buffer). A case in exactly that form raises none of these.
Object and mesh cases already stop the candidate by mesh_render_pipeline
(executor_contract::mesh), so no new row is needed for them. IndirectCommandBuffer (an authoring
requirement about unobserved contents) means something else and is not reused.
ENGINE_EXECUTOR_ABI goes to vulkan-engine-v207, because these cases' recorded rows came from the
executor's own context. executor_contract is a classifier input, so triage recomputes the census.
In the authored compile census, these cases' cells become their requirement refusals; the census
is re-blessed on development.

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

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

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

Verified: gate m3-max-63557 (homelab-um870-1) at c38044230b, the tree of this commit: fmt, clippy
(all features, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc and doctests of metal2vulkan-validation
passed, and its nextest suite passed (1337 tests). Earlier runs on the same branch (m3-max-63495,
m3-max-63532) found the tests fixed above.
2026-11-21 06:58:13 -08:00
Anees Iqbal 03d898aac0 Bless at the pin 7c1baad228: golden semantics line, compile census, render key, opened chains
The pin 7c1baad228 (stage size, SEMANTICS 2257, ARTIFACT 588; the
overlapping copy) named by the planner, blessed as it ruled: the render
key, the opened chains and the compile census; nothing else is
bless-owned.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Tests: overlapping_regions_copy_in_slabs_the_far_end_of_the_shift_first checks the slabs' regions
and order (a 21x1 row shifted by 20, a shift toward lower y, a diagonal shift on the axis of fewer
slabs, regions apart as one slab); the 3D/array host test now expects slabs where it expected the
gap. On a device, every_device_copies_overlapping_regions_from_the_source_before_the_copy copies
toward higher and toward lower x and y, from a view into its texture, along a 3D texture's depth,
and by whole BC1 blocks where the device makes them. Each case expects the source's bytes from
before the copy, one submission, 2 + slabs barriers and no byte copied of the runtime's own.
2026-11-21 06:24:22 -08:00
Anees Iqbal 1d79c26b7a Validation: a render case's argument buffers draw through the runtime
What: runs_render_through_runtime no longer keeps a vertex or fragment case whose function takes
an argument buffer of buffers, textures or samplers on the executor's own context, and it routes a
case that observes an argument-buffer buffer or texture. runtime_render makes each stage's
argument-buffer members the way a kernel's run makes them (platform/runtime.rs):
- each member buffer is a Shared buffer of its bytes;
- each member texture and sampler comes from runtime_textures, with the usage the function
  declares of its field (RuntimeDraw.member_usages, engine::runtime_member_usages);
- each owner holds every member's gpuAddress or gpuResourceID at its field
  (argument_buffers::owner_bytes);
- the render encoder uses each member buffer and texture for reading and writing
  (use_resource).
An argument-buffer buffer output reads back through RenderFinals.argument_buffer_buffers, and an
argument-buffer texture output reads back through runtime_textures::read_back. An argument
buffer's pipeline state or indirect command buffer still keeps the case on the own context.
ENGINE_EXECUTOR_ABI goes to vulkan-engine-v205, because these cases' recorded rows came from the
own context.

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

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

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

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

No file this touches is a classifier input, so the authoring-capability census does not move.
The compile census's executor key moves with the ABI (bless on development).
2026-11-21 06:29:32 -08:00
Anees Iqbal ba428c4f4b rt: a stage fill answers the helper's own device-creation and compile times (StageSpans)
The planner asked for the helper's cost as a number: the 2080's fill read 129.3 s in one probe
and 104.3 s in another, and no line timed the compile alone. serve_stage now times its
Device::new and its one vkCreateComputePipelines call (host_time) and sends both in its reply;
Device::fill_stage answers them as Ok(StageSpans { device_nanos, compile_nanos }) in place of
Ok(()), so the consumer logs them with each fill. The reply's layout changed, so the wire is
version 2 (a helper of the old build is answered StageFill::Version); the stage key holds the
wire version, so entries kept under version 1 are misses.

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

The device test asserts both spans are nonzero and prints them; the README's fill_stage line and
the api signature table name StageSpans.
2026-11-21 06:20:20 -08:00