1dd4e970c0562c73bd3eba12cd15999bb035e019
2403
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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
|
||
|
|
2ec06b93e1 |
Translator: the sparse path goes
The translator kept a second form for a function that observes a texture's residency: a slot's
sparse arm (OpImageSparse* and OpImageSparseTexelsResident under shaderResourceResidency) or its
tile map (a storage buffer of tile bits the consumer would mirror from each mapping), selected by
SpecKey::SparseTexture from the bound texture's MTLTexture.isSparse, with Metal's measured
footprint rule for a sample or gather, writes dropped under the same constant, and
PrecisionNote::SparseResidency where the device answered. With the observed residency now the
constant resident word, nothing builds either form, and nothing can need one: the runtime has no
sparse heap or sparse texture API, and the consumer tells no guest it has sparse textures (every
Apple family's supportsFamily NO, sparseTileSizeInBytes 0, isSparse NO; a sparse heap refused at
newHeapWithDescriptor:). So the path is deleted (rule 4).
Public items deleted, each searched for in the consumer's checkout at 76e6c90369 (0 hits for every
name):
- RuntimeFact::SparseTexture { slot, sparse_arm, tile_map } and its mechanism; the 12-03 cleanup
ruling that kept it in the produced-then-refused group is reversed for it alone;
- SpecKey::SparseTexture;
- ResourceKind::TileMap and BindingSource::TileMap, with pipeline::tile_map, the map's format;
- PrecisionNote::SparseResidency (metal2vulkan-degrade-sparse-residency), with its API.md
catalogue entry, the conformance Degradation and validation's C3 deferred near-equivalent;
- error::Feature::SparseTexture, which nothing constructed;
- bind::TextureFacts::sparse and TextureShape::Texture's sparse, which no binder set.
Crate-internal, gone with them: the texture family's residency use flags, sparse_arm, tile_map and
sparse_writes on a slot plan, their spec constants and tile-map views, resident_access, the tile
decoding (TileLevel), the read's sparse and tile-map arms, the census's ".resident" suffix and
RESIDENCY_WORDS; the sampler's residency and footprint fields and lower::sampler::footprint (Metal's
measured footprint rule, read only to answer from a tile map), the sparse arm in sample, gather and
pixel fetch emission, and lower::texture::residency (every caller sits behind the texture family's
own refusal of a word with another bit observed). The SPIR-V layer loses what only those built:
the builder's sparse_sample, sparse_fetch, sparse_gather, sparse_dref_gather, sparse_read and
texels_resident, the sparse flag of SampleForm and of the fetch, gather and read instructions,
Inst::ImageSparseTexelsResident, its serialization, requirement (SparseResidency, and with it
shaderResourceResidency) and the interpreter's unmapped texels. VkFeature::ShaderResourceResidency
stays: profiles and the device queries name it.
Nothing compiled changes: no module held a sparse instruction or the constant since the previous
commit, so SEMANTICS_VERSION stays. ARTIFACT_FORMAT_VERSION 608 -> 609 (renumbered at landing):
the codec's ResourceKind, SpecKey, RuntimeFact, PrecisionNote and BindingSource lose variants,
which moves later tags. runtime-sources.sha256 moves for bind/state.rs, bind/heap.rs and the
deleted pipeline/tile_map.rs; no run of an unchanged artifact changes. docs/REFUSALS.md, the
runtime's error/basis.rs and tests/api_signatures.tsv are regenerated.
Tests deleted with what they tested: the serializer's sparse sweep, the builder's sparse read
under texel operands, the mechanism table's three SparseTexture rows (the variant indices close
up), C3's SparseResidency deferral (the deferred-row tests now use CubeGradientFootprint).
Verified, on the CPU with no device:
- m3-max-85203, at this change on
|
||
|
|
619e977d63 |
Translator: a texture's observed residency is the constant resident word
A sparse_sample, sparse_gather or sparse_read (and a sparse block read) whose function observes
bit 0 of its status word (sparse_color::resident()) was refused under the identity domains:
the observed residency made the slot's RuntimeFact::SparseTexture, a texture state the identity
domains do not source (Unsupported{IdentityDomains; NotImplemented}, IdentityCause::TextureState).
The golden table and the engine inventory held the refusal for engine/a2_sparse_status, and the
runtime's README listed it as a known gap.
Metal's answer over a texture that is not sparse, measured with this kernel plain and under
Metal's validation layer (which reported nothing): every residency resident on the Apple M3 Max
(macOS 27.0.1) and on the AMD Radeon Pro 5300M (macOS 26.7.1), not resident on the Intel UHD
Graphics 630 of the same MacBook (macOS 26.7.1), with the same colours on all three. Both answers
are Metal's. The runtime makes no sparse texture: it has no sparse heap or sparse texture API, and
the consumer tells no guest it has sparse textures (every Apple family's supportsFamily NO,
sparseTileSizeInBytes 0, isSparse NO, and a sparse heap refused at newHeapWithDescriptor:).
So the word is the M3 Max's and the 5300M's answer, a constant: an observed residency is 0,
resident, of a slot and a heap element alike, with no query, no precision note and no second
form. lower::texture::residency answers false wherever the word's other bits are not observed (a
word with another bit observed stays refused), so no access marks its slot's residency and no
slot states a SparseTexture fact. The extended-range sample, which refused an observed residency,
takes the constant word too.
Tests:
- engine_identity's a_sparse_access_of_a_texture_slot_is_resident compiles a2_sparse_status on
every identity profile and moltenvk-m3 without robustImageAccess2: L3 passes, the interface
states no specialization constant but the dispatch's, the plan no SparseTexture fact, and the
module holds no OpImageSparse* instruction.
- engine_texture_oob's block_reads_read_their_texels_as_reads_do runs br_sparse (a sparse block
read storing 2.0 where resident) on every profile and class, where it asserted the refusal:
its alpha lane reads 2.0 at every point, inside the texture and outside.
- The conformance case sparse-status-plain (cases/sparse_status.rs, the a2_sparse_status kernel
over two 4x4 RGBA32Float textures, 16 threads) records the M3 Max's colours and residencies,
and Metal's times; its module docs state all three Macs' answers.
Docs: the runtime README's known gap for this residency goes, with the sparse residency in the
list of texture state the identity domains do not source; API.md's texture paragraph says an
observed residency reads resident, with the Macs' answers, and PixelSamplerScaling's entry (here
and on PrecisionNote) loses its observed-residency case.
Engine inventory (public_fixture_expectations_engine.tsv): 147 .ll cells move from
Unsupported{IdentityDomains; NotImplemented} to ok, every profile's of a2_sparse_status,
kernel_block_read's br_sparse, sps2_residency_probes, spse_address_probes, spse_array_probes,
spse_level_probes and spse_volume_probes (15 each), and every profile's but runtime-floor's of
spse_write_probes, spse_write_barrier and a27_spse_write_barrier (14 each; runtime-floor's stays
Unsupported{IdentityDomains; NotImplemented}). Their .air.ll twins, which only macOS assembles,
move at the M3 bless.
SEMANTICS_VERSION 2367 -> 2368 (renumbered at landing): the residency-observing fixtures' golden
cells change from the refusal to modules. The golden table is blessed at the next pin.
Verified:
- m3-max-85059, on the CPU with no device, at this change on an earlier development
(004f68b48f; rebased since onto
|
||
|
|
3758e468a7 |
Runtime: TextureCopyMismatch rests on Apple's documented rule, with the Macs' measured answers
Refusal::TextureCopyMismatch (BlitCommandEncoder::copy_from_texture between textures of two pixel
formats or two sample counts) stated a metal-measured basis: the probe blit_copy_format_pairs.m on
the M3 Max under Metal's validation layer alone, which stops every pair of two formats. A
consumer's probe on a MacBook's Radeon Pro 5300M (macOS 26.7.1) had Metal take ten pairs of one
texel size and copy their bytes, plainly and under the validation layer, so the basis was re-read
and measured on all three Macs.
Apple's page for the region copy says of the destination texture: "The pixel format is the same as
`sourceTexture`. The sample count is the same as `sourceTexture`." Outside that rule the Macs
answer apart (the probe, rewritten to run each pair plainly and under the validation layer, with
the bytes checked):
- Apple M3 Max, macOS 27.0.1, Shared and Private: plain Metal copies the bytes as they are; the
validation layer stops every pair of two formats ("[sourceTexture pixelFormat](...) must equal
[destinationTexture pixelFormat](...)") and two sample counts.
- AMD Radeon Pro 5300M, macOS 26.7.1, Private: Metal copies the bytes as they are, plainly and
under the validation layer, which takes the pairs of one texel or block size (depth and BC1
among them) and stops two texel sizes ("must be compatible with") and two sample counts.
- Intel UHD Graphics 630 of the same MacBook, macOS 26.7.1, Private: the copy completes, plainly
and under the validation layer, and leaves the destination unwritten; the layer answers as on
the 5300M.
So the refusal stays, and its basis is metal-documented, quoting the page; its doc carries the
rows above. Nothing it refuses changes.
The probe now holds every leg that ran: the ten pairs of one texel size and R32Uint into R32Float,
each with Shared and Private textures, plainly and under the layer, with the bytes compared; the
earlier depth, BC1 and sample-count cases and a pair of two texel sizes (the negative control)
under the layer alone, where plain Metal has no defined answer; a device index for a Mac of two
GPUs. Its header states what each Mac answered.
docs/REFUSALS.md and the runtime's error/basis.rs are regenerated (one Refusal moves from
metal-measured to metal-documented). The runtime README's blit paragraph names the documented
rule. The conformance rows whose refusals Justification::MetalValidation documents are unchanged.
Verified:
- m3-max-85147, the Apple M3 Max (macOS 27.0.1), and m3-max-85148, the MacBook Pro's Radeon Pro
5300M and UHD Graphics 630 (macOS 26.7.1): the probe as committed, every leg (the rows above).
- m3-max-85410, on the CPU with no device, at this commit: fmt, the workspace's Rustdoc, the
runtime's private Rustdoc, the refusal surface's check and scripts/api-docs pass; the runtime's
suite ran 230 tests, all passed, 2 skipped.
|
||
|
|
0ae54b7ec4 |
Conformance: the M3's recording of the imageblock slice past the grid
Recorded on the Apple M3 Max (macOS 27.0.1) by job m3-max-85134 (record, three runs, one outcome, the validated leg ran without a stop; times --runs 8 --write). Every grid thread's texel holds its own value, (1 + x + 8y) / 64 and three zeros, and every one of the 22 cells past the grid holds zero, neither the -1 sentinel nor any thread's value: the answer the case's test pins, read from these bytes. docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py) for the case and its dispatchThreads step. |
||
|
|
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. |
||
|
|
c43c130d1a |
Tests: a sampler of Metal's undeclared filter 2 is made and filters as nearest (red)
MTLSamplerMinMagFilter's raw value 2 (MTLSamplerMinMagFilterCubic) is declared by no SDK header, by Apple's page, or by the Metal Shading Language, and nothing a program can ask tells it about the value. Metal makes a sampler state of it on every Mac measured. The case's own inputs read a footprint wider than one texel on an Apple M3 Max (macOS 27.0.1, job m3-max-85004) and the nearest texel on a Radeon Pro 5300M and an Intel UHD Graphics 630 (macOS 26.7.1, job m3-max-85003). Undocumented Metal is not emulated, so the runtime is to make the state and filter it as nearest, the x86 Macs' answer, on every device. The tests that hold that: - rt every_device_shares_sampler_states_device_samplers: a state with a Cubic min and mag filter is made (no Gap::CubicSampler), its word is the nearest state's, and it takes no device sampler of its own. - translator a_cubic_filter_is_the_nearest_filters: a Cubic min filter, mag filter or both is the nearest filter's word, device sampler of each use, and unnormalized reading, at normalized and pixel coordinates; and a_sampler_word_holds_each_field_at_its_bits: a Cubic filter's word is 0. - conformance sampler-cubic-filter: its ledger row (refused on every venue) goes. The case drops its bicubic-filter-arithmetic declaration and lets each lane's runtime red hold its own texel where the M3 Max's recording differs (every lane but lane 0), under the new accepted difference in docs/API.md. the_cubic_allowances_are_the_lanes_nearest_moves pins those lanes to the recording. docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py): one ledger row fewer, one tolerance more. |
||
|
|
6af0aa8c9b |
Conformance: depth-colour-reads carries Metal's times; coverage regenerated
The suite's every_case_carries_its_timing failed on the new case (job m3-max-84879). `conformance times --runs 8 --write depth-colour-reads` on the Apple M3 Max (macOS 27.0.1, 26A434; job m3-max-85057) kept its figures in the recording; its answers are unchanged. docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py): one module more declaring a notice, from the depth notices the case now declares. |
||
|
|
556ed46e41 |
Conformance: the depth colour reads declare the depth notices; API.md's border cell is the runtime's
The case's replay on lavapipe (job m3-max-84879) announced restricted-depth-range and restricted-depth-upload: the comparing stage's note and the 32-bit float depth upload's. Every texel is 0.25 or 0.75, inside [0, 1], and the notices site was the whole of their difference, so the case declares both, as sampler_filtering's compare rows do. The same job's replay with the colour allowances dropped printed the runtime's own answers: a sample past the edge under an opaque white border reads (1, 0, 0, 1), which fills the accepted difference's table. |
||
|
|
8e2ae4e702 | CONFORMANCE-COVERAGE.md: regenerated for depth-colour-reads | ||
|
|
8cff38ab42 |
Conformance: depth-colour-reads, a depth texture read through a colour slot (unrecorded)
The planner ruled that the runtime keeps Vulkan's (d, 0, 0, 1) for a depth texture read through a texture2d<float> slot: the three Mac families answer three ways (M3 Max (d, d, d, 1), m3-max-84755; Radeon Pro 5300M (d, d, d, d) and UHD Graphics 630 (d, 0, 0, 1), m3-max-84762), and the 630's is Vulkan's. The case pins that answer: the owned fixture dvw_depth_views's five kernels over a 6x5 Depth32Float texture, thirteen reads (samples nearest and linear, at the edge and past it under an opaque white border, gathers of green and alpha, a view swizzled (G, R, One, Zero), and the depth2d sample and comparison). It is recorded on the M3 Max; each element where the 630's answer differs from the M3 Max's may hold the 630's value as well (0), under docs/API.md's new accepted difference, and everything else compares exactly. Lanes sit at exact coordinates, so a linear weight is the same on every device. docs/API.md section 10 gains the entry (its runtime border cell follows the replay). The recording and the coverage regeneration follow in their own commits. Verified: cargo fmt. Build, record and replay follow in their jobs. |
||
|
|
7941badd0b |
docs/API.md: a 1D texture's bicubic sample is the M3's measured answer, as the 2D one is
API.md now says the bicubic filter is not documented Metal, in 1D or 2D, and that what the sample does is Metal's measured answer on an Apple M3 Max. For 1D that is the bilinear filter of taps i and i + 1 in every format, at the fraction of q = floor(256 (x - 1/2) + 1/2) rounded half up, with the taps clamped at both ends under clamp_to_edge. The 2D sample has the same status. The basis, from Metal's own texts: - The Metal Shading Language Specification 4.1 (2026-06-04), section 6.13.1 "1D Texture": "This member function samples from a 1D texture. Tv sample(sampler s, float coord) const", and "Because mipmaps are not supported for 1D textures, lod needs to be 0". Its Table 2.7 (sampler state enumeration values) lists filter, mag_filter and min_filter as "nearest (default), linear" only. "bicubic" appears nowhere in the specification or the feature-set tables. - The Metal toolchain's header metal/__bits/metal_texture_common declares the enumerator `bicubic` in `mag_filter`, `min_filter` and `filter` only under `#if defined(__HAVE_BICUBIC_FILTERING__)`. Metal's answer comes from an Apple M3 Max on macOS 27.0.1, job m3-max-85106: bcu_forms.metal's 1D lane over an 8-texel texture at 16 points, in RGBA32Float, RGBA16Float and RGBA8Unorm. At x = 3.0, between texels 4 and 9, it reads 6.5, where a Catmull-Rom sum reads 6.25. |
||
|
|
94adea1c61 |
Identity domains: a bicubic sample of a 1D texture
The identity domains refused every function that samples a 1D texture through a bicubic
constexpr sampler ("a bicubic filter of a 1D texture", IdentityCause::SamplerState), though its
lowering reads nothing the identity domains do not source. It is the 2D sample's on one axis: the
same footprint (lower::sampler::bicubic::footprint_on, q = floor(256 (x - 1/2) + 1/2)), the
level-0 size by OpImageQuerySizeLod of the bound image (the slot's set-1 element), the taps by
OpImageFetch of that image, and the bound format's treatment from the slot's
PushField::BicubicTexels word (bicubic::format_bits, which takes no dimension), summed by the
module's Routine::Line, which the default domains already emit: the device's FMix of taps i and
i + 1 at the fraction k / 256, then the normalized formats' clamps. Metal filters a 1D texture
bilinearly over those two taps whatever its format (the module docs; the committed M3 observations
of the bcu_forms and bcx_rules cases). The runtime writes the field per slot from the bound
texture whatever its type, so it needs no change. The refusal and BICUBIC_LINE_FORM go.
The sample keeps PrecisionNote::BicubicFilterArithmetic. No new form, query or copy.
The fixture inventory's bcu_forms.ll and bcx_rules.ll rows move to ok on all 15 profiles (30
cells); their .air.ll twins move at the next M3 bless. docs/API.md, the runtime README (its bicubic
paragraph and the identity domains' known gaps) and IdentityCause::SamplerState's doc no longer
list the form. docs/REFUSALS.md regenerated: unchanged. No public item changes.
Test: tests::engine_identity::a_bicubic_kernel_reads_each_slots_format_treatment_from_its_pushed_field
(red at 74dd91398f).
|
||
|
|
6ba3572cbe |
Translator: the lockstep pass only finds pairs; its barrier insertion, rows mode and RowLockstep deleted
What: the lockstep pass (lower::simd::lockstep) keeps one job: find whether an entry holds a pair of accesses only a SIMD-group's lockstep orders, which sets Lockstep::unordered and the static note PrecisionNote::SimdgroupAccessOrder. Everything that ordered such a pair is deleted: the order key (OrderKey, Order::Rows, Decision), the barrier placement (stab, points, insert, rewritten, the barrier declarations), the rows mode (Basis::Position, Lockstep::rows, across_rows, orders_across_rows, dispatch's rows_may_split, RuntimeFact::RowLockstep and the barrier plan's rows_only), the inserted barriers' own forms (barrier::Origin, the barrier's rows guard, lockstep_class, BarrierPlan::uniform_placed and lockstep_simdgroup, the reconverges helper), Lockstep's barriers, emulated and inserted, and the select arm that emulated SIMD groups for a lockstep pair. The census names barrier.lockstep.* go; a program barrier keeps barrier.simdgroup or barrier.threadgroup. Why: the identity domains, which every state is translated under, take the key that orders nothing, so no barrier was ever inserted and every arm deleted here was unreachable. Public items removed (api_signatures.tsv): metal2vulkan-air Lockstep's across_rows, barriers, emulated and rows fields and its inserted and orders_across_rows methods, and RuntimeFact::RowLockstep. Consumer search: reims-vgpu development 76e6c90369 plus its 203 refs younger than a day: 0 hits each for lockstep, Lockstep, RowLockstep, orders_across_rows, across_rows and .inserted(. Tests: the census checks that asserted no barrier.lockstep name are gone with the names (the value checks of engine_simd_lockstep's kernels stay; its two tests that held only census checks, the branch arms and the texture calls, go with their kernels); engine_quad_ops drops its always-false lockstep_emulated; engine_store_quad, engine_ray_tracing and engine_simd_matrix drop their reads of the deleted fields; the mechanism table loses RowLockstep (62 variants). The test helper pipeline::testing::specialized_entry takes no profile, since the entry no longer depends on one: engine_store_quad checks sst_lanes' entry once, and engine_texture_unit_bit_test, engine_generic_pointers and engine_linking drop the profile they no longer pass. No module word moves: the deleted arms never ran. SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION do not move (the codec tags a fact by its name, and no artifact held RowLockstep). docs/API.md, the runtime's error and test docs, the simd module docs, lockstep.rs's title and the engine fixtures README's row_lockstep_tree row lose the clauses about inserted barriers; runtime-sources.sha256 is re-pinned. Verified: see the jobs named below. |
||
|
|
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
|
||
|
|
aa15ad6b5b |
Translator and runtime: a refusal of the partial-threadgroups variant names its cause
The translator refuses a kernel's partial-threadgroups variant for five structures, and the refusal named none, so a walk could not tell them apart (a guest library's kernels 5ba5f694ad0576ff #81 and #83 refuse it with no cause) and the runtime reported each as Gap::PartialThreadgroups at site Translator. - error: PartialThreadgroupsCause (ComputeDerivatives, OtherForm, SharedSliceWrite, TileFunction, VoteWord), Cause::PartialThreadgroups and Unsupported::partial_threadgroups. Each site names its cause: compile.rs's analyze_one (the variant beside another form), mesh::plan_partial_groups (a tile function, compute derivatives, an imageblock slice write every invocation shares) and simd::divergent's barriers (the vote word, still needing the maxComputeSharedMemorySize limit). Feature::PartialThreadgroups' doc lists today's causes (the stage-input region and the emulated SIMD-group tier are no longer refused). - runtime: VariantRefusal reads the cause (the vote word's, a structure's, or none) instead of the needs; PartialThreadgroupsSite gains Structure { cause }, the translator's type re-exported; Translator stays for a refusal that names no structure. The cache directory keeps each refusal under a marker of its own (cache::REFUSALS: the old two plus one a structure), so a refusal read back names the same cause. - Tests: the red test, and a runtime unit test that every cause maps to its refusal and its marker and back. README: the gap's sites. REFUSALS.md and basis.rs regenerated; api_surface row; api_signatures.tsv blessed. - SEMANTICS_VERSION 2362 and RUNTIME_VERSION 2567: the refusal and the dispatch's gap say more (renumbered at landing: SEMANTICS 2360 and 2361 went to the seq_cst fence and the argument buffer border texels, RUNTIME 2566 to the seq_cst fence). Verified (jobs m3-max-84834, -84836, -84838, -84839, -85025): - red, the red commit's crates over this commit's target: 3 tests run, 0 passed, 3 failed, each refusal PartialThreadgroups with no cause; green: 4 tests run, 4 passed (the three and a_variant_refusal_keeps_the_translator_s_cause). - product suites: 3495 tests run, 3494 passed, 1 failed, 24 skipped; the failure is golden_hashes_match_the_table, whose table is re-blessed on development. Validation: 1348 passed, 2 skipped. Conformance: 1053 passed, 0 skipped. Doctests pass. - clippy --workspace --all-targets --all-features -D warnings: plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, each EXIT=0. Rustdoc with -D warnings and scripts/api-docs: EXIT=0. Not verified here: which cause the walk's kernels #81 and #83 name (a probe on the walk's library, reported apart). |
||
|
|
e5b7498833 |
Translator: an argument buffer's texture read through a sampler takes its border texels from its resource ID's word
Metal 4.1's read(sampler, coord) of a texture an argument buffer holds was refused as
Unsupported{IdentityDomains} with cause HeapResource ("a texture handle that reads its table
entry beyond its element (Indexed ...)"): a read that may hand back the border texels made the
handle search's indexed form (Lookup::Indexed), whose uses read the border texels from a
handle-table entry, and the one form has no table. Metal gives the read to every guest device,
so it is built. The golden table's engine/kernel_read_through rt_heap_zero, rt_heap_ow and
rt_heap_arg, and the conformance cases read-through-a8, -heap-border, -heap-sampler, -r32f,
-rgba8 and -rgba8-swizzled, were refused.
The form is the slot's. Bits 0-11 of the texture's resource ID's word hold its border texels
(docs/RESOURCE-ID.md), and an argument buffer's member holds the whole ID, word included:
- AccessPlan::lookup no longer has an indexed form; a function with heap_border yields Element or
Flagged (alpha) as any other, which the admission takes;
- emit_identity_handle carries the word's low 14 bits (HANDLE_WORD, above the 16-bit element) in
every texture handle of such a function, ungated (the texture-buffer words keep their
TexelBufferWords gate where they alone need them);
- heap_element_index masks such a handle to its element at every use;
- heap_border_texels takes bits 0-11 of the carried word, and for a texture buffer whose word
holds a word layout's fields there, its format's border texels from its code, as a slot's read
does (words::slot_border_texels). It was an error stub;
- the read's words estimate counts that extraction (32 words) in place of two indexed flag reads.
Nothing builds Lookup::Indexed now, so it goes, with what only it used: HANDLE_ENTRY,
FLAG_BORDER_TEXELS, INDEXED_FLAGS_WORDS, heap_flags (a check for the indexed form; its two
callers wrap the handle themselves), the search's indexed arm and its test rows.
Test: engine_identity's
an_argument_buffer_textures_read_through_a_sampler_takes_its_border_texels_from_its_word compiles
rt_heap_zero, rt_heap_ow and rt_heap_arg on lavapipe, moltenvk-m3 and moltenvk-m3 without
robustImageAccess2. Each passes L3, plans heap_border, states no BorderTexels fact and no
specialization constant but the dispatch's, and on the CPU interpreter reads Metal's border
texels (metal::sampler::border_texel) of R32Float, RGBA8Unorm, A8Unorm and a swizzled RGBA8Unorm
for each entry's border colors, and the texel inside the texture. engine_texture_oob's
every_read_through_a_sampler_validates_or_is_refused_typed now validates the three entries where
it counted their refusal.
Conformance ledger (known-gaps-rt.tsv): the six `*` rows of those cases' rt_heap pipelines go.
With the pipelines made, each case runs whole, and llvmpipe's answers at 96 sites that a refusal
had left uncompared differ from Metal's by one f32 ulp in A8Unorm, RGBA8Unorm and swizzled
RGBA8Unorm texels. Those are the device's own 8-bit conversion (rule 1, note
device-texel-conversion), and each gets an llvmpipe row. docs/CONFORMANCE-COVERAGE.md is
regenerated.
Docs: the runtime README's forms list loses the entry for this read. API.md's identity paragraph
and RESOURCE-ID.md say an argument buffer's texture reads its border texels as a slot's does.
Engine inventory (public_fixture_expectations_engine.tsv): the 45 cells of
engine/kernel_read_through.ll's rt_heap_zero, rt_heap_ow and rt_heap_arg move from
Unsupported{IdentityDomains; NotImplemented} back to ok. Their .air.ll twins, which only macOS
assembles, move at the M3 bless.
SEMANTICS_VERSION 2360 -> 2361 (renumbered at landing: 2359 and 2360 went to checked naming and the seq_cst fence): the rt_heap cells of the golden table change from the refusal to
modules. The golden table is blessed at the next pin, not here. runtime-sources.sha256 moves for
memory/handles.rs alone: the deleted indexed form is translation code, and no run of an
unchanged artifact changes.
Verified, at this commit's tree:
- m3-max-84730, on the CPU with no device. Red: the new test and the read-through validation test
with the lowering and memory/handles.rs at the base fail (EXIT 100). Green: both pass, with the
search's tests (EXIT 0). fmt, signatures, clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd),
Rustdoc, private docs, doctests and scripts/api-docs pass. The metal2vulkan suites ran 3,494
tests, 3,493 passed, and the one failure is golden_hashes_match_the_table; the engine inventory
parts pass. Validation ran 1,348 tests, all passed, 2 skipped; conformance ran 1,053, all passed.
- m3-max-84829, on the CPU with no device: of the golden table's 28,950 changed lines, all are
"profile changed" lines of the table not yet blessed since the resident core's deletion, and 45
change a cell, every one an rt_heap cell of engine/kernel_read_through.ll, from the refusal to a
module.
- m3-max-84715, the pinned lavapipe image (llvmpipe, LLVM 23.1.1, 256 bits): the conformance
replay of the 13 read-through cases ends EXIT 0 with "the 96 row(s) above are exactly the open
gaps known-gaps-rt.tsv expects on this venue".
- m3-max-84619, on the Iris Xe (Mesa 26.2.6), at the same change on the base before the inventory
bless: the 13 read-through cases report 0 gap rows, EXIT 0.
|
||
|
|
3fbbadbc6e |
Translator: a seq_cst fence adds to the device's fence word, so seq_cst fences are totally ordered
Vulkan has no sequentially consistent order ("SequentiallyConsistent memory semantics is not
supported and must not be used", vkspec 1.4.366, Memory Semantics), and an acquire-release fence
lets two threads that each store and then load the other's word both read the old values, which
Metal's seq_cst fence forbids: it "establishes a single total modification order of all tagged
atomic operations" (MSL 6.16.1). Such a fence was refused, Unsupported{IdentityDomains}
SeqCstFence; five kernels of the first-setup walk's library aa5e72671a992cea meet it, each with
four air.atomic.fence(mem_device, seq_cst, device) (probe m3-max-84688).
The planner's ruled form, one for every device: a seq_cst air.atomic.fence at any scope beyond
the thread, an LLVM fence seq_cst, and a program's seq_cst barrier whose memory scope is the
device keep the acquire-release barrier they had at their own scope, then add 1 with
OpAtomicIAdd at Device scope, with the barrier's semantics, to the device's fence word. Adds to one
word are totally ordered and each reads the one before it, so the earlier fence's add (a release)
synchronizes with the later's (an acquire). Threadgroup and simdgroup fences take the device word
too (planner, option A): a stronger order than Metal names, with no workgroup memory and no
change to the threadgroup memory limit.
The word: pipeline::SEQ_CST_FENCE_WORD (256) bytes past PushField::ZeroAddress, in the runtime's
zero chunk: one per device (Core holds one Ring; the chunk is kept for the device's life and never
given back), made with every buffer usage, read only in its first 16 bytes (a checked load's unit
at ZeroAddress, psb::ZERO_RANGE_READ, and an indirect command buffer reset's index token of 0
bytes), its value never read. A function with such a fence reads ZeroAddress whether or not it
checks an access (access::place_zero_address keeps it). No new push field.
- lower::sync::barrier: total_order (selection: notes device scope, places ZeroAddress) and
add_to_fence_word (emission); Fence and Barrier carry `total`; require_seq_cst and
SEQ_CST_FORM deleted. lower::sync::memory_model: the LLVM fence's `total`.
- error: IdentityCause::SeqCstFence deleted (the consumer names it nowhere: git grep -n
'SeqCstFence\|SEQ_CST\|seq_cst_fence' at reims-vgpu f054ad57c1 finds only C __ATOMIC_SEQ_CST).
- Guards: psb.rs asserts ZERO_RANGE_READ <= SEQ_CST_FENCE_WORD at compile time; ring.rs asserts
the word fits its chunk; the_fence_word_lies_past_the_zero_range_s_reads checks both readers.
- Tests: the red test's threadgroup and simdgroup rows take the device add (option A); the
identity, dispatch and MSL 4.1 tests compile a4_device_fence, device_fence_store and
a27_memory_order where they asserted the refusal.
- Validation: ToolingRequirement::SeqCstFence and executor_contract::seq_cst_fence retired, as the
runtime runs the fence; a_seq_cst_fence_runs_through_the_runtime replaces the refusal test.
- Docs: the runtime README moves the fence from the identity refusals to a known gap with the
add's cost (RTX 3090 m3-max-84667, RX 7900 XTX m3-max-84666, Iris Xe m3-max-84668; device
fences, standing for threadgroup and simdgroup ones too); docs/API.md and ring.rs say where the
word lies. api_signatures.tsv blessed; REFUSALS.md regenerated, unchanged.
- SEMANTICS_VERSION 2360 (2359 went to checked naming, which landed first), RUNTIME_VERSION 2565 (a runtime word added; renumbered 2566 below).
Verified, potluck jobs on this branch rebased onto development
|
||
|
|
436dd1045e |
Conformance ledger: the buffer-depth-samples rows of the Apple M3 Max go
KosmicKrisp (Mesa 26.3.1) on the M3 Max runs the family's five cases at
|
||
|
|
439a45aa2e |
Conformance ledger: the buffer-depth-samples rows the runtime now copies, on five venues
Each of the family's five cases now runs where it refused (Gap::TextureBytes): the stencil cases compare exact and the 16-bit depth cases announce their note (rounded-sample-depth-copy), which they declare, on the RTX 3090 (NVIDIA 620.70.06, job m3-max-84576), the RX 550 (RADV, Mesa 26.2.6, 84577) and the RX 7900 XTX (RADV, Mesa 26.2.6, 84578), at d81831ad09, the change's tip before its rebase. Their rows go, and so do the 780M's and the Iris Xe's, whose device test copies every row bit for bit on the same runs (their conformance replays are next). On lavapipe (job m3-max-84579) the 4-sample stencil cases are exact, and the 4-sample 16-bit depth case differs only in its samples site, where the device's decode of a 16-bit depth to float is one ulp from Metal's, as depth16-texel-reads records: a row of the device's own answer. The 2-sample rows there stay (no texture of 2 samples). The three every-venue rows narrow to the Apple M3 Max, whose KosmicKrisp venue is not yet run. CONFORMANCE-COVERAGE.md regenerated. |
||
|
|
4ccbde14e0 |
Byte copies: the sample enums are exhaustive, the draw key derives no Debug; REFUSALS.md, basis and signatures regenerated; the replay counts the copies; the conformance case declares the note
The second build (lavapipe job m3-max-84547) stopped on a match over SampleAspect in the runtime, which #[non_exhaustive] forbids across crates, and on a Debug derive over ash's Format, which has none without its debug feature. SampleAspect and SampleWrite become exhaustive (class E in api_surface): a runtime handles each aspect and makes a draw of each write. The replay's per-frame metrics gain stencil_bit_draws and sample_copies. The conformance side announces Texture::SAMPLE_DEPTH_COPY_NOTE for a copy into a multisample Depth16Unorm, which the buffer-depth-samples d16 rows declare; the case's doc states the current form and its refusal of a 32-bit float depth instead of the old form's -0 difference. |
||
|
|
b337c83e25 |
Byte copies: the kernel's heap slot is the kernel stage's; the draw's docs, the README's and API.md's lines, and the device test's all-codes row and counts
The translator's sample kernel named its heap slot under a stage that does not exist (Stage::Kernel is the compute stage's); fixed with the other error the first build (lavapipe job m3-max-84536) reported. The runtime README states the measured layout, the form, the refusals left with their causes, and names this caller on the stencil-export known gap; API.md documents own_draw and SamplesToBytes and catalogues PrecisionNote::RoundedSampleDepthCopy. The device test gains a 128 x 128 Depth16Unorm row at 4 samples whose 65,536 units are every code once, checks every unit of the copy back out, and asserts the counts: 2 sample copies a row, and 8 stencil bit draws for a stencil row on a device without stencil export, else none. |
||
|
|
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.
|
||
|
|
a8ccda7cc6 |
Translator: an identity-domains refusal names the form it met
Feature::IdentityDomains with Needs::NotImplemented covered every form the identity domains do not lower behind one name; only a diagnostic symbol said which, and slot.rs's refusal of a storage texture access without its bound format named nothing. An identity refusal now carries Cause::Identity(IdentityCause), one variant per refused family, the way an access or tessellation refusal names its cause; sites that refuse the same family share a variant, none is named by a file, a line or a string of its own: - ObjectOrMeshStage: a function of a stage other than a kernel, vertex or fragment function (select.rs identity_refusal). - Descriptor: a buffer argument not reached through its device address, or a descriptor beyond a bound kernel's storage views (identity_refusal). - EncoderValue: a push field the identity window does not carry (identity_refusal). - HeapResource: an argument buffer's texture of a type or handle class the identity arrays hold no element for, read as raw extended-range texels, decoded, read through another numeric type, or through a handle that reads its table entry beyond its element (identity_refusal; link.rs's handle-class binding). - TextureState: a texture argument of a type the identity arrays hold no element of, or state of a bound texture or sampler beyond its resource ID (identity_refusal; sampler/mod.rs's identity sampling of a type with no identity class). - SamplerState: a sampler the identity sampling does not take, a minimum level or emulated filter the function specializes, a 1D bicubic filter (identity_refusal), and a reached anisotropic slot sample (sampler/anisotropic.rs). - ConstantBlob: constant data past the module's bound read through memory. - SeqCstFence: a sequentially consistent fence (sync/barrier.rs). - StorageTextureFormat: a storage texture access the device takes only with a declared format, whose bound format no input names (texture/slot.rs, which named no form before). The diagnostic symbols stay. The device-level refusal of a device without bufferDeviceAddress and shaderInt64 (derive.rs) names its needs and no cause. Feature stays IdentityDomains, so validation's outcome key and the census are unchanged, and the golden and engine table cells (feature and needs only) do not move; no version bump. Tests: the error module's Display test of an identity refusal with and without a symbol; the cause asserted at the 1D bicubic, the storage texture without its format, the constant blob, the seq_cst fence and the texture argument refusals (engine_identity) and the replay variant's encoder value (pipeline/compile tests). api_signatures blessed (IdentityCause, Cause::Identity), api_surface lists the enum, REFUSALS.md regenerated (the sites are built through error/mod.rs's Unsupported::identity), docs/API.md's error table and the identity domains' paragraph name the cause. runtime-sources.sha256 unchanged: no runtime input is edited. Consumer uses (consumer-uses.sh, read-only, over the consumer's development 90214271ed and its lane tips of the last day): IdentityCause, Cause and IdentityDomains, 0 hits. The consumer reads Unsupported::cause only through its Display (rt_platform diag.rs refusal_name, unbuilt.rs), so an identity refusal's name there now carries its cause. |
||
|
|
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.
|
||
|
|
6521f16ed5 |
Conformance ledger: the pixel-sampler quotient at group C's sites is ours on the six other venues
What. The KosmicKrisp venue (Apple M3 Max) reads 22 sites as ours, not the device's
(
|
||
|
|
b54d8d46bc |
Docs: the published crates' rustdoc states each measurement by its card and OS, not by our job id
What: every lab job id (m3-max-N) in a doc comment of the three published crates' product sources is removed: 91 ids, and one list written as a range and bare numbers, on 72 lines over 17 files. The card, driver, OS and probe each sentence already names stay. Each changed sentence is rewrapped at 100 columns from the id's line to its paragraph's end. docs/REFUSALS.md is regenerated: its Basis column carries those doc lines' evidence (14 rows). Why: the planner's rule. Docs say the measurement (card, OS), not our job numbers. The ids stay in the commit messages that already carry them. A token comparison of each file against its parent shows only id phrases removed: "(job m3-max-N)", ", job m3-max-N", "potluck job m3-max-N", "(m3-max-N)" and id lists of the same forms. One line that held only "(job m3-max-49358)." in submit.rs is folded into the line above it. Not changed here: the runtime README (217 lines with ids), docs/API.md (20), docs/REPLAY-STREAM.md (2), docs/VALIDATION.md (1), docs/CONFORMANCE-COVERAGE.md (1772, generated from the conformance ledger), plain // comments (blit.rs 3, conformance cases 3, tests 5), test modules' and unpublished crates' doc comments. Verified: refusal_surface.py --check passes. basis.rs regenerates unchanged. runtime-sources.sha256 is unchanged (44066e69...): none of the files is its input. rustfmt --check passes on each file. Rustdoc, private rustdoc and api-docs in the job the READY names. |
||
|
|
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. |
||
|
|
71a5393966 |
Translator: an imageblock refusal names its cause (ImageblockCause)
Feature::Imageblocks covered about ten structures with one untyped refusal, so a walk's counts could not tell them apart. Each site now names the structure it met, in Unsupported::cause (Cause::Imageblocks), as Cause::Access and Cause::Tessellation do: - MultisampleOperation: the front end's undecoded multisample operations (get_imageblock_samples, get_imageblock_num_colors, get_color_coverage_mask, the masked implicit store), set where the front end's refusal converts; - Stage: an explicit imageblock or an imageblock intrinsic outside a kernel or tile function, or an imageblock view outside a fragment function (param_family, use_imageblock); - TwoImageblocks, DataSize, Layout: why the planner gives the kernel's explicit imageblock no region (more than one; no or zero data size; an alignment that is not a power of two, cells past 4 GiB, or an unaliased explicit one beside the implicit one). The planner's imageblock() returns the cause and ArenaLayout keeps it (imageblock_refused) for use_imageblock to refuse with; Missing where the kernel declares no imageblock at all; - DataOperands: air.imageblock_data operands other than (coord, 0, 0); - ParameterValue: the imageblock parameter's value selected (access::select_param); - CellPointer: an imageblock-space pointer that air.imageblock_data does not make, outside a tile function (the planner); - FragmentData: a fragment function's [[imageblock_data]] input (fragment::select_param) or output (stage_io); - SliceWrite: a slice write of a shape not modelled (texture::select, texture::slice). Golden tables are unchanged (their outcome text names no cause). REFUSALS.md regenerated, the signatures table blessed (ImageblockCause, Cause::Imageblocks), the api_surface list and docs/API.md's Unsupported row name the new enum. SEMANTICS_VERSION 2354 (main renumbers at landing): a refusal's text changes. runtime-sources.sha256 follows from the job. Verified: pending (the red tests and the suites). |
||
|
|
69033afcd4 |
rt: a Shared heap's texture on a device without unified memory is an image of its own
The L21 ruling, the third use of rule 2's unified-memory query (Vulkan's device type). On an integrated or CPU device a Shared heap's image texture lies in its heap, as before. Elsewhere it is an optimal image of its own in device memory, made as new_texture makes one but not zeroed (Metal's heap textures are not), and its heap range is left unused. Before, a discrete device either refused the placement (Gap::HeapTexture where its optimal images take no Shared type: the RTX 2080 and 3090 on NVIDIA 620.70.06) or bound the image in system memory, which every read crossed the link for (97 times a Private heap's time on an RX 7900 XTX, job m3-max-79841). How: heap_source decides by core.unified_memory() and the block's class. The own form checks the placement against heap_texture_size_and_align's answers by the same rule the in-heap form uses (heap_place, factored out of make: a heap range past its block, a texture past the heap's end, a byte off the alignment are Refusal::HeapTexturePlace), then makes Source::HeapOwn: Bind::Pooled (a place in a texture block or an allocation of its own, which spills as a texture's does), the heap's hazard id kept, no alias Placement, and Under::Heap with at None, so use_heap still covers it (heap_block) and blits see no shared span (bound). Texture buffers and textures over heap buffers are untouched. Docs: AGENTS.md rule 2's unified sentence gains the clause (the count stays fourteen); the runtime README's heap text and known gaps (the device memory sum beside the heap's block, where it runs out, and the earlier speed row); new_heap_texture(_for_views), heap_texture_size_and_align, has_unified_memory and Gap::HeapTexture docs; docs/API.md and the conformance heap-size side's step 2; docs/REFUSALS.md regenerated (HeapTexturePlace's site is heap_place). RUNTIME_VERSION 2564 (renumbered at landing: development held 2563). runtime-sources.sha256 unchanged (guard PASS, m3-max-84127). Verified: red FAIL / new PASS on the RTX 3090 (build m3-max-84138, run 84144), the RX 7900 XTX (84137, 84221; rt suite under m2v_gpu 993 passed, 4 skipped, 84222) and the Iris Xe (84227, 84238); CPU suites 84127 (conformance + rt 1279 passed, 2 skipped); clippy plain 84180, m2v_gpu 84172, m2v_cpu_icd 84181, rustdoc + api-docs 84182, all EXIT=0; states-only play on lavapipe 84256 equal to the base (gb-3090-r2 10643 render / 15299 compute, windrag-780m-b4-um790 8972 / 225, 0 refused). The consumer's arm64 guest walk on the RTX 3090 at pin S (m3-max-84046) asked for no texture on a Shared heap, so the evidence is the device tests and timing. |
||
|
|
e730fbddbb |
Runtime: AttachmentPlace's basis is Metal's own refusal, measured on the M3 Max
What: Refusal::AttachmentPlace's Basis line said `ours`. It now says
`metal-measured` and cites the committed probe resolve_depth_planes.m
(conformance crate, Apple M3 Max, macOS 27.0.1, job m3-max-73495). With
Metal's validation layer on, a resolve into slice 3 of a 2D texture ends
the process at the encoder ("Slice is 3, but the texture has only 1
slices"), and so does a resolve at depth plane 3 of one ("depth plane is
3, but the texture has a depth of 1 at mip level 0"). With the layer off,
plain Metal writes slice and plane 0 instead. A level past the texture's
was not run, and the line says that part is ours. docs/REFUSALS.md and
error/basis.rs are regenerated by scripts/refusal-surface/refusal_surface.py.
AttachmentPlace's basis() now answers MetalMeasured, and the Refusal
table's counts move one row from ours to metal-measured.
Why: the bug row said plain Metal (layer off) takes resolveSlice 3 into a
2D texture, and the planner's 11-25 ruling was that it needed a read
first, with rule 1 applying if Metal's layer refuses it. The read is the
probe above: the layer refuses it, so the refusal stands under rule 1,
and its basis now cites that evidence. Behaviour is unchanged.
Verified: refusal_surface.py --check exits 0 on this tree. The
runtime-sources fingerprint, recomputed from the tree, is unchanged
(44066e69): the runtime crate's sources are not inputs to it. No
signature changes, so api_signatures.tsv is untouched.
|
||
|
|
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. |
||
|
|
dbc0f04ef3 |
Conformance: block-writes-only-writes recorded on Metal
The case's Metal answer, recorded on an Apple M3 Max under macOS 27.0.1 (job m3-max-83930): for both usages, ShaderRead | RenderTarget | BlockWritesOnly (0x10005) and the bit alone (0x10000), the dispatch completes and every texel holds its four codes (00 ff 00 ff, 10 ef 25 fe, ...), with no notice announced. The coverage table is regenerated with scripts/conformance-coverage/coverage.py. |
||
|
|
62e9d045c3 |
Validation player: command-replay refuses an option a subcommand does not take
Each subcommand names the options it takes beside its required ones, and options() refuses any other with "--NAME is not an option of SUBCOMMAND" before anything runs: exit status 2, the usage printed, as for any bad command line. Before, an unknown --name VALUE pair went into the map and was never read, so a mistyped or retired option played as if absent. The sets are what each subcommand reads: play its four required options and blobs, managed, until-frame, past-range, states-only, state-log, state-threads, state-keys, state-digests, gpu-wait-timeout (the wait module's flag), video-handle, check-presents, read-device-copies, prepass-width, dump-command-buffers and dump-dir; dump and shapes --stream and --blobs (their stream reader reads it; the usage and the module doc now show it); compare-dumps --a and --b; compare-plays --a, --b and --frame; snippet video-surfaces --out and --handle. The module doc and docs/REPLAY-STREAM.md section 10 say so. The audit in the red commit's message found no caller passing an option outside these sets except --probe-dump in two lab probe scripts of one carry, which no commit here ever read. Verified by the job named in the lane's report: the red test at the parent and green here, clippy x3, rustdoc, the validation suite. |
||
|
|
98435ae812 |
Validation: the engine candidate runs a kernel case's stage inputs through the runtime
What: a kernel case's stage inputs of a fixed stride, and its dispatch's
stage-in region, now run on the engine candidate as the Metal oracle runs
them (executor_contract::stage_inputs, the derivation both executors
share):
- compute_case takes the checked entry's AIR-layer interface and maps
each input's data to its own buffer at the slot its location takes;
- ComputeCase carries the stage-input descriptor, the region (the
dispatch's, or the grid's from the origin) and each slot's location;
- the run through the runtime makes its state with that descriptor, sets
the region before the dispatch, and guards a stage input's data as its
OutOfBoundsResource::AttributeBuffer target (guards::buffer_resource);
- the authored compile census compiles the kernel under it
(PipelineRequest::Kernel::stage_input, variants::compile_kernel).
ToolingRequirement::KernelStageInput ("kernel_stage_input") becomes
DynamicStageInStride ("dynamic_stage_in_stride"): it now fires only for
an input of a dynamic stride. The runtime refuses that layout (Gap::StageIn
of DynamicStride), since its compute encoder has no
setBuffer:offset:attributeStride:atIndex:. Docs say the same:
docs/VALIDATION.md, the requirement's, case_requirements' and
compute_case's. A neighbouring line now says the implicit imageblock is
the runtime's limit, where it said explicit; the code already said so.
Why: the runtime has fetched stage inputs at every step function since
|
||
|
|
23193c9bf1 |
Translator: the padded forms' linear mip filter blends two levels, a bfloat form's reads one
Two measured changes to an extended-range sample's level, each from the M3 Max on macOS 27.0.1: - A padded form's linear mip filter (R10Unorm_X6, RG10Unorm_X12 and their _sRGB twins) now blends its two levels as BGR10_XR's and BGRA10_XR's do, through a constexpr sampler and through a runtime one, and records PrecisionNote::BicubicFilterArithmetic. Before, a constexpr sampler's was refused NotImplemented(Format), and a runtime sampler's read one level with no refusal. The probe extended_linear_mip_blends (job m3-max-82967; 16,384 lanes per form and filter, 2D, five levels, random codes) puts Metal's sample within 0.0157 of its own two levels' samples blended by mix at the fraction truncated onto sixty-fourths. The note's doc and its docs/API.md catalogue line gain that bound. - A bfloat form's linear mip filter (R16Bfloat, RG16Bfloat, RGBA16Bfloat) is now its nearest mip filter, which Metal's equals on every lane whose two levels differ (4,096, 8,192 and 16,384 lanes, nearest and linear filters). Before, a constexpr sampler's was refused. A runtime sampler's already read that level. What stays refused through a constexpr sampler: - A two-plane form's linear mip filter (not measured). The probe only shows that a five-level texture is made. - RGB10A2Unorm_sRGB's linear mip filter (not measured). Jobs m3-max-83026 and m3-max-83029 explain why. A texture of five levels holds each level's own code, which a blit reads back per level. Yet the M3 samples level 0's code at every explicit level, at gradients under a nearest mip filter, at every level under a linear one, and in a 2D array's layer 1. RGB10A2Unorm, the control, samples each level's code. Documented Metal samples the level asked for. So this is a driver defect, which is not emulated (an Apple bug report is drafted), and the format's samples keep reading the level the mip filter names. No conformance case samples that format's levels today. Docs: three comments named binder refusals that no code makes, and none of the three exists (ResourcePlanner is gone): - a runtime sampler word that states mixed filters; - a runtime linear mip filter's clamp maximum below the last level; - a runtime linear mip filter of an unmeasured form. The comments sat in lower/sampler/extended.rs, select.rs and the extended-range tests' module docs. They now state what happens: the word samples as nearest, the maximum is not read, and a two-plane form's or RGB10A2Unorm_sRGB's runtime linear mip filter reads the nearest mip filter's level. They also say this is an open gap that no consumer meets while the runtime makes no texture of these formats (the runtime's Gap::TextureFormat). The probe crates/metal2vulkan-conformance/probes/extended_linear_mip_blends.m gains the nearest mip filter at the point's level, the two-plane question and each texture's level count. SEMANTICS_VERSION moves to the next number, because refusals are removed and samples' answers change. runtime-sources.sha256 is re-pinned because metal/format/mod.rs is a runtime input. Tests (tests/engine_extended_range/levels.rs): - unmeasured_linear_mip_filters_are_refused now builds a padded and a bfloat linear mip filter, and still refuses a two-plane and an RGB10A2Unorm_sRGB one. - measured_linear_mip_filters_blend_or_read_one_level: every padded and bfloat form's constexpr sampler compiles, valid, under either mip filter, with the note on a padded linear one alone. On the CPU interpreter, at 64 levels between two, through a constexpr and a runtime sampler, a padded form's sample lies between its two levels' nearest-mip samples on every lane and strictly between on some. A bfloat form's equals its nearest mip filter's, bit for bit. Verified on the CPU with no device (job m3-max-83908): with metal/format/mod.rs, lower/sampler/extended.rs and select.rs at |
||
|
|
4b68322b79 |
Conformance ledger: the Iris Xe's rgb10a2unorm texture-buffer write matches Metal now
What: drops the known-gaps-rt.tsv row norm-storage-codes-rgb10a2unorm | Iris(R) Xe | divergent | case/hsw_buffer/texels, and regenerates docs/CONFORMANCE-COVERAGE.md from it. Why: pin S's real-card round replayed the ledger on the Iris Xe (RPL-P, Mesa 26.2.6) and reported "now matches: 1": that case no longer diverges there, and the ledger must not outlive the gap it stands for. Pin R's round passed the same leg (job m3-max-83399), so the change came between R and S: there a read-write texture buffer whose format's own view reads none without a format became words ( |
||
|
|
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. |
||
|
|
5f1686fb55 |
Validation: a texture over a heap buffer is covered where its buffer is
The cover rule held a buffer's cover on the buffer alone, so a texture made over a covered heap buffer read as uncovered: its check was compared and its dump carried no cover, and compare-dumps could report as a difference the bytes Metal leaves undefined once a heap texture's write aliased them. Covers::covered now maps an object to the one whose bytes it holds (a view to its texture, a texture over a buffer to that buffer), the same mapping the rule already used to decide whether a texture's write is tracked. The rule also takes the player's own list of the selectors that make a texture over a buffer (makes_texture_over_buffer), which adds the tiled form (newTiledTextureWithDescriptor:offset:bytesPerRow:) the rule had missed. docs/REPLAY-STREAM.md and dumps.rs say a texture's cover follows its buffer's. Verified by the test the previous commit added (red there, green here); the jobs are in the lane's report. |
||
|
|
599da8cacf |
REFUSALS: regenerate after the coherent-image landing
The coherent access beside a storage image no longer refuses (
|
||
|
|
5b3bd800c0 |
Translator: under the identity domains a runtime sampler's LOD query outside a fragment function reads its minimum level from the sampler's word
A clamped calculate_clamped_lod in a kernel or a vertex function through a runtime sampler
argument was refused on every profile under the identity domains ("a sampler argument whose
minimum level or emulated filter the function specializes"): the query read the slot's
SamplerMinLevel specialization, which no binder chooses there.
The query now reads the word of the resource ID the sampler slot already pushes (SlotGuestBase):
0 where the word states no mip filter, else SamplerWord::LEVEL_MIN, the level a nearest mip
filter reads at lodMinClamp, bounded by the texture's last level as before. A bind-time clamp
(setSamplerState:lodMinClamp:lodMaxClamp:) binds a variant whose word is made of the clamped
descriptor, so it is read too. That is the M3 Max's and M4's measured answer
(metal::sampler::query_min_level) for no mip filter and a nearest one, and for a linear one where
lodMinClamp is a whole level or past the texture's last level. Under a linear mip filter with a
clamp between whole levels Metal answers the clamp on its sixty-fourths grid, which the word does
not hold. MSL 4.1 section 6.13 leaves both queries undefined outside a fragment function ("Only
call the calculate_unclamped_lod and calculate_clamped_lod functions from a fragment function or
a function you call with a fragment function; otherwise, the behavior is undefined."). So, per
the planner's ruling, there is no precision note; docs/API.md's accepted differences states the
answer. The resident-table path keeps its specialization.
SEMANTICS_VERSION 2347. The runtime-sources pin does not move: pin-compute.py gives a92fe0a8...
for this tree, the same as before. docs/REFUSALS.md does not move either: the refusal text
remains for an extended-range sample's linear-mip blend. The runtime README's known-gap entry
names the lowered query. Verified by the lane's red/green job, named in the lane's report.
Landed with SEMANTICS_VERSION 2347 (renumbered above development's 2346: written 2343 on its base,
then 2346 at the lane's rebase onto
|
||
|
|
011540217d |
Translator: a mode-2 fragment write to a texture buffer held as words rounds half and small floats to nearest even
A texture buffer of a format a device holds as words is written by lower/texture/words.rs's write_texel, which rounded a half-float or RG11B10Float channel toward zero at either textureWriteRoundingMode. Metal's texture buffer rounds those to nearest even at mode 2, as its storage texture does (the probe below). So a fragment function in a mode-2 pipeline that wrote a half-float or RG11B10Float texture buffer on a device holding that format as words stored a code one below Metal's on 36% to 44% of the probe's channels, and 65504 where Metal stores the infinity. Now, where Write::half_up marks the write (a fragment function's, in a pipeline of mode 2): - a half-float channel (R16Float and RG16Float, the half-float formats a device may hold as words) takes ChannelWrite::FloatNearestEven, a finite value past the largest to the infinity, as Metal's RGBA16Float texture buffer stores it; - an RG11B10Float channel takes nearest even too, and a lane that rounds to the infinity from a finite value is held at its format's largest finite value (65024 for the 11-bit channels, 64512 for the 10-bit one), as Metal's stores it; an infinity stays, and a NaN is the quiet NaN still. The RGB9E5Float word's half-up rounding is unchanged; the probe shows Metal's texture buffer storing the same bytes as its storage texture there. A write at mode 0 or 1, and every kernel's write, still rounds toward zero. The probe is committed as crates/metal2vulkan-conformance/probes/texture_buffer_write_rounding.m: texture_write_rounding_storage.m with texture_buffer<T, access::write> targets, made from a Shared buffer with MTLTextureTypeTextureBuffer and written at texel y * 256 + x, over the same 65,536 texels. On an Apple M3 Max under macOS 27.0.1 (job m3-max-83395), mode 0 matched toward zero on every channel, and mode 2 matched nearest even on every channel that is not a NaN: RGBA16Float float texels 262,112 of 262,112 (to the infinity past the largest), RG11B10Float float and half texels 196,583 of 196,583 each (held at the largest), and RGB9E5Float 65,536 of 65,536 at both texel types (half up, its hashes equal to the storage texture's). Docs: words.rs's module doc, Write::half_up and write_texel; API.md's words line names mode 2. SEMANTICS_VERSION moves above development's: a texture buffer write's answer changes. Verified on the CPU with no device (job m3-max-83575): the color_write and words tests pass (79), the golden table differs from development's (semantics 2334) in 109 cells, as at a535f1dc17, and the refusal surface is unchanged; cargo fmt, clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, the API reference check and the doctests pass; the suites pass 3740 of 3741 (24 skipped), the one failure golden_hashes_match_the_table, bless due; the validation suite passes 1340 (3 skipped) and the conformance suite 1052. The states-only plays of this tree (m3-max-83669) make what 126ee4fdf5's make (m3-max-83443): the gb-3090-r2 stream 10643 render and 15299 compute states, the 780M windrag stream 8972 and 225, none refused. |
||
|
|
4b328ca9e2 |
Validation: a fragment function's render-target words are fed by the colour it returns
What: the word scan (check::output_words) now follows a fragment case's render target to the
colour its entry returns for that attachment, as it already followed a kernel's output buffer to
its stores. Before, every render-target word was fed by Family::Unknown, so every recorded note
reached every word of every fragment case by fall-back.
How:
- The scan records a fragment entry's returned value by field (Stores::returned): the
families of each lane of each field, joined over its returns. Where a return or a
air.discard_fragment sits in a block that does not post-dominate the entry, every lane is also
fed by every branch condition, as a conditional store is.
- A render target's words (render_target_words): each channel of a texel takes the families of
the lane of the returned colour it holds (every lane where the colour has fewer lanes than the
format has channels), with those of the entry's other live outputs that decide whether or how
the write lands: a depth, a sample mask, a stencil reference, the second blend source. The
facts repeat every texel (every word for a texel under four bytes); the word's lanes still come
from the target's format. A target with no live colour from the entry (an imageblock writes
it), an attachment index that is not a constant, a vertex case's observed render target, and a
returned value the scan does not follow keep the fall-back.
- air.quad_is_helper_thread and air.simd_is_helper_thread feed Family::Group: whether a thread is
a helper is its place in its quad, which FragmentSimdgroupGrouping and QuadsSplitByClipping
concern. They fed Family::Unknown before.
Tests (check::output_words::tests): a_render_targets_words_take_the_returned_colours_operations
(the public case unclamped-and-clamped-lod-of-a-texture-selected-per-quad: red and green fed by
the texture queries and the position, blue and alpha by nothing, so a texture note reaches the
first two words of a texel and NativeDot none) and
a_helper_query_and_a_discard_feed_a_render_targets_words (helper queries and quad ballots feed
Group alone; a discard the position decides adds the position and its arithmetic). Both read
every word as Unknown without the change.
ENGINE_EXECUTOR_ABI is v216: rows record different word facts for fragment render targets, and
how their differing words are judged changed.
Verified (at 33873ab651, this commit's tree):
- Gate: fmt, clippy with --workspace --all-targets --all-features -D warnings plain, under
--cfg m2v_gpu and under --cfg m2v_cpu_icd, and rustdoc -D warnings, all exit 0 (job
m3-max-83339). Validation suite: 1339 passed, 3 skipped (job m3-max-83340); in the same job the
two new tests pass, and both fail with output_words.rs and words.rs put back to the parent.
- The public cases (1,168), noted / matched only within bounds / mismatch cases (batch-words),
before at
|
||
|
|
9211eb3c10 |
Translator: half +, -, *, / and fma on the 16-bit instructions record NativeHalfConversion
Under the 16-bit float controls, a half +, -, * or / and a half fused multiply-add run on the device's 16-bit instructions, between exact conversions. By the Vulkan spec their results are Metal's. A driver's compiler may still compute them in float and leave them unrounded. Intel's Windows driver 101.2145 on a UHD Graphics 630 does: - A standalone tree of three 16-bit OpFAdds, or Fmas of a product, each decorated NoContraction under all three 16-bit controls, ran on 4,096 invocations. 2,284 sums and 4,080 products matched neither the half tree nor the float tree rounded once (job m3-max-83092). - The Iris Xe under Mesa ANV 26.2.6 gave the half tree on every invocation (job m3-max-83093). - In the runtime's quad test on the UHD, 112 of the 1,536 compared halves are the float chain rounded once at the store (job m3-max-82918). Per the planner's ruling, the operation carries the static note on every device, with no device check. narrow::computes_half_arithmetic looks in the emitted module for a 16-bit OpFAdd, OpFSub, OpFMul, OpVectorTimesScalar or OpFDiv, or a GLSL.std.450 Fma. Where it finds one, the pipeline records NativeHalfConversion, beside the conversion pair's existing cases. A Sqrt alone records nothing, and neither does the simdgroup half tree's ClusteredReduce. The note's reach in validation narrows to half arithmetic. Until now it reached every word fed by any float family. The AIR word scan now feeds a new family, HalfArithmetic, beside the operation's own family, from these operations: - an fadd, fsub, fmul, fdiv, frem or fneg with a half result; - a float cast whose result or operand is a half; - a call of a modelled family whose result or an argument is a half. NativeHalfConversion reaches only that family. A half word that only float arithmetic fed, through a move, is no longer reached. The note stays unbounded at the word, now on the comparison's stay-unbounded list with its reason. A driver may leave the chain unrounded and round it once at the store, and with cancellation the two answers differ by more than the stored value's ulps (40 codes measured on the UHD). How far rests on the operands, which a word does not carry. Docs: - The note's API.md catalogue entry and its PrecisionNote doc said those operations "take no such rounding". They now say the operations record the note, and give the UHD 630 measurement beside NVIDIA's fold and RADV's fusion. - The DeviceHalfDenormals entry points to it. - VALIDATION.md names the half family among those the word scan reads. Tests: - engine_native_half: the controlled-conversion test's sum kernel now records the note, as every kernel there does. - engine_float_call_notes sets the module-level note aside for 16-bit arithmetic, as it does for the conversion pair. - half_simd_reductions accepts, where the quad pipeline records the note, a quad word whose every half is Metal's or the float operations rounded once. The model is the new devtools quads_once. - In validation: - the scan's packed-halves test expects HalfArithmetic on the half word alone; - a words test shows the note reaching a half word only when half arithmetic feeds it; - the reach row is pinned. SEMANTICS_VERSION 2340 -> 2341 (precision notes added). ENGINE_EXECUTOR_ABI vulkan-engine-v215 -> v216 (the word scan feeds HalfArithmetic, and the note's reach narrows to it). Golden hashes: no cell moves. The cells hash the final SPIR-V, which the note does not touch. Job m3-max-83293 (Linux) ran golden_hashes_match_the_table twice: at this change, and with compile.rs and cache/mod.rs at |
||
|
|
d0fb4f3381 |
Translator: delete StageModule::level_reads, which nothing reads
StageInterface::level_reads and StageModule::level_reads stated, per texture slot, the levels of
its bound view the stage's reads reach (LevelReads, SampledLevels, SamplerLevels and the
structural analysis spirv::requirements::level_reads). Nothing reads them:
- the runtime: git grep -nw -e level_reads -e LevelReads -e SampledLevels -e SamplerLevels
-e finite_texels -e highest_lod -e lowest_lod at
|
||
|
|
f42e61aa84 |
Docs: the helper-thread words' four mechanisms, and what a split quad's helper query answers
The read of the ten cases held as helper_thread_words (lavapipe, job 83263; Radeon 780M, jobs 83264 and 83267) explained 454 of their 455 differing words by four mechanisms: Apple's partial quads, lavapipe's clip seam, RADV's lane order and x86 lavapipe's 8-lane subgroup. The docs said otherwise in two places: - QuadsSplitByClipping said each run of a split quad combines fewer active lanes than Metal's. Each piece's run keeps all four lanes; what differs is the helper query, which names the other piece's covered pixels as helpers where Metal's quad, shaded once, names none. The note's doc comment, its API.md catalogue entry and the validation gap's doc now say that. - FragmentSimdgroupGrouping gains the fill past a subgroup under 32 lanes: it reads an inactive lane, which MSL 4.1 section 6.10.2 leaves undefined, and the device reads the calling lane in its place (lower::simd's PartialFragment read). docs/VALIDATION.md's verdict section names the four mechanisms and what lavapipe and the 780M do under each, where the next reader of a held case looks. The gap's doc in c3.rs no longer says the cause is unread. Docs and doc comments only. pin-compute.py over the tree gives the committed runtime-sources fingerprint (artifact.rs is not one of its inputs), so no re-pin. cargo fmt --all is clean. |
||
|
|
f683293b4b |
Docs: a fetch may read the texel from before its draw, so overlapping read-modify-writes leave one
UnorderedFetchWithinDraw's words said a pixel that overlapping fragments of one draw fetch and
write "holds the result of some order of the draw's fragments", "not necessarily Metal's". The
Radeon 780M (RADV, Mesa 26.2.6) shows otherwise. Job m3-max-83259 ran the eight authored cases
the ordered_fetch_within_draw gap holds (n instances of the companion's fullscreen triangle in
one draw, so n identical fragments at every pixel or sample) five times at
|
||
|
|
702916d9d3 |
Validation: helper-thread words and ordered fetch are answer gaps a row's words decide
FragmentSimdgroupGrouping, QuadsSplitByClipping and UnorderedFetchWithinDraw only record a device behaviour now: none of them excuses a word. The cases whose differing words they reach turned from noted differences into mismatches, and nothing held them open, so a round's public leg would read them as new mismatches. Two answer gaps now hold them open. Both are decided by structure (the note and the words its operations reach), never by case id: - HelperThreadWords (helper_thread_words): every unexcused word is reached by FragmentSimdgroupGrouping, or every one by QuadsSplitByClipping. - OrderedFetchWithinDraw (ordered_fetch_within_draw): every unexcused word is reached by UnorderedFetchWithinDraw. How: - For each only-recorded note, the word judge counts the unexcused words that note reaches (Judgement::recorded). - AnswerGap::held_by_words picks the gap one of whose notes reaches every unexcused word of a mismatch, where both outputs have one length. The engine's difference_status calls it for a mismatching verdict, and the batch-run line names the gap (held_open_by=). - Every device has both gaps, since why the device's words differ is not read yet. The reviewed list refuses an entry under either gap. - A row's content check accepts such a gap only on differing bytes from a run that recorded one of its notes, and status_holds re-derives the gap from the row's words. - C3 names a word gap as a mismatch's reason after a deferral and after a listed gap. - docs/VALIDATION.md states both gaps. ENGINE_EXECUTOR_ABI stays vulkan-engine-v215, above development's v214. The three figures, public cases (1,168): noted cases / cases that match only within bounds / mismatches, then how many mismatches an answer gap holds and how many are new. - lavapipe (Mesa 26.2.4 image): - before, development |