ea428bca8b78ca2a327a00550333ff84becf70d5
346
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
255f758265 |
Pipeline: behind the agx flag a wider fragment input reads its vertex output's lanes, then zeros
The planner's ruling for the wide case of agx.allow_mismatched_component_counts: Metal
makes a render pipeline whose fragment function reads a varying at more components
than its flagged vertex function writes, and leaves the lanes past the output's
undefined (M3 Max, macOS 27.0.1, job m3-max-87586: 150 such lanes read 147 distinct
values, none written). One form on every device, decided at pipeline make by structure:
- LoweringInputs::widened_varyings (new public field, serde default): the user varyings
a flagged vertex function writes at fewer lanes than the pipeline's fragment function
reads, with the count it reads, of the same AIR scalar type. compile_render_pipeline
and render_variant_key derive it from the two Function stages' specialized entries
(compile.rs widened_varyings: return-struct field types against fragment-input
parameter types), only where the vertex entry carries the flag; a Compiled stage on
either side gives none. render_pipeline compiles the vertex stage, and only where its
StageIo carries the flag and the set is not empty compiles it again under the set;
render_variant_key hands it to the vertex inputs, so a runtime's stage-by-stage
compile under the keys widens too, and the pipeline key matches.
- Planning declares such an output at the read count (StageIo outputs list it so, so
link matches equal types) and marks its object in StageIoPlan::widened; store writes
the value's lanes then a constant 0 per extra lane (OpCompositeConstruct). Colour
outputs, whose declared components may differ from their form for other reasons, are
never marked.
- The key appends the set only when set: every other function keeps its key.
- Link is unchanged: a wider input behind a vertex function compiled alone stays
Unsupported{UnmatchedVarying, NotImplemented}, as does a mesh producer; flag 0 or
absent stays Metal's link error.
Docs: docs/API.md accepted differences gains the line (Metal undefined, we give zeros;
no precision note, per the ruling); the UnmatchedVarying, StageIo and link docs say
where the gap now remains; reach.tsv's line likewise; REFUSALS.md regenerated; the API
signature table blessed (LoweringInputs.widened_varyings); the inputs-encoding and serde
round-trip tests cover the field. SEMANTICS_VERSION stays at 2394 (the narrow
form's bump).
Tests: the red tests of 3f0fa825f4 (jobs m3-max-87655 lavapipe + translator, m3-max-87661
RTX 5080) go green in the jobs named in the READY message.
|
||
|
|
7d47114ace |
Link: a component-count mismatch behind the agx flag is our gap, not Metal's link error
Metal makes a render pipeline whose fragment function reads a user varying at
another component count than the vertex function writes when the vertex
function's module states agx.allow_mismatched_component_counts as 1 (Apple M3
Max, macOS 27.0.1, job m3-max-87508; float4 written and float2 read, and float2
written and float4 read; refused at 0, with no flag, and with the flag on the
fragment module alone; irc.version_* changed nothing). Link answered every such
pipeline Unsupported{UnmatchedVarying, NotRepresentable}, Metal's link error,
for a pipeline Metal makes.
- AIR: module_flags returns whether the agx flag is 1, and the decoder sets
EntryPoint::mismatched_component_counts on each vertex (post-tessellation
included) and mesh function the module defines; fragment, kernel and object
functions never carry it. The flag's docs state the probe's facts.
- Lowering copies it to StageIo::mismatched_component_counts.
- Link (varyings, mesh_fragment): a fragment input whose type differs from
its producer's output in component count alone (same numeric class and source
width), behind a producer carrying the flag, is
Unsupported{UnmatchedVarying, NotImplemented}; everything else stays
NotRepresentable. A mesh producer is not probed yet, so it stays the typed gap.
- Feature::UnmatchedVarying's doc says both; reach.tsv marks it rare;
docs/REFUSALS.md regenerated (it also drops TextureSwizzle's four translator
sites, which
|
||
|
|
53e2f370d8 |
CI: qualify the committed object and mesh cases on lavapipe
The engine's candidate now draws object and mesh cases through the
runtime's mesh pipeline, so the Linux qualification step runs the 13
committed mesh and object cases that draw on lavapipe against their
Metal rows. Two committed cases stay out: the object function's
threadgroup memory (3ff818075803), which the runtime refuses at the
state's make and the candidate meets as mesh_threadgroup_memory, and
the mesh function that numbers its primitive from its payload
(d2c517d1426d), whose mesh function aborts lavapipe's LLVM ("Cannot
emit physreg copy instruction").
Verified: the 13 cases matched Metal on lavapipe through corpus-vulkan
at c1bdd1e491 (job m3-max-86906); this commit's script run follows.
|
||
|
|
f3a820799e |
Translator and runtime: a runtime pixel sampler samples once, at the quotient, as at pin W
The planner's ruling on pin X's fragment growth (12-04). The level-0 arm that |
||
|
|
27a6c1ebd3 |
Translator and runtime: the interface items no path makes since the resident core went are deleted
|
||
|
|
c74a3015f9 |
REFUSALS.md: a runtime refusal nothing builds refuses nowhere
The refusal surface's Where column gave every variant of the runtime's Refusal, Limit and Gap a
device condition from its basis alone: "at the device's limit" for a device's own limit, and
"every device (a public call's own check of its arguments)" for every other, whether or not
anything builds it. Gap::CubicSampler has had no construction site since the runtime made a
sampler of Metal's undeclared filter 2 as nearest, and kept only because the consumer names it,
yet its row still said it refused on every device. The generator now gives such a condition only
to a variant with a site (or a helper that builds it), so a variant nothing builds reads "-", as
its Sites cell's 0 already said ("0 is a variant nothing builds today").
docs/REFUSALS.md is regenerated: CubicSampler's row alone changes; error/basis.rs does not.
Verified, on the CPU with no device: scripts/refusal-surface/refusal_surface.py --check reads both
outputs current, with 0 variants without a reach mark and 0 without a basis; Refusal (96 of 96)
and Limit (21 of 21) have a site each, and of Gap's 31 only CubicSampler has none.
|
||
|
|
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.
|
||
|
|
9fe45f0043 |
Fix forward: clippy's indexing lint, the tests of the level-0 arm, the floor profile
The first build's legs (job m3-max-84933, lavapipe) found:
- clippy (m2v_cpu_icd): level_zero_test indexed SamplerWord::ADDRESS and ADDRESS_SHIFT, which
lower/ denies; it now zips the two arrays and takes the s and t axes;
- the level_zero device tests made Private textures, which replace_region refuses ("the CPU
reaches no Private or Memoryless texture"); they take the descriptor's default storage mode;
- floor::the_floor_profile_states_exactly_the_floor: runtime-floor.json's m2v_runtime_floor block,
and regen_device_profiles.py's RUNTIME_FLOOR that writes it, state the new limits (sampled
images 262,144, samplers 32,000, per-stage resources 458,760, all pools 490,752);
- eight translator tests that count a slot sample's instructions now count the level-0 arm's
explicit level-0 sample or operand-less gather beside the device path's, and its own sign
extract of a dynamic offset; the tests' operand-mask helpers read a mask only where the
instruction holds one.
|
||
|
|
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
|
||
|
|
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
|
||
|
|
5dc5ea3315 |
Translator: a seq_cst atomic operation takes the sequentially consistent fence
A seq_cst atomic operation on memory another thread reaches (an AIR 2.9 air.atomic.* buffer atomic of order 5, its success order for a compare-exchange; an LLVM atomic load, store, atomicrmw or cmpxchg of seq_cst) now takes the fence the landed seq_cst fence lowers to: an acquire-release memory barrier at the operation's scope over the memories its order applies to, then lower::sync::barrier's add of 1 on the device's fence word at Device scope with the barrier's semantics. A store, a read-modify-write and a compare-exchange take it after the operation; a load takes it before. Thread memory's atomics take none (no other invocation observes their order); texture atomics of any order but relaxed stay refused; relaxed, acquire, release and acq_rel operations are unchanged. The fence before a load, derived: the stores' fences alone order every pair of fenced stores and forbid store buffering and the R and 2+2W shapes, but two readers may still see two independent seq_cst stores in opposite orders (IRIW), since a reader's two acquire loads synchronize with nothing between them. MSL's single total order forbids that outcome. With an add on the one fence word before each load, the two readers' second adds are ordered on that word; the earlier reader's first load acquired its store, which then happens before the later reader's add and so its second load, which must see it. A fence after a load would order nothing more. Each such operation now costs one contended add on the device word: the runtime README's fence known-gap line says so (every non-explicit atomic of MSL 4.1 is one), read from the fence's measured rows. msl_4_1_orders_reach_spirv expects the fence's add after a27_wide_and_float's float add and after each of a27_fragment_atomics' three atomics. reach.tsv drops the SeqCstFence row, whose refusal no longer exists. The identity harness maps the device's fence word (with_fence_word: its 4 bytes past the zero range, the rest still unmapped), and engine_atomics' run_orders binds every kernel with it: the interpreter trapped on the fence's add in the two contention tests whose kernels hold LLVM seq_cst atomics. SEMANTICS_VERSION 2367 (renumbered at landing; 2363-2366 went to arm 9, the blob move, the 1D bicubic and the shared slice): a module holding a seq_cst atomic operation changes. Verified: - red 389e7cf44e, job m3-max-85066: a_seq_cst_atomic_operation_takes_the_fence fails at "a fence's barrier" (no add follows the store); the fence tests and msl_4_1_orders_reach_spirv pass. Green there: 4 passed. - the product suite at the fix without the harness's fence word (85066): 3495 passed, 3 failed, 24 skipped. The failures were golden_hashes_match_the_table (re-blessed on development) and engine_atomics' llvm_ and narrow_atomics_are_exact_under_contention, whose interpreter trapped on the unmapped fence word. With it (85271): engine_atomics, engine_seq_cst and engine_air_2_9 28 passed. - validation 1344 passed, 2 skipped; conformance 1053 passed, 0 skipped; doctests EXIT=0 (85066). - clippy plain 85270, m2v_gpu 85269 and m2v_cpu_icd 85268 EXIT=0 at this tree. Rustdoc and api-docs 85093 EXIT=0 at the fix without the harness change, which adds test code only. |
||
|
|
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. |
||
|
|
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. |
||
|
|
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).
|
||
|
|
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
|
||
|
|
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.
|
||
|
|
ed55748644 |
Docs: the runtime README, API.md, REPLAY-STREAM.md and VALIDATION.md state each measurement by its card and driver, not by our job id
The planner widened the job-id rule from the published crates' rustdoc to the four prose docs a
reader takes measurements from. Each lab job id (m3-max-NNNN, and the bare job numbers beside
them) and each commit sha comes out; the ids stay in the commit messages that already carry them.
A measurement keeps the card, driver and OS its sentence names. Where an id was the only basis a
sentence named, the sentence now says what was measured and on what:
- the runtime README's identity-domains paragraph cited five plays of recorded streams; it now
states what the states-only plays of the 26 kept replay streams on lavapipe show: each makes
every pipeline state its stream makes, and none of their render or compute states is refused,
a refusal under the identity domains among them (the plays of jobs m3-max-83458, -83494, -83695,
-83889 and -83954, each printing refused 0);
- the probe lists name the cards ("probes on the RTX 3090, the Iris Xe, lavapipe and the RX 7900
XTX"; "probes on a Radeon Pro 5300M and a UHD Graphics 630, both macOS 26.7.1");
- sentences that compared runs by id compare them by order ("failed in one run and passed in two
others"), and "the same job" is "the same run";
- "rt at <sha>" and "players built from <sha>" become what that build was ("a build of the runtime
that copied a texture over any import"), or go where the card and driver already say it;
- VALIDATION.md's harness count reads "the harness on lavapipe".
Two README tables lose their Job column (the import-cost table and the guest-buffers table). The
edited paragraphs are rewrapped at 100 columns; a token diff against the parent shows only the
ids, the shas, the two columns and the rewordings above.
submit.rs's three citations of two probe commits (06860a3848 and b15b306d2f) become "measured
with a probe build of the runtime" (and, for the split probe, "that timed each command buffer");
the IN_FLIGHT and infos comments are rewrapped at 100 columns.
So it does not grow back, scripts/api-docs first fails when the four docs name a job id
(`m3-max-NNNN`, or `job NNNN`); CONTRIBUTING.md, API.md's description of the script and ci.yml's
comment on its step say so.
docs/CONFORMANCE-COVERAGE.md is unchanged: its generator has no job column. Its 1772 lines with an
id are all in its last section, The ledger, which quotes the last field of known-gaps-rt.tsv; the
ids are in the ledger's own sentences, which the ruling keeps out.
Not widened, per the ruling: the ledger, known-gaps-rt.tsv, results.py, test comments and the
unpublished crates. The OS is not added to measurements whose sentence named a card and driver
but no OS.
Verified on the CPU with no device, job m3-max-84430 at this commit's tree: cargo fmt --check 0;
the workspace's rustdoc with -D warnings 0; scripts/api-docs 0, and 1 with a job id planted in
docs/VALIDATION.md, naming the planted line (the tree clean after its restore); the refusal
surface's --check 0; the 13 tests that read these docs passed (feature_enables, the floor, the
accepted differences, the precision-note catalogue, the consumer's objects and the guide's
example). Before the commit, no line of the four docs matched the check's pattern, and rustfmt
--check passed on submit.rs.
|
||
|
|
bac1ab1bd9 |
Docs: metal-measured covers Metal's validation stop; the bound form's evidence is the real cards
What: the `metal-measured` basis (refusal_surface.py's vocabulary, and `RefusalBasis::MetalMeasured`'s doc, which states it for the API) now says that Metal's API validation stopping the call counts: documented Metal then defines no answer to it, whatever plain Metal does without the validation. docs/REFUSALS.md is regenerated with it. docs/VALIDATION.md's device-test part gains one sentence: the bound form of a compute function's buffer arguments has its evidence in the device tests on real cards whose query takes it (each test's `M2V-FORM` line, `tests::pool_reach`'s assertion of the form the query chose), and CI's lavapipe legs take the address form, since lavapipe's `maxStorageBufferRange` of 128 MiB is below the 2 GiB and 15 bytes the query needs there. Why: the definition said "Metal itself refuses the input", while runtime refusals declare `metal-measured` on the strength of Metal's validation layer stopping the call (in error.rs, among them IndexedPatchDrawWithoutIndexType, PatchIndexBufferOffset, ViewportNotFinite and StencilAttachment), and the conformance allowances say a validation stop "is not Metal refusing it" for their own verdict. The two answer different questions; the definition now says which one the basis answers. The lavapipe sentence records that CI's lavapipe legs never run the bound form, so a reader of a green lavapipe leg does not take it as that form's evidence. The numbers: job m3-max-84123 (lavapipe, release, three runs a workload) printed `bound_dispatches_per_run` 0 for all 48 harness workloads, and `address_dispatches_per_run` above 0 for the 43 that dispatch. lavapipe's limits are those of the committed lavapipe profiles (maxStorageBufferRange 134217728, minStorageBufferOffsetAlignment 16, so the query needs 2^31 + 15). Verified: refusal_surface.py --check passes, and the regenerated basis.rs is unchanged; runtime-sources.sha256 unchanged (error/mod.rs is not an input: 44066e69...). Rustdoc in the docs job the READY names. |
||
|
|
ad09d74961 |
Stage input: an indexed step fetches at any step rate, as Metal reads it
What: a kernel [[stage_in]] layout of an indexed step (ThreadPositionInGridXIndexed or ...YIndexed) at a step rate past 1 is now fetched: the thread's position on the axis divided by the rate, clamped to the stage-in region's last element, looked up in the index buffer, plus the region's origin. Step::Indexed carries its rate, and the grid and indexed steps share stepped_position, the one division. Why: an M3 Max read index[min(x / rate, size - 1)] plus the origin at rates 2 and 3 (job m3-max-68668), so the refusal guarded a measured answer. The runtime's Gap::StageIn of IndexedStepRate and the translator's Feature::KernelStageIn refused it; both had no other site, so both variants are deleted. Consumer search for the runtime variant: `git grep -n -w IndexedStepRate development -- '*.rs'` in the consumer's checkout at 40c2b1abeb has 6 hits, all in its refusal-label table and the test that expects this refusal (rt_platform/diag.rs 8, 3079, 3088, 3094; rt_platform/compute.rs 1246, 1382), which change with this answer; Feature::KernelStageIn has 0 hits there. Also: SEMANTICS_VERSION 2350 -> 2351 (the modules of an indexed fetch past rate 1, and a refusal gone). docs/REFUSALS.md regenerated (refusal_surface.py) after reach.tsv lost the feature's row; the signature table blessed (two variants out). The runtime README, the encoder's and pipeline's docs and the gap's docs say the indexed element at any rate. runtime-sources.sha256 unchanged (pin-compute, a92fe0a8...). Verified here: signatures.py --bless moved only the two variants; the refusal surface regenerated with 0 variants unmarked. The red tests of the commit before this one, and clippy, rustdoc and the suites, run in the jobs the lane's report names. |
||
|
|
2201f23e9f |
linux-gate-ci: the 128-bit runtime step checks the width took, as ci.yml's does
cpu_icd_tests_128 ran the runtime's tests with LP_NATIVE_VECTOR_WIDTH=128 but never showed that llvmpipe took the width, so a green run proved nothing about 128 bits. It now runs ci.yml's check first, with the same greps: vulkaninfo at that width, its deviceName and subgroup-size lines printed, and the step fails unless the device name says 128 bits and maxSubgroupSize is 4. It also takes ci.yml's --no-fail-fast, keeping the function in step with ci.yml's run text as the file's header asks. Verified: bash -n; and the step end to end on a host lavapipe, not in the gate's container: job m3-max-83977 defined step() and cpu_icd_tests_128 from this file and called the step on Mesa 26.2.4 lavapipe (LLVM 23.1.1). The device line read 'llvmpipe (LLVM 23.1.1, 128 bits)' with maxSubgroupSize 4; Summary 991 tests run: 991 passed, 4 skipped; step ok. The container run is unverified, and METAL2VULKAN_TEST_REQUIRE_PINNED_LLVM, which the script exports at its top, was not set (the host's LLVM is not the pin). |
||
|
|
2549c339c6 |
CI: the runtime's device tests again on lavapipe at 128-bit vectors, with a Mesa shader cache of their own
What: a Linux step after the CPU ICD step runs the runtime's device tests from that step's archive with LP_NATIVE_VECTOR_WIDTH=128 (lavapipe's subgroups of 4, the width arm64 lavapipe runs at) and MESA_SHADER_CACHE_DIR set to a directory of the leg's own in the workspace. It prints vulkaninfo's device name and subgroup sizes first and fails unless they show 128 bits and subgroups of 4, so a green step shows the width ran. scripts/lavapipe-image's nextest command takes --write and --env as run does, so the leg's cache directory and variables reach the container. scripts/linux-gate-ci gets the same step, as docs/VALIDATION.md asks of every Linux step. AGENTS.md's CI line and VALIDATION.md's note on the width name the leg and the cache rule. Nothing in product code reads either variable. Why: the planner wants a stand-in for a device whose SIMD group is 4 wide (tile GPUs are a target). The lab's 128-bit runs failed because of llvmpipe's disk cache, not our lowering. llvmpipe keys its texture functions (lp_texture_handle.c) and its cache id (lp_screen.c) without lp_native_vector_width (Mesa 26.2.4), so a cache that 256-bit runs filled gave a 128-bit shader an 8-wide texture function. A cache of the leg's own cannot collide with the 256-bit one. Verified on lavapipe (Mesa 26.2.4, LLVM 23.1.1, 128 bits, subgroups 4), at aeb0ca9560, the runtime's whole cpu_icd suite: - shared default cache: 989 tests run: 887 passed, 102 failed, 4 skipped (job m3-max-83853); - the cache off: 989 tests run: 989 passed (2 slow), 4 skipped (job m3-max-83888); - gdb on two of the crashes stops at the same JIT store, vmovaps of a ymm register, the 4th of four plus a byte at 0x80: an 8-wide texel struct written into a 4-wide caller (job m3-max-83878). The step itself ran in the lab from ci.yml's step text, in the pinned lavapipe image (Mesa 26.2.4-arch1.1, LLVM 23.1.1): deviceName = llvmpipe (LLVM 23.1.1, 128 bits), subgroupSize 4 (min and max 4); 764 runtime device tests listed; Summary 762 tests run: 762 passed, 231 skipped; job exit 0 (job m3-max-83928, on the RTX 5080 Laptop machine's lavapipe). scripts/linux-gate-ci's new step passed bash -n only; it has not run end to end. No Rust changed, so clippy, Rustdoc and the suites have the inputs they had. |
||
|
|
8e912a905d |
Validation cases: a device-coherent texture handed between threadgroups, Metal's answer
One authored case over engine/coherent_texture_handoff's coherent_texture_handoff: 128 threads in threadgroups of 64, a 64 x 1 r32_uint texture of zeros, a zero flag and an output of 64 words filled with 0xAB. It is authored_bounded: the reader's one loop runs at most 4096 loads, a constant of the kernel. Installed with corpus-case-check and qualified on Metal on the Apple M3 Max, three executions (m3-max-83673): every word is 1 (output sha256 08f4ad0b..., the hash of 64 words of 1), so no read on Metal that saw all 64 writers' flag read the texel's earlier value. scripts/qualify-public-cases with this case in its list exits 0 on lavapipe (job m3-max-83707), and the case's Vulkan candidate on the Intel Iris Xe (RPL-P) under its venue intel-irisxe-rplp-anv prints Match (m3-max-83680). |
||
|
|
df54afeef2 |
Cases: LOD queries through a sampler bound with LOD clamps of its own, qualified on the M3 Max
Six authored cases over the owned fixture rfs_kernel_lod: five of the kernel lod_2d and one of the vertex function lod_vertex, each through a runtime sampler bound with set*SamplerState:lodMinClamp:lodMaxClamp:atIndex: with a pair that differs from its descriptor's, so the answer says which pair the query reads. The M3 Max (macOS 27.0.1, job m3-max-83804) answers the bind's pair in every one: - nearest mip, default clamps, bound (2.7, 4): 3 (the descriptor's pair reads 0); - nearest mip, clamps (3, 4), bound (1.2, 4): 1 (3); - linear mip, default clamps, bound (2, 3): 2 (0); - nearest mip, clamps (2.7, 4), bound (0, FLT_MAX): 0 (3); - nearest mip, default clamps, bound inverted (3, 1): 1, as under (1, 1); - the vertex function, default clamps, bound (2.7, 4): 3 (0). Each unclamped level is 0. The ids join scripts/qualify-public-cases, CI's lavapipe step. Why: under the identity domains the query reads the minimum level from the word of the resource ID the slot pushes, and a bind with clamps pushes the ID of the state's variant of the pair; these cases check that variant's word against Metal. |
||
|
|
c5f979d985 |
Cases: kernel and vertex LOD queries through runtime samplers with LOD clamps, qualified on the M3 Max
Ten authored cases over the owned fixture engine/rfs_kernel_lod. Each comes from the committed runtime-sampler case of its entry with the sampler's mip filter and LOD clamps set (no new AIR): - lod_2d: nearest (2.7, 4) reads 3; nearest (1.5, 3) reads 1; no mip filter (2.5, 4) reads 0; linear (2, 3) reads 2; linear (10, 20) reads 4 (the last level); nearest (6, 9) reads 4; - lod_2d_array: nearest (0.6, 4) reads 1; - lod_3d: linear (1, 2) reads 1; - lod_cube: nearest (2.2, 3) reads 2; - lod_vertex: nearest (2.7, 4) reads 3, 64 points with no rasterization. Every unclamped level is 0. These are exact rows only: a linear mip filter with an lodMinClamp between whole levels, which the identity domains answer by the word's nearest level, has no case (the planner's ruling; docs/API.md's accepted differences). Installed with corpus-case-check and qualified with corpus-metal on the Apple M3 Max (macOS 27.0.1, environment apple-m3-max-macos27.0.1), job m3-max-83473. Each observation decodes to the levels above, which metal::sampler::query_min_level gives. scripts/qualify-public-cases (CI's lavapipe step) now runs these ten and the four existing runtime-sampler cases of the fixture. Before this branch's translator fix those four were not_supported under the identity domains (lavapipe, m3-max-83452: refusal=4); at the fix they match=4. |
||
|
|
2fb00a15ae |
CI: qualify kernel_handle_word_joins's four cases on lavapipe
The public case step now runs the four authored cases of the owned fixture kernel_handle_word_joins (a sampler or a texture taken from a branch merged at a join, as integer words in a phi and in a select, and as pointers in a phi) against their Metal observations. Verified: syntax only (bash -n); the cases' Metal observations and the step's run come next. |
||
|
|
7fcd661645 |
Validation cases: Metal's answer for mul24 and mad24 in and outside their 24-bit range (red)
Two authored cases over engine/int24_products, 12 threads, out filled with 0xAB: operands in the range the Metal Shading Language specification gives mul24 (section 6.4, after Table 6.2: [0, 2^24 - 1] unsigned, [-2^23, 2^23 - 1] signed), and operands outside it, each beside small in-range partners, where the specification calls the product implementation-defined. The addends are full 32-bit words in both. Installed with corpus-case-check (m3-max-82243) and qualified on Metal on the Apple M3 Max, three executions each (m3-max-82247). Metal's outputs against the kernel computed on the CPU, word for word (480 words each): - in range: equal to the 32-bit product of the operands, and equal to the product of their low 24 bits (zero-extended unsigned, sign-extended signed), which agree there; - outside the range: equal to the product of the operands' low 24 bits at all 480 words; the 32-bit product of the whole operands differs at 386 of them. scripts/qualify-public-cases runs both on lavapipe against those rows. They are red until the family is lowered: today the translator refuses the kernel as UnknownIntrinsic. |
||
|
|
39423d92f1 |
ICB: a kernel's indexed patch draws into an indirect command buffer, executed through a layout of indexed patch draws
The owner's 3406 order, the planner's next indirect command kind: MTLIndirectCommandTypeDrawIndexedPatches. The records (pipeline::IndirectDrawLayout) grow by 8 bytes a command for every kind. The control-point indices' address is a third u64 that an execution pushes, and VUID 11103 asks each token's offset to be at or past the one before it, with the draw token last (VUID 11100). So the address cannot go after the draw; it lies past the index token's 16 bytes, at index() + 16. Every command's tail is now 16 + 8 + 4 + 20 = 48 bytes: the stride is index() + 48 (was + 40), the sequence index's place index() + 24 (was + 16), and the draw's arguments index() + 28 (the translator's DRAW_AT, was 20). The cost is 8 bytes a command in every buffer: 160 bytes for 7 vertex and 7 fragment slots (was 152, 5% more), 48 for none (was 40), 544 at most (was 536), which the floor's stride and token-offset limits are checked against. One record shape for every kind stays: a kernel cannot know a buffer's kind when it is translated, so it writes one shape whatever buffer it reaches. The main lane accepted this on the condition that the already-landed kinds' rows run again at the new layout. Translator (lower/access/icb.rs): a render_command's draw_indexed_patches writes what draw_patches writes (the draw's VkDrawIndirectCommand of patches, the factors' and the patch indices' Metal addresses) and the control-point indices' Metal address at the new place (CONTROL_POINTS_AT, IndirectDrawLayout::control_point_indices). Its operands are draw_patches's, with the control-point indices at operand 6. Runtime: Device::new_indirect_command_buffer takes DRAW_INDEXED_PATCHES alone (CommandDraw::IndexedPatches), refused as patch draws are on a device whose executions run no tessellation stage (TessellationStages). Its layout pushes the control-point indices' address where the control stage reads it (FieldValue::ControlPointIndices), holds no index buffer token, ends in TOKEN_DRAW and names the tessellation stages. An execution checks the state's control-point index type against the buffer's kind, as a direct draw checks it against the call: patch draws with a state of an index type are Refusal::PatchDrawWithIndexType, and indexed patch draws with a state of none Refusal::IndexedPatchDrawWithoutIndexType. This replaces the patch draws' check through an empty PatchReads. Docs: the runtime README's ICB section (records, tokens, refusals, floor limits); the API guide's section 1; METAL-COVERAGE (coverage.tsv); CONFORMANCE-COVERAGE and REFUSALS.md regenerated (the two refusals gain the draw site); the API signature table blessed for control_point_indices. Tests: the red commit's engine and runtime device tests; the layout's unit tests at the new offsets, the reset command's control-point place among them; a unit test of the indexed patch tokens. |
||
|
|
08447f8aff |
ICB: a kernel's patch draws into an indirect command buffer, executed through a layout of patch draws
The owner's 3406 order, the planner's next indirect command kind: MTLIndirectCommandTypeDrawPatches. Translator (lower/access/icb.rs): a render_command's draw_patches writes VkDrawIndirectCommand (the patch count, the instances, the patch start and the base instance) where a plain draw's goes, and in the index token's 16 bytes, which a buffer of patch draws does not read as a token, the tessellation factors' Metal address and the patch indices' (0 for the null pointer). The records stay one shape for every kind (pipeline::IndirectDrawLayout::factors and ::patch_indices name the two places). The control-point count is not read, as a direct patch draw does not read it; the factors' instance stride and the factor scale are read only under a per-instance step function or tessellationFactorScaleEnabled, which the runtime refuses at the pipeline state. A post-tessellation vertex function of a state made for indirect command buffers is compiled under LoweringInputs::indirect_range (pipeline/compile.rs), so each evaluation tests its command against the execution range as a plain vertex function does. Runtime: Device::new_indirect_command_buffer takes DRAW_PATCHES alone, the buffer's kind CommandDraw::Patches. Its command layout pushes the factors' and patch indices' addresses where the state's control stage reads them (FieldValue::TessellationFactors, FieldValue::PatchIndices), holds no index buffer token and ends in TOKEN_DRAW; the layout and each execution name the tessellation control and evaluation stages beside the vertex and fragment ones (dgc::PATCH_STAGES). An execution of patch draws draws a patch list with a post-tessellation state and reads no tessellation factor buffer of the encoder's; a state that is not post-tessellation is Refusal::PatchDraw, as is a post-tessellation state with a buffer of other draws, and a state of a control-point index type Refusal::PatchDrawWithIndexType, as for a direct patch draw. VUID-vkCmdExecuteGeneratedCommandsEXT-supportedIndirectCommandsShaderStages-11060 requires the bound stages in the device's supportedIndirectCommandsShaderStages, so the floor reads whether they hold the tessellation stages (IndirectCommandLimits::tessellation_stages) and a buffer of patch draws is refused without them, a new kind, IndirectCommandsKind::TessellationStages. Mesa's source answers VK_SHADER_STAGE_ALL_GRAPHICS on RADV and VK_SHADER_STAGE_ALL on lavapipe. Two draw kinds together, DRAW_INDEXED_PATCHES and the rest stay CommandTypes. Docs: the runtime README's ICB section and refusal line; the API guide's section 1; METAL-COVERAGE (coverage.tsv); CONFORMANCE-COVERAGE regenerated; the API signature table blessed for the new field, methods and variant. REFUSALS.md regenerated with no change. Tests: the red commit's engine test and runtime device test, with the device test's arm for the TessellationStages refusal; a unit test of the patch tokens; the floor's limits test reads the tessellation stages. |
||
|
|
21f0cae67b |
ICB: a kernel's plain triangle draws into an indirect command buffer, executed through a layout of plain draws
The owner's 3406 order, the planner's first indirect command kind: MTLIndirectCommandTypeDraw. Translator (lower/access/icb.rs): a render_command's draw_primitives of the constant triangle type writes VkDrawIndirectCommand (vertex count, instances, vertex start, base instance) where an indexed draw's VkDrawIndexedIndirectCommand goes, 20 bytes past the index token's place, and writes nothing else. Both kinds share the records (pipeline::IndirectDrawLayout), so an encoding writes one shape whatever buffer it reaches. A kernel cannot know a buffer's kind when it is translated, because it reaches the buffer through an argument buffer. A reset's draw of nothing reads as either kind's. Points and lines stay refused, as for indexed draws, because an execution draws one topology. Runtime: Device::new_indirect_command_buffer takes DRAW alone as well as DRAW_INDEXED alone, and the buffer keeps its kind (indirect::CommandDraw). An execution's command layout follows the kind. A layout of plain draws holds no index buffer token, which VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11095 forbids there, and ends in TOKEN_DRAW. Its tokens are one fewer. The execution shapes' cache keys on the kind, and the reset templates serve both kinds. DRAW together with DRAW_INDEXED stays a typed refusal, CommandTypes, until the planner rules. A layout takes one draw token (VUID-...-11100), and no form found draws both kinds in command order at a bounded cost: two executions reorder the commands, an execution per command costs two a command, and identity indices hold only as many vertices as a bound buffer of them. The CommandTypes doc, the runtime README's ICB section and its refusal line say so. Docs: the README ICB section; METAL-COVERAGE (coverage.tsv: "plain or indexed triangle draws"); CONFORMANCE-COVERAGE regenerated for the new row's recording and ledger row. REFUSALS.md regenerated with no change. Not run on an Intel card: the Iris Xe lacks VK_EXT_device_generated_commands, so its ledger row is the Extension refusal; the four-card proof jobs are named in the hand-over. |
||
|
|
c50fd04219 |
rt: drawIndexedPatches, and patch draws through a patch index buffer
The runtime refused a patch draw through a patch index buffer
(Gap::Draw of DrawKind::PatchIndexBuffer) and had no indexed patch draw.
The viewer draws every patch with drawIndexedPatches, indirectly, through
a nil patch index buffer and a UInt32 control-point index buffer (reims's
walk at development
|
||
|
|
71aa9829d0 |
Validation cases: Metal's answer for a row of floats written four at a time with its tail guarded
Four authored cases over engine/split_store_tail, 16 threads at two a row over 8 rows, out filled with 0xCD: sst_split at rows of 7, 6 and 5 floats (each row's second thread writes three, two or one float after its first) and sst_block at rows of 7 (the four in one block, nothing where the row does not hold them). A row starts at 4w bytes times its index, so the first word of a run of four sits at every residue of 16 across the rows. Installed with corpus-case-check (m3-max-80423) and qualified on Metal on the Apple M3 Max, three executions each (m3-max-80428). Each Metal output equals the MSL's stores computed on the CPU, byte for byte (output sha256 d875b981, 2f994d06, 1a84d360, 21ceb16b). scripts/qualify-public-cases now runs the four on lavapipe against those rows. At the branch's last commit their Vulkan runs match Metal on lavapipe (m3-max-80560), the AMD Radeon RX 7900 XTX (m3-max-80568) and the AMD Radeon 780M (m3-max-80570). Not run on an Intel card. |
||
|
|
c1f999eb06 |
rt: pipeline states answer Metal's allocatedSize as their translated SPIR-V's bytes
ComputePipelineState::allocated_size and RenderPipelineState::allocated_size answer MTLAllocation's allocatedSize, which both Metal pipeline states adopt. The answer is our code's size, not the driver's compiled binary, which the runtime does not measure. A compute state answers its kernel's module, the one its interface is read from. A render state answers its stages' modules, summed. Both numbers are taken from the translation when the content is made and kept as a u64 in the content (a compute content's Answers, a field of RenderCompiled); no module is kept for them. Every device takes the same form. No variant counts: not the emulated-SIMD-group or partial-threadgroups variant lowered with a compute state, not one made at a dispatch (the emulated-partial variant), and not a render content made later for a pass. So the answer never changes once a state is made, and two states of one content answer one size. docs/API.md's accepted differences (Heaps and memory) gets the entry. MTLAllocation.allocatedSize stays missing in the coverage ledger: buffers, textures and heaps still lack it. Its note now names the pipeline states' answers, and docs/METAL-COVERAGE.md is regenerated. api_signatures.tsv is blessed with the two methods. Tests: - state_answers: a new test. block_scan (plain module) and sample_down (partial-threadgroups variant) answer non-zero. Each equals the bytes of the module the state keeps (a test-only Kernel::module_bytes). The render state of first_texel_fragment answers the sum of the translator's compile_render_pipeline stages' SPIR-V lengths. Two states of one content answer one size. - translate.rs: the ragged-grid test on emulated SIMD groups now also checks that a state's answer is the same after the dispatches that make the variant later. Verified: job m3-max-79929 on lavapipe, a check of this tree. - signatures --check, coverage --check, clippy (plain, m2v_gpu, m2v_cpu_icd), workspace doc and the runtime's private doc: all 0. - The runtime suite: 928 passed, 3 skipped. - The two tests rerun with output: both pass. On lavapipe the variant already emulates its SIMD groups, so the ragged test makes nothing at a dispatch there. No card run yet. |
||
|
|
86386c4873 |
Refusal surface: --check compares the totals, and REFUSALS.md counts Refusal::TextureUsageAtSlot
docs/REFUSALS.md listed 89 runtime Refusal variants but its two totals tables still counted 88 (and 24 metal-measured where there are 25). A union of two branches' rows keeps every variant row and one side's totals, and --check compared only the variant rows, so it passed. The totals count variants alone (no sites, no line numbers), so they are structural: --check now compares them too. Verified locally (plain script, no build): with the old REFUSALS.md, --check exits 1 naming the two stale Refusal totals rows; after regeneration it exits 0. The regeneration changes only those two rows; basis.rs is unchanged. |
||
|
|
b723c90272 |
rt: Device::default_sample_positions answers getDefaultSamplePositions:count:
The runtime answered no default positions (its README's known gap). Device::default_sample_positions answers a count with the positions a pass of that many samples that sets none rasterizes at: Vulkan's standard sample locations, which the floor's standardSampleLocations makes every such pass take, and which are plain Metal's answers at 1, 2 and 4 samples on an Apple M3 Max, macOS 27.0.1 (probes/default_sample_positions.m, m3-max-78953). supports_texture_sample_count answers at most 1, 2 and 4, so no other count is answered. A count it does not answer is Refusal::DefaultSamplePositions (basis metal-measured: plain Metal asserts "count (n) is not supported on this device." and ends the process, at 0, 3, 5, 6, 8, 16, 17, 32 and 33 on the M3). README (the device's answers; the sample-positions gap sentence), coverage.tsv (I), and the generated REFUSALS.md, basis.rs, api_signatures.tsv, METAL-COVERAGE.md and CONFORMANCE-COVERAGE.md. Verified on lavapipe, job m3-max-79650: clippy, doc and private doc EXIT=0; the runtime suite 923 passed, 3 skipped. Metal's answers: m3-max-78953 (Apple M3 Max). |
||
|
|
d9054b5164 |
Validation: a play's gauge records are the runtime's objects past the play's own, of each kind the program makes one at a time
A play's frames 100 and 200 are not one loop's iterations: the program makes and releases objects between them (glbench-3090-r4 holds 62 textures at frame 100 and 690 at 200), so a runtime gauge held flat there judged the program. The matrix's records of a play are now, for buffers, textures, samplers and events, the runtime's live objects of the kind less the play's own (`KIND_excess`): the stream's live objects the backend made, and the backend's own that stand for them (two-copy Managed buffers' CPU copies and the released ones a commit still copies, the asides, the guest RAM scratches; the planes' shapes, one texture a plane and shape that the plane's surface textures and views are views of; the video and exported surfaces' planes). The settled end lines at frames 100 and 200 carry the play's count of each kind as KIND_held. An excess below zero is written as it is, which results.py takes for no count. The runtime's other kinds follow the program's objects and work, not one object each: they are not replay records (the harness's loops hold those its workloads reach), and every kind stays held at zero at the device's drop. Verified: in the hand-over. |
||
|
|
f4eb47d792 |
Validation: a play's gauges at frames 100 and 200 go out as the matrix's records, every kind on its end lines
What: - The runtime backend's end lines (`Backend::live`) carry every count of an object kind the runtime keeps live: samplers, LOD clamp variants, level elements, kernel variants and entries, render contents, attachment views, descriptor slots, device samplers, shadows, resolve images, plane stand-ins, buffer set pools, surface buffers, indirect command buffers, releases waiting and handles out join them, and the pipeline cache's bytes. - At the ends of frames 100 and 200 (GAUGE_FRAMES) the player reads them once they hold still (Backend::settled_live): the runtime backend reads them every 10 ms until no release waits and two reads in a row agree on every recorded kind, for at most 2 s, a wait no frame's time holds. What the program released goes on the runtime's block-maker and reaper threads after the work before it retired, so a read straight after the frame's waits could differ between two plays. - command-replay prints, where the play ended frame 200 and skipped nothing by then, `M2V-MATRIX gauge replay-rt/STEM/GAUGE@100` and `@200` for each kind of GAUGED (gauge_records). scripts/matrix/results.py judges them as it judges the harness's: equal at 100 and 200, blocks no higher at 200. - Left out, and why: handles_out (1 while the play holds the device), releases_waiting (lowered by the block-maker thread whenever it runs), private_units (a layout of memory that follows the bytes the program holds), and every byte and age gauge, which follows the program's content and the pool's idle clock: the pipeline cache's data (bound 128 MiB), the translator's entries' bytes (bound 64 MiB), the staging bytes, the pool's allocated, idle, reserved, reused, taken and block bytes, and the shadows', resolve images' and stand-ins' bytes, whose counts are recorded. Why: the matrix's leak rule (live gauges per resource kind flat between iterations 100 and 200) reached only the harness's compute workloads. The kinds only draws and passes make (render contents, attachment views, shadows, resolve images, stand-ins, the samplers draws reach) had no such check, and a play's end lines lacked 17 of the kinds. Docs: REPLAY-STREAM.md section 10 (the end line's gauges, the settled read, the records), VALIDATION.md's gauge row, command-replay's module doc. Tests: replay::tests the_player_settles_the_gauges_at_frames_100_and_200_alone and the_gauge_records_are_the_counted_kinds_at_frames_100_and_200; replay::rt_replay the_end_lines_carry_every_gauge_the_gauge_records_carry (device); test_results.py test_a_plays_gauges_at_frames_100_and_200_are_held_flat_as_the_harness_s. Verified: in the hand-over. |
||
|
|
9a89d5e25c |
CI: the lavapipe image's udmabuf decided by the node's presence, its downloads saved on fetch, its build step limited
lavapipe exports a dma-buf through /dev/udmabuf. The image's containers now get the host's node wherever the host has one (docker's daemon opens it for them; rootless podman only where the user may), with the node's group, and `lavapipe-image udmabuf`, which the build step runs, says which. Where they get none, `nextest` skips the tests and `replay` (new: the conformance replay in the image) leaves out the cases scripts/lavapipe-image/needs-udmabuf names, each named in the log: those are measured, each failing without the node and passing with it. The workflow decides by the node's presence alone; no test is loosened. LAVAPIPE_IMAGE_UDMABUF names another node, or none, which is how the lab's replica shows what a runner without the node runs. The downloads are restored before the build and saved right after it, keyed on the pin (the tarball's sha256, the date and the packages' versions), so a job whose later steps fail still keeps them. The build step's limit is 90 minutes: a cold fetch at the slowest rate measured from the archive, one connection at 57 KB/s, of the 127 MB tarball and 135 MB of databases and packages (262 MB) takes 77 minutes. A fetch that fails ends the build step with the URL and curl's status, or pacman's, before any test runs; the fetches retry three times. Measured at this change's parent plus the probe (job m3-max-79668, lavapipe on x86-64 AVX2, no node passed in): of 807 device tests run, 806 pass and replay::rt_replay::a_video_surface_is_waited_for_at_its_ready_point_once fails with "the device exports no DmaBuf"; with the node (m3-max-79517) every one passes. The four surface-textures cases are refused at replace-region without the node (m3-max-79408) and hold the ledger's expectations with it (m3-max-79517). |
||
|
|
7687644485 |
CI: the device-executing steps run on lavapipe in an image of one Arch Linux Archive date
CI's lavapipe steps ran on Ubuntu's Mesa 26.0.8 (LLVM 21.1.8), whose llvmpipe faults in its JIT code on the conformance case reconvergence-constructs' rc_break draw (a null load on its rasterizer thread), while the ledger's llvmpipe rows were recorded on Mesa 26.2.4 with LLVM 23.1.1. The device tests, the conformance replay and public case qualification now run in a container image of exactly that Mesa and LLVM, and nowhere else. scripts/lavapipe-image/pin names the image: the Arch Linux bootstrap tarball of 2026.10.01 and its sha256, the archive date 2026-10-05 its packages come from, and each package's exact version (vulkan-swrast 1:26.2.4-1, llvm and llvm-libs 23.1.1-1, vulkan-icd-loader and vulkan-validation-layers 1.4.363.0-1, spirv-tools 1:1.4.363.0-1, vulkan-tools 1.4.363.0-1, python 3.14.7-1). scripts/lavapipe-image/lavapipe-image builds it: the tarball by curl -A curl, checked against the sha256; its root imported with docker or podman; then pacman, against that date's archive repositories alone, fetching through curl -A curl (XferCommand), with signatures required and checked by the bootstrap's own keyring. Its downloads stay under ~/.cache/m2v-lavapipe-image, which CI caches keyed on the pin, so a run whose pin has not moved downloads nothing. `ensure` prints the pin, the packages the image holds and its device's name and driver, and fails where any differs from the pin or from the ledger's new `# llvmpipe:` line, which names the venue's Mesa, LLVM, loader and layers. That line holds upstream versions: the image is Arch's build (mesa 1:26.2.4-1), and the rows were recorded on another distribution's build of the same release (3:26.2.4-1). The tests are built on the host and only run in the image, with no network, only the environment named, and the checkout mounted read-only (qualification writes the corpus alone). lavapipe exports a dma-buf through /dev/udmabuf, so a container gets the host's where the host's user may open it, and offers the exports the host's lavapipe does. Each container is held to its job's memory (LAVAPIPE_IMAGE_MEMORY, else the host's) and CPUs (CARGO_BUILD_JOBS, else the host's), since the container runtime runs it outside the job's processes. The archive serves a connection slowly at times, so the build fetches the transaction's packages eight at a time with the same curl command before pacman runs. The device tests are the tests the --cfg m2v_cpu_icd build lists and the plain builds do not (only_in.py): a test that opens a device compiles only under the cfg, and the plain builds' tests, the .ll fixtures' test with Ubuntu's LLVM 21 among them, run on the host as before. They go into the image as a nextest archive, which needs no toolchain there; the replay and qualification run the binaries built in the checkout. The host keeps the Vulkan loader and no driver. AGENTS.md and CONTRIBUTING say in one sentence each that the pin and the ledger's line move together. Verified in the lab's replica of CI's Linux job (job m3-max-79517, at this change on e086e51c7e, docker 29.10.1, lavapipe on x86-64 AVX2): the image builds from the cached downloads in 55 s and its check passes (every package equal to the pin; "llvmpipe (LLVM 23.1.1, 256 bits)", "Mesa 26.2.4-arch1.1 (LLVM 23.1.1)"). The device tests: 810 listed, 809 run, 809 passed. The conformance replay holds exactly the 4,712 open gaps the ledger expects on llvmpipe, with no fault. Public case qualification passes. Without /dev/udmabuf (m3-max-79408) one device test met "the device exports no DmaBuf" and the replay refused four surface-textures cases at replace-region; with it both are as the ledger expects. The two red host steps of both runs, golden_hashes and the pinned opened chains, are the tables the next pin blesses, not this change. |
||
|
|
1c307b4608 |
Runtime: a pass rasterizes at the sample positions its descriptor sets, through VK_EXT_sample_locations
L168: a pass's custom sample positions were dropped while the guest could be told they are supported, so a non-default set rendered at the standard positions with no refusal. What changed: - VK_EXT_sample_locations joins the floor's OPTIONAL_EXTENSIONS (enabled where listed; it has no feature). Device::programmable_sample_positions_supported (programmableSamplePositionsSupported) is true where the device lists it with locations at every sample count above 1 it renders, a 1 x 1 grid, every sixteenth from 0 to 15/16 and variableSampleLocations; false elsewhere. No second form: a device that answers no refuses positions other than the defaults. - RenderPassDescriptor::sample_positions is checked as the pass begins (crate::positions): each coordinate is taken to the nearest sixteenth, a tie up, at most 15/16, and each sample past the positions given at the pixel's corner, as the conformance suite's sample_positions rows measured an Apple M4. A set that comes to Vulkan's standard locations (Metal's defaults at 1, 2 and 4 samples) rasterizes as an empty one on every device. - Refusal::SamplePositions (Count, Coordinate, OneSample, Unsupported) where Metal's validation stops the descriptor or the device answers no. Gap::RenderPass of SamplePositions for other positions beside a depth attachment (Vulkan needs a sample-locations-compatible depth image whose layout transitions name the last locations) or at a count the device's locations lack. Gap::Draw of SamplePositions for a draw in such a pass whose fragment module uses InterpolateAtSample (VUID-01524), read from the translator's GraphicsState. - A draw in such a pass takes a VkPipeline of its class made with sampleLocationsEnable and the locations as dynamic state (Raster::positions), one pipeline for every set; the encoder records vkCmdSetSampleLocationsEXT before the pass's first draw. Every coordinate handed to Vulkan is a sixteenth in [0, 15/16], which Vulkan's required 4 sub-pixel bits hold exactly, so no precision note. - The translator's description of a device that enables the extension states it (floor::shader_extension), as for every extension creation enables that the translator names; the translator reads none of its properties. tests::translator_fields gives GraphicsState::interpolates_at_sample its verdict (refused at custom positions). - The conformance rt side passes a case's positions to the runtime; the replay player sets them on the runtime's descriptor and drops its count of passes at other positions (docs/REPLAY-STREAM.md says so). - README (floor table, the device's answers, the known gap rewritten), REFUSALS.md and basis.rs, api_signatures.tsv, METAL-COVERAGE.md and CONFORMANCE-COVERAGE.md regenerated. Tests: the device test every_device_rasterizes_a_pass_at_its_sample_positions now gates on the device's answer and holds the answer to the extension's properties; new device tests every_device_refuses_the_positions_metal_refuses and a_draw_that_interpolates_at_a_sample_is_refused_at_custom_positions; new device-free tests (placed::) of the answer's gates (each count above 1 the device renders in sampleLocationSampleCounts, a 1 x 1 grid, a range holding 15/16, 4 sub-pixel bits, variable locations) and of the placement (every coordinate in [0, 1) on a sixteenth from 0 to 15/16, refusals, the corner, the standard sets, the count and depth gaps); the replay device test sample_positions_play_through_the_runtime_s_descriptor. Verification: the lane's jobs, named in the ledger commit that follows. |
||
|
|
c231c41ddd |
scripts: rustc-wrapper runs under bash, so the compiler keeps Cargo's hyphenated variables
The remote CI's Linux leg has failed "Clippy (warnings denied)" on master since at least
11-15 (run 43704398652 and every push after it, 46893773054 at
|
||
|
|
d0664f2c10 |
CI: qualify the float and half function-constant cases on lavapipe
scripts/qualify-public-cases runs a named list of the owned public cases on lavapipe against their committed Metal observations. It now names lane fcfloat's 15 cases (engine/fc_float_gate: a kernel's gated argument and a fragment's gated sample mask; engine/fc_half_gate: the sample mask), so CI keeps Metal's answer for a float or half predicate: present at 1.5, -0.0 and a quiet NaN, absent at +0.0 and unsupplied (Apple M3 Max, jobs m3-max-75714, 75716, 75726). The lane's candidate ran these 15 on lavapipe at 7de0a8c8bb's tree plus the half fixture: 15/15 Match, every slot current (job m3-max-75728). The script itself runs in the gate at the pin tip. |
||
|
|
c718924d44 |
CI: qualify the AIR 1.8 sampling case on lavapipe with the other public cases
scripts/qualify-public-cases runs case 884ad7d75a22 against its committed Metal row. Run by hand under the same operator environment (ci-lavapipe, job m3-max-73980 on lavapipe 23.1.1): Match, candidate output 7d65bff73d82, Metal's bytes. |
||
|
|
ab24c9617f |
Docs: comments that named a deleted module or file say what is true now
Six comments sent readers to `device::driver_facts` (the release-keyed deviation table) as the
place a driver's measured deviations come from. The module is gone and `Device::from_queries`
reads no identity, so each now says that translation takes no deviation and reads no driver
identity:
- crates/metal2vulkan/src/ash_interop/query.rs (the format query's note),
- crates/metal2vulkan/src/device/description.rs (`device_name`'s doc),
- crates/metal2vulkan/src/device/khronos.rs (the module docs' deviations paragraph),
- crates/metal2vulkan/src/device/tests/description.rs (`a_stated_deviation_is_refused`'s doc),
- scripts/regen-device-profiles/README.md and regen_device_profiles.py (the Deviations text).
lib.rs's note on the crate-private modules drops its design citation and the claim that lowering
and the binder's replay share `indirect_commands`: no lowering reads it, and validation's case
model and Metal executor reach it as `bind::indirect_commands`.
The ASTC HDR probe's header (crates/metal2vulkan-conformance/probes/astc_hdr_textures.m) named
the runtime's `astc.rs`, which does not exist; it now points at `bind::astc_decode`'s docs and
the `astc-*-hdr` recordings. No recording or test fingerprints the probe's source:
`git grep -n 'astc_hdr_textures'` finds only the probe itself, a sibling probe's comment and two
doc comments under bind/astc_decode.
Zeros, at metal2vulkan
|
||
|
|
3c52ee1cf1 |
Render pass: a colour attachment renders one depth plane of a 3D texture's level
What: RenderPassColorAttachmentDescriptor takes `depth_plane` (Metal's `depthPlane`). A 3D texture of RenderTarget usage is made 2D-array-compatible (VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, in its image format query too: Plan::flags, from the image's type and its colour attachment usage, no query). attachment_view then takes the plane of a 3D texture's level as a 2D view of that one layer (base layer = depthPlane, at the level), checked against the level's depth (Refusal::AttachmentPlace past it). Every barrier on a 3D texture's image (its attachment's, its copies' and its moves', texture::barrier_layers) names the image's layers as 0 and VK_REMAINING_ARRAY_LAYERS, so each moves every plane of the level it names. Before, every such pass was Gap::RenderPass of RenderPassKind::TextureType. Still TextureType: a 3D texture in a layered pass (renderTargetArrayLength 2 or more), a depth or stencil attachment of a 3D texture, a 3D resolve texture, and a resolve's depth plane but 0. A draw that reads, through a shadow (a device without the attachment feedback loop), a 3D texture whose plane its pass renders is Gap::Draw of DrawKind::AttachmentRead: a shadow's copies are of layers. The floor asks a device that lists VK_KHR_portability_subset for imageView2DOn3DImage too (VUID-VkImageCreateInfo-imageView2DOn3DImage-04459), as it asks multisampleArrayImage. Why: a guest route meets the refusal. A browser's GL layer clears every 3D texture of an RGB-family format (RGB8, RGB16F) at creation through a pass on each plane, to set the alpha it emulates; it also renders into a plane for framebufferTextureLayer(TEXTURE_3D, k) then a clear or a draw, for a level sampled before a full upload, and for copyTexSubImage3D. The consumer's route showed the key at |
||
|
|
0630c1d9a7 |
Translator: specialize refuses an instruction it would leave half specialized
pipeline::specialize copied every instruction outside its list as it was. An OpExecutionModeId (a LocalSizeId mode among them) beside a WorkgroupSize composite would leave the entry point with two sizes, and an OpDecorationGroup could carry a SpecId the pass never reads, so that constant would keep its default. The translator writes neither, so the pass now refuses both with an Error::Internal that names the instruction. An OpSpecConstantOp of an opcode outside SpecOp was already refused; its refusal now names the opcode. Op::ExecutionModeId and Op::DecorationGroup move into every build, and ExecutionMode::LocalSizeId into test builds. Both come through scripts/regen-spirv-grammar's items.txt and a regeneration from Khronos's grammar (vulkan-sdk-1.4.341.0); table.rs comes out unchanged. Test: a_module_of_an_instruction_the_pass_does_not_specialize_is_refused takes the deep kernel with an OpExecutionModeId LocalSizeId of its LocalSize constants, with an OpDecorationGroup, and with an OpSpecConstantOp turned to ISub. Each must be refused, and the refusal must name the instruction. The next check job runs it. |
||
|
|
ed4b0ecd76 |
rt: storage textures written or read at a run-time level, through runs of set 1's level elements
What: under the identity domains a storage slot written, read or size-queried at a level other
than the constant 0 indexes a run of set 1's storage-image array instead of being refused as
Unsupported{IdentityDomains} ("an encoder value the function reads as TextureLevels(S)"). The
translator pushes the bound texture's level count (PushField::TextureLevels) and the run's first
element (the new PushField::TextureLevelBase, beside it), states no StorageTextureLevels or
StorageTextureLevelViews fact, and an access at level l takes element
first + min(l, max(n, 1) - 1) of the array, NonUniform, inside l < n. A texture of one level
pushes its own index, nil 0 with count 0.
The runtime's binding 1 grows by 65,536 level elements past its 65,536 textures, 4,096 runs of 16
(floor::LEVEL_ELEMENTS, floor::LEVEL_RUN). The first dispatch or draw that binds a texture of more
than one level to such a slot (the encoder's checks, compute and render stages alike) gives it a
run: a single-level storage view of each level, of its storage element's type (a cube's level as
the 2D array of its faces, a view's from its own first level), written at the run's elements. A
later bind takes the texture's lock and pushes the same two words: no Vulkan call. The run goes
back through the pool and reaper once the texture is released and its work retired: elements null,
views destroyed (Gauges::level_elements). Every run held, or a texture of more than 16 levels, is
the new Limit::LevelElements { max: 4096 }, and the dispatch or draw does not run. The floor's
storage-image limits and both totals rise by 65,536: storage 196,608, per-stage resources 327,688,
pools 351,680; every lab device's profile is far above (llvmpipe 1,015,808 storage, the least).
SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION bump in the branch's last commit (a new PushField).
Why: 17 guest kernels in 6 libraries were refused at state creation by this form.
Docs: REFUSALS.md and the signatures table regenerated, RESOURCE-ID.md (binding 1 past 65,536),
API.md (storage levels under identity), the runtime README (Set 1, the floor table, the known-gap
line replaced by the Limit), the runtime-floor profile's limits, and the conformance ledger's
level-sizes-storage row removed.
Checked by: engine_texture_levels' identity test and the runtime's storage_levels device tests
(red at 6ad1c33124: jobs m3-max-70886 and m3-max-70892 on lavapipe), engine_identity's
a_storage_slot_written_at_a_run_time_level_is_an_element_of_its_run; the lane's jobs report the
runs per card.
|
||
|
|
624c5a38b9 |
Translator: a fragment's quad votes are OpGroupNonUniformQuadAllKHR and QuadAnyKHR, helpers included
What: in a fragment function, Metal's quad_all and quad_any are now
SPV_KHR_quad_control's OpGroupNonUniformQuadAllKHR and
OpGroupNonUniformQuadAnyKHR of the predicate, in place of the quad's four
bits of the ballot of the predicate (compared with the ballot of the
active lanes for quad_all). Kernels and vertex functions have no helpers
and keep the ballot form. The IR gains GroupInst::QuadAll beside
QuadAny (no scope operand; QuadControlKHR, SPV_KHR_quad_control and
shaderQuadControl), and the builder's group_quad_any becomes
group_quad_vote(all, pred), as group_vote is. The interpreter, the
serializer and the requirement deriver follow. items.txt lists
GroupNonUniformQuadAllKHR, and scripts/regen-spirv-grammar regenerated
spv.rs from SPIRV-Headers vulkan-sdk-1.4.341.0: the opcode loses its
cfg(test); the test parser's table already held it.
Why: Metal's helpers are active lanes of their quad and take part in
its votes. Vulkan section 9.31 runs quad group operations over a quad's
helpers in every entry, and its other group operations, the ballot
among them, only where the entry declares MaximallyReconvergesKHR. AMD's
open Vulkan driver leaves a partly covered quad's helper out of the
ballot even though the entry declares MaximallyReconvergesKHR beside
RequireFullQuadsKHR (report 142), so a vote read through the ballot
missed the helper: the runtime test quad_votes read quad_any(x > y) = 0
and quad_all(x <= y) = 1 on the 12 covered pixels of the diagonal quads,
where Metal answers 1 and 0 (m3-max-70847, AMDVLK 2025.Q2.1 on the RX
7900 XTX and the Radeon 780M; RADV right on both). The quad vote
instructions are right by the spec on every device whatever the entry's
reconvergence (rung 1), the form the quad reductions took (
|
||
|
|
9f6712f172 |
Translator: spv.rs names OpGroupNonUniformQuadAnyKHR outside tests
The fragment quad reduction emits it (1c64701191), so items.txt lists it and scripts/regen-spirv-grammar regenerated spv.rs from SPIRV-Headers vulkan-sdk-1.4.341.0: the opcode loses its cfg(test). The test parser's table already held it. 1c64701191 alone does not build without this commit. |
||
|
|
5a03a60b6c |
rt: Device::max_threadgroup_memory_length, Metal's maxThreadgroupMemoryLength less the vote word
The answer is the device's maxComputeSharedMemorySize less the 4-byte vote word a kernel's partial-threadgroups variant may take beside its threadgroup memory, rounded down to 16, and at most Metal's 32 KiB: 32,752 on a device of 32,768 bytes (AMD's drivers on the 780M, lavapipe, MoltenVK on the M3), where a Mac answers 32,768; 32,768 on RADV, NVIDIA and ANV. A guest that sizes its threadgroup memory from it (a length it sets, or source it compiles at run time) runs its ragged grids, where 32,768 is refused (Gap::PartialThreadgroups for static memory, Limit::ThreadgroupMemory for a length). The word is one constant, pipeline::VOTE_BYTES, which the module interface's vote word reads too. It changes only the answer: every dispatch is still checked against the device's own limit. An emulated SIMD group's scratch varies by kernel and is not counted; the runtime README records it with the refusal a kernel past the answer keeps, and the unaudited cost to a guest that rounds the answer down to a power of two. Tests: the scan test reads the answer and checks its formula; a kernel whose variant takes no vote word runs [25,1,1] and [1024,1,1] in [1024,1,1] with a length of 32 KiB, past the answer (every_device_runs_a_kernel_without_a_vote_word_at_a_length_past_its_answer). METAL-COVERAGE and the api_signatures table are regenerated. Not yet run. |
||
|
|
058fd25a7b |
Translator: MSL 3.2 program-scope buffer bindings become buffer parameters; other shapes refused apart
What: `!air.global_bindings` decodes into `AirAbi::global_bindings` (`GlobalBinding`: the
global, and its node's role, type information and name, read by the parameter-node decoder;
the node's index is -1). Canonicalization (`canon::global_binding`, beside the global
built-ins) makes each plain load of a bound buffer's pointer (device or constant space, one
stated slot) a read of a parameter: the entry's own parameter of the binding's role and type
where it takes one, else one appended, shared by the bindings of one role and type. Lowering
then binds it where a `[[buffer(n)]]` parameter binds; the runtime binds nothing new.
Why: the whole module was refused as ProgramScopeBinding (78 functions in 1 library of the
private corpus on runtime-floor and gate-lavapipe: kernels, one constant struct buffer each,
read only by plain loads of its pointer). Metal fills a bound global from the executing stage's
own argument table. Measured on an Apple M3 Max under macOS 27.0.1:
- m3-max-70268: a kernel's globals read and write the buffers bound at their indices;
reflection lists each as a binding at its index; a parameter and a global of one type at one
index, and two globals of one type at one index, read the one buffer; a vertex and a fragment
function reading one global each read their own stage's buffer at its index.
- m3-max-70306: Metal also takes a bound texture and sampler, bound threadgroup memory, a bound
sampler array, and a linked visible function of another library that reads a bound buffer.
What stays refused, each a refusal of its own (docs/REFUSALS.md regenerated):
ProgramScopeResource (a texture, sampler or threadgroup memory, one or an array),
ProgramScopeSharedSlot (a binding at a slot an entry parameter or another binding binds with
another role or type), ProgramScopeLinked (bindings in a linked or dynamic-library module),
ProgramScopeRead (a read of a bound buffer other than a load of its pointer, which
`xcrun metal` 32023.922 does not write). ProgramScopeBinding is gone: a consumer's exhaustive
match on Feature breaks, and a consumer's AirAbi literal needs the new field (git grep of the
consumer's checkout at aed8655a62: 0 hits for ProgramScopeBinding and for `AirAbi {`).
Tests: the ABI decode of a binding (a node with a parameter's index, or a global that is not the
externally initialized undef constant, is malformed); canonicalization over a kernel with three
bound buffers (two appended parameters, one shared with the entry's own) and the refused
shapes; linking and dynamic-library refusals.
|