Commit Graph
150 Commits
Author SHA1 Message Date
Anees Iqbal 79166a74b1 Leave NaN bits and min/max picks to the device
One work packet, landed as 6 commits (a6e97e7f93..3919c8c94a on archive/development-linear-2026-10-28), in order:

* Leave NaN bits and min/max picks to the device

On the owner's ruling to promise the GPU's native arithmetic with no exact
emulation, delete the NaN and minimum/maximum switch and every form that
only it, or Metal's NaN bits, kept.

What goes:
- DevicePolicy::nan_and_min_max and NanMinMaxPolicy (exact_answers line,
  serde, ExactFormsOverCompilerLimit::nan_and_min_max, the fit leg).
- The module's selects of Metal's NaN: NanEncoding::Device,
  ArithStrategy::Nan and lower/arith/nan.rs down to its answer classes.
  A NaN Metal answers that the device is not measured to answer records
  NativeNanEncoding.
- Metal's operand pick in fmin, fmax, min3, max3, clamp and saturate
  (metal_min_max, metal_saturate, MinMaxRoute): NMin, NMax and NClamp on
  every profile, NativeMinMax where MetalMinMax is not taken.
- Metal's texel NaN rule (TexelNanRoute, the 0x7e00 keeps, the half texel
  NaN keep, the NaN classes of reads, samples and gathers).
- NaN canonicalization before colour and storage writes:
  StorageImageClass::HalfQuietNan and SmallFloatQuietNan, the half write
  NaN classes (HalfNans), the quieted heap small floats, the colour lanes
  that chose 0x7fc00000, the 16-bit colour outputs (StageIo and
  StageModule half_bit_colors, IoType::bits, Degradation::
  ShaderHalfColorBits), PushField::TextureHalfChannels,
  RuntimeFact::StorageTextureHalfChannels and the slot word behind it.
  Such writes record DeviceNanEncoding where the stored NaN may not be
  Metal's (heap and formatless writes, 32-bit and packed float channels).
- The narrow-float vertex fetch's canonical NaN: noted instead.
- The runtime's colour NaN clears (nan_clear::NanClears and its texel
  computation, the inline-first NaN clear refusal, WorkCounts::
  passes_not_inline_actions_nan_clear): the device's clear, announced as
  DeviceNanEncoding. The depth NaN clear and the bit-exact copies stay.
- FAST-PATHS rows for the switch, the half texel keep and the half from
  bits under float controls; the known gap of RADV's sampler NaN; the
  API.md passages and catalogue entries.

Kept: the notes that describe the native answer (NativeNanEncoding,
NativeMinMax, DeviceNanEncoding), the measured deviations they read, the
copy and depth paths, keeps_nan_sign, the heap half-bits twin, the half
rounding and the blended snorm NaN of other lanes.

Versions: SEMANTICS_VERSION 1871, ARTIFACT_FORMAT_VERSION 454,
RUNTIME_VERSION 1652. docs/REFUSALS.md regenerated.

Verified: cargo clippy --workspace --all-targets --all-features -D
warnings, plain and with --cfg m2v_gpu; RUSTDOCFLAGS='-D warnings' cargo
doc --workspace --all-features --no-deps; nextest of metal2vulkan
filtered to the touched modules, fast_paths, catalogue, degradation,
api_surface and profile (see the report for counts), and of the runtime,
validation and conformance unit tests touched. No device test was run.

* Re-bless the API signatures after the NaN and min/max deletion

The table loses the public items the previous commit removed:
NanMinMaxPolicy and its variants, DevicePolicy::nan_and_min_max,
ExactFormsOverCompilerLimit::nan_and_min_max, PushField::
TextureHalfChannels, RuntimeFact::StorageTextureHalfChannels,
StorageImageClass::HalfQuietNan and SmallFloatQuietNan,
StageModule::half_bit_colors, Degradation::ShaderHalfColorBits and
WorkCounts::passes_not_inline_actions_nan_clear.

Verified: python3 scripts/api-signatures/signatures.py --bless; nextest
of the api_signatures, api_surface, refusal_surface and
feature_vocabulary binaries (21 passed); the previous commit's filtered
metal2vulkan run, 1056 passed, plus runtime (53), validation (83 of 84;
the failing c3 venue-identity test names the Apple M4 and touches no
file of this change) and conformance (38) filtered runs.

* Fix the tests the rebase onto development left broken

The rebase of the NaN and min/max deletion onto development left two test
compile errors: the extended-range samples still round through
`half_toward_zero`, which the resolution had dropped with the storage-slot
test that used it, and the RGBX storage cases named `HalfQuietNan`, which
both sides' deletions removed (a half-float twin is `Identity` now).

Verified: cargo clippy --workspace --all-targets --all-features -D warnings,
plain and with --cfg m2v_gpu; RUSTDOCFLAGS='-D warnings' cargo doc.

* Drop a dead dot form and let formatless half slots note conversion twice

select_float_fn still computed dot's scalar result form, which only the
removed NaN canonicalization read. The half-float storage test asserted
that a formatless slot notes DeviceColorConversion exactly when the
profile does not round Metal's way; a formatless slot may also reach a
normalized image, whose conversion is the device's on every profile, so
the note is only required one way there.

Verified: cargo check --workspace --all-targets --all-features is clean.

* Leave the fast division's NaN to the device in its test

The float-maths lane's a_fast_division_answers_metals_nans_on_every_profile
asserted Metal's canonical NaN after the device's OpFDiv where the
profile does not take MetalCanonicalNans. Under the native-arithmetic
ruling the module selects no NaN: the fast division is the device's
OpFDiv on every profile, noted NativeNanEncoding where the device is not
measured to answer Metal's. The test, now
a_fast_division_leaves_its_nans_to_the_device, checks that the module
is the same on both sides of the fact, the note where the fact is absent,
the device's arithmetic, division and denormal notes on every committed
profile, never DeviceNanEncoding, a NaN for each NaN case and 6 / 3
exactly.

Verified: cargo nextest -E 'test(/engine_arith::a_fast_division/)'
passes (2 tests); the previous form failed on amd-780m-hawkpoint-radv
for fast_one_by_negative_nan (0xffc00000, the device's).

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:20 +02:00
Anees Iqbal 4817f3bdfe Take the device's float maths, rounding order and denormals on every device
One work packet, landed as 3 commits (9fd799bdbb..43bdc4ac17 on archive/development-linear-2026-10-28), in order:

* Take the device's float maths, rounding order and denormals on every device

The owner's ruling: promise the GPU's native arithmetic, no exact emulation.
The translation's own Metal-answer forms for float maths go, and the
device's native form is the only form.

What goes:
- DevicePolicy::float_maths (FloatMathsPolicy) and
  DevicePolicy::rounding_order (RoundingOrderPolicy), their exact_answers()
  lines, serde, docs, and the profile state that carried them
  (FloatFunctions::Device, ProfileFields::rounding_order and
  RoundingOrderRoute); RuntimeFact::ExactFormsOverCompilerLimit loses its
  float_maths and rounding_order fields.
- The maths routines of Metal's answers in lower/arith/libm (atan, exp,
  hyper, log, pair, pi, quarter, rcp, root, rsqrt, sincos, tan, trig) and
  their paths in math.rs: off MoltenVK every call takes the device's
  GLSL.std.450 instruction (or Metal's composition of the device's
  instructions), noted NativeTranscendentals; on MoltenVK the device's
  instruction, Metal's own in the module's mode, with its old notes.
- Metal's precise division routine and its fast reciprocal: a precise and a
  fast division are the device's OpFDiv (NativeDivision), and an frem
  without every flag the device's OpFRem.
- The checked OpFmaKHR, the double, integer and half fused multiply-add
  routines, and the tiny-product check (arith.float.tiny): a fused
  multiply-add is OpFmaKHR, the measured 16-bit Fma, OpFmaKHR under the
  16-bit float controls, or the device's Fma (NativeFma).
- Metal's fused chain for dot, mix and fast::sqrt off MoltenVK: OpDot, FMix
  and Sqrt (NativeDot, NativeMix, NativeTranscendentals). MoltenVK, whose
  float functions are Metal's, keeps Metal's chains.
- The f32 denormal flush taken where the device is not measured to read
  denormals as Metal does (no DriverDeviation::MetalFloatDenormals), and the
  floor and ceil flush: those denormals are the device's, noted
  DeviceDenormals.
- FloatTininessAfterRounding is announced on every device off MoltenVK.

What stays: precise fmod's routine (OpFRem is not the exact remainder past a
quotient of 2^24), ldexp on the bits (GLSL Ldexp is undefined past the
exponent range), double support, and every precision note that describes the
native answer. FloatFn::words charges each function a call takes as before
(the device's instruction where a routine's call was counted).

Tests of the deleted forms are deleted; the tests of the native forms now
check the device's instruction, its note and the interpreter's IEEE answer
(the division, remainder, fmod, fused multiply-add, dot, mix, denormal and
tanh tests), and the roll fixture grows to 13,000 operations so two bodies
stay above the roll size without the flushes. The c3 bound and sign-off
tests expect a subnormal product or quotient on lavapipe to stay open
(its multiply and divisions now record DeviceDenormals) and a product on
MoltenVK, measured to flush as Metal does, to keep Apple's verdict.

Docs: FAST-PATHS.md's two rows become device gaps (the maths library and
divisions; dot, mix and fast::sqrt; the tininess; the denormals), API.md's
policy bullet and catalogue entries, ARCHITECTURE.md's decisions bullet.

Versions: SEMANTICS_VERSION 1878, ARTIFACT_FORMAT_VERSION 461,
RUNTIME_VERSION 1660. REFUSALS.md regenerated unchanged; api_signatures.tsv
is re-blessed in a later commit, after the rebase onto development.

Verified on b1ae235a12, before the rebase onto development 4df472aea2
(whose conflicts the commits after this one check): cargo clippy
--workspace --all-targets --all-features -D warnings with --cfg m2v_gpu;
cargo nextest (--test-threads 4) on the touched modules' tests
(lower::arith, lower::sampler face, position and linear, device::tests,
compile::fit, cache, the engine_* suites touched, engine_roll, fast_paths,
api_surface, api_signatures), the runtime's degradation, catalogue, device
and fitted_variant_notice tests, and the whole metal2vulkan-validation
suite but the runtime-sources pin (left to the landing) and
c3::tests::each_moltenvk_device_compares_with_its_own_gpus_metal (a venue
identity check outside the arithmetic). No device tests ran: the device
lanes compile under --cfg m2v_gpu and were adapted, not run.

* Re-bless the public signatures after the float maths switches' removal

The commit before this one was rebased onto development 4df472aea2. This
commit holds what the rebase left to do:

- api_signatures.tsv re-blessed: against development it drops
  FloatMathsPolicy and RoundingOrderPolicy (their records, fields and
  variants) and ExactFormsOverCompilerLimit's float_maths and
  rounding_order fields. docs/REFUSALS.md regenerated, unchanged.
- corpus-draw-ab's --policy error message: the conflict resolution lost the
  string's line continuation and left a run of spaces in it.
- The DeviceDenormals docs (PrecisionNote and the API.md catalogue entry)
  no longer say the minimum and maximum functions and saturate answer
  Metal at a denormal on every device: under the default policy, and on
  every device once Metal's picks go, they are the device's NMin, NMax and
  NClamp, whose pick of a denormal NativeMinMax records.
- Doc comments this lane wrote past 100 columns refilled.

Verified on this tree: cargo clippy --workspace --all-targets
--all-features -- -D warnings, plain and with --cfg m2v_gpu, clean;
RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps,
clean; cargo nextest (--test-threads 4) of metal2vulkan filtered to the
touched modules (lower::arith, lower::sampler, device::tests, compile::fit,
cache, the touched engine_* suites) and fast_paths, catalogue,
degradation, profile, mechanism, api_surface and api_signatures: 818 run,
817 passed; of the runtime's degradation, catalogue, device and
fitted_variant_notice tests and the whole metal2vulkan-validation suite:
1402 run, 1400 passed. The three failures fail identically on development
4df472aea2 (run there): engine_float_call_notes::
exported_float_notes_are_the_ones_a_compile_records (fabs_f16 on
moltenvk-m3 records NativeHalfConversion, the half decode's note) and
c3::tests::each_moltenvk_device_compares_with_its_own_gpus_metal (a venue
identity check); and the runtime-sources pin, left to the landing. No
device tests ran.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:20 +02:00
Anees Iqbal 70068f7cc0 Leave color writes to the device's own conversion
One work packet, landed as 6 commits (886b08c25a..4df472aea2 on archive/development-linear-2026-10-28), in order:

* Leave color writes to the device's own conversion

The owner ruled that the GPU's native arithmetic is the contract and
the exact emulation goes. The fragment stage no longer rounds a float
output to Metal's codes before a color write where the device is not
measured to convert as Metal does: every lane is written as computed
and the device converts it.

Removed: the shader's unorm, snorm, sRGB, packed 16-bit (through half)
and small-float roundings at Metal's default rounding mode, the
draw-selected rule (ChannelWrite::Selected, PushField::ColorWriteRule,
GraphicsState::color_write_rules, StageIo::selected_colors and the
rule words), and the sRGB color-write table
(SyntheticBinding::ColorWriteTable, WriteSource::ColorWriteTable,
bind::color_write_table) with its runtime and validation binders.

Kept: the rounding to nearest even under TextureWriteRoundingMode::
NearestEven (an explicit Metal API mode no device's conversion makes),
word attachments the function encodes, the storage-form blends of
framebuffer fetch, the 16-bit output route, and the notes. A channel
the device converts unmeasured records DeviceColorConversion; a float
NaN to a half-float channel records DeviceNanEncoding where the device
is not measured to store Metal's. A blend of one and zero is dropped
from an attachment whose channels convert by a rule, as before, so a
device without the blend still draws it.

Bumps SEMANTICS_VERSION to 1874, ARTIFACT_FORMAT_VERSION to 457 (codec
lists lose fields and variants) and RUNTIME_VERSION to 1655 (the
binder no longer binds the table).

Verified: cargo clippy --workspace --all-targets --all-features -D
warnings, plain and with --cfg m2v_gpu, clean; cargo nextest (color
writes, link, stage io, fragment, binder, blend8, api_surface, srgb,
extended range, word, fetch, fast_paths, catalogue, degradation,
profile, codec, compile, push): 694 of 694 passed. Device lanes not
run (no device tests in this lane).

* Leave storage-texture writes to the device's own conversion

On the owner's ruling that the GPU's native arithmetic is the contract,
a kernel's (or any stage's) float or half write to a storage texture
no longer rounds to Metal's codes in the shader where the device is
not measured to store them.

Removed: the normalized write's rounding by the bound format's class
(lower/texture/norm_write.rs, NormWrite, the slot's norm_write flag,
the heap's norm routine and its census entry), the 1-bit alpha's
rounding on a device that stores every other normalized channel as
Metal does (StorageImageClass::OneBitAlpha, the heap's one-bit class
test, texel_format::heap_one_bit_indices), ARGB8Unorm's code rounding
(RotateArgb now only rotates), and the half-float write's rounding
toward zero (StorageImageClass::HalfTowardZero): a half-float write
takes Identity where the device stores Metal's NaN, else HalfQuietNan.

Recorded instead: PrecisionNote::DeviceColorConversion for a write
that may reach a normalized format (ARGB8Unorm included) on a device
without MetalNormStorageWrites, or a 1-bit alpha on one with it, and
for a half-float write on a device without MetalHalfStorageWrites;
where measured, the module requires the property. Imageblock slice
writes record the same.

Kept: the HalfBits route (a half-float texture written through its
unsigned integer alias where the device does not keep a half's NaN
bits) as it is, its float texels still rounded toward zero, since the
alias has no conversion of the device's; the NaN quieting classes;
sRGB encodes; extended-range encodes; RGB9E5's word.

The device lanes for normalized and half storage writes, and the
extended-range planes lane's ARGB8 alpha, now hold a channel to
Metal's only where the device is measured to store it, and print the
rest.

Verified: cargo clippy --workspace --all-targets --all-features -D
warnings, plain and with --cfg m2v_gpu, clean; cargo nextest
(engine_handles, engine_extended_range, engine_link, engine_rgbx,
engine_texture, metal::format, texel_format, bind::heap, engine_access,
engine_heap, engine_texel_nans, storage, lower::texture,
lower::arith::tests, fast_paths, catalogue, degradation, profile,
api_surface): 1028 run, 1 failure fixed, then engine_link 26 of 26.
Device lanes not run.

* Leave Depth16Unorm depth stores to the device's own conversion

The owner's ruling ("Just promise the GPU's native arithmetics, no more
'exact' emulation") makes the device's own conversion of a fragment's
depth to a Depth16Unorm code, and its own depth bias, the contract.
The fragment stage no longer rounds its depth to Metal's 16-bit code,
nor adds Metal's bias in the shader, where MetalDepth16Stores or
MetalDepth16BiasedStores is absent: the depth is written as computed
and the attachment's fixed-function bias applies on every device.

Deleted with it: lower/stage_io/depth16.rs and its arith tests, the
engine_depth16_codes tests, the pipeline's depth16 stage form and its
variant key fields, the Depth16 runtime facts and their codec entries,
the DepthBias push field, the binder's depth16 selection and state, the
runtime's sided-bias push and its work count.

Removed public items: Degradation::ShaderUnormDepth and
Degradation::UnormDepthSlope (nothing can record them any more; their
API.md catalogue entries go too), WorkCounts::depth16_sided_draws,
metal::state::depth16_bias and depth16_bias_side, the four RuntimeFact
Depth16 variants, PushField::DepthBias, and the depth16 fields of
VariantKey, BindState and BindShape. UnormDepthBias and
UnormDepthRounding stay: they describe the native answer and are still
announced where the drivers are not measured to give Metal's codes.

The FAST-PATHS "Costs of matching Metal" bullet for Depth16 goes; the
API.md bias and rounding entries now describe the native answer. The
device lane unorm_depth_bias holds Metal's codes only where measured.
The cache versions were already taken for this lane (1874/457/1655).

Verified: cargo clippy --workspace --all-targets --all-features -D
warnings, plain and with --cfg m2v_gpu; rustdoc with -D warnings;
cargo nextest over mechanism, api_tests, bind_shape, pipeline::compile,
link tests, engine_stage_io, engine_fragment, metal::state,
bind::graphics, cache tests, engine_graphics_binder, depth, fast_paths,
catalogue, degradation, profile, api_surface, notice, work_counts,
draw_shape, render_state and codec across metal2vulkan,
metal2vulkan-runtime and metal2vulkan-conformance: 750 passed. Device
lanes not run; refusals regenerate unchanged.

* Drop two doc references to removed colour and depth16 machinery

The runtime's stage digest doc still listed a synthesized depth16
fragment stage among the link's stages, and the sRGB storage lane's
module doc still named bind::color_write_table, both removed on this
branch. The stage list now names only the stages the link still
synthesizes, and the lane's doc names bind::SRGB_RESOLVE_THRESHOLDS,
the table it reads.

Doc comments only; verified by cargo fmt and the rustdoc build below.

* Re-bless the public signatures after the write conversions' removal

The branch removed the Metal colour-write rule selection, the shader's
storage-texture rounding and the shader's Depth16Unorm codes; the
table now drops their 30 public records (ChannelWrite::Selected,
PushField::ColorWriteRule and DepthBias, the ColorWriteTable binding
and write source, bind::color_write_table, GraphicsState's
color_write_rules, the four RuntimeFact Depth16 variants,
StorageImageClass::HalfTowardZero and OneBitAlpha, the depth16 fields
of LoweringInputs, VariantKey, BindState and BindShape,
metal::state::depth16_bias and depth16_bias_side,
Degradation::ShaderUnormDepth and UnormDepthSlope, and
WorkCounts::depth16_sided_draws). Removals only; nothing added or
changed.

Verified: python3 scripts/api-signatures/signatures.py --bless, the
diff read line by line, and cargo nextest over api_signatures and
fast_paths: 17 passed.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:20 +02:00
Anees Iqbal b7a62be64b Drop the exact tile store: a loaded snorm or RGB9E5Float attachment keeps the device's load and store
One work packet, landed as 7 commits (c18e40911e..53fcb867b4 on archive/development-linear-2026-10-28), in order:

* Drop the exact tile store: a loaded snorm or RGB9E5Float attachment keeps the device's load and store

The owner's ruling (2026-10-27): the GPU's native answers are the contract,
with no exact emulation. TileStorePolicy and DevicePolicy::tile_store go,
with the load pass's rewrite of a signed normalized attachment's minimum
codes and an RGB9E5Float attachment's unnormalized words, and the
unused-bits module's two rules that served only it. The load pass keeps the
extended-range, padded and bfloat attachments, whose raw codes no device
holds as Metal's (capability). snorm-minimum-kept and shared-exponent-kept
still announce the native answer at each such draw; DriverFact::TileStoreIsMetals
still keeps them quiet on MoltenVK.

Docs: the ledger row and docs/API.md's policy bullet go; the catalogue
entries and the notices' docs drop the switch. The validation lane tests the
one form.

Verified: cargo clippy --workspace --all-targets --all-features -D warnings;
nextest of bind::unused_bits, tests::fast_paths, tests::owned_divisions,
api_surface and the runtime's degradation and catalogue tests (49 passed).

* Drop the exact color resolve: the device's average resolves every attachment it can

The owner's ruling (2026-10-27): the GPU's native answers are the contract.
ResolvePolicy and DevicePolicy::resolve go, with the crate-owned resolve
drawn after the pass for a format of Metal's rules on a device whose average
is not measured to be Metal's. The device's AVERAGE in the pass is the one
form there, announced device-rounded-resolve as before. The crate-owned
resolve keeps the resolves no device's average can write: an extended-range
attachment's raw codes, a resolve into the attachment's format's sRGB twin
(VUID-VkSubpassDescription-pResolveAttachments-00850), and a fetching pass's
sample planes, read in place of merging them back.

Docs: the ledger row and docs/API.md's policy bullet go; the shader-resolve,
device-rounded-resolve and unmeasured-resolve entries describe what remains
(unmeasured-resolve's cost text with them).

Validation: the lanes ran under exact_answers, so their expectations follow
the device's resolve: resolve_kind is device-rounded-resolve wherever the
average is not measured to be Metal's; the exact form's tests
(color_resolves_against_metals_rules, the caller's-image copy path, its cost
scout) go; the Maps-form and probe-6 resolves hold Metal's texels where the
fact holds and the announced bound elsewhere; shader-resolve's lane site
moves to the extended-range resolve lane.

Verified: cargo clippy --workspace --all-targets --all-features -D warnings,
plain and under --cfg m2v_gpu; nextest of fast_paths, the degradation and
catalogue tests, the runtime's resolve, sample-plane, framebuffer-fetch and
stand-in tests, and api_surface (129 passed). The device lanes were not run.

* Drop the depth twin: every Depth32Float texture is its D32_SFLOAT depth image

The owner's ruling: promise the GPU's native arithmetic, no exact emulation.
A Depth32Float texture the program only reads was held in an R32_SFLOAT
image with a D32_SFLOAT twin for comparisons, on a driver not measured to
keep every float in a depth image (plan_depth_twin), and a multisampled one
in R32_SFLOAT under MultisampleDepthTwinPolicy::Exact. Both forms exist only
to keep Metal's texel bits; the native form is the depth image, whose
possible clamp or denormal flush the existing notices already announce at
the write (restricted-depth-upload, depth-denormals).

Removed:
- MultisampleDepthTwinPolicy and DevicePolicy::multisample_depth_twin, its
  FAST-PATHS row, its known-gap paragraph and its fast_paths choice.
- image_plan::plan_images, plan_depth_twin, holds_depth_in_colour,
  holds_multisample_depth_in_colour, ImageFacts::depth_loss and
  ImageFacts::multisample_depth_twin.
- The twin image of a texture (Image::twin), its copies in replace_region,
  blits and host copies, Owner::HeapTwin and the heap plan's twin (heap_extent
  now takes the image alone; check_heap_base the route alone; Mine is gone).
- The depth-twin degrade kind (Degradation::DepthTwin) and its docs/API.md
  catalogue entry.
- The bind side: TextureFacts::depth_twin, TextureShape::Texture::depth_twin,
  ImageViewDesc::twin and sampled_view's twin argument.
- A sparse Depth32Float texture is no longer refused for needing a twin.
- copy_unit refuses any depth format held in colour (none is now).

Tests: the twin tests are replaced by one that holds a Depth32Float texture
in its D32_SFLOAT image on every committed profile (single-sampled,
array, cube, render target, 2 and 4 samples); the heap and copy-plan unit
tests follow the one-image forms. The validation lanes that expected a twin
(texture_blits' upload lane, clear_reach, resolves' read-only depth pass,
texture_fills, heap_textures) now expect the depth image and its notices;
conformance's fill cases allow Depth32Float's digest unchecked where
restricted-depth-upload fires, as Depth32Float_Stencil8's already is.

RUNTIME_VERSION 1656: what a run of an unchanged pipeline does with such a
texture changes.

Verified: cargo clippy --workspace --all-targets --all-features -D warnings,
plain and with --cfg m2v_gpu; nextest of the translator and runtime
image_plan, heap, copy_plan, texture_facts, families, texture, degradation,
catalogue, fast_paths, profile, api_surface, bind and driver_facts tests
(973 passed). Device lanes not run.

* Drop the magnitude stand-in and the sign strip: a stored signed depth is tested natively

On the owner's ruling to promise the GPU's native arithmetic, a render target's
32-bit float depth that may hold a negative value or a NaN is no longer
switched on to render over a magnitude stand-in, and no pass strips the signs
of the words it did not write. The device's depth test compares the stored
value as it is and its pass keeps every bit; the runtime announces that
answer.

What goes:
- texture/signed_depth.rs, with the switch-on flags, the stand-in plans, the
  write-backs and the sign strips in render.rs and render_pass.rs;
- Cause::Magnitude in attachment_stand_in.rs;
- the translator's DepthMagnitudeModule (bind/depth_magnitude.rs) and the
  DepthStencilCopy::{DepthMagnitude, MagnitudeBits} draws;
- OwnedModule::DepthMagnitude;
- copy_plan's holds_unlike_its_stand_in;
- WorkCounts' signed_depth_switch_ons, magnitude_stand_in_passes,
  magnitude_write_backs and sign_strips (and their counters).

What stays, describing the native answer:
- signed-depth-test is announced where a write (a host upload, a blit, a copy,
  a written NaN clear, a new target's pattern loaded) may store such a value in
  a render target's Depth32Float or Depth32Float_Stencil8 depth on a device
  that keeps it and whose test is not Metal's (no
  DriverFact::DepthTestComparesMagnitudes);
- where the device's test is Metal's own (MoltenVK), signed-depth-test is
  announced only at a pass that loads and stores the depth and sets a state
  with depth writes but draws under none, which keeps the signs.

The denormal notice no longer mentions the stand-in.

Docs:
- FAST-PATHS drops "A stored negative or NaN depth is tested by its magnitude"
  and the matching known gap;
- FAST-PATHS also drops "A Depth16Unorm depth whose code the fragment stage
  writes is tested after the stage" (the shader write is the translator's to
  remove);
- API.md's depth-denormals and signed-depth-test entries now state the native
  answer;
- doc comments the earlier steps left past 100 columns are reflowed, and the
  remaining depth-twin mentions (bind docs, fast_paths' comment, three
  conformance known-gap todos) are dropped.

Validation:
- depth_denormals' lanes check every read, sample and comparison against
  Metal's, the depth tests only where the device's test is Metal's own, and
  the notices where they now fall;
- the sign-strip lane is deleted;
- texture_blits expects signed-depth-test at the render-target upload.

Verified: clippy with all targets and all features, plain and with
--cfg m2v_gpu, across the workspace; rustdoc with -D warnings; the runtime's
nextest suite (1150 passed); the translator's touched tests (fast_paths,
catalogue, degradation, api_surface, depth_stencil_copy, owned_divisions,
profile, driver_facts, bind, policy: 671 passed); validation and conformance
non-device tests in the touched areas (230 passed). Device lanes were not run.

* Re-bless the API signatures and regenerate the refusal surface

The lane's removals leave the public surface without:
- MultisampleDepthTwinPolicy, TileStorePolicy and ResolvePolicy, with their
  DevicePolicy fields;
- TextureFacts::depth_twin, TextureShape::Texture's depth_twin and
  ImageViewDesc::twin;
- DepthMagnitudeModule and depth_magnitude_module;
- DepthStencilCopy::{DepthMagnitude, MagnitudeBits};
- Degradation::DepthTwin;
- WorkCounts' signed_depth_switch_ons, magnitude_stand_in_passes,
  magnitude_write_backs and sign_strips.

The refusal surface loses four sites:
- the sparse depth-twin refusal (SparseHeaps, texture.rs plan_sparse_texture);
- the host heap's twin refusal (HeapTextureMemory, heap.rs host_heap_plan);
- the heap twin's DetachTextures site (heap.rs heap_texture_at);
- the sign strip's SeparateMultisampledDepthStencil site
  (signed_depth.rs sample_strip).

Verified: python3 scripts/api-signatures/signatures.py --bless and
python3 scripts/refusal-surface/refusal_surface.py, then the api_signatures,
refusal, api_surface, published_crates, fast_paths and degradation_catalogue
tests (81 passed).

* Format the policy import lists after the half switches' removal

The rebase onto development (where the half-precision lane removed three policies) kept both lanes' removals; cargo fmt re-flows the shortened lists.

Verified: clippy (workspace, all targets, all features) clean; 709 touched tests (fast_paths, api_surface, api_signatures, catalogue, degradation, profile, bind, image_plan, published_crates, policy) pass.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:20 +02:00
Anees Iqbal e87d6e558f Drop the exact read of a 16-bit float texel's own bits
One work packet, landed as 6 commits (b07aaeec71..ffa0751e77 on archive/development-linear-2026-10-28), in order:

* Drop the exact read of a 16-bit float texel's own bits

The owner's ruling of 2026-10-27 ("just promise the GPU's native
arithmetics, no more 'exact' emulation") makes the device's decode of a
16-bit float texel the only answer a `half` or `float` read gives. So
`DevicePolicy::half_texel_bits` and `HalfTexelBitsPolicy` go, with
everything only its `Exact` value reached:

- the slot's second binding of the texture's unsigned-integer alias
  (`RuntimeFact::HalfBitsTexture`, `metal::format::half_bits_read_view`,
  `DeviceProfile::reads_half_texel_bits`), its declaration, the read's
  branch on the bound class and its integer widening;
- the snapshot copy's alias arm and the read's codes beside the value;
  `snapshot_copies_alone` now expects the copy's one fetch a slot;
- the binder's alias view and its in-shader swizzle for it, and the
  runtime's alias view format on a sampled image;
- the fit's `half_texel_bits` field of `ExactFormsOverCompilerLimit`
  and the runtime's name for it.

The read keeps the device's decode and its `DeviceNanEncoding` note.
The `StorageImageClass::HalfBits` storage path is untouched. Tests of
the deleted form go (`engine_half_texel_bits`, the snapshot alias and
swizzle tests, the golden check of the copy's arm); the ledger row goes,
and the conformance gap rows' reasons no longer cite the switch.

SEMANTICS_VERSION 1872, ARTIFACT_FORMAT_VERSION 455 (a RuntimeFact
variant and a field gone), RUNTIME_VERSION 1653.

Verified: cargo clippy --workspace --all-targets --all-features
-D warnings clean; nextest over fast_paths, catalogue, degradation,
profile, mechanism, compile::fit, engine_snapshot_exact,
engine_srgb_raw, engine_swizzled_storage, snapshot_codes, codec and
image_plan (276 tests) passed. api_signatures is re-blessed at the
lane's end.

* Drop the shader's exact 16-bit float blend of a half output

The owner's ruling is to promise the GPU's native arithmetic, so the
`half_blend` switch (`HalfBlendPolicy`) goes. Under its exact value the
pipeline named a blended 16-bit float attachment of a `half` output, and a
32-bit float one of a four-lane output under fast math, for the interlocked
storage form alone (`FramebufferFetchInputs::half_blends`), so the shader
computed Metal's blend where the device would otherwise blend. That path
is gone: `compile::blended_in_shader`, the `half_blends` set and its
"optional" handling in the fetch lowering, `fetch::blends_half_in_shader`,
`half_output` and `half_blend_attachment`, the policy field, the profile
field and the fit's `half_blend` flag in
`RuntimeFact::ExactFormsOverCompilerLimit`.

Kept: a fetched attachment's blend (the function reads it, so no Vulkan
blend applies) and an attachment a draw moves into the storage form
(`VariantKey::interlocked_colors`), both capability. `HalfOutputPrecision`
still describes the device's blend and is recorded as before; with no
switch it is no fast-default row, so the ledger test classes it with the
notes docs/API.md section 9 states. The ledger's `half_blend` row goes,
and the device-gap rows no longer cite it.

Tests of the exact form go (`engine_fetch_float32_reach`, two
`engine_stage_io` tests); the validation lane `half_output_blends` runs
under the device's blend alone, and `corpus-draw-ab --policy` no longer
takes `half_blend`.

Verified: cargo clippy --workspace --all-targets --all-features -D
warnings clean; nextest of engine_stage_io, compile::fit, fast_paths,
device::tests, pipeline::api_tests, lower::fragment, catalogue,
degradation, fitted_variant_notice, api_surface and link render tests
(246 passed), and of every fetch, blend, interlock and half_output test
(199 passed). Golden tables not run (re-blessed on development).

* Round half by the device's own conversion or quantize

The owner's ruling is that the GPU's native arithmetic is promised, with
no exact emulation. This deletes the half_rounding switch
(HalfRoundingPolicy, ProfileFields::half_rounding, HalfRoundingRoute)
and everything that only its Metal value reached:

- QuantizeForm::Integer: Metal's rounding to half by integer arithmetic,
  its texel routine arms (grid16_by_integers), round_texel_plain and
  texel_round's f32_to_half_by.
- The NoContraction barrier on the conversion pair, and the
  MetalHalfConversion requirement it carried.

A half now rounds by the device's form:

- Controlled: the float-controls route (ANV, RADV), unchanged.
- Converted: the device's conversion pair, wherever the profile has
  shaderFloat16. It records NativeHalfConversion, MoltenVK included.
- Device: OpQuantizeToF16 with its denormal arm, which becomes the
  QuantizeForm default. It records NativeHalfQuantize unless the driver
  is measured as Metal's (MetalHalfQuantize).

A Converted module reads a half from its bits by the device's widening,
MoltenVK now included. The tests that held a NaN's bits there now accept
any NaN where the module records NativeHalfConversion: engine_access,
engine_half_moves, engine_typed_threadgroup and engine_texel_nans.

The integer conversion of an int to half, and the integer decode inside
loops and on profiles without shaderFloat16, stay: they have no native
form with a recorded bound.

Docs:
- FAST-PATHS.md: the three half_rounding rows are deleted.
- API.md: the degrade catalogue entries are rewritten without the
  switch.
- HOWTO.md: the half paragraph is rewritten.

Tests: deleted the integer-form tests, and rewrote the engine_native_half
and engine_arith half-rounding tests to the device's forms.

SEMANTICS, ARTIFACT_FORMAT and RUNTIME versions were already bumped to
this lane's reserved numbers.

Verified:
- cargo clippy --workspace --all-targets --all-features -D warnings,
  plain and with --cfg m2v_gpu: clean.
- cargo nextest over half, narrow, texel_round, lower::arith,
  engine_arith, engine_sampler, engine_link, fast_paths, device::tests,
  compile::fit, catalogue, degradation, fitted_variant_notice,
  api_surface, engine_texture, lower::texture and engine_snapshot
  (939 tests): the 11 failures were fixed, and the 161 tests they touch
  re-run green.

* Take the device's float Fma for a half fused multiply-add

The owner's ruling is that the GPU's native arithmetic is promised, with
no exact emulation. Where neither MetalHalfFma (the device's 16-bit Fma
measured as Metal's) nor a 16-bit OpFmaKHR under the float controls is
offered, a half fused multiply-add used to call Route::HalfOdd. That is
the translation's round-to-odd routine of Metal's once-rounded answer;
off MoltenVK it was taken only under FloatMathsPolicy::Exact. It now
takes Route::Native under every policy: the device's float Fma, its
result rounded to half, noted NativeFma.

Removed: Route::HalfOdd, its census name (arith.fma.half), its define,
emit, words and routine arms, and half_form. Routine::words,
Routine::words_among and complete no longer take the quantize form, now
that no routine holds a half rounding. half_sum stays, since the
extended-range blend uses it.

Docs: the fma module docs, the narrow docs, NativeFma's and
DeviceSignedZeroInfNan's docs, their API.md catalogue entries, the
runtime NativeFma declaration, and the FAST-PATHS float-maths row's
mention of the half routine.

Tests:
- The HalfOdd rounding test becomes a test of the two 16-bit routes.
- The mix and dot half tests run through F16Khr.
- The route, words and lane-count tests drop HalfOdd.
- The engine_arith fma, zero-sign, chain and denormal-rounding tests
  expect the inline device Fma, and NativeFma within one half ulp.

Verified:
- cargo clippy --workspace --all-targets --all-features -D warnings,
  plain and with --cfg m2v_gpu: clean.
- RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features
  --no-deps: clean.
- cargo nextest over lower::arith, engine_arith, engine_simd, engine_agx,
  lower::sampler::face, fast_paths, catalogue, degradation, api_surface,
  engine_native_half, engine_extended_range, fused and fma (938 tests):
  935 passed. The three engine_arith failures were fixed, and
  engine_arith re-ran 43 of 43 green.

* Bless the public signatures after the half switches' removal

These are the public items lane C's commits removed:
- HalfRoundingPolicy, HalfBlendPolicy and HalfTexelBitsPolicy, and
  their variants;
- FramebufferFetchInputs::half_blends;
- metal::format::half_bits_read_view;
- DeviceProfile::reads_half_texel_bits;
- RuntimeFact::HalfBitsTexture.

RuntimeFact::ExactFormsOverCompilerLimit also loses its half_rounding,
half_blend and half_texel_bits flags.

docs/REFUSALS.md re-derives unchanged: no refusal changed.

Verified:
- signatures.py --check: clean.
- cargo nextest of api_signatures, api_surface, fast_paths, catalogue,
  degradation, device::tests, compile::fit, fitted_variant_notice and
  published_crates: 171 of 171 passed.
- scripts/api-docs: clean.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:20 +02:00
Anees Iqbal d4412c9c95 Key the driver tables by driver and GPU, never by release
One work packet, landed as 3 commits (a1f70a4962..ae43dbc9b3 on archive/development-linear-2026-10-28), in order:

* Key the driver tables by driver and GPU, never by release

The owner's ruling: the driver-release table goes. A driver's measured deviations, defects and
runtime facts were keyed on `driverVersion` windows, and a device whose exact identity (driver,
vendor, deviceID and release) was not measured fell off every measured answer onto the exact
paths, with an informational `metal2vulkan-unmeasured-driver` message, and a release past the last
measured recorded `PrecisionNote::BeyondMeasuredDeviation` in every module.

Now every row of `device::driver_facts` (DEVIATIONS, DEFECTS, MEASURED) and of the runtime's
`driver_defects` names a driver and, where it was measured on some alone, a vendor and a GPU
(`deviceID`, read by `canonical_device_id`), and holds at every release of that driver.

Removed:
- `Measured::{first, last}`, `Standing`, `NAMED_RELEASES`, `MeasuredDevice`, `MEASURED_DEVICES`,
  the `mesa`/`nvidia`/`moltenvk` release encoders;
- `DeviceDescription::{measured_identity, driver_facts_withheld, measured_gpu,
  assumed_unmeasured}` and `DriverFact::assumed_where_unmeasured`;
- the runtime's `DeviceOptions::assume_unmeasured_identity`, `DeviceProperties::driver_facts_withheld`,
  `unmeasured_driver_message` and the `metal2vulkan-unmeasured-driver` message;
- `PrecisionNote::BeyondMeasuredDeviation`, its degrade code `beyond-measured-deviation`,
  `ProfileFields::deviations_beyond` and `DeviceProfile::driver_deviations`;
- the runtime defects' clean list is GPUs alone (the RTX 5080 Laptop GPU, the Radeon 780M).

Rows the release windows made redundant were merged (MoltenVK 1.4.1's and 1.4.2's: 112 deviation
rows to 86, 98 runtime fact rows to 80). Two MoltenVK defects measured on Apple's GPUs now name
MoltenVK on every GPU (`TimestampPoolsAreCounterSampleBuffers`,
`DepthStencilImagesStayGpuOptimized`), keeping the reach the unmeasured-identity rule gave them.

What changes on the committed profiles: RADV's RDNA2 and RDNA3 captures take RADV's
`RobustIndexFetchReadsZero` and `InterpolationNeedsTheWholeQuad`; ANV's Arrow Lake and Tiger Lake
captures take ANV's driver-wide rows (hidden aliased writes, host-transfer bytes, the first sparse
resource's wait, the dispatched copies) and `VertexGroupingNotApples`; NVIDIA's Pascal and RTX 50
desktop captures take `DepthImageKeepsDenormals`; lavapipe takes its 26.2.4 rows
(`SubmissionsWithoutSignalsMerge`, the 8-bit linear filter's bound); MoltenVK's capture takes the
rows measured at 1.4.2 on its deviceID (`MetalFullQuads`, `FragmentDepthKeepsDepth16Codes`,
`BlendlessColorAttachmentsWarn`, the heap colour layouts). A defect fixed in a later release (the
780M's implicit preprocessing, broken at 26.0.8 and clean at 26.2.4) is now the GPU's at every
release.

SEMANTICS_VERSION 1869, ARTIFACT_FORMAT_VERSION 452 (a `PrecisionNote` member removed),
RUNTIME_VERSION 1650.

Verified: clippy clean (workspace, all targets, all features; plain and `--cfg m2v_gpu`); the core
suites (metal2vulkan, -runtime, -air, -devtools) pass but the golden and fixture tables, whose M4
columns and changed outputs are re-blessed on development after this lands.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.

* Re-bless the engine inventory and the golden tables

Blessed on development at b1ae235a12, after the Apple M4 profile left (its columns go) and the
driver tables stopped naming releases (the committed RADV, ANV, NVIDIA, lavapipe and MoltenVK
captures take the rows their drivers and GPUs were measured with, which changes their modules).

Verified: bless_engine_inventory, bless_golden_hashes and bless_engine_goldens each passed
(exit 0) in a tree at b1ae235a12.
2026-10-28 17:24:20 +02:00
Anees Iqbal 6063e66a7c Drop the retired degrade codes
The owner asked for the retired notice codes to go. A kind that no longer
fires is now removed with its code, as any removed public item is; nothing
keeps the history of codes.

- Degradation::RETIRED_CODES (18 codes) is gone, with its rows in
  api_signatures.tsv (re-blessed).
- tests/degradation_codes.txt, the list of every code ever issued, and
  every_code_ever_issued_is_live_or_retired, which held it equal to the
  live and retired codes, are gone.
- codes_are_distinct_and_decode no longer checks retired codes, and
  the_catalogue_lists_every_kind_and_only_them no longer reads retired
  lines.
- docs/API.md's catalogue loses its 18 retired entries; the contract line
  and the runtime's module docs say a code is never renamed, and a kind
  that no longer fires goes with its code. CONTRIBUTING.md drops the
  ever-issued list's rule.
- Validation's C3 test drops the retired code from the announced list it
  judges.

Verified: metal2vulkan-runtime's degradation, catalogue and degradation-site
tests (17 of 17) and validation's
an_announced_deferred_near_equivalent_stays_open_with_its_reason pass;
signatures.py --bless leaves two fewer records.

Originally 3f7ced85af (archive/development-linear-2026-10-28).
2026-10-28 17:24:20 +02:00
Anees Iqbal ec72c052dd Answer as one macOS release, 27.0.1, on every host
The owner's ruling: the runtime imitates the latest measured release
only, not the history of releases. Capabilities (GPU family, features,
limits) still follow the GPU; every answer that differs by release is
macOS 27.0.1's (build 26A434, measured on an Apple M3 Max), on every
host, whatever release it runs.

What changed:
- metal_level.rs becomes metal_release.rs: the public const
  MACOS_RELEASE ("27.0.1") and the release's answers in one place
  (heap block placement per family, the nil-texture stack alignment,
  the mipmap rule, a depth/stencil state's resource ID below Apple10).
  The pixel-format table and the private properties hold 27.0.1's
  answers alone.
- Removed the MetalLevel enum and its 26.7 row, the host-release read
  and the level choice, DeviceOptions::metal_level,
  RawDevice::metal_level and DeviceProperties::metal_level.
- Removed what existed only for 26.7: the indirect-dispatch-of-another-
  type refusal and its predication tracking, the depth/stencil resource
  ID refusal, the M3 Max GPU row counting for heap blocks, PVRTC's
  unmeasured heap placement, and the M4 mipmap stand-in emission.
- Problem::HostReleaseUnmeasured (the Unproven site),
  Problem::IndirectDispatchOfAnotherType and
  Problem::DepthStencilResourceId are gone. The Unproven type is
  untouched.
- Degradations metal-level-below-host, metal-level-not-macos and
  mipmaps-as-apple-m4 are retired (RETIRED_CODES, the retired section
  of docs/API.md); mipmap-tie-rounding's trigger and cost drop the 26.7
  clauses.
- Conformance: the recordings keep their "metal_level": "27.0.1" key as
  a fact about the recording; record and replay compare it with
  MACOS_RELEASE. Venue no longer carries a level.
- Validation's runtime_lane tests run on the default device, with the
  26.7-only tests and level loops removed.
- A runtime unit test now holds the block-compressed kind on ASTC 4x2,
  its one remaining trigger, in place of PVRTC at 26.7.

Docs: docs/API.md, docs/FAST-PATHS.md, docs/RUNTIME-PORTING.md and the
runtime README; docs/REFUSALS.md and docs/METAL-COVERAGE.md
regenerated (CONFORMANCE-COVERAGE.md regenerated, unchanged); the
signature table re-blessed with scripts/api-signatures/signatures.py.

Carried onto development from the parked development-performance branch
(a23f8181d9 there). The three conflicts were that branch's pipeline-record
hook (RawDevice and DeviceOptions fields and their Debug impls), which
development lacks: development's side is kept, without the release field.

Verified: cargo check --workspace --all-targets --all-features, plain and
with --cfg m2v_gpu; refusal_surface.py, signatures.py --check and the two
coverage generators leave the committed files unchanged.

Originally 79bb9749d3 (archive/development-linear-2026-10-28).
2026-10-28 17:24:20 +02:00
Anees Iqbal cfe3cadd65 Count a render target's shadow over host pages apart from a shader write's
One work packet, landed as 3 commits (fd42939b4c..6801186813 on archive/development-linear-2026-10-28), in order:

* Count a render target's shadow over host pages apart from a shader write's

What: WorkCounts::host_texture_shadows_written (a texture over host pages made a shadow because
its usage renders into it or writes it) is split into two counts:
- host_texture_shadows_render_target: the usage holds RenderTarget, whatever else it holds. A
  texture of both RenderTarget and ShaderWrite counts here, and so does an Unknown usage (Metal
  reports every usage for it).
- host_texture_shadows_shader_write: the usage writes it through a shader (ShaderWrite or
  ShaderAtomic) and does not render into it.
ShadowCause::Written becomes ShadowCause::RenderTarget and ShadowCause::ShaderWrite in
in_place.rs. Render target wins because such a texture stays a shadow whatever a check of shader
writes could show.

Why: whether guest frames make shader-written textures over host pages at all decides whether
writing them in place is worth its check. The old count lumped them with render targets, so no
run could tell. Writing them in place is parked on park/shaderwrite-in-place.

The shadowed-texture notice's words are unchanged for both causes, and every texture takes the
path it took. No run's answer or announcement changes, so RUNTIME_VERSION is unchanged.

Tests:
- tests::in_place's decision test now expects each cause by usage. The usages include render
  target with shader write, render target with atomic, shader write with atomic, and every usage.
  It also checks that a shader write's notice reads as a render target's.
- New device lane in_place_textures::textures_that_render_or_write_count_their_shadows_apart:
  64x64 R32Uint textures over no-copy pages, of seven usages, under InPlace and under Shadow. Each
  moves exactly the count it should (render target, shader write, or the exact form's).

Verified:
- cargo clippy for metal2vulkan-runtime, metal2vulkan and metal2vulkan-validation, all targets
  and features, plain and under --cfg m2v_gpu.
- The runtime's in_place and degradation unit tests.
- metal2vulkan's fast_paths, api_signatures and refusal_surface tests.
- api_signatures.tsv blessed.
- The runtime-sources pin is not updated.

Not run: the new device lane. It was landed without its device run on the user's word
("skip the tests, just land it"), so its first run is development's gate.

Removed: WorkCounts::host_texture_shadows_written (now host_texture_shadows_render_target and
host_texture_shadows_shader_write). Nothing in the tree read it but api_signatures.tsv.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.

* Re-bless the golden tables for the new profile field

The YCbCr in-place packet (42abe9a315) added a field to the device profile, which moves every
profile's key. The tables record each profile's key beside its cells, so both went stale on
`development`.

Only the 20 `profile` key lines in each table change; no cell moved (every other line is
identical), so SEMANTICS_VERSION needs nothing here.

Verified: `cargo nextest run -p metal2vulkan --all-features --run-ignored ignored-only
-E 'test(bless_golden_hashes)'` passed at 00404a4ba4, and the diff holds profile lines only.
2026-10-28 17:24:19 +02:00
Anees Iqbal cdf59197cc Read a YCbCr texture's planes in place on integrated GPUs
One work packet, landed as 2 commits (42abe9a315..391480a6b2 on archive/development-linear-2026-10-28), in order:

* Read a YCbCr texture's planes in place on integrated GPUs

On an integrated GPU or a CPU device, a function that only samples a two-plane YCbCr texture now
reads the texture's planes directly. Such a texture is `YCBCR8_420_2P` or `YCBCR10_420_2P` over
plane 0 of a surface. "Only samples" means nearest or linear, no comparison, no anisotropy and no
`min_lod_clamp`; reading the texture's size is allowed too. The function fetches the codes from a
uniform texel buffer over the planes' bytes, then converts and filters them as Metal does, with
Metal's integer arithmetic. The draw or dispatch reads those bytes alone, so the texture's image is
not converted for it. Every other device, and every other use (a `read()`, a gather), keeps today's
form: the image is converted from the planes through the refresh, then sampled.

Both forms are exact, so there is no precision note and no switch. The device's kind picks the
cheaper one, by Vulkan's deviceType: INTEGRATED_GPU and CPU read in place; DISCRETE_GPU,
VIRTUAL_GPU and OTHER keep the image. This is the same rule as hasUnifiedMemory. Nothing is timed
at startup.

The measured basis is GPU time of a 3840x2160 texture whose planes lie in host memory, composited
into 1680x1050. Figures are microseconds, best of 3 x 40, over unchanged planes; "image" means
today's refresh compare plus the sample. Mesa 26.2.4 and MoltenVK 1.4.2.

  device             codes   in place 1 pass   image 1 pass   in place 3 passes   image 3 passes
  Radeon 780M        8-bit        340              1178             1027               3013
  Radeon 780M        10-bit       457              1509             1371               3344
  RX 7900 XTX        8-bit       1819              1754             5460               1876
  RX 7900 XTX        10-bit      3614              3479            10843               3613
  M3 Max (MoltenVK)  8-bit        127               259              375                634
  M3 Max (MoltenVK)  10-bit       125               364              378                737

A discrete GPU reads the host's planes across its bus at every pass, while its image lies in its
own memory. Where the planes changed, the image's form also converts every texel: 1055 to 1252 us
more on the 780M, 1790 to 3636 on the 7900 XTX, 350 on the M3 Max.

The texel buffer formats are R8G8_UINT for 8-bit codes and R16G16_UINT for 10-bit ones. Vulkan
requires UNIFORM_TEXEL_BUFFER support for both on every device ("Required Format Support": the
1-3 byte-sized components table and the 16-bit components table). Each element holds two luma
codes or one chroma pair.

The translator:
- bind::YCbCrInPlace (new, public) holds the slot's push words and the view's format and bytes:
  the size, the planes' places and rows in elements, and the conversion word.
- On a profile that reads in place (ProfileFields::ycbcr_in_place), a 2D float texture slot whose
  every access the form reads records RuntimeFact::YCbCrInPlace { slot, samplers }.
- The plan takes VariantKey::ycbcr_in_place for such a slot when the bound texture states
  TextureFacts::ycbcr_in_place and every runtime sampler it is sampled through has one filter for
  min and mag, no anisotropy, no cubic filter, no comparison and the weighted-average reduction.
  The slot then binds WriteSource::YCbCrInPlace and PushField::YCbCrInPlace.
- The variant lowers each sample through lower::sampler::in_place. It builds Metal's texel from
  the luma code and the 9/3/3/1 chroma, and feeds extended's exact filter routine
  (Decode::InPlace). A runtime sampler's address word is mapped in the shader, as 4:2:0 maps
  repeat and mirror to clamp-to-edge.
- Size and level-count queries answer from the push words.
- The YCbCr image variant excludes these slots, so the variant's plan states the same key.

The runtime:
- texture/ycbcr_image.rs states PlanesInPlace for a converted texture where the device reads in
  place. Otherwise the texture keeps its image, counted by reason in
  WorkCounts::ycbcr_images_kept_{device,layout,swizzle,alignment,elements,reach,view}:
  - device: the device's kind;
  - layout: another layout, or staged planes;
  - swizzle: a swizzle;
  - alignment: the planes' first byte misses minTexelBufferOffsetAlignment;
  - elements: more than maxTexelBufferElements;
  - reach: planes past the buffer, which Metal reads as zeros;
  - view: no view usage.
- Binding a slot under the variant makes the texel buffer view, counted in ycbcr_planes_bound.
  It records a read of the planes' bytes in the tracker, so writes to the planes through the
  buffer, plane textures or blits are ordered before it. The texture's image is not used there.
- The image stays allocated; making it lazily is later work.

SEMANTICS_VERSION 1868, RUNTIME_VERSION 1645.

Also fixed: development's runtime_lane/dma_buf_imports.rs did not compile on Linux under the GPU
cfgs (layer_reported_nothing not imported). It now imports it.

Docs: the runtime's ycbcr.rs and ycbcr_image.rs module docs, docs/FAST-PATHS.md ("Costs of
matching Metal", and the YCbCr filter row), docs/API.md, the runtime README. The api_surface table
and api_signatures.tsv are blessed. REFUSALS, METAL-COVERAGE and CONFORMANCE-COVERAGE did not move.

Verified:
- New interpreter tests (tests::engine_linear_half::in_place) run every texel of a 7x5 texture
  against Metal's model, on lavapipe and moltenvk-m3:
  - 8-bit and 10-bit codes, with junk in the 10-bit words' low bits, under all six conversions;
  - constexpr linear, nearest and offset (2, -1) samples;
  - runtime linear, nearest and repeat-as-edge samples;
  - half and float results.
  They also check that the planner states the fact on lavapipe and moltenvk-m3 and not on
  nvidia-rtx5080-laptop, and that a dynamic offset, min_lod_clamp or a 3D texture gets none. A
  negative control, a deliberately broken in-place form, failed them.
- bind::plan::slots: the_in_place_variant_takes_a_slot_its_texture_and_samplers_read.
- The device lanes, filter test(/ycbcr/) over the validation and runtime crates, 49 tests:
  - M3 Max, MoltenVK 1.4.2, INTEGRATED: 48 passed. The one failure, a constexpr linear mip
    filter that is now read in place, is fixed in this commit's test.
  - Radeon 780M, RADV, Mesa 26.2.4, INTEGRATED: 49 passed. The samples bind the planes:
    ycbcr_planes_bound 3, refreshes 0, whole conversions 0 per three-dispatch round. The 4K
    10-bit minify and padded lanes match Metal's hashes in place (planes bound 7, no refresh).
  - RX 7900 XTX, RADV, DISCRETE: 49 passed. ycbcr_images_kept_device is counted, the planes are
    bound 0 times and the refresh runs.
  - lavapipe (linux-gate, LLVM 21.1.8, CPU): 47 passed. The 2 failures are test expectations,
    fixed in this commit: the constexpr mip case above, and the baked-sampler test, where the
    in-place variant bakes no sampler. The minify lanes read in place and match Metal's hashes.
- Chunked dma-buf buffer, runtime_lane::dma_buf_imports::
  a_ycbcr_texture_over_a_buffer_of_chunks_reads_its_planes_in_place. The buffer is
  list_limit + 76 single pages, assembled from 2 udmabuf chunks into 1 sparse buffer.
  - 780M: read in place across the chunks, every texel Metal's (planes bound 1, no refresh).
  - 7900 XTX: kept the image, every texel Metal's.
- Conformance replay on the M3 Max: ycbcr-minify-band-x and -y, ycbcr-texel-reads-420v and
  ycbcr-two-plane-format-descriptors all compare exact against Metal's recordings. The bands now
  count ycbcr_planes_bound 1 and no refresh, where the recordings hold ycbcr_refreshes 1, so their
  cost records want a re-bless on development.
- clippy -D warnings over the workspace (all features), and over the validation, runtime and
  translator crates under --cfg m2v_gpu. cargo fmt.
- The core suite is still running at commit time; its result goes in the report.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:19 +02:00
Anees Iqbal 54a8b32154 Bind a memoryless texture as plain Metal does, and fail what uses it
One work packet, landed as 2 commits (6c0070d57d..a759d0e88f on archive/development-linear-2026-10-28), in order:

* Bind a memoryless texture as plain Metal does, and fail what uses it

A memoryless texture bound at a texture slot was refused at the setter (`StorageMode`), as
Metal's API validation layer refuses it. Plain Metal takes the binding, so a program that binds
one died here at `setFragmentTextures:withRange:` where it runs on Metal. Seen on an RX 580
under RADV, where the device is told framebuffer reads are unsupported.

Measured on an M3 Max under macOS 27.0.1, plain Metal (probes committed under
crates/metal2vulkan-conformance/probes/memoryless_*.m):
- Every setter returns. A command that uses the texture fails the command buffer with
  MTLCommandBufferErrorInvalidResource (9). That covers a draw, a dispatch or a tile dispatch
  whose function statically uses the slot, an empty one included, and one that reads the slot
  only behind a branch that is never taken. It also covers useResource of the texture, with or
  without a later command, and a blit into or out of it (a zero-size copy included), and
  generateMipmaps of more than one level.
- Nothing fails for a slot no function uses, a slot rebound before the draw, a pass with no
  draw, a memory barrier, the optimize hints, synchronizeResource, a copy of no slices, or the
  mipmaps of one level.
- Granularity: the submission that holds the command runs nothing, as Metal splits the command
  buffer (a render pass alone, a run of blit or compute encoders with no event command between
  them). Neither does anything after it, and its signals do not fire. The submissions before it
  run and their signals fire. The queue runs on.
- The CPU calls of a memoryless 2D texture move nothing; a memoryless texture buffer's fault
  the process. Every view of one is nil.

The runtime now:
- binds it;
- fails the command buffer with the new CommandBufferError::InvalidResource from the first
  encoder of the Metal submission (State::fail_submission_from, checks::submission_start);
- records nothing for the failing command;
- moves nothing in the CPU calls, still refusing the texture buffer's;
- answers nil (`Nil`, `StorageMode`) for views.

The check per command is one emptiness test of a per-table set of the slots that hold a
memoryless texture.

An execution's command whose function uses such a slot is the runtime's gap: Metal's answer
there is not measured. That is IndirectRenderCommands for render, and CommandReplay for an
inherited compute table.

RUNTIME_VERSION 1646. The runtime-sources pin moves with it. docs/REFUSALS.md is regenerated,
api_signatures is blessed for the new variant, and the degrade catalogue's
memoryless-texture-buffer entry is updated.

Verified on MoltenVK over this M3 Max under the validation layer:
- runtime_lane::memoryless_uses: draw shapes (read, empty, branch never taken, earlier draw,
  use_resource, unused, rebound, rebound to nil, no draw); the probe's encoder sequences (CcC,
  BbB, CbC, BcB, BSbB, bSB, CSc); compute and blit uses; CPU access and views.
- runtime_lane::memoryless, and the runtime's unit suite (plain cfg).
- tests::command_buffer::a_memoryless_use_fails_from_its_submission_s_first_encoder.
- Negative controls:
  - failing per encoder instead of per submission fails the sequence and blit/compute tests;
  - dropping the draw check fails the draw test (the draw is refused).
- Clippy in both cfgs, rustdoc -D warnings for the runtime, and the pin guard.

Not run: lavapipe, RADV, and the full validation and conformance suites.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:19 +02:00
Anees Iqbal 87994746ea Take IdPlacement::Outside for a texture over the caller's VkImage
One work packet, landed as 2 commits (6e5d7acfc7..6c8a857d8b on archive/development-linear-2026-10-28), in order:

* Take IdPlacement::Outside for a texture over the caller's VkImage

`Device::new_texture_with_vk_image` now accepts `IdPlacement::Outside`,
the runtime extension `Device::new_texture` already takes for a caller's
helper texture: the placement check is skipped for Outside, and
`Texture::made` (already handed `IdUse::Program(placement)`) takes no ID
and holds no slot. The wrapped path otherwise behaves as before; it still
takes no device sampler ID at any placement.

Why: the consumer wraps its swapchain images with this call. Refused at
Outside, it had to give them `Any`, so they took texture resource IDs and
a guest's textures' `gpuResourceID` and `uniqueIdentifier` started past
them while a window was open: the guest's answers depended on whether a
window existed. At Outside the program's textures are numbered as with
no window.

Docs: `IdPlacement::Outside`, the resource-ID module docs,
`check_texture_placement`, `Problem::OutsidePlacement`,
`TextureDescriptor::placement`, the call's own doc (which now says it is
a runtime extension and how it places the texture), docs/API.md and the
runtime README. docs/REFUSALS.md regenerated (the OutsidePlacement row's
wording). No public signature moved (`signatures.py --check` passes).

RUNTIME_VERSION 1647: a call that was refused now makes a texture, which
the version's rule ("a refusal or its class") counts as a behaviour
change. runtime-sources.sha256 follows the edited runtime files.

Test: `presenting::a_callers_image_placed_outside_takes_no_id` (device
lane). After a reservation of 20000, a plain texture takes 20001 on a
device with no caller's texture; a caller's texture placed Any takes
20001 itself and moves the plain texture to 20002; one placed Outside
answers 0 and the plain texture takes 20001. Placed Outside before the
reservation it starts no space (the plain texture still takes 20001),
and a clear of it is what a blit copy of it reads.

Verified, on this Mac (Apple M3 Max, MoltenVK, --cfg m2v_gpu, under
the shared GPU lock): the new test passes and prints "the plain texture
after a reservation of 20000 answers 20001 with no caller's texture;
(Some(20001), 20002) after one placed Any; (Some(0), 20001) after one
placed Outside". With the old unconditional placement check put back it
fails: new_texture_with_vk_image returns
Invalid(OutsidePlacement). Also passing in the same run: every
presenting test, resource_ids::an_outside_texture_takes_no_id, and the
runtime-sources guard. clippy -D warnings for metal2vulkan-runtime
(all targets, all features) plain, and for metal2vulkan-runtime and
metal2vulkan-validation under --cfg m2v_gpu; runtime rustdoc with
-D warnings; the refusal_surface, api_surface and api_signatures tests.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:19 +02:00
Anees Iqbal 675a3ee122 Take sampled textures over host pages in place where the device's check passes
One work packet, landed as 2 commits (86ec320bae..8485bc6865 on archive/development-linear-2026-10-28), in order:

* Take sampled textures over host pages in place where the device's check passes

A 2D texture (or array) over host pages is now a linear image aliasing those pages, with no shadow,
when all of these hold:
- its declared usage only samples or reads it (no RenderTarget, ShaderWrite or ShaderAtomic);
- the pages are a no-copy buffer's, imported by their pointer or as dma-bufs, or a buffer the
  runtime placed in fresh pages;
- a startup check shows that, on this device, the image's first move keeps every byte while the
  CPU writes beside it.

Vulkan makes such an image start UNDEFINED (VUID-VkImageCreateInfo-pNext-01443) and lets the move
read and write every byte bound to it. Relying on the driver here, once checked, is the owner's
ruling ("In place, trusting the driver"): a deliberate, scoped exception, recorded in FAST-PATHS.

The switch is DevicePolicy::host_page_textures:
- HostPageTexturePolicy::InPlace is the default.
- HostPageTexturePolicy::Shadow is the exact form, which exact_answers() selects. Under it every
  such texture stays a shadow and no check runs.

The check (in_place_check.rs):
- It runs on a thread of its own, started by the first texture that asks, per class of pages:
  pointer imports, fresh pages and dma-buf imports. On a Unix target the dma-buf class uses an
  exported allocation of the device's own.
- Each class tries 11 shapes, 3 rounds each, through the product's own Buffer::new_texture:
  - packed rows of 1, 2, 4, 8 and 16-byte texels;
  - rows with bytes between them, for the same texel sizes;
  - one 3840x2160 surface.
  A shape the device makes no image of is skipped, as the product makes none either.
- A writer thread writes the pattern's complement through texels, the bytes between rows and the
  bytes after the image while the move runs. Every byte is then compared.
- The pattern is a 4099-byte prime period, so it lines up with no row, page or texel. The window
  is filled by copies and compared written bytes first, then a period at a time. That makes the
  33 MB surface cost about 11 ms a round in release.

The verdicts are kept as one record in the shader cache's content store:
- The record is named by vendor, device, driver ID, version, name and info, the UUID, the check's
  kind and version, and RUNTIME_VERSION.
- It is checksummed. A bad, partial or other-version record counts as none: the check reruns and
  overwrites it.
- With no cache directory, the check runs once per process.
- A forced failure (DeviceOptions::fail_in_place_check, a hidden test hook) keeps nothing.

Every texture that still takes a shadow announces why (shadowed-texture) and is counted by cause:
- the policy;
- usage that renders or writes;
- check pending, failed or unchecked;
- refused: rows, detached, image, pitch, placement, the dma-buf source, other dma-buf reasons.

WorkCounts also counts the in-place textures by class and pitched images, and the check's runs and
verdicts.

How an image in place is made, used and visible:
- Pointer and fresh pages take a linear image made for host allocations at Metal's pitch, or a
  DRM_FORMAT_MOD_LINEAR image at an explicit pitch over the host allocation where the driver makes
  one. Dma-buf pages take the modifier image over a dma-buf of the texture's own pages.
- A rebind remakes these images like the others.
- A write or pass beyond the declared usage goes through the existing usage shadow and attachment
  stand-in.
- A CPU write reaches the image's commands as it reaches the buffer's (Host Write Ordering
  Guarantees).

RUNTIME_VERSION 1643 -> 1644. The runtime-sources pin is left for the landing.

Check duration, Apple M3 Max on MoltenVK 1.4.2:
- 75-78 ms in release: Pointer and Fresh passed; DmaBuf unchecked, as there are no dma-bufs on
  macOS.
- 1.76 s in a debug build.
- The first version took 4.1-4.2 s in debug, almost all of it the 3840x2160 shape's per-byte
  hashed fill (240 ms) and compare (461 ms) per round, times 3 rounds and 2 classes; the GPU move
  itself took 0.15-3 ms.
- Nothing was dropped from the check. The 64x64/256 shape became 64x16/256, and packed shapes of
  each texel size were added, because MoltenVK takes no padded pitch: the first version made only
  4-byte images there.

Verified on the M3 Max (debug lanes, --cfg m2v_gpu):
- in_place_textures, all five tests:
  - the path follows the check, and an event-held CPU write after the commit is read;
  - a kernel write and a pass beyond the usage go through their shadows and keep the image;
  - a forced failure keeps the shadow and no record; the next device runs the check, and the one
    after recalls three verdicts and checks nothing;
  - the costs.
- first_use_writes under both settings: 1920x1080/7680 in place, 0 of 542 writes undone.
- no_copy_textures read/write under both settings: ShaderRead-only textures in place at packed
  rows, the rest shadows.
- pitched_surfaces, including the new _in_place variants of the only-reads and read-only-pages
  tests.
- The runtime and translator suites passed (4971 tests), with clippy plain and under --cfg m2v_gpu.

Cost on the M3 Max, release, median GPU time per command buffer, in place against shadow:
- 3840x2160, one pass reading a 32-row strip: 492 against 553 us.
- 1920x1080 strip: 457 against 452 us.
- 1920x1080 whole: 393 against 466 us.
- 1920x1080, three whole passes: 566 against 545 us.

Untested here: RADV, lavapipe and the dma-buf class, which follow; ANV and NVIDIA have no venue
now.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:19 +02:00
Anees Iqbal 3b48637d3c Name a render stage's module without hashing its words again
The steps this packet landed as, in order:
- Re-pin the runtime sources at the landing tip

Content: the tree of `development` at ae7ed9fa17, unchanged.
2026-10-26 13:19:22 +02:00
Anees Iqbal 586bf2ad59 State what a translated module contains on its stage
Content: the tree of `development` at c21116f557, unchanged.
2026-10-26 13:19:21 +02:00
Anees Iqbal d12ea9bbe7 Name the merge's planned dispatches and examined words in the API guide
Content: the tree of `development` at 27935d575e, unchanged.
2026-10-26 13:19:21 +02:00
Anees Iqbal 201803fc48 Compile a kernel once for the stage-input attributes it never reads
The steps this packet landed as, in order:
- Bless the surface and the API guide for the kernel's narrowed inputs
- Re-pin the runtime sources at the landing tip

Content: the tree of `development` at 3eefc94c48, unchanged.
2026-10-26 13:19:21 +02:00
Anees Iqbal 18bf703b5d Predict a compute region only where the request states its threadgroup
The steps this packet landed as, in order:
- Bless the surface for the shared-queue counter and correct three doc claims

Content: the tree of `development` at 087149c5b8, unchanged.
2026-10-26 13:19:21 +02:00
Anees Iqbal ee51060c1c Declare the shader-cache write kind last, so no ALL index moves
Content: the tree of `development` at 1649811132, unchanged.
2026-10-26 13:19:20 +02:00
Anees Iqbal fc63e360fa Count the render and the dispatch pipeline predictions apart
The steps this packet landed as, in order:
- Write a creation's shader cache entries on the device's cache thread

Content: the tree of `development` at 1ff199a2eb, unchanged.
2026-10-26 13:19:20 +02:00
Anees Iqbal 1395addb47 Say what Metal leaves where a plane's GPU rows share bytes, and guard the copy that had no rule
The steps this packet landed as, in order:
- Name BGRA4Unorm's packed-16 attachment and its color input in the API guide

Content: the tree of `development` at ebd18b3408, unchanged.
2026-10-26 13:19:19 +02:00
Anees Iqbal 2dd3557a98 Hold an IOSurface plane whose GPU rows overlap as a shadow
Content: the tree of `development` at 16ad1f5af6, unchanged.
2026-10-26 13:19:18 +02:00
Anees Iqbal cfcb83b069 Say when a heap texture takes the shadowed-texture notice
Content: the tree of `development` at 24bfeec43c, unchanged.
2026-10-26 13:19:18 +02:00
Anees Iqbal 242d017175 Name in each degrade-notice entry the driver facts and formats its kind carries
Content: the tree of `development` at 4a9adf3b33, unchanged.
2026-10-26 13:19:18 +02:00
Anees Iqbal 25653b5b1b Hold a heap texture to the heap's base only where an image of it binds there
Content: the tree of `development` at bb29a64948, unchanged.
2026-10-26 13:19:18 +02:00
Anees Iqbal 88d1a345f2 Reconcile the six degrade notices whose catalogue entry and declaration disagreed
The steps this packet landed as, in order:
- Hold docs/API.md's degrade-notice catalogue to the notices' declarations
- Bound how far a refused IOSurface plane's rows overlap

Content: the tree of `development` at 3e9ba52013, unchanged.
2026-10-26 13:19:18 +02:00
Anees Iqbal fe18def47a Hold the optimized-layout notice's cost to what every reaching texture answers
Content: the tree of `development` at 3614348837, unchanged.
2026-10-26 13:19:17 +02:00
Anees Iqbal 8c47bba02b Compute Metal's fast-math blend of a 32-bit float attachment
Content: the tree of `development` at 2c0f3c643c, unchanged.
2026-10-26 13:19:17 +02:00
Anees Iqbal 405c644b82 Make the shareable padded 10-bit textures Metal makes in Private storage
Content: the tree of `development` at cfd94efd5c, unchanged.
2026-10-26 13:19:17 +02:00
Anees Iqbal 16d8b76467 Say what Error::Invalid holds, and measure the five rules only the layer justified
The steps this packet landed as, in order:
- Give a render command for a buffer of dispatches beside draws, as Metal does

Content: the tree of `development` at aec2582c90, unchanged.
2026-10-26 13:19:16 +02:00
Anees Iqbal 6c05931d19 Run a ragged dispatchThreads: as Metal's one dispatch where the kernel allows
The steps this packet landed as, in order:
- Regenerate the refusal surface at the tip

Content: the tree of `development` at 68529de026, unchanged.
2026-10-26 13:19:16 +02:00
Anees Iqbal 15635f527e Ask the lane for the refusals the runtime now answers on llvmpipe
The steps this packet landed as, in order:
- Hold a heap texture's offset to Metal's alignment where its image lies apart
- Read each pipeline's own loop notice, and Metal's own pitch for a turned plane
- Take Metal's depth denormal as a zero where the device announces the loss
- Expect the memory notice and allow a late calibration one on a discrete chip
- Recompute the runtime-sources pin for the heap, derivation and lane wave

Content: the tree of `development` at 3d3c01150f, unchanged.
2026-10-26 13:19:15 +02:00
Anees Iqbal cb0ced8bdc Make the memoryless texture buffer plain Metal makes
The steps this packet landed as, in order:
- Say in the notice what the footprint now is

Content: the tree of `development` at c8cee22aa9, unchanged.
2026-10-26 13:19:14 +02:00
Anees Iqbal f7d857ec55 Answer a heap's and a heap texture's footprint Metal's numbers
The steps this packet landed as, in order:
- Say in the ledger that the ASTC heap size query answers
- Make the holding rule a named function and hold it to a table

Content: the tree of `development` at 74da346075, unchanged.
2026-10-26 13:19:14 +02:00
Anees Iqbal 7b4c57316a Answer Metal's canonical NaN at a narrow float's widening to float
The steps this packet landed as, in order:
- Hold the fresh-pages test to the runtime's per-class rule
- Re-derive the generated documents for the ledger edits

Content: the tree of `development` at 2be69bf102, unchanged.
2026-10-26 13:19:14 +02:00
Anees Iqbal 1ab5ae7380 Move a 16-bit multisampled depth's samples by draws, as its codes
The steps this packet landed as, in order:
- Say in the refusal surface what a 16-bit depth copy really waits on
- Copy a multisampled 16-bit depth, which plain Metal copies exactly

Content: the tree of `development` at 688b62deab, unchanged.
2026-10-26 13:19:11 +02:00
Anees Iqbal 4ecef7a366 Answer per slot what a function may store through, beside the reflection
The steps this packet landed as, in order:
- Keep a compile that the specialized read refuses, and sweep the fixtures
- Regenerate the refusal surface for the moved plan_one line numbers
- Say correctly which arguments may_write rules out
- Say which AIR field the writability answer actually reads
- Answer a state's texture-slot accesses from its slot writes, and stop keeping refusals

Content: the tree of `development` at 117a9ddbf7, unchanged.
2026-10-26 13:19:11 +02:00
Anees Iqbal 265625077c Tie the fragment-subgroup answer gap to the notice that announces it
The steps this packet landed as, in order:
- Say in the lane's docs which notice announces the subgroup gap
- BREAK: flip the grouping assertion to prove it fails
- Restore the grouping assertion, and say what a narrow subgroup answers
- Measure what the clamp-to-zero columns read just below zero
- Flush a subnormal coordinate on a constexpr border axis, as Metal does
- Flush the coordinate on every path a sampling reads it
- Record the extended-range sibling of the subnormal flush, and doc the rule
- Bump SEMANTICS_VERSION for the subnormal flush
- Re-bless the golden tables after the subnormal border flush

Content: the tree of `development` at dad3270155, unchanged.
2026-10-26 13:19:09 +02:00
Anees Iqbal 5bd3212bc5 Make the padded 10-bit textures Metal makes, and refuse only the creator it refuses
The steps this packet landed as, in order:
- Regenerate the refusal surface at its own commit

Content: the tree of `development` at d7c4cec847, unchanged.
2026-10-26 13:19:09 +02:00
Anees Iqbal ceed7a3971 Compare every byte and word these four lanes read back
The steps this packet landed as, in order:
- Count only hex pairs as bytes the surface-fill runs compared
- Fail the suite where a conflict marker reaches the tree
- Write the unordered mesh draws down as an accepted difference, and compare the attachment

Content: the tree of `development` at 724b552b30, unchanged.
2026-10-26 13:19:08 +02:00
Anees Iqbal 6bc33f2787 Compile a rasterization-rate map of a zero screen extent, as Metal does
The steps this packet landed as, in order:
- The zero-screen-width case is behavioural now, and its ledger row is gone
- Make the zero-screen-width map through the runtime, refusing only what Metal cannot survive
- Regenerate the refusal surface at this branch, and name the ledger row's type
- Hold the zero-extent map on the device, and pin the new public constant

Content: the tree of `development` at 438c844920, unchanged.
2026-10-26 13:19:08 +02:00
Anees Iqbal e4a889debb Hang at a pass of no draw call over a mutable rate map, as Metal's GPU does
The steps this packet landed as, in order:
- Keep the screen a rate-mapped pass took through a reset to another screen
- Bump the runtime version for the fifteenth stack
- Pin the runtime sources of the fifteenth stack

Content: the tree of `development` at ea7b7cf4a4, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal eee19cb365 Fetch, write and blend one- and two-channel sRGB attachments as Metal does
The steps this packet landed as, in order:
- Regenerate docs/REFUSALS.md after the one- and two-channel sRGB fetch

Content: the tree of `development` at 7cad8e47f1, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal e9967ecdc9 Loop a coverage reader that writes outputs, as Metal runs it per sample
The steps this packet landed as, in order:
- Bump the semantics, artifact format and runtime versions for the thirteenth stack
- Pin the runtime sources and bless the golden table over the thirteenth stack

Content: the tree of `development` at 57bfb2c4d6, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 35dd559a04 Bound a run of indexed indirect draws' index fetches in two dispatches
The steps this packet landed as, in order:
- Announce a provoking mode past 1 at the draws Metal's third way draws otherwise

Content: the tree of `development` at 107929f7b9, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 4533745d05 Raise the GPU's recovery as an injected page fault or hang completes
The steps this packet landed as, in order:
- Answer Metal's getters for an indirect draw of primitive type 7, 8 or 9

Content: the tree of `development` at 987448bf48, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 8294000cbf Encode a predicated compute encoder again at a rebind where it was its unit alone
The steps this packet landed as, in order:
- Regenerate docs/REFUSALS.md over the twelfth stack
- Pin the runtime sources and bless the golden table over the twelfth stack

Content: the tree of `development` at 6ca8b9005a, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 9d783a4e3a Run the emulation's wrapped indirect object grids, reporting Metal's wrapped grid
Content: the tree of `development` at f976f1035d, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal a836b22821 Run loads, masks, blends and unstored passes into YCbCr attachments as Metal
The steps this packet landed as, in order:
- Bump the semantics, artifact format and runtime versions for the eleventh stack

Content: the tree of `development` at 02c396984e, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal b0b61ac179 Time a fault that later failing encoders follow as Metal's GPU reaches them
The steps this packet landed as, in order:
- Stop a running predicated loop at the GPU's recovery from a fault or a hang
- Resolve multisampled extended-range targets by Metal's measured rules
- Run the emulation's indirect mesh draws with an object function

Content: the tree of `development` at 60cf488339, unchanged.
2026-10-26 13:19:07 +02:00