Commit Graph
2428 Commits
Author SHA1 Message Date
Anees Iqbal 3e2e65ee1a Translator: an object function has one grid form, folded; the unfolded object grid is deleted
What: given_inputs compiles every object function folded (LoweringInputs::folded_groups), alone or
in a mesh render pipeline, so its draws run any object grid in pieces within the task stage's
limits (bind::mesh_arguments). The unfolded form is deleted: DispatchPlan::object_grid and the
decl's object_grid (an unfolded object function's threadgroups per grid, wrapped at 2^32),
lower::mesh::folds_object_grids with lower::mesh::mesh_stages, which only it called, and
compile_mesh_pipeline's choice between the two. The single-region builtins test keeps its kernel cases and drops the object grid's.

Why: condition 1 of the planner's ruling on the mesh build: one grid form, no device-chosen
second one. folds_object_grids chose the folded form on a device that runs mesh stages and has
device addresses, 64-bit integers, multiDrawIndirect and drawIndirectCount. Device::from_queries
refuses a device without the first two, and object and mesh functions now need the last two
with the extension, so every device that compiles an object function took the folded form and
the unfolded one was reached only by an object function compiled alone.

No SEMANTICS_VERSION bump: an object function's key holds folded_groups, so its key changes with
its module, and every profile refuses object functions under the identity domains today.
docs/API.md's mesh pipelines section and LoweringInputs::folded_groups say an object function
is always folded.

Verified: see the job named below.
2026-12-03 17:05:40 -08:00
Anees Iqbal 7948443887 Translator: object and mesh functions need the mesh extension's two stages and the two indirect draw features together
What: lower::mesh::FEATURES lists taskShader, meshShader, multiDrawIndirect and
drawIndirectCount. An object or a mesh function, and so every mesh render pipeline with or
without an object function, now needs VK_EXT_mesh_shader and all four enabled; a device without
any of them refuses it as Unsupported{MeshShading} naming each one it lacks (plan_entry's
missing_caps). mesh_stages is that same test, and folds_object_grids no longer repeats the two
draw features.

Why: one query decides whether a device runs mesh pipelines. Before this, an object function
asked only for taskShader and a mesh function only for meshShader, and neither for the two draw
features a mesh draw's pieces take (a direct draw's pieces through multiDrawIndirect, an
indirect draw's through drawIndirectCount), so a device with only part of the set compiled stages
the draws could not run.

SEMANTICS_VERSION 2365 (a placeholder; the number is set at landing): a refusal names more
missing features on a device without the extension (both stages' features for either stage),
and a device with part of the set now refuses where it compiled. No committed profile with the
extension lacks any of the four, so no such profile's cell moves. The six committed profiles
without the extension do move: each refusal of an object or mesh function now names every one of
the four features the profile lacks. That is 246 golden cells and the same 246 engine inventory
cells, 41 on each of intel-irisxe-anv, intel-irisxe-rplp-anv, intel-uhd770-rpls-anv,
moltenvk-m3, nvidia-pascal-linux and runtime-floor, over the 14 engine fixtures that hold object
or mesh functions. They wait for the bless at the next named pin.

Tests: the red test of the parent passes, and the refusal test of profiles without the
extension expects the extension and each of the four the profile lacks. docs/API.md's mesh
pipelines section and compile_mesh_pipeline's doc state the set; runtime-sources.sha256 is
re-pinned.

Verified: m3-max-85179 at this commit's first build (tree equal to this one but for the base):
the parent's red test failed and passes here; clippy (plain) 0; the golden and inventory lists
against the base moved exactly the 246 cells above, each to the new refusal.
2026-12-03 17:05:37 -08:00
Anees Iqbal f514d6f283 Validation: a bicubic sample of a format with no bicubic treatment is the runtime's limit
Two public cases of engine/bcx_rules failed on lavapipe:
bicubic-8-bit-normalized-and-srgb-sums-near-the-rounding-tie (63d0f152) and
bicubic-rounding-of-random-float-and-srgb-texels (cbf5dd18). Each binds
RGBA8Unorm_sRGB textures at slots 4-6 and 13, which the kernel samples
through its bicubic constexpr sampler. Until 94adea1c61 (with 0a3a4fe911,
SEMANTICS 2365) the translator refused the whole kernel for its 1D bicubic
samples (slots 12-15), so the cases read as the product's refusal. That
commit built the 1D sample, as meant; the kernel now compiles, and the
runtime refuses its dispatch at slot 4 as Gap::BicubicTexels, an old known
gap its README states (bicubic_texels_word is None for 8-bit sRGB codes).
The executor counted that Gap as a failure, since the case's structure
did not classify it as refused. The refusal moved from the translator to
the runtime; this makes the classification say so.

ToolingRequirement::BicubicTexels ("bicubic_texels"): Limit::Runtime, it
stops the engine's candidate and keeps its cases Metal-qualified. The
checker raises it in checked_requirements
(executor_contract::bicubic_texels) when the case binds, at a texture
slot its function samples through a bicubic constexpr sampler, a texture
whose format gets None from the public
metal2vulkan::metal::format::bicubic_texels_word, so the rule is the
runtime's own. "Samples through a bicubic sampler" is read from the AIR:
an air.sample_* call (with gradients or not, no comparison) of a 1D or
2D colour texture, as the product decodes it, whose sampler operand is a
constexpr sampler (!air.sampler_states) with a bicubic min or mag filter,
as the translator decides it, and whose texture operand is an entry
texture argument, followed through the arguments of direct calls. A
runtime sampler is never bicubic and the translator refuses an argument
buffer's texture, so neither is claimed; a texture reached another way
(a texture array's element, a loaded pointer) is no claim. No census row
carries it: it needs the bound format, a case literal.

The device test that holds the refusal both ways on lavapipe already
exists: metal2vulkan-runtime's
tests::bicubic::every_device_pushes_each_bicubic_slots_format_treatment
(six formats' words pushed, the RGBA8Unorm_sRGB texture refused), with
the conformance ledger's bicubic-texel-classes rgba8unorm-srgb/dispatch
refusal. The requirement's doc names both.

samplers.rs gives each constexpr sampler's state by its global's name
(constexpr_sampler_states); min_lod_clamp.rs's call parsing is shared
(direct_call, operand_list); neither changes what classification
computes. The new module is listed beside depth_range.rs as the
checker's rule over case literals, not classification.

AUTHORED_COMPILE_CENSUS_VERSION 11: the two cases' cells move from
compiled to not_supported{tooling_requirement:bicubic_texels}, which a
cached cell would hide; the census is due a bless on development.
ENGINE_EXECUTOR_ABI is not bumped: no recorded candidate row holds
these cases (corpus/observations holds only their Metal rows).
SEMANTICS_VERSION is untouched: no translation changes.

Tests: requirement.rs's
a_bicubic_sample_of_a_format_with_no_treatment_stops_only_the_candidate
and the Runtime list; bicubic_texels.rs's own: every bcx_rules slot is
found; an RGBA8Unorm_sRGB texture at a 2D or 1D slot (or a texture
array's element there) raises it and RGBA8Unorm does not; a linear
sampler or a gather raises nothing; operands followed through direct
calls; and checked_requirements keeps the case for Metal and stops the
candidate.

Verified at this tree (f8eb488b95's), on lavapipe:
- job m3-max-86229: both cases read not_supported{tooling_requirement:
  bicubic_texels} (refusal=1 failure=0 each), and the public batch
  (ci-lavapipe, device type cpu, validation layer 1.4.363.0) reads
  cases=1189 match=815 mismatch=15 noted_difference=164 refusal=195
  failure=0 held_open=15 new_mismatch=0;
- job m3-max-86238, the same batch at db7bedc60d (the base): match=815
  mismatch=15 noted_difference=164 refusal=193 failure=2, the two
  failures these cases (exit=1, the runtime's BicubicTexels). The change
  moves exactly them from failure to refusal;
- job m3-max-86228: fmt, clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd),
  Rustdoc -D warnings, and the validation suite, 1349 passed, 2 skipped.
2026-12-03 17:02:29 -08:00
Anees Iqbal f838b75e6c Docs: HOWTO and ARCHITECTURE name no device policy
The device policy went with the resident core's deletion (device/policy.rs):
Device::from_queries takes the description alone and derives the profile from its queries
(docs/API.md, section 1). Three sentences still named a policy: HOWTO's first step ("describe
the Vulkan device as created and choose a policy"), its isolation recipe ("the device
description and policy ... equal description and policy give the same profile fingerprint and
keys") and ARCHITECTURE's device profile ("from the description's Vulkan queries and the
policy"). Each now names the description alone.

Docs only. Neither file is an input of runtime-sources.sha256, and no test or script reads
either file's prose.

Verified: on the CPU with no device, at this commit, git grep -i -w policy over docs/HOWTO.md
and docs/ARCHITECTURE.md finds nothing; DeviceDescription derives serde's Serialize and
Deserialize under feature serde (device/description.rs), as the recipe says.
2026-12-03 16:58:33 -08:00
Anees Iqbal 8fb26059c7 Translator: the lowering's unnormalized-sampler and heap-flag paths nothing reaches are deleted
The second half of the cleanup after the resident core's deletion (0ce2f39b71): crate-private
lowering paths whose inputs nothing sets, and the docs that still describe deleted machinery.

Unnormalized constexpr samplers. No selection picks PixelPosition::Unnormalized or
UnnormalizedTexel (pixel_position answers Scaled, Texel, TexelBySpec or TexelByWord), so they go
with BindingKey::unnormalized, PixelPosition::unnormalized(), emit's two coordinate arms and two
offset matches, the sampler.pixel_unnormalized and sampler.pixel_unnormalized_gather census arms,
pixel_note's and centre_denormals' arms, finish()'s invariant for an unnormalized identity
sampling, and constexpr_desc's zero bias for a SamplerUse of unnormalized coordinates, which no
constexpr sampler's use is. The runtime's unnormalized twins of linear pixel samplers
(SamplerUse::unnormalized, vk_sampler's form, offset_texels) stay.

Heap handle flags. AccessPlan's heap_class_index, heap_red_blue and heap_unreadable had no setter;
only heap_alpha is set. They go with carries_class(), Lookup::Flagged's class, red_blue and
unreadable fields (Flagged is now the alpha-carrying form alone), the handle constants
FLAG_TEXEL_CLASS, FLAG_RED_BLUE, FLAG_STORAGE_UNREADABLE, HANDLE_TEXEL_CLASS, HANDLE_RED_BLUE and
HANDLE_STORAGE_UNREADABLE, the sampler.heap.texel_class census arm, heap_element_of's unreadable
branch (its one caller passed false), and identity_refusal's HeapResource refusal of a flagged
form other than the alpha's, which could not fire. The handle-table search, which only the
function-table directory calls, in its element and entry forms, keeps its generic carry of the
alpha flag: Lookup is shared with the identity handle's form, whose element mask the heap accesses
read.

Docs that named deleted items now say what the code does: the PixelSamplerScaling entry (a
constexpr pixel sampler's linear sample or gather records it on every device; the runtime slot's
nearest test is its word, SamplerWord::nearest_pixel, not a specialization), ViewBaseTexelOffset
(no heap_raw; a slot's footprint placed so is refused, IdentityCause::TextureState),
SimdgroupAccessOrder (no resident-table profile), constexpr.rs, memory::handles (heap handles are
the identity arrays' elements; the handle table is the function-table directory's search),
bind::heap, lower::texture (is_null, border texels, level views and the out-of-bounds alpha come
from the resource ID's word), heap_raw's mentions in the sampler modules, the resident-table
mentions in access::object, provenance::objects and validation's tier table, the OpenCL line
variant's docs (the runtime refuses such a binding, Gap::OpenClLineTexture), and PushField's
TextureLevels. SlotPlan::border_texels, never set, goes. Tests: engine_identity's expected lookup
is Lookup::Flagged; the search's host-model test runs the element, flagged and entry forms; the
census assertions of sampler.pixel_unnormalized, which no arm names now, go.

Consumer: in reims at 7d016acc9c, and at 8f3ca9df99, nothing names a crate-private item here
(lower and memory are pub(crate)), and the public-item search is the previous commit's.

Nothing compiled changes: no selection reached the deleted arms, no flag was set, and the census
words of every plan are the same, so SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION stay.
runtime-sources.sha256 moves without a RUNTIME_VERSION bump: memory/handles.rs loses constants
and fields nothing set, and metal/sampler.rs, metal/texel_format.rs, metal/format/mod.rs and
bind/heap.rs change in comments and a test. docs/REFUSALS.md regenerates unchanged; the
signature table is unchanged.

Verified, on the CPU with no device:
- m3-max-86179, at the series' tip (the two cleanup commits and the README line): fmt, the
  refusal surface's, the signatures', both coverage docs' and scripts/api-docs' checks, clippy
  (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, private docs (metal2vulkan and
  metal2vulkan-runtime) and doctests pass. The metal2vulkan suites ran 3,492 tests: 3,491 passed,
  24 skipped, and the failure is golden_hashes_match_the_table, which fails at the base too (a
  bless due at the next pin). Validation ran 1,343 tests, all passed, 2 skipped; conformance ran
  1,061, all passed.
- m3-max-86194 and m3-max-86213, at the tip and at its base db7bedc60d: the golden table's changed
  lines are the same 5,114 at both, line for line, so no cell moves.
2026-12-03 16:57:32 -08:00
Anees Iqbal 27a6c1ebd3 Translator and runtime: the interface items no path makes since the resident core went are deleted
0ce2f39b71 deleted the resident core: every device compiles the identity domains, which read a
texture's presence, out-of-bounds alpha, swizzle, border texels and level count, and a sampler's
state, from the resource ID's words. The interface items the resident core stated for them stayed,
with nothing left that makes them:

- SpecKey's Presence, OutOfBoundsAlpha, TextureSwizzle, OffsetBaseAxes, NearestPixelSampler and
  BorderTexels: no lowering declares them.
- RuntimeFact's ResourcePresence, OutOfBoundsAlpha, StorageTextureLevels, StorageTextureLevelViews,
  OpenClLineTexture and BorderTexels: no plan states them.
- PushField::ControlPointIndexOffset: no plan places it. identity_pushes (lower/select.rs) named
  it on its false side; that arm goes, and lower/push.rs's shape arm with it.
- PrecisionNote::F16IntConvDoubleRounding (metal2vulkan-degrade-f16-int-conv-double-rounding): no
  lowering records it. Its catalogue entry in docs/API.md goes, with the conformance crate's
  Degradation and the validation comparison's allowance and reach arms.
- Feature's LocalSize, TexelBuffer and GroupCount: no site constructs them (docs/REFUSALS.md listed
  each with no site). Their reach.tsv rows go.
- CombinedSampler's unnormalized field, with_unnormalized, heap_index and from_heap_index: the field
  was set only from lower::sampler's BindingKey::unnormalized, which no selection sets (none picks
  PixelPosition::Unnormalized or UnnormalizedTexel) and finish() refuses as an invariant, and the
  two index methods had no caller. sampler_use() now makes the use from the comparison and the
  texel class alone. The runtime's DrawInputCause::UnnormalizedSampler and its two checks (a
  constexpr sampler of a draw or dispatch with the field set) go with it.

The device sampler of unnormalized coordinates stays: SamplerUse::unnormalized, vk_sampler's
unnormalized form and SamplerDesc::unnormalized are what the runtime's linear pixel samplers'
twins are made with.

Tests: device/tests/mechanism.rs covers the 56 facts left; the assertions that a plan states none
of the deleted facts, and the spec values set for deleted keys, go; engine_spec_bits labels its
constant SamplerMinLevel; cache/tests.rs's round trip of OffsetBaseAxes goes; api_tests.rs's
SpecializationLayout round trip names SamplerMinLevel.

The consumer names none of them: in reims at 7d016acc9c, and at 8f3ca9df99, git grep finds 0 hits
each for unnormalized, Unnormalized, heap_index, F16IntConvDoubleRounding,
f16-int-conv-double-rounding, LocalSize, GroupCount, SpecKey::, RuntimeFact::, PushField::,
ControlPointIndexOffset, NearestPixelSampler, OffsetBaseAxes, ResourcePresence,
StorageTextureLevel, OpenClLineTexture, BorderTexels and OutOfBoundsAlpha. TexelBuffer's 2 hits
are maxTexelBufferElements and the runtime's TexelBufferTooLarge, DrawInputCause's 1 is
DrawInputCause::Slot, Feature::'s 10 are other variants and another crate's Feature, and
TextureSwizzle's 66 are Metal's MTLTextureSwizzle.

ARTIFACT_FORMAT_VERSION 612 -> 613 (renumbered at landing): the codec's lists are positional, and
SpecKey, PushField, RuntimeFact, PrecisionNote and CombinedSampler lose members. SEMANTICS_VERSION
stays: nothing that compiles changes. runtime-sources.sha256 moves without a RUNTIME_VERSION bump:
device/mechanism.rs loses the arms of the deleted facts, which no run reached. docs/REFUSALS.md and
the signature table are regenerated; the metal and conformance coverage docs regenerate unchanged.

Verified, on the CPU with no device:
- m3-max-86143, at this commit: clippy (plain, all targets and features) passes; the mechanism,
  spec-bits, round-trip and texture-level tests ran 64 tests, all passed, 2,571 skipped.
- m3-max-86179, at the series' tip (the two cleanup commits and the README line): fmt, the
  refusal surface's, the signatures', both coverage docs' and scripts/api-docs' checks, clippy
  (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, private docs (metal2vulkan and
  metal2vulkan-runtime) and doctests pass. The metal2vulkan suites ran 3,492 tests: 3,491 passed,
  24 skipped, and the failure is golden_hashes_match_the_table, which fails at the base too (a
  bless due at the next pin). Validation ran 1,343 tests, all passed, 2 skipped; conformance ran
  1,061, all passed.
- m3-max-86194 and m3-max-86213, at the tip and at its base db7bedc60d: the golden table's changed
  lines are the same 5,114 at both, line for line, so no cell moves.
2026-12-03 16:57:32 -08:00
Anees Iqbal 3e3deb25b9 Translator and runtime: BGR10_XR and BGRA10_XR render targets take Metal's writes, clears, masks and covered blends
The red commit's test, and the conformance cases that render into either format, which the runtime
refused (Gap::TextureFormat on a RenderTarget texture).

Attachments. A BGR10_XR or BGRA10_XR color attachment is its texture's UNORM image
(FormatEmulation::ExtendedRangeUnorm, now admitted as a color attachment and, blended, as a blended
one): A2R10G10B10_UNORM_PACK32, and R16G16B16A16_UNORM with red and blue exchanged. The formats'
second, raw candidate and ExtendedRange::of_attachment are gone; the runtime makes a RenderTarget
texture of either, and a device whose format query lacks the usages is refused the pipeline,
naming them (the runtime's floor does not require R16G16B16A16_UNORM as a color attachment).

Writes (lower::stage_io::extended_unorm_color). A fragment function writes Metal's code of its
output (rounded to half, nearest even, then encoded as a kernel write encodes it) as the field's
value over its maximum, a little above the code (metal::format::extended_unorm_field: 10-bit
(c + 0.0005) / 1023, 16-bit (64 c + 0.25) / 65535), which a device's conversion stores as that code
whether it rounds to nearest, toward zero, by floor(x 1024) or, as lavapipe does for a 10-bit
target, through 16 bits (round(x 65535) >> 6; an offset of 0.25 stored code + 1 for the 251 codes
from 772). BGR10_XR's two alpha bits are written as ones, as Metal writes them. Clears store
Metal's clear codes (metal::format::extended_unorm_clear, the runtime's clear values). Masks are
Metal's on the image's channels (BGRA10_XR's red and blue exchanged; BGR10_XR's alpha bits written
with any color channel). A resolve is the device's AVERAGE of the codes, which average as the
values do; PrecisionNote::DeviceRoundedResolve now names a BGRA10_XR field's low bits. A fetch of
either attachment is refused NotImplemented(Format) at compile, and at link where the function
does not write it.

Blends (pipeline::extended_blend). Metal's blend into these formats, measured on an Apple M3 Max
(macOS 27.0.1) over the xr-blend recordings: the source clamped to the values of codes 0 and 1022
(a NaN to code 0) and alpha to [0, 1], a destination color code to 1022, half arithmetic, the
result rounded to a code. That model is every recorded channel's but 9 of 172,032 (premultiplied
source-over, one code each, listed in the ledger rows). The function clamps its output as Metal's
blend does; a blend that stores its source (one and zero, added) stores the clamped codes exactly.
Any other blends the codes in Vulkan with a source factor of one, the function writing the term
X that makes Vulkan's blend of the codes Metal's blend of the values; destination factors that read
the source read it from a second output (dualSrcBlend, in the floor), BGR10_XR's alpha too, so its
alpha bits stay ones. A factor pair the module does not cover (a BGRA10_XR destination alpha among
them) is refused NotImplemented(Format).

Notes, static per pipeline: PrecisionNote::ExtendedRangeBlend on every blend that does not store its
source (the device rounds each draw's result to the field, a BGRA10_XR field keeping the fraction of
a code in its six low bits); PrecisionNote::ExtendedRangeBlendWindow where the corrected term or a
second-output factor can leave [0, 1], which Vulkan clamps (pipeline::extended_blend::window_holds,
from the factors and operations at the corners of the source's range; a unit test classifies every
factor pair and operation at both formats). Both are in docs/API.md's catalogue with counts, and the
runtime's README records the window as a known gap with its trigger.

Ledger: 18 llvmpipe rows of the B cases that differ (the xr-blend addition and premultiplied
source-over, xr-gamut, the blended xr-gradient and xr-masked over draws, and xr-gradient's
unblended resolve), each citing its note, with counts from a model of our blend whose count of
differing elements is lavapipe's replay's to within 11; and the same cases' rows on the RTX 3090
(NVIDIA 620.70.06, m3-max-85796; there xr-gradient-bgra10xr-unblended-x1 too, 39 fields a code
off by the device's arithmetic of the gradient), the RX 7900 XTX (m3-max-85797) and the Iris Xe
(m3-max-85798), each pointing at the case's llvmpipe row, with that device's counts.

Cache key: LoweringInputs::extended_unorm_colors is hashed into the function key where it is set
(pipeline::compile::key), so a fragment function compiled for a BGR10_XR or BGRA10_XR attachment
never takes another's translation; the key test asserts that the attachment and the format each
change the key.

SEMANTICS_VERSION 2378 and ARTIFACT_FORMAT_VERSION 612. RUNTIME_VERSION 2577 (XR render targets
are made); runtime-sources.sha256 re-pinned. api_signatures blessed and
api_surface extended (ExtendedUnormBlend, ExtendedUnormColor, extended_unorm_clear);
docs/REFUSALS.md regenerated (the fetch's refusal site).
2026-12-03 16:18:20 -08:00
Anees Iqbal e9290d8138 Runtime tests: BGR10_XR and BGRA10_XR render targets store Metal's codes (red)
An arm64 guest walk met render pipelines and passes into MTLPixelFormatBGR10_XR (554) and
MTLPixelFormatBGRA10_XR (552); the runtime refuses a texture of either with RenderTarget usage
(Gap::TextureFormat), so no pass draws into one.

every_device_renders_extended_range_targets_as_metal_stores_them, on every device of the cfg's
kind, for both formats in Shared and Private storage (a Private target read back by a blit into a
buffer): a pass clears an 8 by 8 target to Metal's specials and code boundaries and the words come
back as Metal's clear stores them; rt6_samples' half4 fill over 64 values across and past the
codes' range (a NaN, the infinities, the ends) draws unblended, then blended with Metal's default
factors, one and zero, and each texel holds Metal's store (unblended: the half's code; blended: the
source clamped to codes 0 to 1022, a NaN to code 0, alpha to [0, 1]); over a Shared BGR10_XR target
whose words' two top bits are zero, a draw under straight alpha-over leaves those bits ones, as
Metal's store writes them.

The ledger's refused rows of the conformance cases that render into either format, which this
change's fix makes run, go: xr-draw, xr-clears, xr-clear-routes, xr-masked, xr-blend, xr-gamut,
xr-gradient and xr-unwritten, BGR10_XR and BGRA10_XR without sRGB (168 rows); the sRGB twins' and
the two-plane forms' stay. Coverage regenerated.
2026-12-03 16:18:20 -08:00
Anees Iqbal 549ab0ac23 Runtime: a draw that reads the depth through a range past [0, 1] goes through a depth range twin
The partial fix draws through a viewport depth range past [0, 1] where
nothing reads the depth, and refuses every other draw (DrawKind::Viewport).
Metal draws those too (M3 Max, macOS 27.0.1, job m3-max-85617). It reads
[[position]].z = znear + z * (zfar - znear) unclamped. It stores that, and a
[[depth]] output, clamped to [0, 1], and tests the clamped value. Clip
space's 0 <= z <= w clips whatever the range. Vulkan takes no such range
without VK_EXT_depth_range_unrestricted, which the floor does not have.

The translator commits before this one build the fold:
LoweringInputs::depth_range_fold. Under it, the vertex function stores
znear * w + (zfar - znear) * z as its z, from PushField::DepthRangeFold. It
stores z and w - z as two clip distances after its own. Under
depthClampEnable with the viewport at [0, 1], that clips, reads, stores and
tests what Metal does. This commit draws through it.

- RenderCompiled keeps what its content was made for (arrays, words, srgb)
  and a OnceLock'd twin. depth_range_twin lowers the content's descriptor
  again for the same inputs under VariantKey::depth_range_fold
  (lowered_content, factored out of render_pipeline_state). It is made at
  the first draw that needs it, counted (Metrics::depth_range_twins), and
  timed as a make at encode. It is held as long as its content, and no map
  keeps it. The translator's refusal of it is kept, so a later draw answers
  it without lowering again. That refusal is the clip-distance limits.
- RenderPipelineState::folded gives the twin's state, its samplers numbered
  at the state's indices, cached in RenderInner. It refuses (Viewport) a
  vertex function the consumer compiled, and a twin that stores no fold.
- Fixed::fold (RuntimeFact::DepthRangeFold) makes every VkPipeline of the
  twin take depthClampEnable. draws() takes the fact, and the vertex push
  field as FieldValue::DepthRangeFold. fill_push writes the first
  viewport's [znear, zfar - znear] as f32 bits.
- The encoder's route (in place of draws_refused) is found when the
  pipeline state, the viewports or the depth clip mode are set. A draw
  reads one field, as before.
  - Under a past range that the pass's depth attachment or the fragment's
    [[position]] z or w reads, draws go through the twin.
  - The route refuses under the Clamp mode, and for a function that writes
    [[viewport_array_index]] while the viewports set have different ranges.
  - Only the viewports a draw reaches count: the first, or every one set
    for a function that selects.
  - bind_content composes the twin with the content for the draws' bindings
    (for_draws). The viewports are recorded at [0, 1] while folded.
- RenderCommandEncoder::DEPTH_RANGE_NOTE (DeviceArithmetic) is the static
  note of every draw through a twin. The docs/API.md catalogue says so.

Bounds: a twin holds at most 8 VkPipelines (Clip mode only), and 8 more for
its words twin, so a content holds at most 48 where it held 32, for its
life.

Docs: set_viewport, DrawKind::Viewport, Metrics::translations_at_encode,
and the runtime README's paragraph, Gap::Draw list and a known gap. The
known gap gives the first draw's stall, the twin's pipelines, the limit
refusal and the two refusals. REFUSALS.md and api_signatures.tsv are
regenerated. api_signatures also takes the translator rows of the commits
before (VariantKey and LoweringInputs depth_range_fold, PushField and
RuntimeFact DepthRangeFold). RUNTIME_VERSION 2576. The
runtime-sources pin does not move (pin-compute).

Verified: the READY gives the job lines (red at the commit before, green
here, on lavapipe and an RTX 3090; clippy in three configurations;
rustdoc).
2026-12-03 16:18:19 -08:00
Anees Iqbal f7c56cd4d2 Translator: a vertex function under the depth range fold folds the range into its position
Under LoweringInputs::depth_range_fold, a vertex (or post-tessellation
vertex) function that stores its position does three things at each
return:
- it stores the position's z as znear * w + (zfar - znear) * z, reading
  [znear, zfar - znear] from PushField::DepthRangeFold;
- it stores z and w - z, of the z it returned, as two clip distances
  after its own;
- it records PrecisionNote::DeviceArithmetic.

Drawn with the viewport's depths [0, 1] and depth clamping enabled, this
maps a viewport depth range past [0, 1] as Metal maps it (the M3 Max, jobs
m3-max-85541 and m3-max-85617): [[position]].z reads znear + z / w *
(zfar - znear) unclamped; the depth stored and tested is that, clamped to
[0, 1] by the clamp; and the clip distances keep Metal's 0 <= z <= w where
the clamp leaves z unclipped.

Planning:
- The function's own ClipDistance array is declared two longer, with its
  own elements stored as before.
- A function with none declares ClipDistance of 2 (shaderClipDistance).
- Under the fold the declared count must fit maxClipDistances and
  maxCombinedClipAndCullDistances, else Unsupported names
  Feature::ClipDistance and the limit.
- The usual path's check (maxClipDistances alone) is unchanged.
- A function that stores no position, and any other stage, compiles as
  without it.

docs/API.md's DeviceArithmetic entry says the fold records it on every
such compile and why. SEMANTICS_VERSION 2377 and ARTIFACT_FORMAT_VERSION
611 (a new push field and fact). runtime-sources.sha256
takes the translator's new sources, including the commit before's.

Verified: see the twin's READY job lines (the red tests at the commit
before fail, pass here).
2026-12-03 16:18:19 -08:00
Anees Iqbal f43cff7e76 METAL-COVERAGE: the sparse tile sizes and region conversions are sparse tiles, not tile pipelines
Six MTLDevice items were filed in the coverage map as tile render pipelines ("tile render
pipelines; metal2vulkan-runtime makes none", size L, group tile): sparseTileSizeInBytes,
sparseTileSizeInBytesForSparsePageSize:, the two sparseTileSizeWithTextureType:pixelFormat:
sampleCount: forms and convertSparsePixelRegions:toTileRegions:... and
convertSparseTileRegions:toPixelRegions:.... They answer a sparse texture's tile size and convert
regions between pixels and its tiles, and have nothing to do with tile render pipelines. They now
read "sparse tiles", size S, group sparse, as MTLTexture.firstMipmapInTail, tailSizeInBytes and
isSparse already do; that group's name, "placement sparse page sizes", becomes "sparse page and
tile sizes", which it held already with those three. The tile render pipeline group keeps its
other 20 items.

docs/METAL-COVERAGE.md is regenerated: missing by size S 178 -> 184 and L 313 -> 307, the sparse
group 5 -> 11 items, the tile group 26 -> 20; the status totals do not move.

Verified, on the CPU with no device: scripts/metal-coverage/coverage.py --check reads the document
current; the table's status counts, which the validation suite's
the_coverage_documents_totals_are_the_tables compares with the document, are unchanged, and every
missing row keeps a size and a group.
2026-12-03 16:18:18 -08:00
Anees Iqbal 8bc3ad5e86 Runtime: Gap::CubicSampler goes
The runtime never raises it: Device::new_sampler_state makes a Cubic filter
(MTLSamplerMinMagFilterCubic, Metal's undeclared raw value 2) and filters it as nearest. The variant
stayed only because the consumer named it. The consumer's public tip no longer does: `git grep -n
CubicSampler 7d016acc9c` in reims-vgpu (its pin V move, push #97) has 0 hits.

The basis tests that used it as their Ours example use Gap::MemorylessTexture, also Ours.
docs/REFUSALS.md regenerated (the runtime's Gap: 31 -> 30 variants); api_signatures blessed (one
variant row out). RUNTIME_VERSION unchanged: no run of an artifact does anything else, since the
variant was never raised. runtime-sources.sha256 is unchanged: the runtime crate's error.rs is not one of
its inputs (computed equal, 1ab29fff…).
2026-12-03 16:18:18 -08:00
Anees Iqbal bb7661f09a Conformance ledger: the linear pixel-samplers slot rows of five cards and lavapipe's rgba8 pair read the exact form
A linear runtime pixel sampler's slot site hands the bound state's unnormalized twin the
coordinate itself at the texture's level-0 element. So each card's slot digest moves off the one
its normalized sampler gave at x / N.

Answers change on the 6 slot rows (rgba8 and rgba16f linear edge, zero and border) of:
- RX 7900 XTX (m3-max-85879, RADV 26.2.6)
- RTX 3090 (m3-max-85881, 620.70.06)
- 780M (m3-max-85882)
- RX 550 (m3-max-85883)
- Iris Xe (m3-max-85938, Mesa 26.2.6)

Each digest comes from that card's replay of the 20 pixel-samplers cases at 82b6989d59. The linear
arm is unchanged by 9cc5655c57. Every row of those cases at those venues takes a text naming the
new grouping of the four sources' digests. Answers change on slot rows alone: 32 rows, checked
against the parent's ledger.

On the 3090 (m3-max-85937, the same build with each source's results dumped), slot is nearer
Metal's answer than the normalized sources in every linear case. For example, rgba16f edge: slot
differs from Metal at 24 of 800 coordinates by at most 0.0142, the others at 45 by at most
0.0215.

lavapipe's two rgba8 rows (linear zero and border, case/output/slot) move to 7423f6db70a5. This is
the exact form's change, not an image change:
- The pinned-lavapipe check m3-max-85860 (msi's Mesa 26.2.4, LLVM 23.1.1) gives that digest.
- The merged check m3-max-85692 counted the same 4 drift lines among its 10, at the same product
  code (3777af5b7a changes a test alone).
- Mesa 26.2.6 (m3-max-85845) gives it too.

Per element (85845's dumps, same sha256), slot differs from norm at 79 of 800 coordinates by at
most 2.35e-7, and from Metal's at 489 where norm does at 495, each by at most 0.00181. That is the
device's filter at Metal's coordinate. So the pin and the ledger's "# llvmpipe:" line stay.

No nearest or subnormal row changes. 9cc5655c57 keeps a nearest runtime pixel sampler's texel
centre, as shipped.

Coverage regenerated (scripts/conformance-coverage/coverage.py).
2026-12-03 16:17:59 -08:00
Anees Iqbal c99bf0c6c3 Translator and runtime: a nearest runtime pixel sampler keeps its texel centre; only linear takes the level-0 arm
The exact arm hands the device's unnormalized sampler Metal's coordinate itself. Under a linear
filter that is the device's own filter at Metal's coordinate (DeviceSampling). Under a nearest
filter it moves texel selection onto the device sampler's own handling of the coordinate, and the
pixel-samplers replays at 82b6989d59 show new slot divergences where the cards matched Metal
before:
- RX 550 (m3-max-85883): rgba8 and rgba16f nearest-zero and -border.
- RTX 3090 (m3-max-85881): subnormal-zero and -border.

Metal's recorded answers for the subnormal cases read texel -1 at a negative subnormal and texel 0
at a positive one, so no flush of a subnormal to 0 is taken.

What changes:
- SamplerWord::reads_unnormalized holds only for pixel coordinates with linear min and mag filters
  (no mip filter, isotropic, s and t clamped), the descriptor's unnormalized_reads of linear
  filters.
- The shader's level-0 test compares the word's filter bits with UNNORMALIZED_LINEAR alone.
  Two instructions fewer per test.
- A nearest word takes the form shipping before the series: the texel's centre over the size.
  A gather through a nearest word takes x / N with its PixelSamplerScaling note, as before the
  series.
- The runtime makes twins, and holds level-0 elements, only for linear states.
- SamplerWord::UNNORMALIZED_NEAREST is deleted. This series added it and nothing reads it now;
  it is not on development.
- a_words_unnormalized_reads_are_its_descriptors now pairs the word with the descriptor's
  unnormalized_reads of linear filters: 9 descriptors, linear with linear over 3 by 3 modes.
- Docs: the predicate's filters in docs/RESOURCE-ID.md and the runtime README; the sampler
  module's pixel-coordinate list names the level-0 arm. The conformance pixel_samplers module
  doc is corrected: a const site under the identity domains reads a normalized sampler, a linear
  slot site the twin. SEMANTICS_VERSION 2376 and RUNTIME_VERSION 2575 (a nearest word's arm and
  the runtime's linear-only twins and level-0 elements); the runtime-sources pin is recomputed.

Checks: red d9abcdde67 holds only_a_linear_pixel_samplers_word_reads_unnormalized. This commit's
gate and the family's card replays are named in the ledger commit that follows.
2026-12-03 16:17:59 -08:00
Anees Iqbal 82b7d9e4a2 Conformance ledger: the llvmpipe rows of three rgba16f pixel-samplers cases read the exact form
The exact form (86b5171e25) hands a runtime pixel sampler's coordinate itself to the device's
unnormalized sampler through the texture's level-0 element, where `arg`, `norm` and `const` (a
constexpr pixel sampler, normalized under the identity domains) hand its normalized sampler the
coordinate over the size. lavapipe filters RGBA8 at 8-bit weights, where both coordinates read
one answer, but weighs an RGBA16Float texel pair at its own sub-texel precision, so the `slot`
site of pixel-samplers-rgba16f-linear-edge, -zero and -border answers its own digest; mirror stays
on the normalized path and nearest reads the same texel either way.

My miss: group C's gate replayed only the pixel-downscales cases on lavapipe, not the
pixel-samplers family, which also samples through a runtime pixel sampler; the staged check
(job m3-max-85692, lvp_conf on the pinned lavapipe) found the three rows stale.

Checked per element (job m3-max-85845, lavapipe Mesa 26.2.6, the same slot digests as 85692's
pinned 26.2.4), each source's 800 results against Metal's recorded answers: `slot` differs from
`norm` at 107 (edge) and 81 (zero, border) of 800 coordinates, by at most 1.31e-6, 81 and 55 of
them nearer Metal's answer and 21 farther; the largest difference from Metal's, 0.0107, is the
same for every source. RGBA8 and mirror: `slot` equals `norm` bit for bit on edge and mirror.
The device's filter at Metal's coordinate (rule 1, note device-sampling). Each case's four
llvmpipe rows take the new text; the slot rows take the new digests.
docs/CONFORMANCE-COVERAGE.md is regenerated.
2026-12-03 16:17:58 -08:00
Anees Iqbal 69a3254e1a Precision note: device sampling names its unnormalized sampler's sub-texel step
The exact form hands a pixel sampler's coordinate as given to the device's unnormalized sampler,
and on RADV that sampler's sub-texel step is not Metal's. PrecisionNote::DeviceSampling's doc and
its API.md catalogue entry now carry the measured bound.

Measured on seven linear downscales by 8 (the pixel-downscales cases' textures) at 306a517dc4,
against Metal's answers recorded on an Apple M3 Max:
- RADV, Mesa 26.2.6 (RX 7900 XTX job m3-max-85100, Radeon 780M job m3-max-85101, RX 550 job
  m3-max-85161): at 172,665 coordinates whose x - 0.5 lies at a half step of the 1/256 grid on
  both axes, the even steps (86,333) all differ from the normalized control at Metal's step and
  the odd ones (86,332) none: round half to even where Metal rounds half up; the largest
  difference is 1.906/255. At the case's 172,665 coordinates 2^-21 apart, 1.5% differ, 0.945/255.
- NVIDIA 620.70.06 (RTX 3090) and ANV Mesa 26.2.6 (Iris Xe), job m3-max-85099: the slot equals
  the normalized control at Metal's step bit for bit at every coordinate.
- KosmicKrisp (Apple M3 Max), job m3-max-85028: Metal's answer bit for bit.
- lavapipe Mesa 26.2.4 (job m3-max-85083): within 1.375/255 in the compared windows.

The remainder is the device's: the same module answers Metal on KosmicKrisp, and the coordinate
reaches the sampler unchanged. pipeline/artifact.rs is not a runtime input; the runtime-sources
pin is unchanged.
2026-12-03 16:17:58 -08:00
Anees Iqbal ed46bdbfc5 Conformance ledger: the pixel-downscales rows of six venues read the exact form
The texture slot's runtime pixel sampler (`slot`) now samples the texture's level-0 element
through its state's unnormalized twin at the coordinate as given, so its answers moved. Each
venue's rows are rewritten from a clean replay of the seven cases at 306a517dc4 (the product
code of this tip), with new waiting-on texts:

- NVIDIA (RTX 3090, 620.70.06, job m3-max-85099) and Iris(R) Xe (Mesa 26.2.6, same job): `slot`
  answers the argument buffer's normalized control's (`norm`) digest at every set, bit for bit
  over every element (the probe's dumps, 172,665 a set).
- RX 7900 XTX (job m3-max-85100), 780M (alone on its node, job m3-max-85101) and RX 550 (job
  m3-max-85161), RADV Mesa 26.2.6: `grid` and `ulp` answer Metal's digests; at `frac` `norm` lies
  within 0.031/255 of Metal's and `slot` within 0.95/255, 1.5% of the samples at another sub-texel
  step. The probe's half-step set shows RADV rounding a half step of the 1/256 grid to the even
  step where Metal rounds up (every even one of 86,333, none of the 86,332 odd), the device's own
  arithmetic: the same module answers Metal bit for bit on KosmicKrisp (job m3-max-85028).
- llvmpipe (Mesa 26.2.4, LLVM 23.1.1, the pinned image's; job m3-max-85083): `slot` and `norm`
  answer one digest at `grid` and `ulp`; at `frac` `slot` lands within 1.375/255 of Metal's in
  the compared windows, `norm` within 1/255.

No row says ours. docs/CONFORMANCE-COVERAGE.md is regenerated
(scripts/conformance-coverage/coverage.py).
2026-12-03 16:17:58 -08:00
Anees Iqbal 24cb048066 Conformance ledger: the pixel-downscales rows of the Apple M3 Max go
The texture slot's runtime pixel sampler now samples through the level-0 arm, at the coordinate
itself, so on KosmicKrisp (Apple M3 Max), whose filter is Metal's, the seven pixel-downscales
cases are announced with no divergence at any set: the 18 frac/slot rows of that venue no longer
diverge ("it now matches", job m3-max-85022, a clean replay of the seven cases on KosmicKrisp at
28d28599bd). docs/CONFORMANCE-COVERAGE.md regenerated.
2026-12-03 16:17:57 -08:00
Anees Iqbal 43f22a5661 Docs, versions and API tables: the level-0 elements and unnormalized twins
The runtime's README describes set 1's sampled-image array of 196,608 elements (textures, second
elements, level-0 elements) and the plain sampler array's 8,000 unnormalized twins, the level-0
element written at the first dispatch or draw that samples a texture through a state that reads
unnormalized (Gauges::level_zero_views), the floor's limits (sampled images 262,144, samplers
32,000, per-stage resources 458,752, all pools 490,752; Vulkan's least with descriptorIndexing is
500,000), and attachment reads on every device. docs/RESOURCE-ID.md gives the two ranges, the word
test and what a consumer laying the arrays out itself writes; an argument buffer's sampler still
scales a pixel coordinate. The API signature table is blessed and api_surface names the two consts.

Versions: SEMANTICS_VERSION 2375 (slot pixel samples gain the exact arm, and the interface's
level_zero_samplers), ARTIFACT_FORMAT_VERSION 610 (TextureSlot's codec gains level_zero_samplers),
RUNTIME_VERSION 2574 (set 1's sizes, twins, level-0 elements and the floor's limits).
REFUSALS.md regenerated with no change.
2026-12-03 16:17:56 -08:00
Anees Iqbal 8f69218029 Translator and runtime: a runtime pixel sampler samples at x itself through the level-0 element
The planner's group C ruling: a sample or gather through a runtime sampler slot whose state reads
unnormalized coordinates takes Metal's coordinates as they are, not scaled into normalized ones.

Translator: a slot sample or gather of a 1D or 2D texture, not an array, not multisampled, not
depth, with no compare, no residency, no footprint and no offset base, through [[sampler(n)]],
n < 16, records the sampler in TextureSlot::level_zero_samplers and branches on the sampler's word
(SamplerWord::reads_unnormalized: PIXEL with nearest or linear filters, clamp-to-edge or
clamp-to-zero or clamp-to-border s and t) and on the texture index (below 65,536). The exact arm
hands x itself, moved by its offset, at explicit level 0, to the sampler's unnormalized twin
(plain sampler element index + UNNORMALIZED_TWIN_ELEMENT) and the texture's level-0 element
(sampled element index + LEVEL_ZERO_ELEMENT); every other word runs the existing path.

Runtime: set 1's sampled array holds 3 x 65,536 elements (textures, seconds, level-0) and the
plain sampler array 16,000 (states, then their twins). A state whose word reads unnormalized
writes its unnormalized twin. A texture of one 1D or 2D layer writes its level-0 element at the
first dispatch or draw that samples it through such a state: its own sampled view for one level,
else a view of its first level it owns (Gauges::level_zero_views), released with the texture.
The floor's limits grow to hold the arrays (sampled images 4 x 65,536, samplers 32,000), which
every second element now fits, so Capabilities::attachment_reads is always true.
2026-12-03 16:17:56 -08:00
Anees Iqbal 5bfaa69869 Translator: BGR10_XR and BGRA10_XR textures leave the raw-held forms
With their textures held as the UNORM codes of their bits (the previous commit),
ExtendedRange::of no longer names MTLPixelFormatBGR10_XR (554) or MTLPixelFormatBGRA10_XR (552).
Their srgb=false forms stay for the two live uses that hold raw codes: a texture buffer's words
(texel_words builds Bgr10/Bgra10 { srgb: false } itself; the words path decodes and encodes them
through lower::arith::extended_range) and, until their render targets are built, a render
pipeline's colour attachment (ExtendedRange::of_attachment, through the formats' second, raw
candidate; the pipeline is made as before, and no pass draws into one).

- ExtendedRange::HEAP_READ drops them (7 to 5): an argument buffer's 552 or 554 texture is an
  element of the sampled float class, read through the step's arm (its handle's bit 30), not raw
  in the unsigned integer class (bind::heap::raw_held). The heap's class layout loses the two
  extended entries.
- texel_format::crosses_classes still excludes them (metal::format::extended_unorm), and a heap's
  storage element of one is still refused NotImplemented(ArgumentBufferTextures).
- The attachment sites (color_writes' extended_range_colors and merges_extended, link's fetch
  refusal, bfloat blend, written and unwritten attachments, alpha-to-coverage, stage_io's missing
  attachment, write_conversion) read ExtendedRange::of_attachment: every answer for a 552 or 554
  attachment is the one before.
- The extended-range sRGB twins and the two-plane forms keep their raw paths (RGB10A8_2P_XR10's
  goes with its two images).

Tests: the format table test asserts both formats' first candidate is ExtendedRangeUnorm with no
raw-held form, an attachment form, a raw second candidate, and no cross-class read; a new runtime
test samples a BGRA10_XR texture through an argument buffer's half member and a BGR10_XR one
through its float member (examples/heap_samples' hs_sample, a constexpr and a slot sampler).

Consumer search (reims-vgpu at 35cea45c0e, *.rs, *.c, *.h): 0 hits for HEAP_READ, heap_read(,
ExtendedRange, "Bgr10 {", "Bgra10 {", WordLayout::Extended, texel_words and crosses_classes;
ExtendedRangeColor appears only in crates/reims-vgpu-c/link-order.txt. Formats still reaching
the raw-held path: the extended-range sRGB twins, the two-plane forms, the padded R10X6/RG10X12
forms and their twins, RGB10A2Unorm_sRGB and the bfloat forms.

SEMANTICS_VERSION 2374 (the heap's class layout and its reads). ARTIFACT_FORMAT_VERSION unchanged
(no encoded type changes). RUNTIME_VERSION 2573 (bind's heap class layout); runtime-sources.sha256 re-pinned.
api_signatures blessed: ExtendedRange::HEAP_READ is [ExtendedRange; 5] (a consumer indexing its
two first entries breaks; none in the consumer). REFUSALS.md unchanged.
2026-12-03 16:14:42 -08:00
Anees Iqbal 58988c6b83 Translator and runtime: BGR10_XR and BGRA10_XR textures are held as the UNORM codes of their bits and read as Metal's values
An arm64 guest walk met MTLPixelFormatBGR10_XR (554) and MTLPixelFormatBGRA10_XR (552), which the
runtime refused (Gap::TextureFormat): the translator held them raw in an integer format whose
values the identity domains do not convert.

A texture of either is now held in the UNORM format of its bits (FormatEmulation::ExtendedRangeUnorm):
BGR10_XR in A2R10G10B10_UNORM_PACK32, bit-identical, its alpha read as one; BGRA10_XR in
R16G16B16A16_UNORM, viewed with red and blue exchanged. Copies, blits, getBytes and replaceRegion
move Metal's bytes unchanged. The emulation is admitted for sampling, linear filtering and min/max
reductions; a device whose format query lacks the usage is refused the texture. The runtime's form
admits it.

Every float or half sample, gather and read of a sampled colour image (lower::texture::extended_unorm)
tests the texture's word: a slot's pushed resource ID word, format (word >> 16) in 552..554; an
argument buffer member's handle, which now carries the word's low bits and bit 30 where the word
names one of those formats (AccessPlan::heap_extended). Where it does, each lane holding a channel's
code (the word's border-texel bits: code lanes, and alpha lanes) is mapped from the field's value u to
Metal's (c - 384) / 510: w = u * m (m = 1023, or 65535 / 64), a read's and a gather's code taken
whole (a 16-bit field's floor(w + 1/128), whatever its low 6 bits hold; a 10-bit field's nearest
code, floor(w + 1/2), as NVIDIA's gather on the RTX 3090 widens a 10-bit code by replicating its
bits, (c << 6 | c >> 4) / 65535, up to 0.015 of a code low, m3-max-85756), alpha clamped to [384, 894], and the quotient formed as n * KH + n * KL
(KH + KL the f32 split of 1/510), which rounds once to Metal's correctly rounded value at every code,
fused or not (unit tests over all 1024 codes of both formats, and of a replicated 10-bit code). The difference, both products and the sum are
decorated NoContraction: lavapipe otherwise factored the sum into n * fl(1/510), which misrounds 572
of the codes (the first try replay's reads one f32 step off at exactly the codes that misround). A read the device's robustness bounds
tests its operands inside the branch and reads a code lane outside as 0, Metal's out-of-bounds texel.
A sample is the device's filter of the codes, which the affine map keeps. On a real card a
nearest sample is Metal's value exactly: the RX 7900 XTX's every nearest sample of both formats,
m3-max-85664. Lavapipe converts a field by its reciprocal, c * fl(1 / (2^b - 1)), as
PrecisionNote::DeviceTexelConversion records, and the map keeps that: its nearest sample of
BGRA10_XR's code 602 is four f32 ulps from Metal's (m3-max-85482, LLVM 23.1.1; m3-max-85612, LLVM
23.1.4). The runtime test compares nearest samples exactly, on lavapipe (cfg m2v_cpu_icd) against
lavapipe's conversion so mapped.

A render pipeline with a 552 or 554 colour attachment is made as before, through the formats'
second, raw candidate (R32_UINT, R16G16B16A16_UINT; emulation ExtendedRange): their render targets
are not built, and a texture of either with RenderTarget usage takes that candidate, which the
runtime refuses (Gap::TextureFormat), so no pass draws into one. A storage element is not built
(the storage choice refuses the emulation).

Not built (the runtime's known gaps, docs/API.md): a sample past the edge through a border address
mode reads the device's border in code space (opaque white 1.2529, BGRA10_XR's 1.2549; black
-0.7529); a linear sample of a BGRA10_XR texel whose fields' low 6 bits are set filters them in
(within 63/64 of a code step); every float sample, gather and read of a sampled colour image pays
the word's test and branch.

SEMANTICS_VERSION 2373 (module words: the arm, the handle's bits). RUNTIME_VERSION 2572 (a run views an
extended-range format held as its UNORM codes); runtime-sources.sha256 re-pinned. api_signatures
blessed: FormatEmulation::ExtendedRangeUnorm added
(a consumer matching FormatEmulation exhaustively meets a new variant; the enum is non_exhaustive).
REFUSALS.md unchanged.

The ledger's llvmpipe rows for extended-swizzles-bgr10xr gain the four border sites (0ag1/g2,
0ag1/sl, 0ag1/sn, ar10/g1) the replay on lavapipe at the CI pin (Mesa 26.2.4, LLVM 23.1.1) shows,
m3-max-85482, and its BGRA10_XR rows of nearest and linear samples name the low-bits gap beside
the border's: most of the case's random fields hold low bits, which a sample filters in. Lavapipe's
conversion shows at none of the case's elements (each texel's fields checked against lavapipe's
reciprocal conversion). Coverage regenerated.
2026-12-03 16:14:41 -08:00
Anees Iqbal 5d628eeee8 Tests: BGR10_XR and BGRA10_XR textures are made and read as Metal's values (red)
The runtime refuses a texture of MTLPixelFormatBGR10_XR (554) or MTLPixelFormatBGRA10_XR (552)
(Gap::TextureFormat): the translator holds them raw in an integer format whose values its identity
domains do not convert. An arm64 guest walk met them.

A new runtime test, every_device_reads_samples_and_gathers_extended_range_values, makes a 4 by 2
texture of each, holding codes at the ends, at the values 0 and 1, and alphas outside [0, 1], with
the bits Metal does not read set in every other texel, and through the owned fixture
fpv_swizzled_reads checks: the bytes come back from getBytes as replaceRegion wrote them; a read
and a nearest sample of each texel answer (c - 384) / 510 correctly rounded, alpha clamped to
[0, 1] and BGR10_XR's alpha 1; a gather of each component answers its four texels; a linear
sample between four texels answers the mean of their codes' value within 1e-3; and through a view
of the swizzle alpha, blue, zero, red each lane its source.

The conformance ledger drops the refused rows of texture-round-trip-552 and -554,
fresh-pattern-552 and -554, and extended-swizzles-bgr10xr and -bgra10xr, whose textures are made
next; the coverage doc is regenerated.

Red: the test fails at new_texture with the refusal, and the six cases' replays fail on the
unlisted refusal, until the next commit.
2026-12-03 16:14:41 -08:00
Anees Iqbal 41438f2693 Translator: a depth cube's read by face samples its cube view, as a colour cube's does
A read of a depth cube or depth cube array by face (depthcube<float, access::read>'s
read(coord, face, lod), air.read_depth_cube and air.read_depth_cube_array) was refused on every
profile, Unsupported{IdentityDomains; NotImplemented}: the read kept the 2D-array view
(RuntimeFact::ImageViewShape), which the identity arrays hold no element of. The resident tables
built it before the cutover to the one form, and that commit deleted its interpreter test with
them; the runtime's README listed it as a known gap.

A colour cube's read by face already samples its cube element, the texture's cube view, at the
texel's centre and the read's explicit level through element 0 of the plain sampler array (the
default sampler, nearest, every level), its operands tested in the shader. A depth cube's element
is its cube view of the depth, which that plain float sampler samples without a comparison as a
depth cube's sample() does, the depth the sample's first component. So slot::samples_cube_element
no longer excludes a depth shape: the read takes the same form, and the slot states no
ImageViewShape.

Tests:
- engine_texture's an_identity_cube_read_by_face_samples_its_cube_element compiles
  unk_read_depth_cube too, on every identity profile: L3 passes, no ImageViewShape fact, its two
  textures from the sampled float depth cube and depth cube-array classes, its sampler from the
  plain array, OpImageSampleExplicitLod and no OpImageFetch. Red with slot.rs at the base.
- The runtime's tests::cube_reads gains cr_depth (a Depth32Float depth cube of three levels) and
  cr_depth_array (a depth cube array of two cubes and two levels): every texel of every face,
  level and cube reads its uploaded depth bit for bit, and each read outside the texture reads 0.
- scripts/qualify-public-cases, CI's step, qualifies the public case
  depth-cube-and-cube-array-reads-at-32-and-16-bit-coordinates (3 x 3 depth textures, every
  texel of every face and cube, depths over many binades) on lavapipe against its Apple M3 Max
  observation.

Docs: lower::texture's module docs, slot.rs, emit.rs, API.md and RESOURCE-ID.md say a depth
cube's read by face samples its cube view; the runtime README's known gap loses the depth cube
read and names it lowered. engine_texture_unk's module docs no longer claim an interpreter run of
the depth cube reads.

Engine inventory: engine/unk_read_depth_cube.ll moves from Unsupported{IdentityDomains;
NotImplemented} to ok on all 15 profiles; its .air.ll twin moves at the M3 bless.
SEMANTICS_VERSION 2365 -> 2367 (a placeholder, renumbered at landing): the fixture's 15 golden
cells, one a profile, change from the refusal to modules, and no other cell moves. The golden
table and the authored compile census (the case's row, not_supported today) are re-blessed on
development.

Verified, at this commit's tree on 6459eaa946 (rebased since onto the sparse path's deletion,
whose only overlap is the SEMANTICS line):
- m3-max-85654, on the CPU with no device: the engine inventory's eight llvm_as parts differ
  from the table by nothing (the row moved with the change). Red, with slot.rs at the base:
  an_identity_cube_read_by_face_samples_its_cube_element fails at the depth cube; green: it and
  the 20 other cube tests of the translator pass. The golden table's cells: 105 change at this
  commit, the base's 90 (development's, blessed since) and unk_read_depth_cube's 15, the two lists
  otherwise equal. The refusal surface's check, fmt, signatures, clippy (plain, --cfg m2v_gpu,
  --cfg m2v_cpu_icd), Rustdoc, private docs, doctests and scripts/api-docs pass; the metal2vulkan
  suites ran 3,471 tests: 3,470 passed, 24 skipped, and the failure is
  golden_hashes_match_the_table, whose table is blessed on development; validation ran 1,344
  tests, all passed, 2 skipped; conformance ran 1,053, all passed.
- m3-max-85654, on devices: the runtime's every_device_reads_a_cube_by_face_as_its_texels, with
  the depth cube and depth cube array rows, passes on lavapipe (llvmpipe, LLVM 23.1.1, 256 bits,
  m2v_cpu_icd) and on the RTX 5080 Laptop GPU (m2v_gpu).
- m3-max-85654, CI's lavapipe image: scripts/qualify-public-cases exits 0, every case's slot
  current, the depth cube case's among them.
- m3-max-85857, on the CPU with no device, at this commit on the sparse path's deletion: clippy
  of the workspace (all targets and features) passes, and the 34 cube and engine-inventory tests
  of the translator all pass.
2026-12-03 16:14:41 -08:00
Anees Iqbal ee45758ba9 Translator: a sparse read through a sampler reads its texel, resident
Metal 4.1's sparse_read(sampler s, coord, offset, lod), a read through a sampler whose function
observes bit 0 of its status word (sparse_color::resident()), was refused in the texture family
(Unsupported{Lowering(Texture); NotImplemented}): what a sampler's addressing does to the residency
of a sparse texture's texels was unmeasured, the M3 having read only a texture that is not sparse.
With an observed residency now the constant resident word and the runtime making no sparse
texture, the question is Metal's answer over a texture that is not sparse, through each kind of
addressing, inside the texture and outside it.

Measured, with the new owned fixture engine/a2_sparse_read_through (a texture2d<float> read at
p[i] through constexpr clamp_to_edge, clamp_to_zero, clamp_to_border of opaque white, and repeat,
storing each colour and each resident()), over a 4x4 RGBA32Float texture of two levels at twelve
positions: inside the texture, one and several texels past each edge, at level 1, and at levels 2
and 5, past its last. On the Apple M3 Max (macOS 27.0.1), plain and under Metal's validation layer
(which reported nothing), every residency is resident, at every position through every sampler,
and every colour is the one a read through that sampler reads (the read_through family's rules:
the edge texel through clamp_to_edge and repeat, the border texel through the two border modes,
zero in every lane past the last level). So the read takes the constant word as every other
observed residency does, and select_read's refusal goes. Nothing else changes: the read through a
sampler and the word were each built already.

Tests:
- engine_texture_oob/through.rs's
  a_sparse_read_through_a_clamp_to_edge_sampler_reads_its_texel_resident runs sparse_edge (the
  test's Metal 4.1 module, storing 1.0 in lane 3 where resident) and edge_plain (the same read with
  its word unused) on every profile and class over a two-level 4x4 texture: inside, past each edge,
  at i32::MIN, at level 1 and past the last level, each reads the clamp-to-edge texel (zero past
  the last level) and sparse_edge's lane 3 reads 1.0 at every row; it links and passes spirv-val
  on every profile where it translates. It replaces
  a_sparse_read_through_a_clamp_to_edge_sampler_is_refused.
- engine_identity's a_sparse_access_of_a_texture_slot_is_resident compiles a2_sparse_read_through
  too, on every identity profile and moltenvk-m3 without robustImageAccess2: L3 passes, the
  interface states no specialization constant but the dispatch's, and the module holds no
  OpImageSparse* instruction.
- The conformance case sparse-read-through (cases/sparse_read_through.rs, the fixture's kernel,
  12 threads) records the M3 Max's colours and residencies, and Metal's times. It declares
  simdgroup-access-order, which loosens no value: the kernel writes out[5 * i + k] for five k,
  stores the translator does not find disjoint between two threads of one SIMD-group, so the
  runtime's pipeline notes it on every device (announced on lavapipe), as for the other cases
  with that store.

Docs: lower::texture's module docs (the read through a sampler, the status words) and API.md's
texture paragraph say a sparse read through a sampler reads resident, with the M3 Max's answer.
docs/CONFORMANCE-COVERAGE.md is regenerated.

The new fixture's companions (.ll, .air.ll, TOOLCHAIN's line) come from
scripts/regen-air-fixtures on the M3 Max; its air_input golden printout is blessed under the
pinned LLVM. Engine inventory: the new rows engine/a2_sparse_read_through.air.ll and .ll, ok on
all 15 profiles. The .air.ll row, which only macOS assembles, carries the .ll row's answer, as
every blessed pair in the table does (1,724 pairs equal; the 10 that differ are the previous
commit's, which the next bless moves); the M3 bless confirms it.

SEMANTICS_VERSION 2365 -> 2366 (a placeholder, renumbered at landing): a function with such a
read translated to a refusal and now translates. The golden table gains the new fixture's rows at
the next pin's bless; no other cell moves (the cells that change at this commit are the previous
commit's 237, cell for cell).

Verified:
- m3-max-85077, the Apple M3 Max (macOS 27.0.1): the fixture's companions from
  scripts/regen-air-fixtures, and its kernel plainly and under the validation layer (the answers
  above).
- m3-max-85084 and m3-max-85200, the M3 Max: the recording of sparse-read-through, plain and under
  the validation layer, and its times.
- m3-max-85550, the M3 Max: the air_input golden printout, blessed under Homebrew LLVM 21.1.8,
  the pinned major.
- m3-max-85515, on the CPU with no device, at this change before its golden and row: the engine
  inventory's eight llvm_as parts differ from the table only by the new row (ok on all 15
  profiles, now in it). Red, with lower/texture/mod.rs at the previous commit:
  a_sparse_read_through_a_clamp_to_edge_sampler_reads_its_texel_resident and
  a_sparse_access_of_a_texture_slot_is_resident fail, and the control
  a_clamp_to_edge_read_clamps_its_coordinate_into_the_texture passes. Green: all three pass.
- m3-max-85600, on the CPU with no device, at this change before the .air.ll row and the
  declaration: the golden table's cells at this commit and at the previous commit are the same
  237, cell for cell; the refusal surface's check, fmt, signatures, clippy (plain, --cfg m2v_gpu,
  --cfg m2v_cpu_icd), Rustdoc, private docs, doctests and scripts/api-docs pass; the metal2vulkan
  suites ran 3,471 tests: 3,469 passed, 24 skipped, and the failures are
  golden_hashes_match_the_table, whose table is blessed at the next pin, and
  inventory_lists_every_fixture_in_order, which the .air.ll row now answers; validation ran 1,343
  tests, all passed, 2 skipped; conformance ran 1,055, all passed. In CI's lavapipe image,
  sparse-status-plain differed only as justified, and sparse-read-through differed only at its
  notices, by simdgroup-access-order, which it now declares.
- m3-max-85750, at this commit: inventory_lists_every_fixture_in_order passes, conformance ran
  1,055 tests, all passed, and in CI's lavapipe image both cases differ only as justified:
  sparse-read-through by the simdgroup-access-order notice it declares, sparse-status-plain by
  native-nan-encoding.
2026-12-03 16:14:40 -08:00
Anees Iqbal e9e52050d0 Runtime and translator: a compute encoder binds a buffer with its attribute stride, and a dynamic stage-in layout fetches at it
What:
- ComputeCommandEncoder gains three methods:
  set_buffer_with_attribute_stride (setBuffer:offset:attributeStride:atIndex:;
  setBuffers:offsets:attributeStrides:withRange: is a loop of it, as every
  other range call of the runtime is), set_buffer_offset_with_attribute_stride
  (setBufferOffset:attributeStride:atIndex:) and
  set_bytes_with_attribute_stride (setBytes:length:attributeStride:atIndex:).
- Each buffer slot's binding (Slot::Buffer, Slot::Bytes) keeps the stride's
  low 32 bits, so MTLAttributeStrideStatic is 2^32 - 1. A new
  FieldValue::StageInStride(slot) pushes it. It is mapped from the
  translator's PushField::StageInStride, and the interface accepts
  RuntimeFact::StageInStride.
- set_buffer, set_buffer_offset and set_bytes bind a stride of 0, which
  clears an earlier one. That includes set_buffer of the buffer and offset
  the slot already holds, which used to return early.
- Translator: the identity domains accept PushField::StageInStride
  (lower/select.rs), as they accept the vertex analogue
  PushField::VertexBufferStride. Before, a dynamic layout was their typed
  refusal, EncoderValue "StageInStride(1)". The translator test
  a_fixed_layout_records_no_stride_and_a_dynamic_one_records_its_own now
  makes the pipeline, which records RuntimeFact::StageInStride of layouts 1
  and 2 and none for layout 3, the constant step.
- Deleted: StageInKind::DynamicStride, unbuilt_stage_in and its call at
  state creation. Gap::StageIn now names only IndirectRegion.
- Conformance:
  - The runtime side plays the four attributeStride steps and
    setStageInRegion:.
  - The four DynamicStride ledger rows of attribute-stride-buffer,
    -buffer-offset, -inline-bytes and -plural-buffers are replaced by each
    case's dispatchType row (case/outcome/dispatch_type, the consumer's own),
    which every compute-pass case carries.
  - CONFORMANCE-COVERAGE.md is regenerated.
- Regenerated:
  - REFUSALS.md and error/basis.rs;
  - METAL-COVERAGE.md and coverage.tsv (the four setters are implemented);
  - api_signatures.tsv (three methods added, one variant removed).
- Docs:
  - The runtime README's compute section and its known gaps.
  - Validation's ToolingRequirement::DynamicStageInStride doc: the runtime
    builds the layout, and the engine's candidate does not yet bind with the
    stride form. Its classification is unchanged.
- Versions, renumbered at landing: RUNTIME_VERSION 2570 and
  SEMANTICS_VERSION 2370, because the
  translator's refusal becomes a pipeline. runtime-sources.sha256 does not
  move: lower/select.rs, cache/mod.rs and the runtime crate are not among
  its inputs.

Why: the planner ruled DynamicStride BUILD. The translator already lowered
the fetch at PushField::StageInStride. The runtime refused the state because
its compute encoder had no attributeStride setter and no field that pushed
the stride, and the identity domains refused that encoder value.

What a plain bind reads: Metal documents no answer for a plain bind of a
slot that a dynamic layout reads, and the debug layer answers differently.
Probe dynamic_stride_plain_binds.m, job m3-max-85456 (Apple M3 Max, macOS
27.0.1), read stride 0 for every plain bind, alone and after a stride bind
(setBuffer:offset:atIndex:, setBufferOffset:atIndex:,
setBytes:length:atIndex:). Its stride-8 control read stride 8. The planner
ruled to build that answer without pinning it against Metal: there is no
conformance row for it. The setter's doc says Metal documents no answer, and
the runtime device test below holds the runtime's own behaviour.

Consumer search (git grep -n -w DynamicStride in the consumer's checkout at
a34e93e4fa): 8 hits.
- Code that will no longer compile:
  - rt_platform/diag.rs:3077 and :3085 name rt::StageInKind::DynamicStride
    in a test.
- Tests that will fail:
  - rt_platform/compute.rs:1394 expects the dynamic-stride state to be
    refused (StageIn-DynamicStride).
- Docs and comments:
  - rt_platform/compute.rs:18 and :1246.
  - rt_platform/diag.rs:7 and :3081.
  - docs/accuracy-ledger.md:129.
Per compute.rs:14, the consumer binds the attributeStride selectors as the
calls without them. It can now call these setters.

Tests: every_device_fetches_a_dynamic_stride_layout_at_the_stride_each_bind_gives
makes ten binds and dispatches:
- strides 40 and 80, 2^32 + 40 (reads at 40), and MTLAttributeStrideStatic
  (thread 0's element, then zeros);
- set_buffer of the same buffer and offset after a stride bind (stride 0);
- set_buffer_offset after a stride bind (stride 0, one element on);
- set_buffer_offset_with_attribute_stride;
- set_bytes_with_attribute_stride;
- set_bytes after a bytes stride bind, and after a buffer stride bind
  (stride 0).

Verified, at this tree (2f654e598c before the fold):
- Device tests, filtered test(stage_in) | test(dynamic_stride), 8 tests
  each, every one passed; each card printed the dynamic-stride test's line:
  - lavapipe, job m3-max-85611 (998 skipped);
  - RX 7900 XTX (RADV, Mesa 26.2.6), job m3-max-85587, --cfg m2v_gpu;
  - RTX 3090 (NVIDIA 620.70.06), job m3-max-85588, --cfg m2v_gpu;
  - Iris Xe (ANV, Mesa 26.2.6), job m3-max-85601, --cfg m2v_gpu.
- Conformance replay of attribute-stride-buffer, -buffer-offset,
  -inline-bytes and -plural-buffers on the same four devices, same jobs:
  EXIT=0. Each case's one refusal is its dispatchType ledger row, with no
  divergence, so every stride slot read the words the M3 recorded,
  MTLAttributeStrideStatic and the 2^32-truncated strides included.
- Suites, job m3-max-85586:
  - product: 3471 passed, 4 failed, 24 skipped. One failure is
    golden_hashes_match_the_table (the SEMANTICS placeholder; golden tables
    are re-blessed on development). The other three are the fixture tables
    inventory_lists_every_fixture_in_order,
    engine_fixtures_match_their_golden_printout and llvm_as::part_5_of_8.
    All three fail on engine/dvw_depth_views, which development's
    aedc38190f added without rows in public_fixture_expectations_engine.tsv
    or an air_input printout. No file of this change touches them.
  - validation: 1344 passed, 2 skipped.
  - conformance: 1059 passed, 0 skipped.
  - doctests: EXIT=0.
- clippy: plain m3-max-85592, --cfg m2v_gpu m3-max-85593 and
  --cfg m2v_cpu_icd m3-max-85602, each EXIT=0.
- rustdoc, api-docs and rustdoc --document-private-items: job m3-max-85599,
  EXIT=0.
- refusal_surface, metal-coverage, conformance-coverage and api-signatures
  --check: current.
2026-12-03 15:15:11 -08:00
Anees Iqbal 2ec06b93e1 Translator: the sparse path goes
The translator kept a second form for a function that observes a texture's residency: a slot's
sparse arm (OpImageSparse* and OpImageSparseTexelsResident under shaderResourceResidency) or its
tile map (a storage buffer of tile bits the consumer would mirror from each mapping), selected by
SpecKey::SparseTexture from the bound texture's MTLTexture.isSparse, with Metal's measured
footprint rule for a sample or gather, writes dropped under the same constant, and
PrecisionNote::SparseResidency where the device answered. With the observed residency now the
constant resident word, nothing builds either form, and nothing can need one: the runtime has no
sparse heap or sparse texture API, and the consumer tells no guest it has sparse textures (every
Apple family's supportsFamily NO, sparseTileSizeInBytes 0, isSparse NO; a sparse heap refused at
newHeapWithDescriptor:). So the path is deleted (rule 4).

Public items deleted, each searched for in the consumer's checkout at 76e6c90369 (0 hits for every
name):
- RuntimeFact::SparseTexture { slot, sparse_arm, tile_map } and its mechanism; the 12-03 cleanup
  ruling that kept it in the produced-then-refused group is reversed for it alone;
- SpecKey::SparseTexture;
- ResourceKind::TileMap and BindingSource::TileMap, with pipeline::tile_map, the map's format;
- PrecisionNote::SparseResidency (metal2vulkan-degrade-sparse-residency), with its API.md
  catalogue entry, the conformance Degradation and validation's C3 deferred near-equivalent;
- error::Feature::SparseTexture, which nothing constructed;
- bind::TextureFacts::sparse and TextureShape::Texture's sparse, which no binder set.

Crate-internal, gone with them: the texture family's residency use flags, sparse_arm, tile_map and
sparse_writes on a slot plan, their spec constants and tile-map views, resident_access, the tile
decoding (TileLevel), the read's sparse and tile-map arms, the census's ".resident" suffix and
RESIDENCY_WORDS; the sampler's residency and footprint fields and lower::sampler::footprint (Metal's
measured footprint rule, read only to answer from a tile map), the sparse arm in sample, gather and
pixel fetch emission, and lower::texture::residency (every caller sits behind the texture family's
own refusal of a word with another bit observed). The SPIR-V layer loses what only those built:
the builder's sparse_sample, sparse_fetch, sparse_gather, sparse_dref_gather, sparse_read and
texels_resident, the sparse flag of SampleForm and of the fetch, gather and read instructions,
Inst::ImageSparseTexelsResident, its serialization, requirement (SparseResidency, and with it
shaderResourceResidency) and the interpreter's unmapped texels. VkFeature::ShaderResourceResidency
stays: profiles and the device queries name it.

Nothing compiled changes: no module held a sparse instruction or the constant since the previous
commit, so SEMANTICS_VERSION stays. ARTIFACT_FORMAT_VERSION 608 -> 609 (renumbered at landing):
the codec's ResourceKind, SpecKey, RuntimeFact, PrecisionNote and BindingSource lose variants,
which moves later tags. runtime-sources.sha256 moves for bind/state.rs, bind/heap.rs and the
deleted pipeline/tile_map.rs; no run of an unchanged artifact changes. docs/REFUSALS.md, the
runtime's error/basis.rs and tests/api_signatures.tsv are regenerated.

Tests deleted with what they tested: the serializer's sparse sweep, the builder's sparse read
under texel operands, the mechanism table's three SparseTexture rows (the variant indices close
up), C3's SparseResidency deferral (the deferred-row tests now use CubeGradientFootprint).

Verified, on the CPU with no device:
- m3-max-85203, at this change on ec56957c00, after the previous commit's own run in the same
  job: the golden table's cells are the previous commit's, cell for cell (237 at each, every cell
  listed at both, the two lists equal); the refusal surface's check, fmt, signatures, clippy
  (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, private docs, doctests and scripts/api-docs
  pass; the metal2vulkan suites ran 3,495 tests: 3,494 passed, 24 skipped, and the failure is
  golden_hashes_match_the_table, whose table is blessed at the next pin; validation ran 1,343
  tests, all passed, 2 skipped; conformance ran 1,054 tests, all passed.
- m3-max-85366, at this commit, rebased onto development past the deletions of the anisotropic
  emulation and RowLockstep (select.rs's anisotropic call and sampler/anisotropic.rs go with
  development's side; the mechanism table is development's without SparseTexture, its indices closed
  up to 0..60): the refusal surface's, conformance coverage's and signatures' checks, fmt and clippy
  (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) pass; 185 tests (the mechanism, cache, SPIR-V serializer
  and builder, bind::heap and sample-coordinate tests, the two sparse tests and the engine
  inventory's llvm_as parts) all passed. The golden cells are the previous commit's, cell for cell
  (237 at each, the two lists equal).
2026-12-03 15:14:41 -08:00
Anees Iqbal 619e977d63 Translator: a texture's observed residency is the constant resident word
A sparse_sample, sparse_gather or sparse_read (and a sparse block read) whose function observes
bit 0 of its status word (sparse_color::resident()) was refused under the identity domains:
the observed residency made the slot's RuntimeFact::SparseTexture, a texture state the identity
domains do not source (Unsupported{IdentityDomains; NotImplemented}, IdentityCause::TextureState).
The golden table and the engine inventory held the refusal for engine/a2_sparse_status, and the
runtime's README listed it as a known gap.

Metal's answer over a texture that is not sparse, measured with this kernel plain and under
Metal's validation layer (which reported nothing): every residency resident on the Apple M3 Max
(macOS 27.0.1) and on the AMD Radeon Pro 5300M (macOS 26.7.1), not resident on the Intel UHD
Graphics 630 of the same MacBook (macOS 26.7.1), with the same colours on all three. Both answers
are Metal's. The runtime makes no sparse texture: it has no sparse heap or sparse texture API, and
the consumer tells no guest it has sparse textures (every Apple family's supportsFamily NO,
sparseTileSizeInBytes 0, isSparse NO, and a sparse heap refused at newHeapWithDescriptor:).

So the word is the M3 Max's and the 5300M's answer, a constant: an observed residency is 0,
resident, of a slot and a heap element alike, with no query, no precision note and no second
form. lower::texture::residency answers false wherever the word's other bits are not observed (a
word with another bit observed stays refused), so no access marks its slot's residency and no
slot states a SparseTexture fact. The extended-range sample, which refused an observed residency,
takes the constant word too.

Tests:
- engine_identity's a_sparse_access_of_a_texture_slot_is_resident compiles a2_sparse_status on
  every identity profile and moltenvk-m3 without robustImageAccess2: L3 passes, the interface
  states no specialization constant but the dispatch's, the plan no SparseTexture fact, and the
  module holds no OpImageSparse* instruction.
- engine_texture_oob's block_reads_read_their_texels_as_reads_do runs br_sparse (a sparse block
  read storing 2.0 where resident) on every profile and class, where it asserted the refusal:
  its alpha lane reads 2.0 at every point, inside the texture and outside.
- The conformance case sparse-status-plain (cases/sparse_status.rs, the a2_sparse_status kernel
  over two 4x4 RGBA32Float textures, 16 threads) records the M3 Max's colours and residencies,
  and Metal's times; its module docs state all three Macs' answers.

Docs: the runtime README's known gap for this residency goes, with the sparse residency in the
list of texture state the identity domains do not source; API.md's texture paragraph says an
observed residency reads resident, with the Macs' answers, and PixelSamplerScaling's entry (here
and on PrecisionNote) loses its observed-residency case.

Engine inventory (public_fixture_expectations_engine.tsv): 147 .ll cells move from
Unsupported{IdentityDomains; NotImplemented} to ok, every profile's of a2_sparse_status,
kernel_block_read's br_sparse, sps2_residency_probes, spse_address_probes, spse_array_probes,
spse_level_probes and spse_volume_probes (15 each), and every profile's but runtime-floor's of
spse_write_probes, spse_write_barrier and a27_spse_write_barrier (14 each; runtime-floor's stays
Unsupported{IdentityDomains; NotImplemented}). Their .air.ll twins, which only macOS assembles,
move at the M3 bless.

SEMANTICS_VERSION 2367 -> 2368 (renumbered at landing): the residency-observing fixtures' golden
cells change from the refusal to modules. The golden table is blessed at the next pin.

Verified:
- m3-max-85059, on the CPU with no device, at this change on an earlier development
  (004f68b48f; rebased since onto ec56957c00, cleanly, then onto 6459eaa946, which deleted the
  anisotropic emulation: this change's doc edits to sampler/anisotropic.rs and
  PrecisionNote::DeviceAnisotropicFilter went with it). Red: the three tests below with
  lower::texture, sampler/select.rs and sampler/anisotropic.rs at the base fail, with the engine
  inventory's eight llvm_as parts (EXIT 100). fmt, signatures, clippy (plain, --cfg m2v_gpu,
  --cfg m2v_cpu_icd), Rustdoc, private docs, doctests and scripts/api-docs pass. The metal2vulkan
  suites ran 3,496 tests: 3,493 passed, and the failures are golden_hashes_match_the_table and
  inventory parts 1 and 4, whose rows a27_memory_order, a4_device_fence and dispatch_builtins
  that base had not blessed (ec56957c00 blesses them). Validation ran 1,344 tests, all passed, 2
  skipped. Conformance ran 1,054: every_case_carries_its_timing failed, the new recording having
  no times; they were taken on the M3 Max (conformance times --runs 8 --write) and are in this
  commit.
- m3-max-85203, on the CPU with no device, at this change on ec56957c00:
  a_sparse_access_of_a_texture_slot_is_resident, block_reads_read_their_texels_as_reads_do and the
  engine inventory's eight llvm_as parts pass (10 tests run, 10 passed). The golden table's cells at
  this commit, each listed: 237 change from Unsupported{IdentityDomains; NotImplemented} to a
  module, 147 of them this commit's (a2_sparse_status, br_sparse, sps2_residency_probes and
  spse_address_probes, spse_array_probes, spse_level_probes and spse_volume_probes, 15 each;
  spse_write_probes, spse_write_barrier and a27_spse_write_barrier, 14 each) and 90 development's,
  not yet blessed (a27_memory_order, a4_device_fence, dispatch_builtins's device_fence_store and
  kernel_read_through's rt_heap_arg, rt_heap_ow and rt_heap_zero, 15 each). In the same job, at
  the next commit's tree (this one and the sparse path's deletion), conformance ran 1,054 tests,
  all passed, every_case_carries_its_timing among them.
- m3-max-85366, on the CPU with no device, at this commit on development (past the anisotropic
  emulation's deletion): the same 10 tests, 10 passed, and the same 237 golden cells, 147 of them
  this commit's; at the next commit's tree, the refusal surface's, conformance coverage's and
  signatures' checks, fmt and clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) pass.
- m3-max-84877 and m3-max-85200, the Apple M3 Max (macOS 27.0.1): the recording of
  sparse-status-plain, plain and under Metal's validation layer, and its times.
- m3-max-84885, the Iris Xe (Mesa 26.2.6), at this change before its rebases and the times: the
  conformance replay of sparse-status-plain differs from the recording only by announcing the
  notice metal2vulkan-degrade-native-nan-encoding, which it justifies (EXIT 0).
- m3-max-84712, the MacBook Pro's Radeon Pro 5300M and UHD Graphics 630 (macOS 26.7.1): the
  fixture's kernel, plain and under the validation layer.
2026-12-03 15:14:41 -08:00
Anees Iqbal 3758e468a7 Runtime: TextureCopyMismatch rests on Apple's documented rule, with the Macs' measured answers
Refusal::TextureCopyMismatch (BlitCommandEncoder::copy_from_texture between textures of two pixel
formats or two sample counts) stated a metal-measured basis: the probe blit_copy_format_pairs.m on
the M3 Max under Metal's validation layer alone, which stops every pair of two formats. A
consumer's probe on a MacBook's Radeon Pro 5300M (macOS 26.7.1) had Metal take ten pairs of one
texel size and copy their bytes, plainly and under the validation layer, so the basis was re-read
and measured on all three Macs.

Apple's page for the region copy says of the destination texture: "The pixel format is the same as
`sourceTexture`. The sample count is the same as `sourceTexture`." Outside that rule the Macs
answer apart (the probe, rewritten to run each pair plainly and under the validation layer, with
the bytes checked):
- Apple M3 Max, macOS 27.0.1, Shared and Private: plain Metal copies the bytes as they are; the
  validation layer stops every pair of two formats ("[sourceTexture pixelFormat](...) must equal
  [destinationTexture pixelFormat](...)") and two sample counts.
- AMD Radeon Pro 5300M, macOS 26.7.1, Private: Metal copies the bytes as they are, plainly and
  under the validation layer, which takes the pairs of one texel or block size (depth and BC1
  among them) and stops two texel sizes ("must be compatible with") and two sample counts.
- Intel UHD Graphics 630 of the same MacBook, macOS 26.7.1, Private: the copy completes, plainly
  and under the validation layer, and leaves the destination unwritten; the layer answers as on
  the 5300M.
So the refusal stays, and its basis is metal-documented, quoting the page; its doc carries the
rows above. Nothing it refuses changes.

The probe now holds every leg that ran: the ten pairs of one texel size and R32Uint into R32Float,
each with Shared and Private textures, plainly and under the layer, with the bytes compared; the
earlier depth, BC1 and sample-count cases and a pair of two texel sizes (the negative control)
under the layer alone, where plain Metal has no defined answer; a device index for a Mac of two
GPUs. Its header states what each Mac answered.

docs/REFUSALS.md and the runtime's error/basis.rs are regenerated (one Refusal moves from
metal-measured to metal-documented). The runtime README's blit paragraph names the documented
rule. The conformance rows whose refusals Justification::MetalValidation documents are unchanged.

Verified:
- m3-max-85147, the Apple M3 Max (macOS 27.0.1), and m3-max-85148, the MacBook Pro's Radeon Pro
  5300M and UHD Graphics 630 (macOS 26.7.1): the probe as committed, every leg (the rows above).
- m3-max-85410, on the CPU with no device, at this commit: fmt, the workspace's Rustdoc, the
  runtime's private Rustdoc, the refusal surface's check and scripts/api-docs pass; the runtime's
  suite ran 230 tests, all passed, 2 skipped.
2026-12-03 15:14:40 -08:00
Anees Iqbal 0ae54b7ec4 Conformance: the M3's recording of the imageblock slice past the grid
Recorded on the Apple M3 Max (macOS 27.0.1) by job m3-max-85134
(record, three runs, one outcome, the validated leg ran without a stop;
times --runs 8 --write). Every grid thread's texel holds its own value,
(1 + x + 8y) / 64 and three zeros, and every one of the 22 cells past
the grid holds zero, neither the -1 sentinel nor any thread's value: the
answer the case's test pins, read from these bytes.

docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py) for the case and
its dispatchThreads step.
2026-12-03 13:12:41 -08:00
Anees Iqbal 6706d5b97f rt and translator: a sampler of Metal's undeclared filter 2 is made and filters as nearest
MTLSamplerMinMagFilter's raw value 2 (SamplerMinMagFilter::Cubic) is
declared by no SDK header, Apple page or Metal Shading Language text, and
nothing a program asks tells it about the value, so it is undocumented
Metal and is not emulated. Metal makes the state on every Mac measured. An
Apple M3 Max filters it over a footprint wider than one texel, and a Radeon
Pro 5300M and an Intel UHD Graphics 630 read the nearest texel (the
conformance case's own inputs: jobs m3-max-85003 and m3-max-85004). The
runtime now makes such a state and filters it as nearest on every device:
no shader arm, no second pipeline, no query, no note.

- rt Device::new_sampler_state no longer refuses a Cubic min or mag
  filter. Nothing raises Gap::CubicSampler now; the variant stays,
  documented so, because the consumer names it.
- translator: SamplerWord::of sets no bit for a Cubic filter, so its word
  is the nearest filter's. SamplerWord::CUBIC (bit 30) is deleted (its
  one reader, the anisotropic word path, is gone on development). SamplerWord::FIELDS is now (1 << 30) - 1.
  unnormalized_reads compares the two filters as the device's (a Cubic
  filter's is NEAREST) rather than refusing Cubic. vk_sampler already
  made NEAREST of Cubic.
- SamplerMinMagFilter::Cubic stays, because the consumer converts a
  guest's raw 2 to it. It is documented through regen_metal_enums.py's
  PRIVATE_DOCS as Metal's undeclared raw value 2, which the M3 Max filters
  and the x86 Macs read as nearest, and whose device sampler and word here
  are the nearest filter's. generated.rs is regenerated against the
  macOS 27.2 SDK.
- docs: the runtime README's sampler line, RESOURCE-ID.md (the word's bit
  30 is now 0, and the consumer makes a Cubic state as nearest),
  resource_words.tsv's three Cubic lines (bit 30 cleared:
  0x40000000 -> 0x00000000 twice, 0x58f6ab53 -> 0x18f6ab53), and the
  comments in select.rs and extended.rs that said the runtime makes no
  cubic sampler.
- reach.tsv's SamplerBicubicFilter row no longer names a runtime cubic
  sampler as its reach. REFUSALS.md and error/basis.rs regenerated
  (refusal_surface.py: Gap::CubicSampler has no raise site);
  api_signatures.tsv blessed (SamplerWord::CUBIC removed, FIELDS changed).
- RUNTIME_VERSION: a Cubic state is made where it was refused, so it
  takes a bump, set at staging (left at development's 2568 here).
  SEMANTICS_VERSION stays, since no module's words change.
  runtime-sources.sha256 re-pinned.

Consumer search (reims-vgpu development 1913fcbc15 and the steelbrain/*
refs from the last day): Gap::CubicSampler, 2 hits (development
crates/reims-vgpu-vulkan/src/rt_platform/diag.rs:3071 and :3109, a test
that counts the gap's name), kept. SamplerWord::CUBIC, SamplerWord::FIELDS
and SamplerMinMagFilter::Cubic by name: 0 hits. The consumer's
rt_platform::state::tests::states_on_vulkan, which expects None for
min_filter 2, now gets a sampler.
2026-12-03 13:06:04 -08:00
Anees Iqbal c43c130d1a Tests: a sampler of Metal's undeclared filter 2 is made and filters as nearest (red)
MTLSamplerMinMagFilter's raw value 2 (MTLSamplerMinMagFilterCubic) is
declared by no SDK header, by Apple's page, or by the Metal Shading
Language, and nothing a program can ask tells it about the value. Metal
makes a sampler state of it on every Mac measured. The case's own inputs
read a footprint wider than one texel on an Apple M3 Max (macOS 27.0.1,
job m3-max-85004) and the nearest texel on a Radeon Pro 5300M and an Intel
UHD Graphics 630 (macOS 26.7.1, job m3-max-85003). Undocumented Metal is not
emulated, so the runtime is to make the state and filter it as nearest, the
x86 Macs' answer, on every device.

The tests that hold that:
- rt every_device_shares_sampler_states_device_samplers: a state with a
  Cubic min and mag filter is made (no Gap::CubicSampler), its word is the
  nearest state's, and it takes no device sampler of its own.
- translator a_cubic_filter_is_the_nearest_filters: a Cubic min filter,
  mag filter or both is the nearest filter's word, device sampler of each
  use, and unnormalized reading, at normalized and pixel coordinates; and
  a_sampler_word_holds_each_field_at_its_bits: a Cubic filter's word is 0.
- conformance sampler-cubic-filter: its ledger row (refused on every
  venue) goes. The case drops its bicubic-filter-arithmetic declaration and
  lets each lane's runtime red hold its own texel where the M3 Max's
  recording differs (every lane but lane 0), under the new accepted
  difference in docs/API.md. the_cubic_allowances_are_the_lanes_nearest_moves
  pins those lanes to the recording.

docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py): one ledger row
fewer, one tolerance more.
2026-12-03 13:06:04 -08:00
Anees Iqbal 6af0aa8c9b Conformance: depth-colour-reads carries Metal's times; coverage regenerated
The suite's every_case_carries_its_timing failed on the new case (job
m3-max-84879). `conformance times --runs 8 --write depth-colour-reads` on
the Apple M3 Max (macOS 27.0.1, 26A434; job m3-max-85057) kept its figures
in the recording; its answers are unchanged.

docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py): one module more
declaring a notice, from the depth notices the case now declares.
2026-12-03 12:51:33 -08:00
Anees Iqbal 556ed46e41 Conformance: the depth colour reads declare the depth notices; API.md's border cell is the runtime's
The case's replay on lavapipe (job m3-max-84879) announced
restricted-depth-range and restricted-depth-upload: the comparing stage's
note and the 32-bit float depth upload's. Every texel is 0.25 or 0.75,
inside [0, 1], and the notices site was the whole of their difference, so
the case declares both, as sampler_filtering's compare rows do.

The same job's replay with the colour allowances dropped printed the
runtime's own answers: a sample past the edge under an opaque white border
reads (1, 0, 0, 1), which fills the accepted difference's table.
2026-12-03 12:51:33 -08:00
Anees Iqbal 8e2ae4e702 CONFORMANCE-COVERAGE.md: regenerated for depth-colour-reads 2026-12-03 12:51:32 -08:00
Anees Iqbal 8cff38ab42 Conformance: depth-colour-reads, a depth texture read through a colour slot (unrecorded)
The planner ruled that the runtime keeps Vulkan's (d, 0, 0, 1) for a depth texture read through
a texture2d<float> slot: the three Mac families answer three ways (M3 Max (d, d, d, 1), m3-max-84755;
Radeon Pro 5300M (d, d, d, d) and UHD Graphics 630 (d, 0, 0, 1), m3-max-84762), and the 630's is
Vulkan's. The case pins that answer: the owned fixture dvw_depth_views's five kernels over a 6x5
Depth32Float texture, thirteen reads (samples nearest and linear, at the edge and past it under
an opaque white border, gathers of green and alpha, a view swizzled (G, R, One, Zero), and the
depth2d sample and comparison). It is recorded on the M3 Max; each element where the 630's answer
differs from the M3 Max's may hold the 630's value as well (0), under docs/API.md's new accepted
difference, and everything else compares exactly. Lanes sit at exact coordinates, so a linear
weight is the same on every device.

docs/API.md section 10 gains the entry (its runtime border cell follows the replay). The recording
and the coverage regeneration follow in their own commits.

Verified: cargo fmt. Build, record and replay follow in their jobs.
2026-12-03 12:51:32 -08:00
Anees Iqbal 7941badd0b docs/API.md: a 1D texture's bicubic sample is the M3's measured answer, as the 2D one is
API.md now says the bicubic filter is not documented Metal, in 1D or 2D, and that what the
sample does is Metal's measured answer on an Apple M3 Max. For 1D that is the bilinear filter of
taps i and i + 1 in every format, at the fraction of q = floor(256 (x - 1/2) + 1/2) rounded half
up, with the taps clamped at both ends under clamp_to_edge. The 2D sample has the same status.

The basis, from Metal's own texts:
- The Metal Shading Language Specification 4.1 (2026-06-04), section 6.13.1 "1D Texture": "This
  member function samples from a 1D texture. Tv sample(sampler s, float coord) const", and
  "Because mipmaps are not supported for 1D textures, lod needs to be 0". Its Table 2.7 (sampler
  state enumeration values) lists filter, mag_filter and min_filter as "nearest (default),
  linear" only. "bicubic" appears nowhere in the specification or the feature-set tables.
- The Metal toolchain's header metal/__bits/metal_texture_common declares the enumerator
  `bicubic` in `mag_filter`, `min_filter` and `filter` only under
  `#if defined(__HAVE_BICUBIC_FILTERING__)`.

Metal's answer comes from an Apple M3 Max on macOS 27.0.1, job m3-max-85106: bcu_forms.metal's
1D lane over an 8-texel texture at 16 points, in RGBA32Float, RGBA16Float and RGBA8Unorm. At
x = 3.0, between texels 4 and 9, it reads 6.5, where a Catmull-Rom sum reads 6.25.
2026-12-03 12:37:30 -08:00
Anees Iqbal 94adea1c61 Identity domains: a bicubic sample of a 1D texture
The identity domains refused every function that samples a 1D texture through a bicubic
constexpr sampler ("a bicubic filter of a 1D texture", IdentityCause::SamplerState), though its
lowering reads nothing the identity domains do not source. It is the 2D sample's on one axis: the
same footprint (lower::sampler::bicubic::footprint_on, q = floor(256 (x - 1/2) + 1/2)), the
level-0 size by OpImageQuerySizeLod of the bound image (the slot's set-1 element), the taps by
OpImageFetch of that image, and the bound format's treatment from the slot's
PushField::BicubicTexels word (bicubic::format_bits, which takes no dimension), summed by the
module's Routine::Line, which the default domains already emit: the device's FMix of taps i and
i + 1 at the fraction k / 256, then the normalized formats' clamps. Metal filters a 1D texture
bilinearly over those two taps whatever its format (the module docs; the committed M3 observations
of the bcu_forms and bcx_rules cases). The runtime writes the field per slot from the bound
texture whatever its type, so it needs no change. The refusal and BICUBIC_LINE_FORM go.

The sample keeps PrecisionNote::BicubicFilterArithmetic. No new form, query or copy.

The fixture inventory's bcu_forms.ll and bcx_rules.ll rows move to ok on all 15 profiles (30
cells); their .air.ll twins move at the next M3 bless. docs/API.md, the runtime README (its bicubic
paragraph and the identity domains' known gaps) and IdentityCause::SamplerState's doc no longer
list the form. docs/REFUSALS.md regenerated: unchanged. No public item changes.

Test: tests::engine_identity::a_bicubic_kernel_reads_each_slots_format_treatment_from_its_pushed_field
(red at 74dd91398f).
2026-12-03 12:37:20 -08:00
Anees Iqbal 6ba3572cbe Translator: the lockstep pass only finds pairs; its barrier insertion, rows mode and RowLockstep deleted
What: the lockstep pass (lower::simd::lockstep) keeps one job: find whether an entry holds a pair
of accesses only a SIMD-group's lockstep orders, which sets Lockstep::unordered and the static
note PrecisionNote::SimdgroupAccessOrder. Everything that ordered such a pair is deleted: the
order key (OrderKey, Order::Rows, Decision), the barrier placement (stab, points, insert,
rewritten, the barrier declarations), the rows mode (Basis::Position, Lockstep::rows,
across_rows, orders_across_rows, dispatch's rows_may_split, RuntimeFact::RowLockstep and the
barrier plan's rows_only), the inserted barriers' own forms (barrier::Origin, the barrier's rows
guard, lockstep_class, BarrierPlan::uniform_placed and lockstep_simdgroup, the reconverges
helper), Lockstep's barriers, emulated and inserted, and the select arm that emulated SIMD groups
for a lockstep pair. The census names barrier.lockstep.* go; a program barrier keeps
barrier.simdgroup or barrier.threadgroup.

Why: the identity domains, which every state is translated under, take the key that orders
nothing, so no barrier was ever inserted and every arm deleted here was unreachable.

Public items removed (api_signatures.tsv): metal2vulkan-air Lockstep's across_rows, barriers,
emulated and rows fields and its inserted and orders_across_rows methods, and
RuntimeFact::RowLockstep. Consumer search: reims-vgpu development 76e6c90369 plus its 203 refs
younger than a day: 0 hits each for lockstep, Lockstep, RowLockstep, orders_across_rows,
across_rows and .inserted(.

Tests: the census checks that asserted no barrier.lockstep name are gone with the names (the
value checks of engine_simd_lockstep's kernels stay; its two tests that held only census checks,
the branch arms and the texture calls, go with their kernels); engine_quad_ops drops its
always-false lockstep_emulated; engine_store_quad, engine_ray_tracing and engine_simd_matrix drop
their reads of the deleted fields; the mechanism table loses RowLockstep (62 variants). The
test helper pipeline::testing::specialized_entry takes no profile, since the entry no longer
depends on one: engine_store_quad checks sst_lanes' entry once, and engine_texture_unit_bit_test,
engine_generic_pointers and engine_linking drop the profile they no longer pass.

No module word moves: the deleted arms never ran. SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION do
not move (the codec tags a fact by its name, and no artifact held RowLockstep). docs/API.md, the
runtime's error and test docs, the simd module docs, lockstep.rs's title and the engine
fixtures README's row_lockstep_tree row lose the clauses about inserted barriers;
runtime-sources.sha256 is re-pinned.

Verified: see the jobs named below.
2026-12-03 12:06:07 -08:00
Anees Iqbal fa5d051b64 Translator: the two-word 64-bit integer forms deleted; every profile holds 64-bit integers in u64s
What: the arithmetic family's word form of 64-bit integers is deleted: Held::Wide and every
arm on it, lower/arith/wide.rs (its word arithmetic, division, casts and lane moves) with its
tests, ArithStrategy::Wide and ArithPlan's wide and divides, the profile's wide forms
(wide_form_on, wide_demote, widen, widen_const, holds_wide), the two-word switch selector
(SelectorForm::Words), the chunked vector's two-word lanes, the ulong texel's word form
(TexelConv::U64Words loses its flag), the matrix descriptor's word form, and in the access
family the two-word address (pointer.rs's Address enum and its helpers, the handle table's
word entries and HandleIds, psb.rs's word base). The helpers the u64 paths still use move to
arith/ops.rs (low_word, zext_word) and access/psb.rs (Pair, split). Every !int64 refusal goes
with them: Feature::Int64Arithmetic, and Feature::PointerCompare, whose one producer was the
static guest plan's !int64 arm. LeafCaps::int64 is deleted, and the mesh fold no longer asks
for shaderInt64. BinOp::ISubBorrow, which only the word subtraction built, goes with its
interpreter and builder arms (the grammar's Op::ISubBorrow stays in spv.rs).

Why: Device::from_queries refuses a device without bufferDeviceAddress and shaderInt64
(IdentityDomains), and it is the only way to make a profile, so every profile has
shaderInt64 and every arm deleted here was unreachable. This commit's parent is the last that
holds the word form.

Consumer search: reims-vgpu development cadac770c2 plus its steelbrain refs younger than a
day (190 refs): 0 hits each for Int64Arithmetic, PointerCompare, LeafCaps and leaf.int64.

The profile's fingerprint changes on every device (the field leaves the profile's Debug
text), so the golden cells read "profile changed" until the table is re-blessed; no key
stays unchanged, so SEMANTICS_VERSION does not move. The module words do not move: the u64
paths emit the same instructions in the same order (the uvec2 the slot offset builds is the
same type the word form's type helper made).

Tests: chunk.rs keeps the chunked lane-move and fragment-shuffle bound tests, on 64-bit and
32-bit lanes held whole; the selector test drops the word cases; the tests that asserted or
filtered on the int64 field or Int64Arithmetic drop those lines; the dynamic move between
slots runs L3 on every profile.

docs/API.md (the object grid's needs), docs/REFUSALS.md, scripts/refusal-surface/reach.tsv
and tests/api_signatures.tsv are updated; runtime-sources.sha256 is re-pinned.

Verified: job m3-max-84770 at this commit (CPU only; the device steps on
lavapipe): clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd EXIT=0;
rustdoc EXIT=0 and private-item docs of five crates with 0 diagnostics;
the translator's suite 2,594 of 2,595 passed, 20 skipped, the one failure
golden_hashes_match_the_table (28,950 cells under a changed profile
fingerprint, 0 changed under an unchanged key); air, runtime, devtools
and harness 872 passed, 4 skipped; validation 1,348 passed, 2 skipped;
conformance 1,053 passed; doctests passed; the conformance replay on
lavapipe EXIT=0 with 0 ledger drift lines; the refusal-surface and
signatures checks EXIT=0. The golden and engine inventory lists at the
parent and at this commit show 0 computed cells moved and no inventory
line.
2026-12-03 11:57:03 -08:00
Anees Iqbal 31d8a874f1 Translator: the Floor buffer access deleted; every profile reaches buffers by address
What: BufferAccess and ProfileFields::buffer_access are deleted with every Floor arm:
the refusals that named addressed_needs (the Floor arms of DereferenceLoadedPointer,
Int64Atomics, GpuEncodedIndirectCommands in the indirect-command, replay and execution-range
paths, the de-indexed and private list forms, and the addressed function tables), the
memory planner's addressed flag and its loaded-pointer refusal, the plan's needs (MemNeeds:
that refusal read its dynamic_roots, and the handle classes beside it had no reader since the
handle table went), provenance's dynamic_deref field, the Floor mechanism of
RuntimeFact::FunctionTableRange, the Floor values of MetalDeviceProperties (argument buffers
tier, max buffer length), and the null pointer's static escape that only a profile without
device addresses took. Public items gone:
DeviceProfile::addressed_needs and Feature::{ArgumentBufferPointers, PointerToInteger,
BufferRange}, whose only producers were those arms.

Why: Device::from_queries refuses a device without bufferDeviceAddress and shaderInt64
(IdentityDomains), and it is the only way to make a profile, so no profile is Floor: every
arm deleted here was unreachable. This commit's parent is the last that holds the Floor form.

Consumer search: reims-vgpu development f054ad57c1 plus its steelbrain refs younger than a
day (188 refs): 0 hits each for addressed_needs, ArgumentBufferPointers, PointerToInteger
and BufferRange.

The profile's fingerprint changes on every device (the field leaves the profile's Debug
text), so every golden cell reads "profile changed" until the table is re-blessed; no key
stays unchanged, so SEMANTICS_VERSION does not move.

Devtools: the fuzz Target loses its addressed flag; the pointer-select generator draws the
loaded form on every target, the same draw a target with device addresses made.

Tests: the memory plan tests ask whether a buffer pointer is wide in place of the needs, and
drop the handle-table asserts; the profile tests drop the field's asserts (the max buffer
length test keeps its allocation-limit arm); the pointer-cell tests no longer accept
PointerToInteger; the atomic, kernel stage-in and tessellation tests no longer filter on the
field.

docs/REFUSALS.md, scripts/refusal-surface/reach.tsv and tests/api_signatures.tsv are
regenerated; runtime-sources.sha256 is re-pinned.

Verified: job m3-max-84770 (CPU only, no card): the golden and engine
inventory lists at the parent and at this commit show 0 computed cells
moved of 28,950 (every cell re-keyed by the profile fingerprint, which
this commit moves) and no inventory line. The stack's tip ran the whole
gate (see its message).
2026-12-03 11:57:02 -08:00
Anees Iqbal 09b6d0fb89 Translator: the anisotropic emulation deleted; a device without samplerAnisotropy refuses an anisotropic sampler
What: lower/sampler/anisotropic.rs and its tests, the emulated filter's
routine arm, SpecKey::SamplerAnisotropy, LoweringInputs and VariantKey's
anisotropic samplers, and PrecisionNote::AnisotropicFilter and
DeviceAnisotropicFilter (no producer is left) are deleted.
metal::sampler::check_sampler refuses a sampler of maxAnisotropy above 1
for a use that filters on a device without samplerAnisotropy
(Feature::SamplerAnisotropy, needing the feature): a constexpr sampler
where the function that samples through it compiles, a runtime or
argument buffer's sampler where it is made. A runtime slot's sample
compiles as the plain sample.

docs/API.md's precision-note catalogue loses the two notes,
docs/REFUSALS.md and scripts/refusal-surface/reach.tsv are regenerated
(SamplerAnisotropy is now a device refusal), api_signatures.tsv loses
the deleted items, and the runtime README line on the emulation goes.
SEMANTICS_VERSION 2363 (renumbered at landing: 2360, 2361 and 2362 went to
the seq_cst fence, the argument buffer border texels and the
partial-threadgroups cause). runtime-sources.sha256
is pinned at this tree.

Consumer search (read only), reims-vgpu development 4bb5db49fc and every
steelbrain/* branch younger than a day, 184 refs, git grep over *.rs,
*.toml and *.md: AnisotropicFilter, DeviceAnisotropicFilter,
anisotropic_samplers, SpecKey::SamplerAnisotropy and both degrade ids:
0 hits each.

Why: the planner ruled the emulation deleted directly after G1: under the
one form it is reached only on a device without samplerAnisotropy, where
Metal's anisotropic filter is not the device's, and the refusal names
the feature that device lacks.

Verified: job m3-max-84770 (CPU only, no card): the previous commit's red
test passes at this commit (1 run, 1 passed); the golden and engine
inventory lists at 9886324e31 and at this commit show 0 computed cells
moved of 28,950 and no inventory line (the table's 28,950 cells are
re-keyed by development's own profile changes, waiting for the pin's
bless). The stack's tip ran the whole gate (see its message).
2026-12-03 11:57:02 -08:00
Anees Iqbal aa15ad6b5b Translator and runtime: a refusal of the partial-threadgroups variant names its cause
The translator refuses a kernel's partial-threadgroups variant for five structures, and
the refusal named none, so a walk could not tell them apart (a guest library's kernels
5ba5f694ad0576ff #81 and #83 refuse it with no cause) and the runtime reported each as
Gap::PartialThreadgroups at site Translator.

- error: PartialThreadgroupsCause (ComputeDerivatives, OtherForm, SharedSliceWrite,
  TileFunction, VoteWord), Cause::PartialThreadgroups and Unsupported::partial_threadgroups.
  Each site names its cause: compile.rs's analyze_one (the variant beside another form),
  mesh::plan_partial_groups (a tile function, compute derivatives, an imageblock slice write
  every invocation shares) and simd::divergent's barriers (the vote word, still needing the
  maxComputeSharedMemorySize limit). Feature::PartialThreadgroups' doc lists today's causes
  (the stage-input region and the emulated SIMD-group tier are no longer refused).
- runtime: VariantRefusal reads the cause (the vote word's, a structure's, or none) instead of
  the needs; PartialThreadgroupsSite gains Structure { cause }, the translator's type
  re-exported; Translator stays for a refusal that names no structure. The cache directory
  keeps each refusal under a marker of its own (cache::REFUSALS: the old two plus one a
  structure), so a refusal read back names the same cause.
- Tests: the red test, and a runtime unit test that every cause maps to its refusal and its
  marker and back. README: the gap's sites. REFUSALS.md and basis.rs regenerated;
  api_surface row; api_signatures.tsv blessed.
- SEMANTICS_VERSION 2362 and RUNTIME_VERSION 2567: the refusal and the dispatch's gap say
  more (renumbered at landing: SEMANTICS 2360 and 2361 went to the seq_cst fence and the
  argument buffer border texels, RUNTIME 2566 to the seq_cst fence).

Verified (jobs m3-max-84834, -84836, -84838, -84839, -85025):
- red, the red commit's crates over this commit's target: 3 tests run, 0 passed, 3 failed,
  each refusal PartialThreadgroups with no cause; green: 4 tests run, 4 passed (the three and
  a_variant_refusal_keeps_the_translator_s_cause).
- product suites: 3495 tests run, 3494 passed, 1 failed, 24 skipped; the failure is
  golden_hashes_match_the_table, whose table is re-blessed on development. Validation: 1348
  passed, 2 skipped. Conformance: 1053 passed, 0 skipped. Doctests pass.
- clippy --workspace --all-targets --all-features -D warnings: plain, --cfg m2v_gpu and
  --cfg m2v_cpu_icd, each EXIT=0. Rustdoc with -D warnings and scripts/api-docs: EXIT=0.
Not verified here: which cause the walk's kernels #81 and #83 name (a probe on the walk's
library, reported apart).
2026-12-03 11:37:12 -08:00
Anees Iqbal e5b7498833 Translator: an argument buffer's texture read through a sampler takes its border texels from its resource ID's word
Metal 4.1's read(sampler, coord) of a texture an argument buffer holds was refused as
Unsupported{IdentityDomains} with cause HeapResource ("a texture handle that reads its table
entry beyond its element (Indexed ...)"): a read that may hand back the border texels made the
handle search's indexed form (Lookup::Indexed), whose uses read the border texels from a
handle-table entry, and the one form has no table. Metal gives the read to every guest device,
so it is built. The golden table's engine/kernel_read_through rt_heap_zero, rt_heap_ow and
rt_heap_arg, and the conformance cases read-through-a8, -heap-border, -heap-sampler, -r32f,
-rgba8 and -rgba8-swizzled, were refused.

The form is the slot's. Bits 0-11 of the texture's resource ID's word hold its border texels
(docs/RESOURCE-ID.md), and an argument buffer's member holds the whole ID, word included:
- AccessPlan::lookup no longer has an indexed form; a function with heap_border yields Element or
  Flagged (alpha) as any other, which the admission takes;
- emit_identity_handle carries the word's low 14 bits (HANDLE_WORD, above the 16-bit element) in
  every texture handle of such a function, ungated (the texture-buffer words keep their
  TexelBufferWords gate where they alone need them);
- heap_element_index masks such a handle to its element at every use;
- heap_border_texels takes bits 0-11 of the carried word, and for a texture buffer whose word
  holds a word layout's fields there, its format's border texels from its code, as a slot's read
  does (words::slot_border_texels). It was an error stub;
- the read's words estimate counts that extraction (32 words) in place of two indexed flag reads.
Nothing builds Lookup::Indexed now, so it goes, with what only it used: HANDLE_ENTRY,
FLAG_BORDER_TEXELS, INDEXED_FLAGS_WORDS, heap_flags (a check for the indexed form; its two
callers wrap the handle themselves), the search's indexed arm and its test rows.

Test: engine_identity's
an_argument_buffer_textures_read_through_a_sampler_takes_its_border_texels_from_its_word compiles
rt_heap_zero, rt_heap_ow and rt_heap_arg on lavapipe, moltenvk-m3 and moltenvk-m3 without
robustImageAccess2. Each passes L3, plans heap_border, states no BorderTexels fact and no
specialization constant but the dispatch's, and on the CPU interpreter reads Metal's border
texels (metal::sampler::border_texel) of R32Float, RGBA8Unorm, A8Unorm and a swizzled RGBA8Unorm
for each entry's border colors, and the texel inside the texture. engine_texture_oob's
every_read_through_a_sampler_validates_or_is_refused_typed now validates the three entries where
it counted their refusal.

Conformance ledger (known-gaps-rt.tsv): the six `*` rows of those cases' rt_heap pipelines go.
With the pipelines made, each case runs whole, and llvmpipe's answers at 96 sites that a refusal
had left uncompared differ from Metal's by one f32 ulp in A8Unorm, RGBA8Unorm and swizzled
RGBA8Unorm texels. Those are the device's own 8-bit conversion (rule 1, note
device-texel-conversion), and each gets an llvmpipe row. docs/CONFORMANCE-COVERAGE.md is
regenerated.

Docs: the runtime README's forms list loses the entry for this read. API.md's identity paragraph
and RESOURCE-ID.md say an argument buffer's texture reads its border texels as a slot's does.

Engine inventory (public_fixture_expectations_engine.tsv): the 45 cells of
engine/kernel_read_through.ll's rt_heap_zero, rt_heap_ow and rt_heap_arg move from
Unsupported{IdentityDomains; NotImplemented} back to ok. Their .air.ll twins, which only macOS
assembles, move at the M3 bless.

SEMANTICS_VERSION 2360 -> 2361 (renumbered at landing: 2359 and 2360 went to checked naming and the seq_cst fence): the rt_heap cells of the golden table change from the refusal to
modules. The golden table is blessed at the next pin, not here. runtime-sources.sha256 moves for
memory/handles.rs alone: the deleted indexed form is translation code, and no run of an
unchanged artifact changes.

Verified, at this commit's tree:
- m3-max-84730, on the CPU with no device. Red: the new test and the read-through validation test
  with the lowering and memory/handles.rs at the base fail (EXIT 100). Green: both pass, with the
  search's tests (EXIT 0). fmt, signatures, clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd),
  Rustdoc, private docs, doctests and scripts/api-docs pass. The metal2vulkan suites ran 3,494
  tests, 3,493 passed, and the one failure is golden_hashes_match_the_table; the engine inventory
  parts pass. Validation ran 1,348 tests, all passed, 2 skipped; conformance ran 1,053, all passed.
- m3-max-84829, on the CPU with no device: of the golden table's 28,950 changed lines, all are
  "profile changed" lines of the table not yet blessed since the resident core's deletion, and 45
  change a cell, every one an rt_heap cell of engine/kernel_read_through.ll, from the refusal to a
  module.
- m3-max-84715, the pinned lavapipe image (llvmpipe, LLVM 23.1.1, 256 bits): the conformance
  replay of the 13 read-through cases ends EXIT 0 with "the 96 row(s) above are exactly the open
  gaps known-gaps-rt.tsv expects on this venue".
- m3-max-84619, on the Iris Xe (Mesa 26.2.6), at the same change on the base before the inventory
  bless: the 13 read-through cases report 0 gap rows, EXIT 0.
2026-12-03 10:53:26 -08:00
Anees Iqbal 3fbbadbc6e Translator: a seq_cst fence adds to the device's fence word, so seq_cst fences are totally ordered
Vulkan has no sequentially consistent order ("SequentiallyConsistent memory semantics is not
supported and must not be used", vkspec 1.4.366, Memory Semantics), and an acquire-release fence
lets two threads that each store and then load the other's word both read the old values, which
Metal's seq_cst fence forbids: it "establishes a single total modification order of all tagged
atomic operations" (MSL 6.16.1). Such a fence was refused, Unsupported{IdentityDomains}
SeqCstFence; five kernels of the first-setup walk's library aa5e72671a992cea meet it, each with
four air.atomic.fence(mem_device, seq_cst, device) (probe m3-max-84688).

The planner's ruled form, one for every device: a seq_cst air.atomic.fence at any scope beyond
the thread, an LLVM fence seq_cst, and a program's seq_cst barrier whose memory scope is the
device keep the acquire-release barrier they had at their own scope, then add 1 with
OpAtomicIAdd at Device scope, with the barrier's semantics, to the device's fence word. Adds to one
word are totally ordered and each reads the one before it, so the earlier fence's add (a release)
synchronizes with the later's (an acquire). Threadgroup and simdgroup fences take the device word
too (planner, option A): a stronger order than Metal names, with no workgroup memory and no
change to the threadgroup memory limit.

The word: pipeline::SEQ_CST_FENCE_WORD (256) bytes past PushField::ZeroAddress, in the runtime's
zero chunk: one per device (Core holds one Ring; the chunk is kept for the device's life and never
given back), made with every buffer usage, read only in its first 16 bytes (a checked load's unit
at ZeroAddress, psb::ZERO_RANGE_READ, and an indirect command buffer reset's index token of 0
bytes), its value never read. A function with such a fence reads ZeroAddress whether or not it
checks an access (access::place_zero_address keeps it). No new push field.

- lower::sync::barrier: total_order (selection: notes device scope, places ZeroAddress) and
  add_to_fence_word (emission); Fence and Barrier carry `total`; require_seq_cst and
  SEQ_CST_FORM deleted. lower::sync::memory_model: the LLVM fence's `total`.
- error: IdentityCause::SeqCstFence deleted (the consumer names it nowhere: git grep -n
  'SeqCstFence\|SEQ_CST\|seq_cst_fence' at reims-vgpu f054ad57c1 finds only C __ATOMIC_SEQ_CST).
- Guards: psb.rs asserts ZERO_RANGE_READ <= SEQ_CST_FENCE_WORD at compile time; ring.rs asserts
  the word fits its chunk; the_fence_word_lies_past_the_zero_range_s_reads checks both readers.
- Tests: the red test's threadgroup and simdgroup rows take the device add (option A); the
  identity, dispatch and MSL 4.1 tests compile a4_device_fence, device_fence_store and
  a27_memory_order where they asserted the refusal.
- Validation: ToolingRequirement::SeqCstFence and executor_contract::seq_cst_fence retired, as the
  runtime runs the fence; a_seq_cst_fence_runs_through_the_runtime replaces the refusal test.
- Docs: the runtime README moves the fence from the identity refusals to a known gap with the
  add's cost (RTX 3090 m3-max-84667, RX 7900 XTX m3-max-84666, Iris Xe m3-max-84668; device
  fences, standing for threadgroup and simdgroup ones too); docs/API.md and ring.rs say where the
  word lies. api_signatures.tsv blessed; REFUSALS.md regenerated, unchanged.
- SEMANTICS_VERSION 2360 (2359 went to checked naming, which landed first), RUNTIME_VERSION 2565 (a runtime word added; renumbered 2566 below).

Verified, potluck jobs on this branch rebased onto development 436dd1045e, each at a commit of
the branch (whose later commits declare the MSL 4.1 barrier in the test, count 40 requirements,
take RUNTIME 2566, satisfy clippy's assertions_on_constants and add the api_surface row):
- m3-max-84728: the red test at the red commit, with the barrier declared, fails on the
  IdentityDomains SeqCstFence refusal (RED EXIT=100); validation 1344 passed, 2 skipped;
  conformance 1053 passed, 0 skipped; doctests EXIT=0.
- m3-max-84778, at the tree of the branch's last commit: clippy plain EXIT=0; metal2vulkan,
  air, runtime, devtools and harness 3494 run, 3491 passed, 24 skipped, 3 failed: golden_hashes
  and the fixture inventory's parts 1 and 4, whose 45 moved cells are a27_memory_order,
  a4_device_fence and device_fence_store on each of 15 profiles,
  Unsupported{IdentityDomains} -> ok (re-blessed on development). The seq_cst test validates
  every module with spirv-val on every profile.
- clippy -D warnings with the const assertions: plain m3-max-84758, --cfg m2v_gpu
  m3-max-84759, --cfg m2v_cpu_icd m3-max-84761, each EXIT=0; rustdoc and api-docs at the last
  commit's tree, m3-max-84817, EXIT=0.
- Cells against the M3 Max's committed Metal observations: a4_device_fence (8ebbfe8893f9) and
  a27_memory_order (914fc7fd4040) Match on lavapipe (m3-max-84766) and on the Radeon 780M under
  its venue amd-780m-radv (m3-max-84772); a_seq_cst_fence_runs_through_the_runtime and
  a_fence_of_another_order_is_made_through_the_runtime pass on both.
2026-12-03 10:51:23 -08:00
Anees Iqbal 436dd1045e Conformance ledger: the buffer-depth-samples rows of the Apple M3 Max go
KosmicKrisp (Mesa 26.3.1) on the M3 Max runs the family's five cases at 760b5f7de2 (job
m3-max-84640): the stencil cases exact, the 16-bit depth cases announcing their declared note.
Every row of the venue for them now matches, so each goes. CONFORMANCE-COVERAGE.md regenerated.
2026-12-03 10:01:16 -08:00
Anees Iqbal 439a45aa2e Conformance ledger: the buffer-depth-samples rows the runtime now copies, on five venues
Each of the family's five cases now runs where it refused (Gap::TextureBytes): the stencil cases
compare exact and the 16-bit depth cases announce their note (rounded-sample-depth-copy), which
they declare, on the RTX 3090 (NVIDIA 620.70.06, job m3-max-84576), the RX 550 (RADV, Mesa 26.2.6,
84577) and the RX 7900 XTX (RADV, Mesa 26.2.6, 84578), at d81831ad09, the change's tip before its
rebase. Their rows go, and so do the 780M's and the Iris Xe's, whose device test copies every row
bit for bit on the same runs (their conformance replays are next). On lavapipe (job m3-max-84579)
the 4-sample stencil cases are exact, and the 4-sample 16-bit depth case differs only in its
samples site, where the device's decode of a 16-bit depth to float is one ulp from Metal's, as
depth16-texel-reads records: a row of the device's own answer. The 2-sample rows there stay (no
texture of 2 samples). The three every-venue rows narrow to the Apple M3 Max, whose KosmicKrisp
venue is not yet run. CONFORMANCE-COVERAGE.md regenerated.
2026-12-03 09:59:40 -08:00
Anees Iqbal 4ccbde14e0 Byte copies: the sample enums are exhaustive, the draw key derives no Debug; REFUSALS.md, basis and signatures regenerated; the replay counts the copies; the conformance case declares the note
The second build (lavapipe job m3-max-84547) stopped on a match over SampleAspect in the runtime,
which #[non_exhaustive] forbids across crates, and on a Debug derive over ash's Format, which has
none without its debug feature. SampleAspect and SampleWrite become exhaustive (class E in
api_surface): a runtime handles each aspect and makes a draw of each write. The replay's per-frame
metrics gain stencil_bit_draws and sample_copies. The conformance side announces
Texture::SAMPLE_DEPTH_COPY_NOTE for a copy into a multisample Depth16Unorm, which the
buffer-depth-samples d16 rows declare; the case's doc states the current form and its refusal of a
32-bit float depth instead of the old form's -0 difference.
2026-12-03 09:59:39 -08:00
Anees Iqbal b337c83e25 Byte copies: the kernel's heap slot is the kernel stage's; the draw's docs, the README's and API.md's lines, and the device test's all-codes row and counts
The translator's sample kernel named its heap slot under a stage that does not exist (Stage::Kernel
is the compute stage's); fixed with the other error the first build (lavapipe job m3-max-84536)
reported. The runtime README states the measured layout, the form, the refusals left with their
causes, and names this caller on the stencil-export known gap; API.md documents own_draw and
SamplesToBytes and catalogues PrecisionNote::RoundedSampleDepthCopy. The device test gains a
128 x 128 Depth16Unorm row at 4 samples whose 65,536 units are every code once, checks every unit
of the copy back out, and asserts the counts: 2 sample copies a row, and 8 stencil bit draws for a
stencil row on a device without stencil export, else none.
2026-12-03 09:59:39 -08:00
Anees Iqbal 0ce2f39b71 Translator: the resident core deleted; every device compiles the one form, and the tests run it
Every device now compiles the identity domains, the one form: a kernel's
buffer arguments are bound as storage buffers of set 0 where the device
binds them (DeviceProfile::binds_kernel_buffers) and are reached at their
device addresses elsewhere, as every other stage's are; vertex attributes
are fetched by fixed-function vertex input; textures and samplers are
elements of the identity arrays of set 1, named by their resource IDs.
What the one form does not lower is a typed refusal,
Unsupported{IdentityDomains, NotImplemented} with the IdentityCause the
previous commit names.

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

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

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

Verified at the stack's tip, which differs from this commit only by the
five commits after it; the jobs and their results are named in the READY.
2026-12-03 09:15:33 -08:00