Record mode (job m3-max-46378 at 37f73671dd, an Apple M3 Max, macOS 27.0.1 26A434) took the case's
Metal answer: plain Metal ran the pass with no error. Every instance fetched element
base + (iid - base) / rate, its count starting at the draw's base instance:
- rate 2 from base instance 0: elements 0, 0, 1, 1 (words 0x10, 0x10, 0x11, 0x11);
- rate 2 from base instance 5: 5, 5, 6, 6 (a count from instance 0 would read 2, 3, 3, 4);
- rate 3 from base instance 0: 0, 0, 0, 1;
- rate 3 from base instance 5: 5, 5, 5, 6 (from instance 0: 1, 2, 2, 2).
That is Vulkan's divisor, firstInstance + (instanceIndex - firstInstance) / divisor.
conformance times --runs 8 --write (same job) wrote both legs' figures: within the 10x margin, the
margin reported unjudged (the instrument's floor read 17.77 instrument costs on Metal's leg). The same
job's replay on the M3 Max (the old runtime over MoltenVK) reads exact.
docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py).
Record mode (job m3-max-45736 at f5172d90a3, an Apple M3 Max, macOS 27.0.1 26A434) took the case's
two Metal facts:
- Plain Metal ran the pass, Completed with no error, over 3 runs folded into one outcome. Every slot a
draw's vertex and instance sums reach holds the attribute buffer's first word, 0x10, with its sum,
and the one slot they do not reach stays 0xEE..: from vertex 0 slots 0-2 (0x10, 0..2); indices 1-2
at base instance 1 slots 2, 3, 0 (0x10, 2..4); vertex start 2^30 and base instance 2^30 slots 0-2
(0x10, 2^30..2^30+2). So Metal's constant step reads the first element whatever the vertex start,
the instance and the base instance, past the buffer's end included.
- Metal's API validation let the case run.
conformance times --runs 8 --write (same job) wrote both legs' figures: within the 10x margin, the
margin reported unjudged (the instrument's floor read 19.59 instrument costs on Metal's leg).
The same job's replay on the M3 Max (the old runtime over MoltenVK) reads exact.
docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py; --check passes).
Record mode (job m3-max-44847 at 09c51a35ef, an Apple M3 Max, macOS 27.0.1) took the case's two
Metal facts:
- Plain Metal ran the pass: every step answered Ok, and the command buffer is Completed with no
error, over 3 runs folded into one outcome.
- Metal's API validation stopped it at the pass: "Compute Function(vwp_words): the offset into the
buffer src that is bound at Buffer index 0 must be a multiple of 4 but was set to 2.", and the
same for dst at index 1.
docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py): 167 case
modules, 1,282 recordings.
Verified: the recording's facts as listed (read from the file); coverage.py --check passes.
6f5bd20321 removed the 16-bit `half` color output form on every device. That moved Device::new's
output, which the old runtime builds on: 111 golden cells on each RADV, ANV and MoltenVK profile
(5c47b9c867 -> bfe63b5097). The form comes back for Device::new alone, as a profile fact:
ProfileFacts::half_outputs is HalfOutputs::Sixteen in Device::new's facts (ROWS) and
HalfOutputs::Widened in Device::from_queries' (EVERY). Under Sixteen a `half` color output is
declared with 16-bit `float` lanes where the profile enables storageInputOutput16 and
shaderFloat16, as before 6f5bd20321. storageInputOutput16 is not one of the queries rule 2 lets
choose a second form, so the new runtime keeps one 32-bit form for every stage output. The fact
renders into no ROWS fingerprint, so Device::new's profile keys do not move.
- lower::stage_io: plan::half_variable (now reading the fact and the enabled feature),
IoObject::User::half, the 16-bit store and io_elem's width are back. StageIo::half_outputs and
the link contract's 16-bit lanes are back.
- The HalfOutputPrecision and HalfOutputFastMathBlend note texts, docs/API.md's degrade
catalogue, docs/FAST-PATHS.md and the half-output-blends case say what they said for the old
path, each scoped to Device::new, with Device::from_queries handing every device the `float`.
- known-gaps.tsv: the 52 MoltenVK rows for the M3 Max's half-output-blends-r16f, -rg16f and
-rgba16f go, as before 6f5bd20321: with the 16-bit output MoltenVK stored Metal's codes there.
docs/CONFORMANCE-COVERAGE.md is regenerated (3,783 -> 3,731 ledger rows).
- The Iris Xe's 62 half-output rows (6769c2eaaf) were measured with the 32-bit form on ANV, which
gets the 16-bit form again under Device:🆕 they are owed a re-run with it.
- SEMANTICS_VERSION 2157 (the 111 cells per profile change under unchanged keys) and
ARTIFACT_FORMAT_VERSION 530 (the artifact codec has StageIo::half_outputs again).
- The engine_stage_io test is back. It also checks that the profile from Device::from_queries is
HalfOutputs::Widened and keeps the output 32-bit on MoltenVK, RADV and lavapipe, with no
StorageInputOutput16.
Verified at 8e0e199a12 on 00ca405504, whose tree is this commit's but for SEMANTICS_VERSION (2156
there; development took it meanwhile) and development's later commits (03a3741772 and the
harness's), which touch none of this commit's files:
- msi 41897: golden_hashes_match_the_table with every difference listed, compared with the
tables at 5c47b9c867 and bfe63b5097. All 504 stage-io cells on the .ll rows that Linux compares
(56 on each of the 4 RADV, 4 ANV and MoltenVK profiles) are back at their 5c47b9c867 values,
none elsewhere. On ANV and MoltenVK those are the only cells that moved (280, under unchanged
keys). The RADV and NVIDIA columns are stale under profile fingerprints that development's
e0f567a8bc moved back before this commit (12,705 cells, the table not yet blessed for it); in
them only the stage-io cells above and 185 cells on each of nvidia-rtx50-linux and
nvidia-rtx5080-laptop (e0f567a8bc's NVIDIA restore) moved. No ROWS fingerprint moved with
this commit. The 55 stage-io cells per profile on .air.ll rows need metal-as and wait for the
M3 bless.
- msi 41813: clippy -p metal2vulkan --all-targets --all-features -D warnings, rustdoc
-D warnings, nextest -p metal2vulkan -p metal2vulkan-conformance in full: 4,719 of 4,722 pass.
The failures: golden_hashes_match_the_table, for the bless above;
the_public_signatures_are_the_committed_table, development's degradations! row, fixed since by
489bc24c4e; the_authored_4096_step_kernel_compiles_inside_the_budget, which passed alone on
the same build (41862) and is not in this commit's scope.
- msi 41814: clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd.
The six half-output blend cases differ from Metal on the RTX 3090 (59 sites) and on the Iris Xe
under ANV (62 sites). The ledger had no rows for either venue, so the conformance replay failed
there. Every site is the device's own blend, which the native-arithmetic contract makes the
answer, so each gets a row: 59 scoped `NVIDIA GeForce RTX 3090`, with answers equal to the
RTX 5080 Laptop's rows (no venue pattern covers those two without the RTX 2080, which no run
here measured), and 62 scoped `Iris(R) Xe`. docs/CONFORMANCE-COVERAGE.md is re-derived for them.
How the sites were shown to be the device's blend, by a measurement build (not committed) that
read every stored code back and set it beside plain float models of the blend:
- The `one-zero`, `min` and `max` sites store the source or the destination through the
attachment alone, and store Metal's codes on both devices, so both operands reach the blend
exact.
- RTX 3090 (NVIDIA 620.70.06): the exact blend rounded once to the attachment's precision gives
98.0% of the 16-bit words and 98.7% of the 32-bit ones. Into a 16-bit target the blend colour is
truncated to `half`; the runtime hands vkCmdSetBlendConstants Metal's float colour unchanged, so
the truncation is the device's. Every word that differs from Metal's is within 1.01 ulps of
that model at the largest operand's magnitude. A -0 + +0 sum stores -0, which is the 32768 and
2147483648 of the zero-1msa and sas-1msa rows.
- Iris Xe (Mesa 26.2.6): the float blend truncated toward zero into a 16-bit target gives 97.6% of
those words. The exact blend rounded to nearest gives every 32-bit word.
- On both devices every differing word is within two ulps of Metal's at the largest operand's
magnitude. That is inside the bound of the `half-output-fast-math-blend` precision note (three
half ulps, two float ulps). The note is announced on both devices: the cases' allowance for it
fired on all six cases (3090: 12 of 12 allowances fired; Iris: 6 of 12, the six silent ones are
shared-in-system-memory, which an integrated GPU does not announce).
Verified:
- conformance replay of the six cases exits 0, each run holding one GPU: ms01 RTX 3090
m3-max-41210, ms01 Iris Xe m3-max-41211, um870 RTX 3090 m3-max-41218.
- cargo nextest run -p metal2vulkan-conformance --all-features: 1043 passed (m3-max-41208).
The first run, before the document was re-derived, failed only
the_conformance_coverage_document_is_what_the_sources_derive (m3-max-41199).
- Measurements: m3-max-41151, 41171 and 41176 (um870 3090), 41174 (ms01 3090), 41175 (Iris).
These ran at tree 9326ca7fd8, which this commit's tree equals.
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.
Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.
Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
Apple's GL renderer sends setTriangleFillMode:2 for glPolygonMode(GL_POINT) under its Intel and
Apple-silicon caps tables. The value is not in the public headers. Our TriangleFillMode had only
Fill and Lines, so the consumer's raw-value conversion failed and its host died. Measured on
Metal: an M3 Max and an Intel UHD 630 draw only a triangle's 3 vertex pixels (a Radeon Pro 5300M
fills it); our own probe on the M3 (m3-max-26811) draws 1-px points whether point_size is 4, 1 or
unwritten, culls them with CullMode Front, and draws them with Back.
Now TriangleFillMode::Points (2) exists. The generator (scripts/regen-metal-enums) takes a
PRIVATE line for it, with its evidence, and a PRIVATE_DOCS doc comment (metal_enum! accepts
variant attributes); generated.rs stays generated and `--check` passes. The runtime draws it as
VK_POLYGON_MODE_POINT. It needs fillModeNonSolid (refused otherwise:
Feature::TriangleFillPoints) and, on a portability-subset device, pointPolygons
(VkFeature::PointPolygons; MoltenVK withholds it, so it refuses Points). New degradation
TrianglePointSize ("triangle-point-size"): Vulkan sizes the points by the PointSize the vertex
function writes, where Metal draws 1 px. An ICB command still refuses set_triangle_fill_mode, as
before. New lane module runtime_lane::triangle_points.
Verified (fillpoints, 6b9927c402 on 25be73dddf):
- lavapipe lane 30/30: points light {(3,3),(3,12),(12,3)} (Metal's 3 vertex pixels); culled
front none, back the same 3; fill 45 px (the M3 lit 45); lines 27; fill/lines unchanged.
- msi: clippy plain, m2v_gpu and m2v_cpu_icd 0; rustdoc 0; touched tests 102/102.
- Owed: the XTX leg (m3-max-26943).
ARTIFACT_FORMAT_VERSION 519 -> 520 (VkFeature appended to the codec), RUNTIME_VERSION 2245 -> 2246.
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.
Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
A lost VkDevice's recovery notice named its hang only as "a command buffer (of queue `Q`)",
so an Iris boot's GpuHang (46 victims) left nothing to tell which work hung. The runtime had
no label for a command buffer or an encoder at all.
CommandBuffer::label/set_label (MTLCommandBuffer.label) and label/set_label on the blit,
compute, render and resource state encoders (MTLCommandEncoder.label) now keep what the
program sets. A command buffer has one encoder open at a time, so the open encoder's label
lives on the command buffer's state, and the encoder's record takes it as it ends: each
EndedEncoder reports its label, in its place, a render encoder that ends on the lowering
thread included. The recovery names its culprit from the command buffer's state as it fails
the pending batches: its label and its queue's, then its first 32 ended encoders' places,
kinds and labels, counting the rest, e.g. "command buffer `busy` of queue `relayed` (its 1
encoder: 0 blit `copies`) failed as the hang (`GpuHang`)".
set_label and label are no calls in EncoderCall's numbering. The API table, the Metal and
conformance coverage maps, docs/API.md's DeviceRecovered entry and the runtime README say so.
The table's WorkCounts::spare_command_buffers_freed_past_recorded line moves to where the
script sorts it.
Verified: fmt only on this machine; tests::labels (both lowering policies) and
tests::device_recovery's relayed-loss test, which asserts the named notice, run on lavapipe next.
SamplerDescriptor gains `lod_bias: f32` (MTLSamplerDescriptor.lodBias,
default 0, serde default), so a guest's bias is carried rather than
having no field to land in.
What Metal does with it, measured on the M3 Max (Apple9, macOS 27.0.1
26A434) with a throwaway Swift probe of runtime-compiled MSL (jobs
m3-max-19665/19666): level L of a 7-level texture held L, so every
sample read its own level of detail. Across 136 row groups no sample
changed with the sampler's bias: fragment implicit, shader bias(),
level(), gradient2d(), min_lod_clamp() and bias+min_lod_clamp; kernel
default, level, gradient and bias; linear and nearest mip filters on
float textures, both on uint ones; a NotMipmapped sampler's min/mag
choice; clamps [1,3], [1.5,MAX], [0,2]; biases -1000 to 1000, 15.99,
16, 16.5, 17, NaN, +-inf. The probe saw levels move with the shader
bias, the clamps, explicit levels and the NotMipmapped filter switch.
With MTL_DEBUG_LAYER=1 every value made a sampler with no assertion and
read back as set. Apple's tables list the bias under Apple10, which no
runtime device claims.
So the Vulkan sampler's mipLodBias stays 0 whatever the descriptor
holds: no bias is past maxSamplerLodBias, and none needs a portability
subset's samplerMipLodBias. The binding shape and the sampler word do
not carry it either. The runtime's state key does: on the M3 (job
m3-max-19683, with and without validation) biases 0 and 1, 1 and
1.0001, and 20 and 30 gave two states each, while 0 and -0, and two
NaNs of one encoding, gave one. The key takes the bits of `bias + 0.0`.
The Apple10 family row stays a gap, its reason now that the biased
level of Apple10 is not built. The conformance suite's SamplerSpec
states the bias too (tag 8, a word only where it is not 0, so no
recording's fingerprint moves), and both legs set it. METAL-COVERAGE
lists lodBias as implemented; CONFORMANCE-COVERAGE and the API
signature table are regenerated.
Tests: metal::sampler::a_lod_bias_makes_the_unbiased_sampler covers
every committed profile, every mip filter, three filter pairs and four
uses plus the unnormalized one, and 15 biases: the Vulkan sampler and
the binding shape are the zero bias's. That includes MoltenVK, which
withholds samplerMipLodBias, and biases past every device's limit.
runtime_lane::lod_bias::a_sampler_s_lod_bias_reads_the_unbiased_level
runs a kernel's biased samples through runtime sampler states of ten
biases, under linear and nearest mip filters, and compares them bit for
bit with the unbiased state's. It also checks the state-sharing rule.
lavapipe's fixed-function vertex input takes an element's displacement modulo 2^32: the
conformance case vertex-fetch-past-4gib-small-buffer reads the wrapped words in 24 elements
where Metal reads zero. Vulkan places the attribute at the whole displacement (28.4 Vertex Input
Address Calculation) and robustBufferAccess2 makes a read past the bound range zero, so the
wrap is the driver's defect: a new RuntimeDriverDefect::VertexFetchWrapsPast4GiB, listed for
MESA_LLVMPIPE alone.
On a listed driver the render lowering names the fixed-function layouts a draw may fetch past
2^32 bytes of their bind offset in a new BindState/BindShape field, far_vertex_buffers, and the
binder pulls them (the existing pulled-vertex-buffer variant, whose fetch reads past 2^32 as
zero). The reach is the existing furthest_element: a draw's last vertex, 65535 plus the base
vertex for ushort indices, the base instance plus the last instance over the rate. Those are
pulled by default. A per-vertex layout of a uint-indexed draw, and an indirect draw's, has its
reach stated by GPU memory; pulling it costs a variant for every such draw, so it is behind a
new runtime-only DevicePolicy switch, vertex_reach (VertexReachPolicy::Bounded by default,
Exact in exact_answers()). Under Bounded such a draw keeps fixed function and is announced
vertex-fetch-may-wrap (Precision). The draw-again paths (rebound, restated) compare the pulled
set; the host-step precompile names none; the GPU replay derives it from its indirect draw.
WorkCounts::far_vertex_fetch_pulled_draws counts the pulled draws.
The conformance case's known-gaps row is removed: replay runs under Exact. FAST-PATHS gets the
switch's row (its lavapipe cost is measured next, in a later commit). New tests: the binder
pulls a named layout; far_layouts under both policies; runtime_lane::far_vertex_fetches
measures the defect on every device under both values, and far_reach_costs (ignored) measures
the exact form's cost.
SEMANTICS_VERSION is unchanged: an empty far_vertex_buffers, every existing shape's, plans as
before, so no output changes under an unchanged key.
Verified so far: api_signatures blessed (signatures.py), refusal_surface --check, the
conformance and Metal coverage checks; builds and tests follow as potluck jobs.
The coverage document counts the ledger's rows and lists each one's gap, and counts the modules
that declare a notice: the 27 RADV NAVI31 rows, the corrected text of the extended-range mipmap
rows, and read_through's `shared_memory_notice` (a module that declares a notice outright now)
move it. Written by `python3 -I scripts/conformance-coverage/coverage.py`; `--check` passes.
Found by the conformance suite's run at 0ef30d74db (potluck m3-max-14873, lavapipe on um790):
`the_conformance_coverage_document_is_what_the_sources_derive` failed, the only failure of 1043.
Replayed on lavapipe (llvmpipe, LLVM 23.1.4, homelab-um790-xtx-1, job
m3-max-13976), both policies: case/out differs in 24 elements, the largest
difference 27, and nothing else in the case. The 24 are the four slots of the
six far draws at strides 4 and 12, the layouts the runtime leaves to the
device's fixed-function vertex input. The first differs at byte 32 (Metal 0,
ours 0x10, word 0: element 2^30 at stride 4, displacement 2^32 read mod 2^32),
and 27 is word 11 (0x1b), element WRAP_12 + 3 at 2^32 + 44 read at byte 44. The
pulled stride-6 draws read zero as Metal does. llvmpipe reports
robustBufferAccess2 (vulkaninfo in job m3-max-14015), under which a vertex input
past the bound range reads zero, so the wrapped word is lavapipe's own fetch.
The same case replays exact on RADV (AMD Radeon 780M, RADV PHOENIX, job
m3-max-14015) and on MoltenVK on the M3 Max (m3-max-13932), under both policies.
The row is scoped to llvmpipe and names what is open on our side: pulling an
attribute whose draw may fetch past 2^32 bytes of its bind offset on a device
whose fixed-function input wraps, which no device check finds today.
docs/CONFORMANCE-COVERAGE.md counts the row (3584 ledger rows).
Verified: coverage.py --check "as derived" locally; the Linux conformance suite
and the lavapipe replay of the case at this tip.
scripts/conformance-coverage/coverage.py over the tree with the case's
recording: 1277 committed recordings, 853 cases running a committed shader
fixture, 1193 metal_run answers, and vertex_fetch_reach's row reads one case,
one recording, 110 compared fields. The other rows move only where the
module joins the lists of families that call an item.
Verified: coverage.py --check reads "as derived" at this commit (locally);
the_case_set_is_the_recordings_the_document_counted in the Linux
conformance suite at this tip.
What: on the owner's word (11-10 ~06:35, "stop tests, merge as-is into development"), with no further check:
- steelbrain/triage-c (8): the vertex_fetch_reach fixture, its AIR and the conformance case
vertex-fetch-past-4gib-small-buffer (no Metal recording or cost record yet); InstanceShadows::holds by binary
search; the GPU-fault lane prints its notices; the color-groups lane's four-color option
(DeviceOptions::color_attachment_limit, doc-hidden) in place of the profiles layer, and the dropped re-exports.
- steelbrain/triage-a-720 (2, marked WIP/UNVERIFIED by their author): merge verdicts recorded only clear of load
and repeated (CHECK_VERSION 6); the paths test's relay condition.
RUNTIME_VERSION 2015 -> 2016; the pin and docs/CONFORMANCE-COVERAGE.md follow.
Known state: the vertex-fetch case lacks its Metal recording and cost record; 720's after-fix counts never ran.
Not in pin 36 (ef7af82fe4). Verified here: pin-compute, generators, api-signatures --check clean only.
What: a Metal 4.1 read(sampler, ...) of a texture held in an argument buffer now hands back
Metal's border texel of the resident texture, its pixel format's through its swizzle, for every
sampler: a constexpr one of any border colour, a runtime [[sampler(n)]] and an argument buffer's
sampler (the colour from the sampler's word).
- The binder writes each texture's border texels (metal::sampler::border_texels of its format
and swizzle, the layout of a slot's BorderTexels specialization) in its handle-table entry's
flags, bits 3 to 14 (memory::handles::FLAG_BORDER_TEXELS); handle_entry_flags carries them, so
a consumer's own table of every ID gets them too.
- A module with such a read searches the table in a new indexed form (Lookup::Indexed): the
handle is the element with the found entry's index in its top 16 bits (HANDLE_ENTRY). The read
loads the entry's border texels by it (handles::border_texels); every use that reads another of
the entry's flags (texel class, red-blue order, out-of-bounds alpha) loads them from the entry
into the flagged handle's layout (handles::flagged_handle), through one typed value
(texture::emit::HeapFlags) so no reader sees the entry index in those bits.
- through::finish selects the border texel for slots and heap elements alike; a heap member read
by its raw texels (an extended-range form) takes its border and its zero past the level or
layer from its own image's addressing inside the raw arm, not the float array's neutral's.
- The old heap path, which selected the out-of-bounds texel (transparent black, unswizzled) and
refused every other border colour and runtime sampler NotImplemented(ArgumentBufferTextures),
is gone, with ReadSampler::transparent and the forced alpha flag of such reads.
Why: the M3 runs all three (conformance cases read-through-heap-border, read-through-heap-sampler,
and read-through-rgba8-swizzled's rt_heap_zero, where (G, R, 1, 0) reads (0, 0, 1, 0) past the
edge and we read (0, 0, 0, 0)). A 32-bit heap handle had no room for 12 border bits beside the
element, class, red-blue and alpha fields; the entry does (bits 3 to 14 were unused).
SEMANTICS_VERSION 2017 (translation output changes). ARTIFACT_FORMAT_VERSION unchanged: no
encoded type changed. RUNTIME (for the orchestrator's bump): the runtime's handle tables
(heap_sets.rs, through bind::handle_entry_flags) now carry the border-texel bits.
Ledger: the three rows of these gaps go; llvmpipe's rt_heap_zero row of the swizzled case keeps
only llvmpipe's 8-bit unorm conversion. FAST-PATHS known gap removed; REFUSALS.md,
CONFORMANCE-COVERAGE.md regenerated (METAL-COVERAGE.md unchanged).
Verified: not yet built (next: Linux build, clippy and the touched tests).
(cherry picked from commit bc000fa475e572131248b908541dbe29f1f5996c)
The llvmpipe 3D mirror rows' text and the RADV row of pass-bytes-srgb-decode-all-bytes
(the two commits before this one) change what the coverage document derives.
Verified: scripts/conformance-coverage/coverage.py regenerated it.
Regenerated by scripts/conformance-coverage/coverage.py in job m3-max-13466 at 94a89c5273
(gem10, lavapipe cfg): two more recordings (1265), 23 more ledger rows (3484), and the
blit_encoder_commands family's case count (11). The conformance crate's tests passed against
it there (1050 of 1050).
(cherry picked from commit 0bbbd5f379db297f84df60b129b15a4e6e1222d5)
From the replay of the 11 padded-fetch cases on the Iris Xe (job m3-max-13463): its linear loads
exact, an sRGB twin's colour a half step from Metal's table where the device's Pow decode rounds
apart (device-pack-conversion), and the clear and draw cases the announced stored-codes
difference; the same replay held every padded-blend row on the Iris Xe. CONFORMANCE-COVERAGE.md
regenerated.
(cherry picked from commit 51f7de510a25e696fbb83be145d73e6ee70be94f)
(cherry picked from commit 92f9642928970b8d8f19731a667f9af3572881df)
(cherry picked from commit 9dd440ac76a1bbb46b6d001e936d4693dbe1cd06)
python3 -I scripts/conformance-coverage/coverage.py; the coverage test found the document stale
at 85edc61c8f (job m3-max-13469).
(cherry picked from commit 53c388806fad4a522aee606e4f8021e95cdabfdb)
(cherry picked from commit b90d930e487ed30c141f5d0e20e0d5c6496a07c6)
(cherry picked from commit 7b59616984a87356c649888200cca22fb52e00be)
python3 scripts/refusal-surface/refusal_surface.py (the padded fetch's FramebufferFetch site
gone) and python3 -I scripts/conformance-coverage/coverage.py (the padded-fetch cases);
METAL-COVERAGE.md is current (coverage.py --check).
(cherry picked from commit 0c8ad6c47d76ff7436835fa5377ff17700151c21)
(cherry picked from commit f448ad63ca5d317526e923c2363c3f05a44a0068)
(cherry picked from commit 4037ac989aa2942bdde46538b8b9856a9bfd3d78)
ExtendedRangeBlendSource and ExtendedRangeFloatBlendSource (their docs, the API
catalogue entries and the FAST-PATHS device-gap row) now say what the suite
measured: the device's compiler may contract and regroup the in-shader blend
(MoltenVK on the M3 Max and NVIDIA's driver on the RTX 5080 compute
S·F + D·(1 - F) as D + F·(S - D)); a stored channel lands within two codes of
Metal's on a linear format and within six near zero on an sRGB twin; and where
the compiler regroups a padded format's blend, an infinite second source stores
an end code where Metal's sum is NaN, stored as 0. The FAST-PATHS row names the
padded formats, which it lacked, and no longer says 'not measured'.
known-gaps.tsv: the 168 extended-range rows (xr-blend, xr-gamut, xr-gradient,
xr-masked) whose Open item was the blend notes' documentation are closed (Open:
nothing, the recorded bound covering the difference); every one is within the
bound (survey of the rows' largest differences). The padded-blend rows are
regenerated for five venues: the M3 Max, RADV PHOENIX and llvmpipe as before,
and the RTX 5080 (b5080 entry xrblend2-padded-replay-5080) and the Iris Xe
(job m3-max-13386), 17 each. The 5080's second-source cases differ by the whole
code range as the M3's do, and its counts are exactly a model of
D + a·(S - D) over an unnarrowed float destination (971 on R10Unorm_X6, 1850 on
RG10Unorm_X12); the Iris's are exactly the sum as written over the half
destination (844, 1607), as RADV's; llvmpipe's the sum as written over a float
destination (962, 1831). No venue's largest difference exceeds the M3's, the
780M's or llvmpipe's.
engine_padded_blends: a fetch of a padded attachment makes the whole pipeline
on every committed profile that orders fetch (storage form or input
attachment) and names the device gap elsewhere; a bfloat fetch stays
NotImplemented(Format), the negative control. Not yet run.
(cherry picked from commit c923b6d49c36c8354f375f6dababfd5f81f1ffbc)
(cherry picked from commit e3a2b226d7f5938811d1d251172088baf05c15cb)
(cherry picked from commit 85a2473cc6ea6a2c9165e2614d1e87ca77c1627e)
Seventeen rows for the 256-bit llvmpipe venue, the counts its replay printed at
31d3ac25a2 (job m3-max-13288). lavapipe computes the second-source blend as
written with a product fused into the sum (native-fma), so an infinite second
source's NaN stores code 0 as Metal's does and no linear element is more than two
codes from Metal's.
CONFORMANCE-COVERAGE.md regenerated for the ledger's row count.
(cherry picked from commit 37237c7c805a19a814c809d13a1b2c196fd148b2)
Seventeen rows per venue, the counts the replays printed at 31d3ac25a2 (M3 under
MoltenVK, job m3-max-13278; the 780M under RADV, job m3-max-13289). Each blend runs
in the shader in the device's arithmetic, unclamped, and lands a code or two from
Metal's on a linear format, up to six near zero on an sRGB twin. The second-source
blends differ by venue: the M3's compiler computes S·a + D·(1 - a) as D + a·(S - D),
so an infinite second source stores an end code where Metal's IEEE sum is NaN,
stored as 0; RADV computes the sum as written and stores 0. A model of each form
reproduces the replay's count exactly on R10Unorm_X6 and RG10Unorm_X12.
CONFORMANCE-COVERAGE.md regenerated (the new case module, its recordings and rows).
(cherry picked from commit e117b085632700b586e56d043b91b16b2365a524)
Regenerated by scripts/conformance-coverage/coverage.py after the 96 llvmpipe
rows and the three read_through gap rows: 3410 ledger rows.
Verified: the conformance suite on msi (job m3-max-13292) failed only
the_conformance_coverage_document_is_what_the_sources_derive before this.
(cherry picked from commit 3514ac3e7a91a8245325939db06bbec5e950a63a)
Regenerated by scripts/conformance-coverage/coverage.py: 13 more recordings,
162 case modules, three ledger rows, and read_through among the families that
compare MTLSamplerState and the texture and buffer items it calls.
Verified: coverage.py --check reported the doc stale before and is the
generator's output now.
(cherry picked from commit b2b166a2d4b03ed957824bc8290b214d4c78c66b)
The family's declaration test held every allowance to the notices site or
the fresh value declaration, so the two Depth32Float rows' unchecked fresh
site under fresh-pattern-zeroed (55df5fa64b) failed it. The test now names
that declaration, counts the texture row's three extra allowances and the
pattern row's two, and checks no other row carries it.
docs/CONFORMANCE-COVERAGE.md is regenerated
(python3 -I scripts/conformance-coverage/coverage.py): fresh_contents now
loosens one measured value.
Verified: both failed in the conformance suite on gem10 (job 10312); the
rerun follows.
(cherry picked from commit 184d622fa578658947c19dd19df29ff160a91b9b)
What. Buffer::new_texture of a texture buffer whose texels run past
the buffer's length (inside Metal's allocation rule) is made instead
of returning NotImplemented(TexelsPastBufferLength), as a 2D texture
or array already is. Its texels inside the length are the buffer's
bytes; those past it lie in a tail of its own, a zeroed Shared buffer
the runtime owns, laid out from the functions' first byte (the offset
rounded down to 16, as Metal's kernels read a texture buffer).
- GPU: the texture buffer takes the staged form (StagedTextureBuffer,
announced): its bindings view the tail as their staging buffer. The
copy in takes the bytes inside the length from the buffer (none
where the texels lie wholly past it), the copy back gives only those
bytes back, and a Shared buffer's merge copies the current part from
and to the buffer and the tail apart (staged_bytes, which now names
a texture buffer's staging buffer as well as an image's, and
record_out, which copies the staging buffer's every byte).
- CPU and blits: as for 2D, each row split at the length
(Texels::past, whose rebase is now the tail's base, tail_base).
Only an IOSurface plane past its surface stays
NotImplemented(TexelsPastBufferLength); the gap's doc, its reach in
scripts/refusal-surface/reach.tsv, the StagedTextureBuffer catalogue
entry and docs/API.md's accepted difference say so.
Why. Plain Metal makes these: reims-vgpu's tbprobe on both x86 oracle
Macs (jobs m3-max-4019, 4046, 4152) and the M3 Max probe
(probes/texture_buffer_past_length.m, job m3-max-4617), whose paths
read and write the bytes past the length as one memory, as a 2D
texture's. The tail gives the 20000-byte buffer's answer for every
shape, as the 2D tail does.
Tests.
- tests/buffer_tail_device.rs: a texture buffer of 64 R32Uint texels
from 3968 of a 4096-byte buffer (32 past) and from 4096 (all past):
as made, after a kernel's write across the length (ob1_texel_buffer)
and after replace_region past it, a kernel, get_bytes and a blit
read alike; the buffer's words inside the length are written, every
other word and 16 buffers around it keep theirs.
- linear_plan unit rows: texture buffers past the length made.
- runtime_lane::buffer_textures: the texture buffer at 3968 is made.
- Conformance: buffer-tails-texture-buffer, 1024 R32Uint texels from
16384 of a 20000-byte buffer (904 inside): ob1_texel_buffer reads
and writes, getBytes, replaceRegion, blits from and into it, the
buffer's bytes; recorded on the M3 Max (3 runs, one outcome, every
site the model's answer).
Verified:
- M3 Max, macOS 27.0.1: the probe (m3-max-4617) and the recording
(m3-max-4640): buffer-tails-texture-buffer is made, announcing only
the staged-texture-buffer notice, and the 2D tail cases still are.
- gem10 (m3-max-4635): clippy of the runtime (all targets, all
features) and of runtime and validation under --cfg m2v_cpu_icd;
the runtime's unit tests (70 of 70); the runtime lane on lavapipe
(172 of 172, the new texture-buffer test among them); the
buffer_textures, texel_swizzles and degrade_notices validation lanes
(27 of 27).
- gem10 (m3-max-4662): rustdoc of runtime and conformance; the
conformance unit tests over the tails, refusal, catalogue and
accepted-difference rows (20 of 20); a lavapipe replay of the six
buffer-texture cases, all six announced as the ledger expects.
Clippy there named the shape test's two constant assertions, now
const blocks; clippy of runtime and conformance and those unit
tests again on this tree: m3-max-4688.
- Negative control (m3-max-4662): the runtime's sources at 5020e74ebb
with these tests and cases fail the new device test with
NotImplemented(TexelsPastBufferLength), and the replay refuses
buffer-tails-texture-buffer at case/texture.
(cherry picked from commit f0a3390160064eabb820fbdc4f83822e0492fb5f)
What. Buffer::new_texture and new_linear_texture of a 2D texture or a
2D array whose texels run past the buffer's length (inside Metal's
allocation rule, past which Metal answers nil and so does the plan)
are made instead of returning NotImplemented(TexelsPastBufferLength).
The texels inside the length are the buffer's bytes, exactly as
before; those past it lie in a tail of the texture's own: a zeroed
Shared buffer the runtime owns (Texels::tail), laid out from the
texels' first byte, and no other allocation's memory.
- GPU: such a texture is kept as a shadow image (ShadowedTexture is
announced). The tail is the shadow's staging buffer; its copy in
takes the bytes inside the length from the buffer, its copy back
(staging rows clipped by inside_rows) writes only those bytes back
to the buffer, and a Shared buffer's merge copies the current part
from and to the buffer and the tail apart (shadow_merge.rs).
- CPU: getBytes and replaceRegion split each row at the length
(past_runs, write_past).
- Blits: copies that name the texture's bytes split their rows at
each side's length (RowsCopy::split) and copy the part past it
from or to the tail; a copy with an ordinary texture goes through a
scratch buffer of the encoder; synchronizeResource covers the bytes
inside the length; the extended-range rewrite announces its note
rather than binding the buffer's words past the length.
Texture buffers and IOSurface planes past the length stay
NotImplemented(TexelsPastBufferLength), whose doc now says so.
Why. Plain Metal makes these textures: reims-vgpu's oracle on the
AMD 5300M and the UHD 630 (4096-byte buffer, 64x16 and 64x17 at rows
of 256, offsets 0, 256 and 2048) and the M3 Max probe
(probes/texels_past_buffer_length.m, job m3-max-4337) for the same
shapes. Under Policy::Dies the refusal ended the consumer's host. The
M3 Max's paths agree that the bytes past the length are one memory:
the next allocation's over a 4096-byte buffer, the allocation's own
zeros over a 20000-byte one, read and written alike by every path.
The tail is the second answer for every shape; docs/API.md's accepted
differences records that the runtime never reads or writes another
allocation there.
Tests.
- tests/buffer_tail_device.rs (m2v_gpu / m2v_cpu_icd): 64x17 over
4096 bytes, 64x16 at 2048, 64x80 over 20000 bytes (row 78 across
the length), 64x1 wholly past, a Private buffer's, and a 2D array
whose second slice is past the length; each path (kernel, blit,
CPU) reads what each other path wrote, the buffer keeps its bytes,
and 16 buffers around it keep theirs.
- Unit tests: linear_plan expectations (2D and array past the length
made, texture buffers refused), RowsCopy::split, inside_rows.
- Conformance: buffer-tails-kernels (scout_read_u / scout_write_u,
getBytes, replaceRegion, the buffer's bytes) and buffer-tails-blits
(blits from a buffer across the length and from a texture past it,
a copy out into a texture, blit and getBytes reads), RGBA8Uint
16x256 at offset 4096 over 20000 bytes, recorded on the M3 Max
(3 runs, one outcome, every value the model's).
- The runtime_lane assertion that a 2D array past the length is
refused now asserts it is made.
REFUSALS.md and CONFORMANCE-COVERAGE.md regenerated.
Verified:
- M3 Max, macOS 27.0.1: probe m3-max-4337 (the shapes above); record
m3-max-4492 (both cases, 3 runs, one outcome each, every site the
model's answer); replay on MoltenVK m3-max-4508: buffer-tails-* and
the four buffer-texture(s)-* cases announced (every value exact).
- gem10, lavapipe (LLVM 23.1.4, 256 bits), m3-max-4509: unit 71/71
(linear_plan, buffer_texture, blit_plan, tail); device tests under
m2v_cpu_icd 139/139 (the four buffer_tail_device tests and every
buffer_texture, shadow and blit test); runtime_lane::buffer_textures
7/7; conformance replay of the same six cases: all announced.
- Negative control, same job: the runtime's sources at 0e2c70f08f with
these tests: the four device tests fail at Buffer::new_texture with
NotImplemented(TexelsPastBufferLength), and both conformance cases
are refused with it (case/texture, case/work).
- m3-max-4565: clippy -D warnings (runtime and conformance; runtime
and validation under m2v_cpu_icd), rustdoc -D warnings, unit
rows_split, buffer_tails, refusal and api_surface tests.
(cherry picked from commit e483e17c6c4d087a50a95cda297cf291934bee54)
6d7223a048 replaced the case's refused row with a lavapipe texel row and did
not re-derive the document. Verified: scripts/conformance-coverage/coverage.py
writes this; the ledger holds 3295 rows.
On development c0d0511d68 plus this branch, the signature bless rewrites one
record, metal2vulkan-runtime::commands! (macro-template), whose committed text
no longer matched the macro. The coverage doc is regenerated from the merged
case set and ledger.
Verified: m3-max-4172 on homelab-ms01-1 at f7a9747f90 ran
`scripts/api-signatures/signatures.py --bless` (one signature changed),
`scripts/conformance-coverage/coverage.py`, and
`scripts/refusal-surface/refusal_surface.py` (REFUSALS.md unchanged), then
clippy in all three configurations and rustdoc, all clean.
(cherry picked from commit 7644dfd59580037247e8236f5ed4a8f84bbcf282)
rows3 (e1ff50ac33) made two product fixes:
- GPU writes into read-only no-copy memory are now dropped off macOS.
- pass-sequence-color-actions' DontCare attachments are kept under the
exact policy the replay runs.
The RADV rows for both families recorded the old answers, and the whole
RADV replays at development c418a1f55b read every one of the 8 as stale
("no longer diverges ... and the known-gaps ledger still lists it"), on
the Radeon 780M (m3-max-4236) and on the RX 7900 XTX (m3-max-4237) alike:
- host-page-writes-kernel-store-read-only and
host-page-writes-visibility-read-only, each at
case/bytes-in-a-later-command-buffer-bytes and
case/bytes-the-cpu-reads-bytes;
- pass-sequence-color-actions at its four MTLStoreActionDontCare cells.
No venue's row is left for either family. docs/CONFORMANCE-COVERAGE.md
re-derived. Besides these, each replay held one unlisted line,
pass-bytes-srgb-decode-all-bytes, which amdperf owns.
(cherry picked from commit 0017a2c76ddad7a214127e4b700e5740fe3b6917)
The rest of the RADV ledger round: every line the whole RADV replays
read as unlisted, on the RX 7900 XTX (m3-max-4102, 306 lines) and the
Radeon 780M (m3-max-4108, 281 lines, each identical to an XTX line),
except the 10 lines the case declarations of b5c45c23cf settle and
pass-bytes-srgb-decode-all-bytes' one line, which amdperf owns.
Each row names the native note the RADV run announced for its case at
that site (the case block's "the device's native notes this case
announced" line, or a case-declared notice that fired), and states the
device's own answer with RADV's first differing element and largest
difference:
- 275 rows read "RADV": the 780M holds each of them with the same
answer, so a RADV row holds on both of the consumer's AMD GPUs.
- 20 rows read "NAVI31": ycbcr-gathers-* and ycbcr-minify-band-*,
where the XTX's memory is not the host's and the slot binds a
converted image. The 780M, which reads the planes in place, does not
diverge there.
Families with a text of their own:
- sampler-r-address-modes and sampler-border-colours: one lane, r the
negative smallest subnormal, which Metal reads as layer 0 and the
device reads below it.
- sampler-axis-mode-triples: the device's weight in whole 1/256 steps.
- denormal-word-fetches: the device's nearest samples flush a denormal
and its gathers keep it.
- BC1 to BC3 sRGB: the sRGB decode moves, since the 780M's block decode
is measured to be Metal's. BC4 and BC5: the device's decode.
- a2c-*: the device's coverage at alpha 0.5 is samples 0 and 2, and its
resolve rounds a tie down, as device-rounded-resolve records for RADV.
- texture-fills, nearest-sample-positions, sample-positions-default-*,
math-frexp-ilogb-half, the pass-bytes tanh and encode sites, and
blend-interaction-format-*.
The other rows take another venue's venue-neutral text, after the first
differing element and the largest difference were substituted and the
text was read against RADV's answer.
docs/CONFORMANCE-COVERAGE.md re-derived (scripts/conformance-coverage).
Proof: the whole RADV replay on both GPUs at this branch's tip.
(cherry picked from commit 2e0f7f2baf5f72200580b2092005e49645eca4be)
The owner's rule 1 keeps the fast form of every speed-for-accuracy choice the
default. A colour attachment of a texture's own image stored DontCare now
stores as the driver stores it by default (DONT_CARE where the driver is
measured to keep one of Metal's answers or to store as Metal's own, else
STORE), announced dont-care-store, and renders through the pooled backing
that keeps its earlier texels only under the new opt-in switch
DevicePolicy::dont_care_colors = DontCareColorPolicy::Kept, which
DevicePolicy::exact_answers() selects.
- metal2vulkan: the new public field DevicePolicy::dont_care_colors and enum
DontCareColorPolicy { Driver (default), Kept }. Its docs give each form,
its cost and Metal's documentation ("You need to assume that GPU discarded
the texture's contents"). The runtime alone reads it, so no profile carries
it (tests::fast_paths checks that no fingerprint moves).
- runtime: kept_bytes::settle takes the backing only under Kept. The docs of
kept_bytes, render_target, attachment_stand_in, degradation and
WorkCounts::kept_texels_passes, which counts only the Kept form's passes,
now say which policy they describe.
- docs/FAST-PATHS.md: the choice moves from "Costs of matching Metal" into the
table, as a row with its default, its switch, its bound and its measured
cost. docs/API.md's dont-care-store entry and the Render passes accepted
difference name the policy.
- Tests of both settings. dont_care_stores' default-policy tests are back to
their earlier form (each texel one of Metal's two answers, announced where
the driver does not store as Metal's own) and assert that no pass took a
backing. The new exact_answers_keep_a_dont_care_color_s_earlier_texels_on_
every_driver runs under Kept: the single-sample cases, both barriers and the
two 4x colours keep their texels exactly and are counted.
deferred_calls's refused-end test is back to its DontCare form.
clear_reach gains lane_with.
- conformance: the Policy::Exact doc lists queue_sharing and dont_care_colors.
The colour case's dont-care-store comment says what each policy gives.
- The known-gaps ledger keeps the eight pass-sequence-color-actions rows
removed. It is held against `conformance replay`, which takes the exact
policy, as the BGRA10_XR compressed-blit rows already are.
- The API signatures are blessed and docs/CONFORMANCE-COVERAGE.md is
re-derived (its ledger table had kept the rows that both families removed).
REFUSALS.md does not change.
Verified: cargo fmt only. The Linux clippy, rustdoc, suites and lavapipe
replays under both policies follow as potluck jobs.
(cherry picked from commit ec3479464c0f72ab5443223a28e23e84ec23e78d)
From the same whole RADV replay (m3-max-4016 at 7470a49e6d). Each
family's notes are announced for its cases on RADV (the case's own
native-note line, or every declaration fired: none of these cases is
among those whose declarations did not all fire, save the MoltenVK-only
set-past-layout one), and each row states RADV's own answer:
- half-output-blends (63): the device's fixed-function blend where
Metal's compiler folds blend and conversion under fast math, under
half-output-fast-math-blend; the rows say whether a site is within
that note's bound is not established, as llvmpipe's do.
- pixel-downscales (42): a normalized downscale differs by 0.031 of a
code at most, inside device-sampling's RADV bound (0.548); a pixel
sampler's by up to 0.876, inside pixel-sampler-scaling's 2/255; the
digest sites point at the head and tail rows.
- half-texel-nans, half-read-nans, half-write-nans (38): each a NaN
whose sign and payload are the device's, under native-nan-encoding
and the case's announced conversion note, with RADV's first
differing element.
- pixel-samplers (38): digests of the device's own sampler and
conversion; the subnormal arg and slot sites hold the digest
MoltenVK and lavapipe answer, the device's floor of a negative
subnormal, under device-denormals.
- vertex-format (20): a narrow float attribute's NaN widened with its
payload, under device-nan-encoding; a float read as half keeps the
NaN's sign, under native-nan-encoding.
All are scoped to RADV. CONFORMANCE-COVERAGE.md re-derived.
(cherry picked from commit 8e309cbacd31cdf61ecc74bbad8876225ae7a299)
The whole RADV replay (RX 7900 XTX, RADV NAVI31, Mesa 26.2.6; potluck
job m3-max-4016 at 7470a49e6d) read 704 lines not in known-gaps.tsv;
193 of them are the extended-swizzles family (extended-range,
padded 10-bit, packed 16-bit, bfloat and sRGB-twin formats under
every swizzle and op). Each is a site the case's M3 Max, NVIDIA and
llvmpipe rows already hold, and each is the same answer:
- 124 sites read exactly the count and largest difference another
venue's row holds, and 15 more (the sRGB twins' gathers and reads)
differ from it only in the largest word difference (91309 here
against 91311-91315), the same one-step code; their row texts state
the module's own decode and encode arithmetic and the device's
conversions, venue-neutral, under device-pack-conversion, which
every one of these cases announced on RADV, so they are reused as
they stand;
- 20 extended-range linear samples (sl) blend their taps by the
device's FMix, under bicubic-filter-arithmetic, which these cases
declare and which fired on RADV (none of them is among the cases
whose declarations did not all fire); each row now names RADV's
own first mismatch and how far apart it is in value;
- 14 bfloat NaN sites keep the NaN's sign and payload where Metal
answers 0x7fc00000 (RADV's first: ours 0xFFEF0000), under
device-pack-conversion;
- 20 packed 16-bit linear samples are the device's own filter and
widening, under device-sampling and device-texel-conversion
(announced); each row names RADV's first differing element and
that device-sampling's RADV bound (0.548 of a code) is measured on
unpacked formats only.
All are scoped to RADV. CONFORMANCE-COVERAGE.md re-derived.
(cherry picked from commit b255f138531068fea5f2d4edc2be7f2084d24c09)
The whole RADV replay (AMD Radeon RX 7900 XTX, RADV NAVI31, Mesa
26.2.6; potluck job m3-max-4016 at 7470a49e6d) read four lines not in
known-gaps.tsv at the 8-bit sRGB `beyond` sites of
read-write-tier-round-trip-float (768 elements, largest 67649) and
read-write-tier-held (192 elements, largest 64922), for BGRA8 and
RGBA8 alike. They are the device's native sRGB decode, the same
answer the case's llvmpipe and NVIDIA rows hold at the same sites:
- both cases announce srgb-texel-decode on RADV;
- the U32 difference is between f32 bit patterns, not codes: the
round trip's first element is Metal 0x3C840841 (66 / 4095) against
our 0x3C830000; the held read's are Metal 0x3D080881 (136 / 4095)
against our 0x3D0798DA, the transfer of code 51, and 0x3BB80B81
(23 / 4095) against 0x3BB7AD6B, the transfer of code 17;
- RADV stores no sRGB format (its optimal tiling of B8G8R8A8_SRGB and
R8G8B8A8_SRGB lists no STORAGE_IMAGE, read with vulkaninfo, job
m3-max-4052), so the held texture is read through its UNORM alias
and decoded through the device's Pow, as on the other two venues.
The rows are scoped to RADV: the decode is the driver's compiler's,
not one Mesa build's. CONFORMANCE-COVERAGE.md re-derived (2600 rows).
(cherry picked from commit 6efa9157436862f6e6d990f298f53fd84ab11b06)
The 5080 replay of the two-plane YCbCr cases (potluck b5080 entry
replay-replay-nv-ycbcr-072438 at 394b4db3f6) read twenty lines not in
known-gaps.tsv: ycbcr-gathers-{edge,zero,white,repeat} at
case/samples/{420v,x420}/{float,half} and ycbcr-minify-band-{x,y} at
case/samples and case/samples/ends, each a digest Metal's and ours
differ at. The digests are the ones the 5080 answered at 10012a618f.
They are the device's native answers. The 5080's memory is not the
host's, so the runtime binds the texture's image of converted texels
rather than reading the planes in place (lavapipe and MoltenVK read
them in place and match Metal at every one of these sites):
- the 8-bit 420v surface: the device converts the format itself
(ycbcr_device.rs; NVIDIA 615.71.09 enables samplerYcbcrConversion
and its optimal tiling of G8_B8R8_2PLANE_420_UNORM reports
SAMPLED_IMAGE, TRANSFER_DST and MIDPOINT_CHROMA_SAMPLES, read with
vulkaninfo, potluck job m3-max-3911), and samples are its own
filter: announced as ycbcr-filter-not-exact and device-sampling;
- the 10-bit x420 surface and the minify bands: the device does not
convert it (RuntimeDriverDefect::TenBitCodesReadAsWords names
NVIDIA), so the texels are Metal's fixed-point conversion and only
the filter is the device's: announced as device-sampling.
Both notes are suite native notes, which loosen no value
(replay::NATIVE_NOTES), so each site is a row naming its note. The
sites compare by digest, so which lanes moved is not separated, and
the rows say so. CONFORMANCE-COVERAGE.md re-derived.
(cherry picked from commit 05a4e4d3994ef83845ca55417f480aa0aab3606d)
Two of the conformance ledger's every-venue rows, both of the runtime's
archive surface.
binary-archive-mesh-adder: BinaryArchive had three of Metal's four
pipeline adders. add_mesh_render_pipeline_functions
(addMeshRenderPipelineFunctionsWithDescriptor:error:) makes the state as
new_mesh_render_pipeline_state does with the default options, answering
its error, and keeps the descriptor's archive key (metal_key::mesh). A
mesh creation compiles its pipeline whole and looks in no archive, so
the add keeps no compiled artifact. Under FAIL_ON_BINARY_ARCHIVE_MISS a
mesh creation, which every listed archive missed before, now hits an
archive holding its key (binary_archive::mesh_missing). Which fields
Metal keys a mesh pipeline by is not measured, so the key holds every
field of the descriptor: a creation hits only an add of an equal
descriptor, where Metal's hits too, and one differing in a field Metal
does not key misses here where Metal's may hit, as the add's and
new_mesh_render_pipeline_state's docs say.
binary-archive-sources: Metal takes a metallib as an archive (the case's
M3 Max recording); container::read refused it as no archive of ours. A
file that parses as a metallib (Library::from_metallib, container tags
alone) now loads as an archive holding nothing: its lookups miss and it
serializes as one nothing was added to. What Metal's archive of a
metallib holds is not measured; new_binary_archive's doc says so.
The suite's runtime side answers the mesh add through the new call. The
ledger's two rows go; api_signatures.tsv gains the method, and
METAL-COVERAGE (coverage.tsv) marks the call implemented. Tests: unit
tests the_mesh_key_holds_every_field_and_a_lookup_names_the_mesh_function
and a_metallib_loads_as_an_archive_holding_nothing; lane test
a_mesh_add_is_found_by_its_own_descriptor_and_a_metallib_loads_as_an_
empty_archive (hit, miss before the add and for another color format,
the add's error, serialize and reload, the metallib's miss and nothing
to serialize). Verified by those tests and a whole lavapipe conformance
replay (see the tip report).
(cherry picked from commit adadb73f7c2063341e1dbe54fe887a5ceddf86b7)
Metal resolves separate Depth32Float and Stencil8 textures with the
depth filter Min or Max beside the stencil filter Sample0, each into its
own resolve texture. On a device with no MIN or MAX depth resolve mode
(lavapipe) the runtime draws the picked depth after the pass, but a
split resolve (aspects resolving into different textures) refused any
drawn aspect NotImplemented(DepthStencilResolve): the draws wrote the
first step's scratch image, whose copy takes that step's aspect alone.
Now a split resolve draws its drawn aspect into that aspect's own
resolve texture (or a scratch image copied there, Destination::attach),
held as the resolve's drawn_into, which drawn_target prefers; the other
aspect resolves in its subpass step as before. Both aspects drawn, each
into its own texture, stays refused. The image separate textures render
through is made sampled where such a resolve may be drawn
(resolve::may_draw, which shares the filter-to-mode choice with
depth_stencil through aspect_modes), since the draws read its samples.
The ledger's two llvmpipe rows of resolve-stencil-under-depth-filters
(Sample0 under Min and Max) go. The lane test
split_depth_and_stencil_resolves_are_metals now expects every case but
both-aspects-drawn to be built and to hold Metal's answers; before this
change sep_min, sep_max, two_min, two_max and slices_max were refused
on lavapipe. Verified on lavapipe: the lane test and the conformance
replay (see the tip report).
(cherry picked from commit c2b4cbc80bf7f8f209d02ecbd5e5aec186b04d96)
python3 -I scripts/conformance-coverage/coverage.py: one more case module
and recording, and setVertexBuffer:offset:attributeStride:atIndex: on the
render encoder now exercised by the Metal leg (812 of the reachable).
(cherry picked from commit dce4bd753c2e298f3b1cbb84b5c808d2cabb85b1)
tile-simd-blur-columns and -rows on llvmpipe compared the tile state's
maxTotalThreadsPerThreadgroup, Metal's 1024 against the runtime's 960,
as a divergence of ours, while the same case's 32x32 dispatch, refused
typed with Feature::LocalSize and a Capability::Limit, already read as
the device's gap (a_dispatch_the_device_cannot_take_is_the_devices_gap).
960 is lavapipe's: its emulated 32-lane simdgroups hold 960 threads of
the blur's pipeline, and the runtime reports the device's lower limit
by contract (pipeline/tile.rs).
Now the tile_threadgroups family, where the device refused a dispatch
Metal ran of the state as its gap and the state's descriptor states no
limit, states the state's maxTotalThreadsPerThreadgroup site as that
gap (Sites::device_gap), and the comparison reads a value site our side
stated so as a DeviceGap instead of a divergence (compare.rs, before
any allowance, as a refused site's gap). A state whose answer matches
Metal's records nothing; an unstated difference still diverges.
Metal's side never states one: its failures carry no lacks.
The two llvmpipe ledger rows go; the cases now read lacks-feature
there. Test: a_getter_our_side_states_is_the_devices_limit_is_the_
venues_gap holds both directions (stated reads lacks-feature, the same
answer unstated reads divergent, a stated site matching Metal exact).
Verified by the conformance unit tests and a whole lavapipe replay
(see the tip report).
(cherry picked from commit ffa0411fb87a3dc61ca14a5418b16a60e06c3fa2)
ComputePipelineMetalInfo::static_threadgroup_memory_length answered, on
a device that emulates simdgroups, the declared arena plus the scratch
of the most threads (32768 on lavapipe for compute-threadgroup-simd-
scratch, whose kernel declares 24 KiB), and elsewhere the kernel's
static part plus a predicated walk's vote word. Both additions are
ours: Metal's staticThreadgroupMemoryLength is the static part of the
kernel's own layout (KernelFacts::static_threadgroup_bytes), and the
getter now answers exactly that.
The planner keeps counting the scratch and the vote word in each
dispatch's total (bind::plan::compute: the arena from
RuntimeFact::SimdgroupEmulation, the vote beside it, the scratch rule
per region), so a dispatch whose threadgroup lengths fit beside the
reported length but not beside the scratch is refused
ThreadgroupMemorySize, the device's gap, where before the inflated
getter kept a well-behaved client from asking. The emulated tests
check both: region_k reports 0, a Metal client's remainder beside it is
refused at the most threads, and a region that fits beside the arena
and the scratch runs; barrier_k reports its own 31 KiB.
The compute-threadgroup-simd-scratch llvmpipe row goes. The runtime
getter's doc names the refusal. SEMANTICS_VERSION 1980 -> 1982 (1981 is
rows2's).
Verified: runs next (targeted translator tests, lavapipe replay).
(cherry picked from commit dd3d0a893bf900fbf11cb885f5fb9a7b7cfd9055)
python3 -I scripts/conformance-coverage/coverage.py: the ledger count
falls from 2619 to 2605 (the four attribute-stride rows, the three
slice-past used-size rows and the seven move rows), the slice-past row's
note follows the ledger, and the sparse families count the
allowGPUOptimizedContents call the move rows now make.
Found by tests::the_conformance_coverage_document_is_what_the_sources_derive
failing at fcfdf2bcb1 (job m3-max-3620, the only failure of 1,019).
(cherry picked from commit cc6e6740161cc876cfdf2f8ccc008088de24970b)
With the shadow held over input attachments (and the input-form draws
kept for recording again), the lavapipe xr replay on msi (m3-max-3561,
at 43b2d2dd54; 109 xr-* cases) answers the 26 group-1 texel sites
exactly as the RTX 5080 does, and 22 of them as the M3 Max does (the
four xr-gradient-*blended* rows differ from the M3's by the device's
arithmetic, as the 5080's do):
- xr-gamut-bgra10xr-{over,straight}-{half,float}-{x1,x4}, the sRGB twins
and the x4-stencil pair, xr-masked-bgra10xr{,-srgb}-rgb-over,
xr-masked-bgr10xr{,-srgb}-red-over and
xr-gradient-bgra10xr{,-srgb}-blended-{x1,x4}: each row's answer is the
measured one, and its text the 5080's (the device's blend arithmetic,
encode and resolve, in replay::NATIVE_NOTES or announced and
declared), saying the function blends over the input attachment and
reads and writes the shadow beside it in the interlock. None is our
gap any more.
- The four notice rows of xr-masked-bgr10xr{,-srgb}-{red,blue-green} go:
extended-range-blends-stored-codes is no longer announced, as the pass
holds the shadow.
The gamut and masked cases' allowance docs no longer say lavapipe holds
no shadow. CONFORMANCE-COVERAGE.md regenerated.
Verified: the msi replay above (lavapipe, LLVM 23.1.1). The whole
replay on the homelab lavapipe (LLVM 23.1.4) runs next.
(cherry picked from commit cd910afb74e5faf67a0e6affdea77ced18205747)
MTLComputePipeline.h documents -[MTLComputePipelineDescriptor reset] as
"Restore all compute pipeline descriptor properties to their default
values", and maxTotalThreadsPerThreadgroup as "If it is not set,
returns zero". The runtime's reset is ComputePipelineDescriptor::new,
every field at its default. Metal's reset on the M3 Max (macOS 27.0.1)
keeps threadGroupSizeIsMultipleOfThreadExecutionWidth,
maxTotalThreadsPerThreadgroup and requiredThreadsPerThreadgroup as the
program set them (true, 96 and 8 by 6 by 2 in compute-descriptor-reset),
while the tile and mesh descriptors' resets restore every field on the
same machine. The owner's decision: the header's contract is Metal's,
and the compute descriptor's kept fields read as one release's defect.
docs/API.md section 10 (Kernels) states it. compute-descriptor-reset
loosens its five thread-shape sites to the runtime's default alone
(AnyOf the default, so Metal's kept value is still a divergence),
justified by that entry, and its five known-gaps rows go. A module test
holds the entry, the five paths and the defaults; the other two shapes
loosen nothing. CONFORMANCE-COVERAGE.md regenerated.
Verified: the conformance suite and clippy run on this branch next.
(cherry picked from commit 3dbd14b8fa45f6fcb836603b32aace527d009c0e)
The 5080 replay at 3e5ef48250 (b5080 entry replay-r4-nv-043226, whole
suite, 1228 verdicts) reported three ledger mismatches beyond the 20
known ycbcr gather and minify sites:
- read-write-tier-held diverges at BGRA8Unorm_sRGB and RGBA8Unorm_sRGB
(192 elements, largest 64919). The 5080 stores neither sRGB format,
so the heap views a held texture through its UNORM alias and the
function decodes by the MSL transfer through the device's Pow, as on
lavapipe; srgb-texel-decode is announced for the case. Two rows, in
the sRGB decode section, whose header now names both venues and the
held alias read.
- norm-storage-fields-bgr10a2unorm no longer refuses hsw_held/dispatch
on the 5080 (the heap's storage aliases, f4c1fbd170): its row goes.
The held BGR10A2Unorm texels match Metal on the 5080 (no row), and so
do the RGB9E5 attribute reads: the one RGB9E5 site left,
attribute-format-fetches' attribute3/Half2, is the listed half NaN
quieting of another attribute.
Verified: the replay output above; coverage regenerated with
scripts/conformance-coverage/coverage.py. Not verified: a 5080 replay
at this commit.
(cherry picked from commit e127ed348db352da2a4a4fa97fecd8f836ea867f)