Commit Graph
2925 Commits
Author SHA1 Message Date
Anees Iqbal 7cc02e47d7 RUNTIME_VERSION 1943 and the runtime-sources pin for the RX 550's clear taking either code
The commit before this (nvreds) adds RADV on the RX 550 (Polaris 12, 0x699f) to
DriverFact::ColorClearTakesEitherCode. The driver's clear cuts the colour to a half, rounding
toward zero, and then rounds to the nearest code. That model gives every one of the 270 channels
of the 93 differing fills (job 10655), and each stored code is one of Vulkan's two closest. So the
runtime announces device-color-conversion there, as it does on ANV and the 5080.

Verified (nvreds, m3-max-10829, um790 with MESA_VK_DEVICE_SELECT=1002:699f!, RADV POLARIS12):
driver_facts 35/35, color_fills 7/7. Landing: pin-compute, api-signatures --check, refusal surface
and coverage with no diff. A follow-up inverts the fact to the spec's default (either code unless
measured ColorClearIsMetals) and removes the per-device rows.
2026-11-08 21:43:03 -08:00
Anees Iqbal 5ed5e47ae5 DriverFact::ColorClearTakesEitherCode on RADV on the Radeon RX 550 (Polaris 12), as measured
runtime_lane::color_fills::plain_color_fills_are_the_device_s_clear failed on the RX 550 (um790,
RADV POLARIS12, Mesa 26.2.6, job m3-max-10655 at 90c9936538): 186 plain fills differed from
Metal's past what they announce, 93 colour fills of 11 formats, each in a texel of a level and in
a whole 1 x 1 slice: RGB10A2Unorm and BGR10A2Unorm 24 each, RGBA8Snorm 9, RGBX8Snorm 7,
RGBA8Unorm, BGRA8Unorm and ARGB8Unorm 6 each, RGBX8Unorm 5, RG8Snorm 3, RG8Unorm 2, A8Unorm 1.
Every differing channel stored the code below the nearest, a code from Metal's, off the
midpoint: 8-bit scaled values 0.50 to 0.58 past their lower code (RG8Unorm's 0.515986, 131.58
codes, stored 131 where Metal stores 132), 10-bit ones 0.51 to 0.87 past (0.549235, 561.87 codes,
stored 561). None was announced: the runtime announces a clear off a midpoint only on a driver
that takes either code (clear_value::rounds_apart).

The cause: the device's clear cuts the colour to a half toward zero, then rounds to the code.
That model gives every one of the 270 channels of those 93 fills (offline, from the job's
lines), and the same lane's R16Float clears store the half cut toward zero (0.001 as 0x1418,
Metal's 0x1419), RG16Float and RG11B10Float alike, already announced there. A half's cut is under
half a 10-bit code, so the stored code is one of the two nearest: Vulkan's "one of the two ...
closest" allows it, the device's native conversion. The row records it as the 5080's and ANV's
do, keyed to RADV, AMD's vendorID and the RX 550's deviceID (0x699f, AMD_RX_550), so the runtime
announces device-color-conversion for a clear or plain fill of a normalized channel anywhere off
a whole code there.

The fact's doc gives the measurement; docs/API.md's clear entry names RADV on the RX 550. No
committed profile is of the RX 550, so no profile's facts move.

Verified: the model offline over the 10655 lines. The RX 550 color_fills lane and the suites
follow through potluck.

(cherry picked from commit e3455e70e245184ce96777a64e4a166c73400625)
2026-11-08 21:42:16 -08:00
Anees Iqbal ac85c4b5ca composite_costs: a glass form of indexed draws that differ only in their arguments
A window server's glass layers draw many indexed draws of one pipeline and one set of bindings
that differ only in their first index or base vertex, which the runtime now rebinds with their
arguments (`WorkCounts::draws_rebound_arguments`). The lane had no such form, so it could show
neither that cut nor a regression of it. `glass` draws 8 passes of 80 indexed triangle lists:
the first half at successive first indices over segments of zwd_quad's six corners, the second
half at successive first indices and negative base vertices over segments of 6j..6j + 6, every
vertex a corner. A pass's binds and draws now carry their draw count, so a form of another
count per pass measures a draw as its own.

`composite_costs_one_pass_alone` encodes the one-pass form alone, for a profile of it, as the
passes and bare forms already have.

Verified: cargo fmt only; the build, clippy and the 780M runs follow as potluck jobs.

Landing note (orchestrator): on the 780M (gem10, RADV PHOENIX, job 10818, base f441d6c89 = before
the argument rebind, tip 3f42b4cee, lane file overlaid, medians of 9) the glass form reads 26366 ->
6636 instructions a draw, 3748 -> 922 ns a draw, frame CPU 2.907 -> 0.919 ms, with every draw after
a pass's first rebound with its arguments (draws_rebound_arguments 632 of 640, no
draws_unlike_kept). The one-pass form's +103 instructions a draw at the rebind is code layout, not
new work: perf record of instructions:u moves samples between functions none of which the rebind's
diff touches (out of line only in base: PassStartReads::add, AttachedMemo::shares, settles_kept;
only in the tip: samples_attachment, rebound::Changed::add, slot_descriptor, Texture::slot_shadow),
and no work count but the scheduler's moved.

(cherry picked from commit 6ad954f65e)
2026-11-08 21:39:44 -08:00
Anees Iqbal f76ae3404d Re-bless the golden tables at 01273f9b04
Translation changed at 01273f9b04 (SEMANTICS_VERSION 1999). Blessed on the M3
(s37-pl.sh bless, dv-golden).

(cherry picked from commit 1ba8d4b2a3cee98a8785b4772e32dea43da6de9a)
2026-11-08 21:28:57 -08:00
Anees Iqbal 01273f9b04 SEMANTICS 1999, ARTIFACT_FORMAT 496, RUNTIME_VERSION 1942 and the pin for the slots' level reads
The three commits before this (ownpixel) carry StageModule::level_reads in every stage's artifact:
one LevelReads per texture slot, giving the levels its reads can reach. The runtime counts the
attached-read slots of draws that take every step by how those levels meet the lowest attached
level: attached_read_slots and its _one_level, _first_level, _any_level, _reaching and _below
parts. Nothing is bound or copied differently yet; the counts name the shape that a narrowed view
may serve. The branch had bumped SEMANTICS to 1998 and ARTIFACT_FORMAT to 495 on b4c1d25aa3,
numbers the early-mask notice took first (5be90aacf9), so the artifacts move to the next ones
here. work_counts.rs met the early-mask counter on cherry-pick and keeps both.

Verified (ownpixel, on the M3): workspace plain clippy and the translator suite at the branch
(3396/3397, the one red its own test, fixed in the last commit); level_reads 3/3, golden hashes,
api_surface and api_signatures at its tip. Landing: pin-compute, api-signatures --check (834
names), refusal surface and coverage with no diff. The merged tree's build and clippy follow on
development.
2026-11-08 21:16:10 -08:00
Anees Iqbal b85c7168b3 level_reads tests: the size query without a level reads a storage image
SPIR-V allows OpImageQuerySize only of a multisampled, storage, buffer or rect image, and the
builder refused it of the slot's sampled 2D image.

Verified: cargo fmt only; the suite reruns as a potluck job next.
(cherry picked from commit 6cd8ca2bb390882d8bbef1b0a133b1d2a5a6cf03)
2026-11-08 21:15:13 -08:00
Anees Iqbal c80c8ece40 level_reads tests: the image operands helper takes no builder
The closure borrowed the function builder it never used, which the borrow checker refused
beside the builder's own borrow at the fetch.

Verified: cargo fmt only; the build runs as a potluck job next.
(cherry picked from commit 5ab42ff3b917ba5e4a8965b6956d3a6a2e2b338e)
2026-11-08 21:15:12 -08:00
Anees Iqbal f0628b75eb The levels each texture slot reads, and the attached-read slots counted by them
The translator states, for each texture slot of a stage, the levels of its bound view its
reads reach (`StageModule::level_reads`, `spirv::requirements::level_reads`): whether some
read may reach any level, the highest constant level a fetch, size query or gather names
(through the fetch lowering's `UMin(c, levels - 1)` containment too), and its samples by
sampler, with the highest constant explicit level of detail and whether one is computed.
`SampledLevels::level` answers the highest level such samples reach through a bound
sampler (`SamplerLevels::of` a `vk::SamplerDesc`: its LOD clamps, bias and mip mode), and
`LevelReads::highest_level` the slot's.

The runtime counts, at each draw that takes every step and reads through copies, every slot
whose sampled binding presents a texture an attachment of the instance renders
(`WorkCounts::attached_read_slots`), split by how its reads meet the lowest attached level:
one level, the first level attached, any level, reaching it, or below it. The samplers are
those the draw binds (the bind's own descriptor for a runtime sampler, the layout's
immutable sampler for a constexpr one). No draw binds or copies otherwise: this names the
shape of the usage shadow the attached reads of mipmapped textures take, ahead of serving
the "below" slots through a view of fewer levels.

SEMANTICS_VERSION 1998 and ARTIFACT_FORMAT_VERSION 495: the artifacts carry the new fact.
api_surface and api_signatures name the new public types and fields.

Verified: cargo fmt only so far; the build, clippy and tests run as potluck jobs next.
(cherry picked from commit 89855203ad1b8b9b3695f313b3cdb34688993840)
2026-11-08 21:15:12 -08:00
Anees Iqbal 5be90aacf9 RUNTIME_VERSION 1941 and the runtime-sources pin for the early-mask visibility notice
The four commits before this (nvreds) carry GraphicsState::writes_sample_mask in the lowered state
(SEMANTICS 1998, ARTIFACT_FORMAT 495, set there) and read maintenance5's
earlyFragmentMultisampleCoverageAfterSampleCounting into the device's limits. Where a device reports
false (ANV on the Iris Xe), a counted draw with early fragment tests and a fragment-written sample
mask counts the samples the mask keeps, where Metal counts every sample covered before the shader.
The runtime announces visibility-past-early-mask there and counts
WorkCounts::draws_counted_past_early_masks. Keeping Metal's count would cost a second draw per
counted draw (a mask-free, colour-free variant inside the query), so the device's count is the
near-equivalent, recorded in docs/API.md and FAST-PATHS' device gaps. Draws outside a visibility
query pay nothing.

Verified (nvreds):
- Iris m3-max-10629: sample_coverage, visibility, post_depth_coverage, coverage_outputs and
  line_widths 23/23. 'counted 0 of the 256 / 128 of 512 / 320 of 1024 samples Metal counts',
  announced and counted.
- Lint 10560 and the quick suite 10624 green.
- M3 lanes 10544 green, where MoltenVK reports true and the count is held exact.
Landing: pin-compute, api-signatures --check, refusal surface and coverage with no diff.
2026-11-08 20:42:02 -08:00
Anees Iqbal 1746ba0927 sample_coverage: the early-mask kind's lane site, PAST_EARLY_MASKS
tests::degradation_sites failed in the suites of m3-max-10560: VisibilityPastEarlyMask was named
by no lane site. The sample coverage lane, whose early-tests draws take it on a device without
earlyFragmentMultisampleCoverageAfterSampleCounting, now declares it as a site const, which
degrade_notices lists and documents.

(cherry picked from commit 3d6d90ef6054cf5fa1ea6f2eaafc7be53f0d6966)
2026-11-08 20:41:08 -08:00
Anees Iqbal ee36d3558e api_tests: the codec round trip carries GraphicsState::writes_sample_mask
The round trip's GraphicsState literal now sets the new field true, so the codec's
encoding of it is exercised (the lint at 4aa2896af5, m3-max-10543, failed E0063 here).

(cherry picked from commit d9213125ac488df7c295fe57751f3012a6ddeff6)
2026-11-08 20:41:07 -08:00
Anees Iqbal b0c76a4291 render.rs: the early-mask notice's reason on lines within the width
(cherry picked from commit 3f2d6c53f5114093c27acb1826b828dfa637d227)
2026-11-08 20:41:07 -08:00
Anees Iqbal e67c617756 Visibility past an early-tests mask: announced where the device may count after the mask
runtime_lane::sample_coverage::the_sample_coverage_applies_after_the_fragment_function fails on
the Iris Xe (ANV, RPL-P) at its three early-tests draws: a full-screen draw of coverage 0.3
under psc_early counts 0 of 256 samples at 1 sample, 80 of 512 at 2 and 140 of 1024 at 4
(iris-B at 6cb37f2c86), where Metal counts every sample the early tests pass and masks the
colors alone. Its colors and depths are Metal's. The translator applies Metal's private masks
under early tests in the fragment function's SampleMask output, which Vulkan orders after
sample counting only where the device states earlyFragmentMultisampleCoverageAfterSampleCounting
(VkPhysicalDeviceMaintenance5Properties). ANV's capture on the Iris Xe of RPL-P states false;
RADV on the 780M, NVIDIA's on the RTX 5080 Laptop GPU, lavapipe and MoltenVK on the M3 Max
state true.

- metal2vulkan: Limits::early_fragment_multisample_coverage_after_sample_counting, read from the
  maintenance5 structure (false without the extension), and
  GraphicsState::writes_sample_mask, the fragment function's SampleMaskOut builtin (its own
  [[sample_mask]] return or the private masks it applies). SEMANTICS_VERSION 1998,
  ARTIFACT_FORMAT_VERSION 495 (a new encoded field).
- metal2vulkan-runtime: a draw under a visibility result (Counting or Boolean) whose fragment
  function declares early tests and writes its sample mask, on a device without the property,
  runs announced as Degradation::VisibilityPastEarlyMask
  (metal2vulkan-degrade-visibility-past-early-mask) and is counted in
  WorkCounts::draws_counted_past_early_masks. Keyed to the documented property alone, never to
  a driver or vendor.
- No structural form keeps Metal's count at no cost to uncounted draws: the colors' masks are
  the SampleMask output or a discard, both fragment operations such a device may count after, so
  only a second draw of each counted draw without the mask would count as Metal does. The
  announcement is the proportionate answer.
- The lane: on a device without the property, the early draw's colors and depths are still
  Metal's, its count at most Metal's, the draw counted once and the kind announced; elsewhere the
  count is Metal's and nothing is announced.
- docs/API.md's catalogue entry, docs/FAST-PATHS.md's device-gap row, visibility.rs's module docs,
  the api_signatures rows, and validation's limit bound (Execution). docs/REFUSALS.md
  regenerates unchanged.

Not done here: the runtime-sources pin and RUNTIME_VERSION (the orchestrator's number), and the
golden tables, which development re-blesses.

Verified: cargo fmt; the device description test reads the property from RADV's and ANV's
captures. Builds, lint and lanes follow through potluck.

(cherry picked from commit 4aa2896af563c41fec7d8129f15fb86b5dc4e418)
2026-11-08 20:41:07 -08:00
Anees Iqbal 67f9922c3c Re-bless the authored compile census at 32c3330694
Its product fingerprint follows development's versions at 32c3330694. Blessed on the
M3 (s37-pl.sh censusbless --bless, dv-m3).

(cherry picked from commit 677531698712bfaa1a5f856076e5a8e7b1edf69b)
2026-11-08 20:33:26 -08:00
Anees Iqbal 32c3330694 sample_fills: an 8-bit unorm sample holding the clear may stand either nearest code, sRGB too
On Iris Xe (ANV, RPL-P) the bgra8srgb-4 case reads ff89bbe1 for the pass's clear where Metal
reads ff89bce1: the green channel's 0.5 encodes to 0.73536 (187.52 codes), which ANV stores
as 187 and Metal as 188. ANV's clear takes either nearest code
(DriverFact::ColorClearTakesEitherCode, the row this branch adds) and the device announces
device-color-conversion for the clear. The case allowance only knew RGBA8Unorm's byte order
and linear codes, so it fell through to SAMPLE-FILLS-DIFFERS.

The allowance now takes each 8-bit unorm format's bytes in order (R8, RG8, RGBA8, BGRA8 and
the two sRGB ones, whose color channels are encoded first) and compares a cleared sample's
every channel against the two codes nearest its scaled value; a colour fill stays allowed
only for RGBA8Unorm, the one format a colour fill case writes. Every other word is still
compared with Metal's.

Verified: built and run on Iris in the job that carries this branch (reported with the tip).
(cherry picked from commit bb63d2f827c2ca68a6cd4d4b5954bbd55e5d2593)
2026-11-08 20:21:42 -08:00
Anees Iqbal d57c46b096 Re-bless the conformance cost records at b4c1d25aa3
A whole-set `cost --runs 8 --write` on the M3 (MoltenVK), then `cost --runs 8 --alone --write` over
the 498 records it changed (s37-pl.sh rebless, m3-max-10642). The moves come from work landed since
09f11573c1:
- cfbf33126e reports memory_frees.kept_stale, memory_frees.blocks, memory_frees_posted and
  blocks_ahead_unused rather than gating them, so the records drop their bounds;
- RT 1939 (the argument rebind) adds draws_rebound_arguments and the draws_rebind_stopped_arguments
  family where cases draw again with other arguments, and moves draws_unlike_kept_* to draws that
  draw nothing;
- the block counts by kind (buffer_blocks_made_in_place, image_blocks_made_in_place,
  host_copy_blocks_made_in_place) and the scheduler and object-churn counts the whole-set
  measurement now reads;
- RT 1937's snapshot-refusal clause counts and RT 1938's route C counts.
The alone leg is honest: 14 commands_recorded readings are 0 alone, one count each, in cases whose
other commands still read: fetch-ordered-{bgra8,rgba8}unorm-srgb, fresh-buffer-private,
fresh-pattern-81, fresh-pattern-92, fresh-pattern-93 and visible-tables-compute-size-0. Each is a
case the selection decides (what ran before it moved its fresh pages or its first fetch), the same
family as the previous re-bless's.

(cherry picked from commit 0791ebae9b8417427071f7646e2e20e4bdadad5d)
2026-11-08 20:21:35 -08:00
Anees Iqbal 0b52add1c9 cross_class_storage: the NaN notes are those of the stages the runtime ran
What happened on Iris (m3-max-10431, after 3d49ce60ec): the notes helper
compiled the cross-class kernel under the format's storage choice and was
refused: "RwRead Int over R8Unorm: unsupported: Format; needs
NotRepresentable". For a cross-class storage read, the runtime's variant
pairs the slot's storage choice with the bound format's class
(VariantKey::cross_class, bind::plan::compute's cross_variant). A test-side
recompile that reproduces only half of that is not the runtime's variant.

So the test stops recompiling. dispatch_noted returns the dispatch's words
and the precision notes of the stage the dispatch ran, specialized ones
included, as CommandBuffer::executions records them: the variant the runtime
compiled for the bound texture. A read leaves its NaN bits to the device
where the native or the cross dispatch's stage records one of NAN_NOTES.
leaves_nan_bits and driver_deviations::stage_notes_under (3d49ce60ec) are
removed.

Verified: the Iris run follows.
(cherry picked from commit d2d2db125454a800256467fcf949b6d4eeca5150)
2026-11-08 20:16:04 -08:00
Anees Iqbal 553a7dfeb3 half_read_nans: a sampled 32-bit float NaN or denormal is the device's under device-texel-conversion
What the device does: ANV on the Iris Xe (Mesa 26.2.6) hands back every NaN
of an R32Float, RG32Float or RGBA32Float texel as 0xffc00000 in a nearest
sample, through a constexpr sampler or a runtime one, and every denormal as a
zero of its sign. Metal hands back the stored bits. Reads, texture-buffer
reads, argument-held reads and gathers on ANV hand back the stored words.
Iris run m3-max-10431: 224 sampled lanes, every one a NaN as 0xffc00000 or a
denormal as a zero of its sign, and no other difference.

Why the old expectation was wrong: on a device whose texture unit is not
Metal's (no VkProperty::MetalSampler), a float-result access hands back the
device's own conversion of the texel, recorded as
PrecisionNote::DeviceTexelConversion. That is rule 1's native sampling. The
note's recorded bound and the lane covered a 32-bit float texel's NaN and
denormal only in a gather (NVIDIA), plus a denormal in a nearest sample
(RADV). ANV's samples are the same native behaviour, measured.

So:
- PrecisionNote::DeviceTexelConversion's recorded bound (artifact.rs) and its
  docs/API.md entry now name a 32-bit float texel's NaN in a nearest sample
  as the device's encoding, with ANV's measurement beside RADV's denormals.
- The lane takes a NaN of the device's encoding and a denormal flushed to a
  zero of its sign in a sample, as it did in a gather. It now also asserts the
  notice: where the texture unit is not Metal's, each sample dispatch's
  executed stage (CommandBuffer::executions) records DeviceTexelConversion,
  and the device announces device-texel-conversion.

Verified: the Iris run follows.
(cherry picked from commit d759e0fb4b264508f32ee069b9945e9c7f39fa34)
2026-11-08 20:16:04 -08:00
Anees Iqbal 89c0fb383c driver_deviations, cross_class_storage: three expectations that read the wrong operation or input
float_denormals_read_as_metal_reads_them. What the device does: ANV on the
Iris Xe (Mesa 26.2.6) answers the fast probe's word 7, `0 - a`, of the
denormal 0x00000001 as 0x80000000, where Metal answers 0x80000001 (96
words). Why the expectation was wrong: in nan_denormals_fast, Metal's
compiler folds `0 - a` into `fneg fast float %a`, the same instruction as
`-a` (word 6). That is a sign move, which reads denormals as Metal's only
where the profile takes DriverDeviation::MetalUnaryDenormals, and Iris's
profile does not. The test held it to the arithmetic's
MetalFloatDenormals. The fast probe's word 7 is now a unary word
(DENORMAL_PROBE_NEGATE). The plain probe's `fsub float 0.0, %a` stays an
arithmetic word.

half_quantize_rounds_as_metal_at_the_edge. What the device does: in
nan_half's word 26 (`fmod(a, b)` in the low half, `-a` in the high half),
ANV answers 0x7bff8000 where Metal's word is 0x7bff0000. The edge half,
`-(-65504)` = 0x7bff, is Metal's. The other half is the module's `half`
fmod's -0 for a zero remainder of a negative dividend, where Metal answers
+0, recorded as NativeTranscendentals (FloatFn::half_zero_of_float). Why
the expectation was wrong: it compared the whole word wherever either half
was the largest half. Now it compares only the edge: each half that is
0x7BFF or 0xFBFF, or the whole word of a float 65504.

cross_class_storage_and_buffer_reads_are_the_native_words. What happened:
the test's notes helper compiled the read_write kernel with no inputs. On
ANV the function asks for the storage slot's format
(NeedsInput(StorageTextureFormat)), which the runtime supplies when it
compiles the pipeline for the bound texture. So the helper panicked before
any comparison. The helper now compiles as the runtime does for that
texture: with no input where none is asked for, else with the format's
storage_image_choice. Its cache is keyed by format too.
(driver_deviations::stage_notes_under is stage_notes under given inputs,
returning the compile's error.)

Verified: the Iris run follows.
(cherry picked from commit 3d49ce60eca3479e44f00f0be49902c996aa8b5f)
2026-11-08 20:16:04 -08:00
Anees Iqbal 508e9249cd clear_reach: a half NaN clear holds the device's NaN, announced, beside Metal's green
What the device does: ANV on the Iris Xe (Mesa 26.2.6) stores the clear
(NaN, 1.0, 0.5, NaN) of an RG16Float attachment as 0xfe00 in red, where
Metal stores its canonical quiet NaN 0x7e00 (development's Iris leg,
m3-max-10311 at 846f2112f5).

Why the old expectation was wrong: it demanded 0x7e00 through an integer
scratch clear the runtime no longer makes. Under the native-arithmetic rule
the clear value goes to the device's conversion, and the runtime announces
device-nan-encoding for every half NaN clear (nan_clear::degrade_nan_clears).
The test now takes, in each texel the clear reaches, a half NaN of any
encoding in red with Metal's 0x3c00 in green. Every other texel keeps its old
bytes exactly, and the notice must be announced on every device. It prints
how many texels hold the device's NaN (NAN-CLEAR).

Verified: the Iris run follows.
(cherry picked from commit 5c254fccdeefb567f1836f9d4831a058ad25166d)
2026-11-08 20:16:04 -08:00
Anees Iqbal 90c9936538 RUNTIME_VERSION 1940 and the runtime-sources pin for ANV's clear taking either code
The two commits before this (nvreds) add DriverFact::ColorClearTakesEitherCode for ANV on the Iris
Xe of RPL-P (deviceID 0xa7a0), as the RTX 5080 Laptop's row has it. Vulkan's float-to-unorm
conversion returns either of the two closest codes. On that driver a clear's code depends on the
image: 0.1 in an 8-bit unorm channel stores 0x1a in a private optimal image and 0x19 in place.
RGB10A2's 0.8793 (899.51 codes) stores 899 where Metal stores 900. Under rule 1 that is the
device's native conversion: the runtime announces device-color-conversion for a clear or a plain
fill of a normalized channel off a whole code there. The lanes accept either code only at the clear
step, for the cleared channels, where the device lacks ColorClearIsMetals. They compare every load,
blend and blit byte for byte.

Verified (nvreds):
- Iris m3-max-10468 at 385c9c6357, Mesa 26.2.6: no_copy_textures, pitched_surfaces, resolves and
  color_fills 77/77, twice;
- um870 m3-max-10469: clippy x3 and rustdoc green; suites red only at golden_hashes, the profile's
  facts fingerprint, which development's golden re-bless takes;
- M3 m3-max-10524 79/79, and lavapipe 79/79 (um790 10558) at the next commit of that branch.
Landing: pin-compute, api-signatures --check, refusal surface and coverage with no diff.
2026-11-08 20:09:21 -08:00
Anees Iqbal 7be13179cc DriverFact::ColorClearTakesEitherCode on ANV on the Iris Xe of RPL-P, as measured
runtime_lane::color_fills::plain_color_fills_are_the_device_s_clear failed on the Iris Xe (ms01,
job m3-max-10408 at 67b66645ab): "4 plain fills differ from Metal's past what they announce",
each the colour (0.0845, -5e-324, 0.8793, 1e300) into RGB10A2Unorm and BGR10A2Unorm, in a texel
of a level and in a whole 1 x 1 slice: the 10-bit channel of 0.8793 (899.51 codes) stored 899
(RGB10A2Unorm f8300056 against Metal's f8400056, BGR10A2Unorm c5600383 against c5600384), off
a midpoint, which the runtime announces only on a driver that takes either code
(clear_value::rounds_apart). Beside them 3,827 texels of 38 formats and placements stood a code
apart at ties, announced. And ANV's load-operation clear takes its code by the image: 0.1 in an
8-bit unorm channel (25.5 codes) stores 0x1a in a private optimal image and 0x19 in a linear
image in place over host pages or in a shadow listing an unsigned-integer view format
(pitched_surfaces, no_copy_textures; the lanes' previous commit). Vulkan allows either code
("one of the two unsigned binary integer values ... closest"), so this is the device's native
conversion: the row records it as the RTX 5080 Laptop's row does, keyed to the measured driver,
vendor and deviceID (0xa7a0), and the runtime then announces device-color-conversion for a clear
or plain fill of a normalized channel anywhere off a whole code there.

The fact's doc gives the measurement; docs/API.md's device-color-conversion entry names ANV;
the committed profile's facts test (device::tests::driver_facts) lists it for
intel-irisxe-rplp-anv. The profile's fingerprint moves with its facts, so the golden tables
follow on development.

Verified: cargo fmt. The Iris color_fills and lane modules, the Linux suites and lint, and the M3
follow through potluck.

(cherry picked from commit 385c9c6357cd5eb8d0e6deb579533fcad45b5472)
2026-11-08 20:08:34 -08:00
Anees Iqbal fc6773b58f Lanes: a clear's channel may stand a code from another image's on a device whose clear is not Metal's
On the Iris Xe (ANV, ms01), pitched_surfaces (9 tests) and no_copy_textures'
passes_over_no_copy_textures_blend_load_and_store_as_private_ones_* (6) failed only at their
pass that clears and blends, and resolves' sRGB twin lane at its agreeing samples, a clear's
codes. Both lanes clear to (0.1, 0.2, 0.3, 0.4), 0.1 being 25.5 codes of an 8-bit unorm channel.
ANV stores 0x1a in a private optimal image and 0x19 in an image in place over the caller's pages,
or in a shadow that takes its word view (MUTABLE_FORMAT with R32_UINT listed, from
DriverFact::ShadowCopyBackDispatchFaster); blended texels over it follow, a code apart, and an
RGBA16Float blend of 0.6 at alpha 0.5 over the clear's 0.3 stores 0x3733 privately and 0x3732 in
place. The resolves lane's RGBA8Unorm_sRGB clear of 0.5 (187.52 codes) stores 0xbb where Metal
stores 0xbc. Vulkan lets a clear store either code nearest a channel's value and leaves a
float's rounding and an sRGB encode to the device: these are the device's own conversion, which
the runtime announces (device-color-conversion, clear_value::rounds_apart), not a defect to
emulate. Measured with diagnostic prints of the first differing texels (ms01 job m3-max-10366):
a texel the pass only cleared reads [4c,33,19,66] in the pages against the private texture's
[4c,33,1a,66]; with the copy back's dispatch fact dropped (a scratch patch) the shadow takes the
private image's code and all 9 pitched tests and the Shadow half of the no-copy ones passed,
the InPlace half still a code apart.

The lanes now hold, in the clear step alone and on a device without
DriverFact::ColorClearIsMetals, each channel of a texel within one code of the private
texture's (no_copy_textures::differing_by, clear_codes_apart), and the bytes between the rows
exactly; the pages then stand as the device left them for pitched_surfaces' later steps. Every
load, blend and blit step stays byte for byte. Each lane's device announces
device-color-conversion at each occurrence (DeviceOptions::announce_each), and the lanes assert
that the private texture's clear and the texture's own each announced it
(degrade_notices::clear_conversions, the notices whose object is a colour attachment's clear).
The sRGB twin lane holds the agreeing samples' colour channels within a code of Metal's where
the clear is not Metal's, and asserts the kind announced where a texel stood apart.

Verified: cargo fmt. The Iris, lavapipe, RADV and M3 runs follow through potluck.
(cherry picked from commit 67b66645aba5c60d5cd3f719cb3bde0f0873b356)
2026-11-08 20:08:34 -08:00
Anees Iqbal b4c1d25aa3 RUNTIME_VERSION 1939 and the runtime-sources pin for the argument rebind
57c21dc6bb..3f42b4cee5 (ownpixel) rebind a direct draw that differs from its kept draw only in its
own arguments (counts, starts, index offset, instance count, base vertex and base instance): the
Vulkan draw, index overrun, BaseVertexInstance words and index use are worked out again through
BindingPlan::redraw_apart_into, and every other step is skipped. The draw path's behaviour and its
counts change (draws_rebound_arguments, draws_rebind_stopped_arguments and its five parts;
draws_unlike_kept and draws_unlike_kept_arguments_alone now count an argument-only difference
only where the draw draws nothing), so the runtime's version moves and the pin follows
bind/graphics.rs.

Verified (ownpixel): M3 plain clippy and bind::graphics::tests, api_signatures, api_surface 38/38
(m3-max-10631); MoltenVK m3-max-10636 60/60 over draw_again, kept_shadowed_draws, command_counts,
inline_first, set_zero_at_offsets, shared_draw_locks and the draw_work, draw_changes, draw_bases,
replayed_frames lanes, among them draws_of_another_first_index_alone_are_rebound_with_their_pixels.
Landing: pin-compute, api-signatures --check, refusal surface and conformance coverage with no
diff. Linux clippy, lavapipe lanes and the cost --cpu contrast follow (m3-max-10633); the cost
records are re-blessed on development.
2026-11-08 20:05:22 -08:00
Anees Iqbal 3f42b4cee5 First-index rebind test: a base-vertex draw's uses are the last draw's, so it is inside and compares none
The MoltenVK run of draws_of_another_first_index_alone_are_rebound_with_their_pixels
(m3-max-10620) failed in its base vertex form: commands_noted_as_before was 4 rebound
against 8 every step. A draw that differs only in its base vertex has the draw before's
uses, the index buffer's included, so its rebind is inside (draws_moved_inside) and, as
every draw inside does, compares none of its uses, where every step notes them as before.
The pixels, commands and state commands were equal. The test now states the draws inside
of each form (none of the first index form, whose index use moves; every rebound draw of
the base vertex form) and holds rebound noted-as-before plus inside equal to every step's,
as draws_moved_along_their_buffer_note_nothing_again does. The rebound module docs' check
paragraph is rewrapped.

Verified: the failure on m3-max-10620; the fix runs next on the M3's MoltenVK.
(cherry picked from commit 74a907ecfe1817649a3159425b57ec694f8bff57)
2026-11-08 20:04:26 -08:00
Anees Iqbal 1c939ccba7 Rebound check: the index bind's digest takes ash's handle and index type by their raw values
The rebuild of cc9bbf220e (m3-max-10561, msi-laptop) refused the eighth digest part: ash's
vk::Buffer and vk::IndexType implement no Debug in this build, as the set-write and push-write
digests beside it already note. Their raw values are digested instead.

(cherry picked from commit abf02560d7a3728f2278c88e8b406e8d62453241)
2026-11-08 20:04:26 -08:00
Anees Iqbal 9f2716f8ad Argument rebind stops counted by where; the rebound check digests the draw and index bind
Two follow-ups to ab3e5002bb.

The orchestrator asked that reims' next walk be able to tell what stops a draw of other arguments
from being rebound, not only that it stopped. draws_rebind_stopped_arguments now counts every stop
of such a draw, at any step, and five new WorkCounts fields split it by where:
draws_rebind_stopped_arguments_route (the draw may make a primitive where the kept draw may not,
or the other way), _tables (the plan reads its slots some other way than a rebind works out: a
stage's argument or root table, a uniform view a written slot may alias), _fetch_window
(BindingPlan::redraw_apart_into answered Ok(false) for a plan with fixed-function vertex buffers:
a window the arguments move), _reach (a pulled attribute past 4 GiB) and _other (every other stop,
a kept draw that keeps nothing to rebind among them). A kept draw is never a de-indexed, mesh or
patch draw, so no count is kept for those: they can never be rebound.

The first build (m3-max-10557, gem10, plain clippy) refused Expected's variant sizes
(clippy::large_enum_variant): Rebound had grown by the recording's Vulkan draw and index bind. They
are now an eighth digest part, "Vulkan draw and index buffer bind", beside the other seven, so the
check compares them as before and Rebound stays its old size.

api_signatures blessed (five fields); the unlike-count test asserts the route count.

(cherry picked from commit cc9bbf220e208e0edc5b334962f032b0b8286d8d)
2026-11-08 20:04:26 -08:00
Anees Iqbal 57c21dc6bb Draws unlike their kept draw only in their own arguments are rebound with them
In reims' pin-26 glass walk, 69,981 of 70,882 draws unlike their kept draw differed only in
their arguments (draws_unlike_kept_arguments_alone, all of them in the index offset), and each
took every step. Such a draw, of something to draw, now goes to the rebound path
(render/draw_again/rebound.rs), whatever its tables' stamps, and works out again each step that
reads its arguments:

- its route, which reads them only through whether the draw may make a primitive
  (line_width::draws_primitives): the draw goes on only where that is the kept draw's;
- its commands' Vulkan draw, index overrun, BaseVertexInstance push fields and index buffer use,
  through a new BindingPlan::redraw_apart_into, which answers Ok(false) where the plan reads the
  arguments some other way (a stage's argument or root table, a mesh, patch or de-indexed draw)
  or a fixed-function vertex buffer's fetch window moves with them;
- its pulled attributes' reach (check_vertex_reach, as before, now of the new draw);
- its index buffer's use, patched in place as a moved slot's use is
  (binding::patch_command_uses), so a moved, narrowed draw checks, notes and gathers it with
  the moved slots' uses;
- its index buffer's bind (IndexBind::of of the new source), recorded where the record holds
  another, with its new draw; the kept draw takes its arguments, index source and draw.

A stop at one of those steps is counted (WorkCounts::draws_rebind_stopped_arguments) and the
draw takes every step; a rebound one is counted in draws_rebound_arguments. A draw of other
arguments that draws nothing still takes every step and is counted unlike, as before. The
draw-again debug check covers the new form: the kept draw it compares is the kept draw with the
new arguments, and the rebound check now compares the recording's Vulkan draw and index buffer
bind as well as its draw state.

New public items: BindingPlan::redraw_apart_into (docs/API.md), WorkCounts::draws_rebound_arguments
and draws_rebind_stopped_arguments (api_signatures blessed). Tests: the translator's
draws_of_other_arguments_redraw_what_every_step_writes holds redraw_apart_into to every step's
commands (first index, count, base vertex, a robust overrun) and to Ok(false) where a window
moves, for another kind, index type or buffer, and a de-indexed plan, and to every step's error
past a multiview limit; the runtime's draws_of_another_first_index_alone_are_rebound_with_their_pixels
draws each rectangle by its first index alone, then by its base vertex alone, rebound, with the
commands, state commands and pixels of the same draws taking every step; the unlike-count test
now holds one draw rebound with other counts, one stopped at its route and one of nothing.

(cherry picked from commit ab3e5002bbd6bf8dde7c2761bf7d12ab4461b555)
2026-11-08 20:04:26 -08:00
Anees Iqbal f441d6c891 A case of mesh_object_grid_mesh: an effect-free mesh function draws nothing without rasterization
The authored case for the mesh group: mesh_object_grid's mesh_object_grid_mesh sets its
primitive count to 0 from thread 0, sets no vertex or primitive, and binds and writes no memory.
Drawn without rasterization under a grid of 2 threadgroups of 2 threads, with no fragment
function, it has no effect a stage observes, so the case selects no output: the draw must
complete and its exact observable output is the empty byte sequence, as the committed
empty-kernel and void-fragment cases are.

Verified on the M3 Max: corpus-case-check installed it, corpus-metal qualified it on
apple-m3-max-macos27.0.1 (the empty output), and corpus-moltenvk on apple-m3-max-moltenvk matched
it.

(cherry picked from commit 5737e9235d8279db6d57b87c74de3df12eef23f3)
2026-11-08 20:03:19 -08:00
Anees Iqbal 9e7a42b39d A case of ive_encode: a vertex function whose only effect is an indexed draw it encodes runs it
The authored case for the vertex group: icb_vertex_encode_indexed's ive_encode, a
rasterization-disabled vertex function with no position and no writable resource, drawn as one
point of instance 0, encodes command 0, a point draw of 6 indices from buffer 1. The execution of
that command inherits the render replay template's pipeline (its own committed case, token 1) and
the executing encoder's vertex buffers: the params window at 256 bytes of buffer 1 (scale 3, bias
5) and the out window at 512 bytes. The case selects the out window (the producer passes buffer 1
to the command it encodes, so the checker counts it written), and observes the replayed draw:
out words 0 to 5 hold 8, 11, 14, 17, 20, 23 and words 6 to 15 keep the 0xab fill.

Verified on the M3 Max: corpus-case-check installed it (it checks only with the vertex rule's
change; an empty selection is refused because the encode call's pointer arguments count as
written), corpus-metal qualified it on apple-m3-max-macos27.0.1 with exactly those words
(output_sha256 b95c1c17...), and corpus-moltenvk on apple-m3-max-moltenvk matched it.

(cherry picked from commit 1a33b8789e6305c6cf6fcfb46de070e5754342c3)
2026-11-08 20:03:19 -08:00
Anees Iqbal ae42a1acfc Census: a mesh function that sets no vertex or primitive and writes nothing needs no fragment stage
The census held five mesh rows unresolved under mesh_companion, each missing a fragment stage:
icb_object_threadgroup_mesh, mesh_partial_barrier_mesh (empty bodies), mesh_object_grid_mesh,
mesh_pipeline_limits_mesh_alone (a constant zero primitive count) and mesh_pipeline_limits_mesh
(a count read from its payload). None sets a vertex or primitive and none writes device memory;
they exist so their modules' object functions can be drawn. The row rule fell through to "needs
a fragment stage" for any mesh function writing neither memory nor its position, although a
fragment stage observes nothing such a function defines: it emits no primitive, or primitives
over vertices it never wrote.

Such a function has no effect a stage observes, so it draws with rasterization off and an empty
observation (OutputSelection::None), as a kernel that writes nothing does: both executors already
draw a mesh pipeline with rasterization off into a one-pixel sink, and the checker accepts an
empty observation where nothing is writable. A mesh function that sets vertices or primitives
without their position, and writes nothing, still needs a fragment stage nothing supplies
(sets_mesh_outputs decides it from the entry's `air.set_*_mesh` calls through the AIR front end's
intrinsic table, never a name).

The five rows' first unresolved commits are their fixtures' add commits (97d01927cb, 1d494932f7,
0f289cdac4); the rule predates them (0175289314).

Tests: the mesh contract's row test holds the three fixtures' effect-free mesh functions to no
missing stage and no call that sets an output; a triage test classifies all five public rows to
no requirement and no missing stage. Both fail without the change. The census test's synthetic
mesh row now sets its primitive's ID without a position, so it stays the gap it demonstrates.
The validation README says what an effect-free mesh row draws with. The classifier version is
structural-triage-v82.

(cherry picked from commit 68d4bbb9b67a72bfcce4d0c6069f1579da43ef04)
2026-11-08 20:03:19 -08:00
Anees Iqbal c446716580 Census: a vertex function whose only effect is commands that replay observes is authorable
The census held icb_vertex_encode_indexed's ive_encode and icb_vertex_encode_textured's
ivt_encode unresolved under vertex_side_effect_observation. Each is a rasterization-disabled
vertex function with no position and no writable resource whose only effect is the indexed draw
it encodes (plus a fragment buffer on ivt_encode). The commands-only contract already answers
Replayed for that shape: both executors draw a vertex producer with rasterization off and then
execute the commands it wrote, and the checker already requires a case of such a module to
execute them. But the vertex observation rule decided from the reflection alone and never
counted encoded commands as the stage's effect, so it stopped both executors for exactly the
shape the replay contract says they run. The one committed vertex replay case passes only
because its function also binds a writable window it hands to the commands.

The rule now counts commands that replay observes (CommandsOnly::Replayed) as the vertex
function's effect, as a kernel's are: the row is authorable, and its encoded commands stay the
census's non-blocking indirect_command_contents unobserved effect. A vertex function whose
commands no replay observes (a fragment buffer alone) still raises the requirement, beside
indirect_command_buffer. unsupported_observation_requirements takes the entry's text for this.

The two rows' first unresolved commits are their fixtures' add commits (20747c70a1 and
3550112c29); the rule predates both (13b279df1b).

Tests: the shared-gate test now holds an encoding-only vertex function to no observation
requirement, a case of it to executing its commands, and a fragment-buffer-only one to the
requirement; a triage test classifies both public rows to no requirement with their encoded
calls unobserved. Both fail without the change. The classifier version is structural-triage-v81.

(cherry picked from commit 1581c68753d7b873ce93dae4fe4a74bcbdf4560b)
2026-11-08 20:03:18 -08:00
Anees Iqbal 2f2a187027 submission_checks: wait for the head's count before the gate lets the GPU signal land
runtime_lane::submission_checks::a_submission_detached_while_a_gpu_signal_is_in_flight_fails
failed on the Iris Xe in round 063 (m3-max-10422 at e9d1d94f36) at submission_checks.rs:612,
"at commit true: no head counted as awaiting its checks' signals"; every other assertion of the
round held (checked once, after the signal landed, not on the committing thread).

The count is the scheduler's (scheduler::check_heads, WorkCounts::heads_awaiting_check_signals):
its pass finds the waiter at the head of its line with a shared-event wait that a submitted GPU
signal reaches, and counts it while that signal is held. The committing thread never claims such
a head (claim_check takes only heads whose landing waits are empty), so a waiter committed with
commit_and_submit is counted at the scheduler's next pass. The test opened the gate (finish)
right after commit_and_submit and the detach, with nothing ordering that pass before the gate:
where the scheduler's thread ran later, the signal had landed and no head awaited it. Both rounds
(at commit true and false) depend on that pass coming first.

The test now waits, at most WAIT, for the count to move before finish opens the gate; the claim
is unchanged (a waiter whose count never moves still fails, after WAIT), and the gate, which only
the test opens, keeps the signal from landing first.

Verified (nvreds):
- probe (d8481e0bf3, never merged: each scheduler pass delayed 20 ms before check_heads), M3
  m3-max-10605: with the fix 5/5 pass; without it 0/5, each "at commit false: no head counted as
  awaiting its checks' signals" (so the delay breaks the at-commit-false round too);
- undelayed: Iris m3-max-10473 10/10 with and 10/10 without; M3 m3-max-10474 5/5 each way (the
  race needs the scheduler's thread to run late).
Test-only; clippy runs on development's lint leg.

(cherry picked from commit 7d36b8914d, message corrected: the original said the at-commit-false
round's pass always came first, which the delayed probe disproved)
2026-11-08 19:55:42 -08:00
Anees Iqbal 2de48dfeb4 Re-pin the runtime sources after the exit guard's test-only thread-local fix
The pin hashes exit_guard.rs, which 10f0048c43's cherry-pick changed (a cfg(test) step reads
BETWEEN_COUNTS with try_with). No behaviour change outside test builds, so RUNTIME_VERSION stays.

Verified: pin-compute over the landing tree; api-signatures --check, refusal surface and
conformance coverage regenerate with no diff.
2026-11-08 19:11:39 -08:00
Anees Iqbal 0e2ac3f345 exit_guard: the test-only step between the counts tolerates destroyed thread-locals
In builds of the runtime's own tests, Guard::close's wait runs a test
step between its reads (between_counts), which read BETWEEN_COUNTS with
LocalKey::with. On macOS exit() destroys the exiting thread's
thread-locals before it runs the exit handlers, so a test child that
exited from a thread that had used the step's thread-local, with a
section of the runtime's in progress on another thread, panicked in the
hook ("cannot access a Thread Local Storage value during or after
destruction"), and the panic in exit_handler, which cannot unwind,
aborted the child. Measured on the M3 (MoltenVK 1.4.2): 2965 of 5931
probe children aborted there, every one that exited with a command
buffer in flight, none of those that did not. Builds without cfg(test)
run no step (between_counts is empty), so consumers never reached it.

The step now reads its thread-local with try_with and runs nothing once
it is destroyed. The new test runs the hook's wait in a thread-local's
destructor after the step's thread-local was destroyed: it aborted the
test process before, and now the wait ends at its bound.

(cherry picked from commit 10f0048c43fc0498c61842bd823fdae1dd632c09)
2026-11-08 19:10:52 -08:00
Anees Iqbal cfbf33126e Cost half: the allocator's quiet-period frees and blocks made ahead unused are reported, never gated
What: memory_frees.kept_stale, memory_frees.blocks, memory_frees_posted and blocks_ahead_unused
join pooled_memory_blocks_freed under QUIET in cost.rs's RACY table (41 -> 45 rows).

Why: round 063's whole-set M3 replay (m3-max-10500, tree e9d1d94f36) put all four at 1 where the
measurement's most was 0 on swizzled-storage-rgba8unorm, rotated-planes-store-0-64x16,
render-then-sample-exact and pass-start-barrier-private-read, while the cost leg's measurement of
the same tree passed. Each counts a free that a quiet period decides: a kept empty block freed
after KEPT_EMPTY_FOR without a placement, a block made ahead freed once its pool stopped growing
for 10 s, and the two totals that hold such frees. Whether one lands in a case's window is a
question about elapsed time, the reason pooled_memory_blocks_freed is already reported. Every
other free cause (dedicated, pooled_emptied, kept_for_room, host_import, own_pages, teardown)
stays gated by its own name, so no free a case causes escapes the gate.

Verified: the racy test asserts the four reported and the six other causes gated (gem10 run in
the landing's message trail); records keep their stored bounds, which the check reports and does
not fail on (cost.rs, "Reach moving either way is reported and not fatal").
2026-11-08 19:10:47 -08:00
Anees Iqbal afcf0ed634 kernel_textures census: a case whose depths lie outside [0, 1] passes as the runtime's announced clamp; depth_range.rs is no classifier input
Two reds from the depth-range change (6cb37f2c86) in round 063.

1. M3 lane (MoltenVK, at 09f11573c1):
   kernels_with_textures_and_samplers_match_metal_15 failed on
   read-a-cube-a-depth-slice-and-a-missing-volume with "the fresh candidate
   gave no output: not_supported{tooling_requirement:depth_outside_unit_range}".
   The case really puts depths outside [0, 1] into a depth image: its
   Depth32Float 2x2x2 array holds 1000.0 to 1111.0. A device without
   VK_EXT_depth_range_unrestricted cannot hold them (VUID-07931), so the
   candidate's refusal is right. Before the change, the executor copied them
   invalidly on MoltenVK. The runtime clamps the upload and announces
   restricted-depth-upload, so its output differs from Metal's, and the census
   then failed because the candidate had nothing to compare with.
   Now, where the candidate's answer is that typed refusal
   (depth_range_refusal), the census reruns the runtime on a device of its own.
   The case passes only if that run completes with a clean execution report,
   gives an output of Metal's length, announces restricted-depth-upload, and
   the validation layer reports nothing. Its differing words are counted and
   printed on a "clamped:" line. Every other case is held as before.

2. lavapipe leg (m3-max-10423):
   triage::tests::analyzer_key_covers_the_classifier_version_product_and_sources_only
   found src/executor_contract/depth_range.rs reached from
   executor_contract.rs but neither a classifier input nor listed.
   Classification never reads it. Its only callers are the engine executor's
   create_slot_image and its render attachment setup
   (candidate/platform/plan_resources.rs, render.rs), which read a case's
   depth bytes and the opened device's extensions. The classifier sees neither.
   It is now listed under not_classification with that reason. No classifier
   or census version changes: no classification reads it, and requirement.rs,
   which gained the variant, is already a classifier input.

Verified: the M3 and lavapipe runs follow.
(cherry picked from commit 1a66f381ee98fe175f6233789f55859e07777c85)
2026-11-08 19:00:00 -08:00
Anees Iqbal 3282668457 Re-pin the runtime sources after the in-place report's doc fix 2026-11-08 18:58:27 -08:00
Anees Iqbal 307c41a4a7 Device::in_place_check_report's doc: its lines by class, access and row end
The doc listed the report's lines access by access for three classes'
worth of an older check ("the same eighteen"), with no unobserved
renders and none of the classes added since. It now says how the lines
are laid out (row ends outermost, then accesses in Access::ALL's order,
then one line per class in PagesClass::ALL's order), how a line is
named, with three examples, and what follows the verdicts: the check's
notes. No count to go stale. The lane's verdicts_in reads that layout.
Doc only.

(cherry picked from commit ca3a7cb2a7c74312535f7580ac5b5c8b0989557b)
2026-11-08 18:58:15 -08:00
Anees Iqbal 0e13a68c54 In-place lane: the verdict count is held to the check report's own lines
VERDICTS is still written out (84), but the failing-check test now
asserts it equals the count read from the first device's report, so a
class or an access the check gains fails this assert by name instead of
a recall bound later. verdicts_in counts from the report's grid: the
leading lines name the classes alone (`Pointer: Passed`), and each later
run of as many lines naming them in order under a new suffix is one more
access or row end; the check's notes that follow break the run. The
runtime's class and access lists are crate-private, so the lane cannot
read them. A synthetic report checks the count: 2 classes x 2 accesses
x 2 row ends, with notes after, gives 8.

(cherry picked from commit 7f6fcdb1b1f0844967fd54792259e7adb6f17cf5)
2026-11-08 18:56:45 -08:00
Anees Iqbal c38ec885c3 In-place lane: the check's verdicts are six classes' now
a_failed_check_keeps_the_shadow_and_no_record truncated the device's
check report to 56 lines (four classes, seven accesses, two row ends)
and bounded the next device's recalled verdicts by that count. The
check has six classes since f46f1ca9cf (ExportedFd and ExportedDmaBuf,
RT 1930), 84 verdicts, so a device that recalls them all failed the
bound: on the M3 (MoltenVK) at 09f11573c1, "84 recalled, 20 measured",
and on the Iris Xe at 846f2112f5. The record keeps what it kept: the
count alone was stale. VERDICTS is 84, its comment naming the classes.

Verified: the lane test on the M3 and on the Iris Xe (jobs in the
landing message).

(cherry picked from commit 59cd9caef5ac6b52eebbace58aed72e27d7da9f8)
2026-11-08 18:56:45 -08:00
Anees Iqbal d253d9f952 Re-bless the authored compile census at 4a3a247a30
Its product fingerprint follows development's versions at 4a3a247a30. Blessed on the
M3 (s37-pl.sh censusbless --bless, dv-m3).

(cherry picked from commit b9b0dfb688ad8184bd698b46f16f13dfdb26bd6f)
2026-11-08 18:43:57 -08:00
Anees Iqbal 22a4e5e5a3 Re-bless the golden tables at 09f11573c1
Translation changed at 09f11573c1 (SEMANTICS_VERSION 1997). Blessed on the M3
(s37-pl.sh bless, dv-golden).

(cherry picked from commit 4a3a247a309d6b5257caab72952045828813ff0d)
2026-11-08 18:36:02 -08:00
Anees Iqbal cba7851b70 heap_textures alias lane: a texture made in place of its first image announces its route
a_buffer_write_shows_in_an_overlapping_texture failed on the RTX 5080 Laptop at 9bfc1b52e
(round 062, dv-ln08) at heap_textures.rs:815, transfer + linear 1 against 0: the device hides
no aliased write (no DriverFact::CompressedImagesHideAliasedWrites), yet one heap-texture-linear
was announced. Every alias round trip still showed the buffer's write in every texel.

The notice is the refit's (texture/heap.rs, HeapPlan::refit): the 64x64 render-target texture in
the Private placement heap took an optimal image of 16384 bytes at an alignment of 1024, where
Metal's answer is 16512 at 128, so a linear image that fits the answer lies in the heap's bytes in
place of a shadow, announced as heap-texture-linear. docs/API.md's catalogue already gives that
case ("Also, on any device, a single-sample colour texture whose first image takes more bytes or a
coarser alignment of the heap than Metal's answer ..."), and the sibling lane under
HeapCompressionPolicy::Compressed already counts it through WorkCounts::heap_textures_refit. This
lane's expectation predates the refit route: it allowed the alias notices only where the driver
hides writes.

The lane now counts refits per making as its sibling does, and asserts each alias notice at most
once and one announced exactly where the driver hides writes or a texture was refit. The
announcement is the device's own query's answer and stays.

Verified: the failure and the refit's notice text read from the 5080 lane log above. The rerun on
the 5080, lavapipe, RADV and the M3 follows through potluck.

(cherry picked from commit f743482fc068b252b6a508a3882fcb80dbd4a83f)
2026-11-08 18:34:36 -08:00
Anees Iqbal 09f11573c1 Re-bless the conformance cost records at 6cb37f2c86
A whole-set `cost --runs 8 --write` on the M3 (MoltenVK), then `cost --runs 8 --alone --write` over
the 430 records it changed (s37-pl.sh rebless, m3-max-10380). The moves come from work landed since
1c2f265ca6:
- RT 1935 adds the draws_unlike_kept_* counts (pipeline, call, counts, index_buffer, index_offset,
  tessellation, command_buffer, under, arguments_alone) where cases draw unlike their kept draw;
- SEMANTICS 1996 / RT 1936 clamps depth on MoltenVK. Its uploads now clear a fresh depth pattern
  where they copied it (cmd_clear_depth_stencil_image), and the cases declare
  restricted-depth-upload and restricted-depth-range. These are the 32 cases air11's 07d0c2afe8
  had re-recorded at its own base.
The alone leg is honest: 12 commands_recorded readings are 0 alone, one count each in cases whose
other commands still read. They are fetch-ordered-{bgra8,rgba8}unorm-srgb, fresh-pattern-252,
fresh-buffer-managed, fresh-pattern-92, fresh-texture-over-buffer-private,
visibility-counting-occluded and visible-tables-compute-size-0. air11 found the first three read
the same in a process of their own (m3-max-10345).
The snapshot-refusal clause counts (RT 1937) and route C (RT 1938) came after this tree; the
next re-bless adds them.

(cherry picked from commit ade9934d80be827cf7788895b75c09fe6df36e15)
2026-11-08 18:32:19 -08:00
Anees Iqbal e9d1d94f36 RUNTIME_VERSION 1938: a dma-buf export's texture goes in place through its own dma-buf where no image binds in the memory
Picks exitcrash's steelbrain/exitcrash-dmabuf (5e89357f00..617becef4f; the code is c2e90e2321).
Since RT 1930 (f46f1ca9cf), an image over exported memory names the memory's handle type
(VUID-02728). On RADV that left the dma-buf planes as announced shadows: the format query refuses
a plain linear image with DMA_BUF, and the DRM_FORMAT_MOD_LINEAR image needs a dedicated
allocation. The DMA_BUF | OPAQUE_FD export tried in between (1acb4f1fbf, 239d8ff9bb) hit
VUID-VkExportMemoryAllocateInfo-handleTypes-09860 at bind under the layer, so af8bda811b reverts
it, fix-forward.

What happens now:
- As the last step before the shadow, ungated by driver, only after a refusal, a texture over a
  runtime dma-buf export makes a DRM_FORMAT_MOD_LINEAR image. Its explicit plane lies at the
  texels' offset, with Metal's pitch.
- The image is bound to a dedicated import of vkGetMemoryFdKHR(DMA_BUF) of the buffer's memory,
  in that memory's own type, and acquired from FOREIGN_EXT, as the DmaBuf class's images are.
- The in-place check's ExportedDmaBuf textures take this exact route (CHECK_VERSION 14).
- The import is freed after the image. It is counted live, and WorkCounts::exported_dma_buf_images
  counts the images. The consumer's fd and export set are unchanged (DMA_BUF alone).
- Devices whose images bind in the memory (ANV, lavapipe) keep that path. The RX 550 lists no
  VK_EXT_image_drm_format_modifier, so its planes stay announced shadows (HOWTO section 7).

Verified, all at c2e90e2321 under the validation layer:
- 780M (m3-max-10369, RADV PHOENIX): 49/49, no VUID. Both NV12 planes are in place through the
  import in both storage modes: R8 at 256, RG8 at 8294656, row pitch 3840. 2 images were counted
  and 2 imports live, back to baseline once the textures dropped. The exported fd is a dma-buf
  (exp_name).
- RX 550 (m3-max-10372): 49/49, no VUID; announced shadows, 0 imports.
- lavapipe and Iris (m3-max-10370): 49/49 each, no VUID; planes in the memory, 0 imports.
- clippy clean (no cfg, m2v_gpu, m2v_cpu_icd); api_signatures and api_surface 15/15
  (m3-max-10412).
- Negative control (m3-max-10376): development 1c2f265ca6 plus the new test fails on the 780M,
  where the R8 plane is Shadow(Unchecked).
2026-11-08 18:31:24 -08:00
Anees Iqbal e22f367533 HOWTO section 7: the RX 550's missing extension as listed, not by generation
6ff21171d8's message said RADV enables VK_EXT_image_drm_format_modifier
on GFX9 and later only; that was inferred, not measured. Measured
(m3-max-10378, vulkaninfo on um790, Mesa 26.2.6): the RX 550 (POLARIS12)
lists VK_EXT_external_memory_dma_buf and VK_EXT_queue_family_foreign but
no VK_EXT_image_drm_format_modifier; the 780M (PHOENIX) and lavapipe
list all three. The line now says that. Doc only.

(cherry picked from commit 617becef4f0d68a14d0ff85ce0b15c5e07f81e0a)
2026-11-08 18:30:28 -08:00
Anees Iqbal 006d43ecb0 HOWTO section 7: the RX 550's dma-buf planes are shadows for want of VK_EXT_image_drm_format_modifier
RADV enables VK_EXT_image_drm_format_modifier on GFX9 and later only, so
the RX 550 (POLARIS12) has no DRM_FORMAT_MOD_LINEAR image to import a
dma-buf export's memory into: its dma-buf planes stay announced
shadows. Doc only.

(cherry picked from commit 6ff21171d8d228d1e22bdb072b65f67c85784187)
2026-11-08 18:30:28 -08:00
Anees Iqbal 7b29073f8c A dma-buf export's texture goes in place through its own dma-buf where no image binds in the memory
On RADV the runtime's memory exported as a dma-buf takes no image of a
texture's: the format query takes the dma-buf handle type for no
linear image, and its DRM_FORMAT_MOD_LINEAR image requires a dedicated
allocation (VUID-vkBindImageMemory-image-01445), so the 780M's VA-API
frames' planes were announced shadows (m3-max-10261, 10304). Binding
an image naming another handle type there is no way out: the layer
checks each type of the memory's export set against the bound image
(VUID-VkExportMemoryAllocateInfo-handleTypes-09860, m3-max-10339).

As the last step before the shadow, on any device that does it, the
texture's image is the runtime's route for images over dma-bufs
(Device::dma_buf_image): a DRM_FORMAT_MOD_LINEAR image whose explicit
plane lies at the texels' offset in the memory with Metal's pitches,
bound to a dedicated import of that memory's own dma-buf:

- dma_buf.rs: explicit_plane_image (shared with dma_buf_image_unbound),
  exported_dma_buf_image_unbound (the format query with DMA_BUF
  importable, the driver's layout, the image's memory within the
  memory and of its type) and bind_exported_dma_buf_image:
  vkGetMemoryFdKHR(DMA_BUF) of the memory (Device::dma_buf_of, as
  export_memory_dma_buf makes one), vkGetMemoryFdPropertiesKHR, the
  dedicated import at the image's size (01433; the import's type is
  among the image's, 02989; bound at offset 0, 02628), of the memory's
  own type. Vulkan imports a payload into the instance that exported it
  (VkImportMemoryFdInfoKHR, fd-00668). import_dma_buf hands the driver
  a duplicate and closes ours either way. The import is a DmaBufPages
  of no source (of_exported), freed after the image, live in
  WorkCounts::dma_buf_image_memories_live; each image is counted in the
  new WorkCounts::exported_dma_buf_images.
- texture.rs: exported_dma_buf_alias, after alias_unbound's refusal of
  the image in the memory (a shared block's, or a buffer's dedicated
  allocation): only for the runtime's dma-buf exports, only on a
  refusal (a pending or failed verdict stands), under the device's
  check of that memory; the image must hold exactly Metal's texels to
  the buffer's end (linear_plan::aliases). alias_image binds it
  (exported_dma_buf_texture_image: the buffer's memory held, the first
  move acquiring from VK_QUEUE_FAMILY_FOREIGN_EXT into GENERAL as an
  image over dma-buf pages does), alias_image_made answers it unbound.
  Devices whose image binds in the memory (ANV, lavapipe) keep that
  path unchanged.
- in_place_check.rs: the ExportedDmaBuf class takes a dma-buf's
  dedicated allocation too, and its textures take this route wherever
  the image in the memory is refused, so its verdicts (reads: a CPU
  write through the buffer's mapping read through the import's image;
  writes and renders the other way) measure it. CHECK_VERSION 13 -> 14:
  13's records kept ExportedDmaBuf Unchecked as a cause that lasts.

Test: exported_textures'
a_dma_buf_export_s_planes_go_in_place_through_its_own_dma_buf_where_no_image_binds_in_it
asks the device itself (the format query and the image's dedicated
requirement) whether a plane's image binds in the memory; where none
does and the device makes DRM_FORMAT_MOD_LINEAR images, each plane must
be in place through the import (counted) or a CheckFailed shadow, never
Unchecked; the buffer's export is a dma-buf (fdinfo exp_name); one
import live per such image, none once the textures go; no VUID. The
NV12 test reads such an image's memory plane (09433). The RX 550
enables no VK_EXT_image_drm_format_modifier: its planes stay announced
shadows.

Docs: API.md's shadow rule, HOWTO section 7, the runtime README, the
module docs.

Verification follows: the 780M, the RX 550, lavapipe and the Iris Xe
under the layer, then the 5080 through an entry.

(cherry picked from commit c2e90e2321937067d38cebc5b342f651a638b064)
2026-11-08 18:30:28 -08:00
Anees Iqbal 5ebe1d32aa Revert the dual dma-buf export and the opaque-descriptor naming
Reverts 1acb4f1fbf, 07d9fcac79, 6a6523d2bf, 4a13dfe5bc and 239d8ff9bb
as one fix-forward commit; the tree is b4331408bd's again.

An image naming an opaque file descriptor in a block exported as
DMA_BUF | OPAQUE_FD went in place on the RX 550 (m3-max-10339 at
239d8ff9bb), but the validation layer reported
VUID-VkExportMemoryAllocateInfo-handleTypes-09860 at each bind: it asks
vkGetPhysicalDeviceImageFormatProperties2 for the bound image with each
handle type of the memory's export set, and RADV supports no dma-buf
linear image. Its DRM_FORMAT_MOD_LINEAR dma-buf image requires a
dedicated allocation. So no image in a shared block exported as a
dma-buf is clean under the layer there, whatever else the block
exports, and the block goes back to exporting the dma-buf alone, with
no opaque naming and no counter of it. The next commit takes the
DmaBuf route instead: the block's own dma-buf, imported as memory
dedicated to the texture's image.

(cherry picked from commit af8bda811b4ba9a7816965d2f3bf1fd710d1e40e)
2026-11-08 18:30:28 -08:00