9b60da4bee03514df7f4ef5a1aefa8f9ecd28bca
129
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
53e2a6be78 |
Complete a command buffer that needs no GPU work without submitting it
What: a command buffer whose encoders recorded nothing and whose one batch waits for and signals no event and no binary semaphore (so presents no drawable) is taken by the scheduler with no vkQueueSubmit (State::needs_no_gpu, decided from what it recorded), once it leads its logical queue's line, no group is held and no first work of the device's waits (that still rides in it, as before). Everything else its last batch's taking does is kept: kernel times, scheduling (by a hang's thread where one makes it), submission handlers, heap tickets, own textures, holds. Its batch is watched at its VkQueue's last submitted value (Completion::watch_unsubmitted), so it completes in its queue's order, after the work submitted before it, from the turn that finishes that work. Where its queue reached that value already and no turn is under way, no waiter is woken: the thread that took it (the scheduler's after its round's submission handlers, or a thread about to block, after its pass) makes the turn once it holds no lock (Completion::turn_owed), running only the transitions a thread there may run. A turn no longer wakes a parked waiter whose queue it emptied (it has nothing to arm for; the next watch or a stop wakes it). New WorkCounts: command_buffers_unsubmitted, completion_turns_where_taken. GPU-time placement is unchanged (NoWork: a point at the later of its kernel end and its queue's latest end), which the new conformance case shows matches Metal's booleans. Why: the consumer commits empty command buffers as sync points; each was a vkQueueSubmit, a waiter wake and a turn. Metal completes them without its GPU (M3 Max, macOS 27.0.1: idle, commit and wait 15 us p50, GPU interval 0 to 0.3 us, 1 to 9 us after kernelEndTime; behind a fill, after the fill, 65 to 135 us after its GPUEndTime). Conformance: new case empty-command-buffers (statuses in handlers and after the wait, the four timers' signs and orders, GPU interval one point, behind a 64 MiB fill: completed-handler order, the fill's status in the empty one's handler, kernel and GPU times against the fill's), recorded on the M3 Max (5 of 5 runs identical), cost and contrast and times written; replayed on the M3 Max over MoltenVK: announced (only gpu-times-from-host, declared). completion_turns_where_taken is reported, not gated (which thread made the turn is a race with the GPU); the M2 handler counters are classified with the submission region. Coverage doc regenerated. The lane test empty_command_buffers_submit_no_command_buffer becomes empty_command_buffers_make_no_submission (0 submissions, 8 unsubmitted). Verified on the M3 Max (MoltenVK 1.4.2), --cfg m2v_gpu: tests::unsubmitted (3 tests; idle: 81 unsubmitted, 0 queue submissions, 40 of 40 waited ones finished by the taker, 0 waiter wakes); negative control with the path disabled: 0 unsubmitted, 81 submissions, 40 waiter wakes, both empty tests fail. The whole runtime GPU suite: 1506 of 1507, the one failure video_interop::a_raw_submission_is_ordered_by_a_shared_event_s_semaphore read its event's signal already Reached under the full suite's load, and passed 6 of 6 alone (its command buffers wait and signal, so never take this path). The conformance crate's tests 1010 of 1010; clippy (workspace, all targets and features; and runtime + validation under --cfg m2v_gpu) clean. Not run here: the validation lane tests (commit_work, first_use, gpu_times) and lavapipe. Owed on development: conformance cost bounds of cases with empty command buffers now read fewer queue_submissions and a nonzero command_buffers_unsubmitted (a re-bless). (cherry picked from commit 304bdd2a24e31f7aeb3045e33b9d21209ca7df97) |
||
|
|
4b194d24af |
Write Metal's encoding through compressed BGRA10_XR blits under an exact-answers switch
What: a new DevicePolicy switch, `extended_range_blits` (ExtendedRangeBlitPolicy::Kept, the default, and ::Canonical, which `exact_answers()` selects). Under Canonical a blit or fill through a BGRA10_XR or BGRA10_XR_sRGB texture Metal keeps losslessly compressed writes Metal's canonical encoding: each 16-bit field's low six bits cleared and, for a blit, the alpha code clamped to [384, 894]. - bind::extended_canonical_module, a compute kernel that rewrites a texel range's words in place (bind/extended_canonical.rs, with extended_range_canonical as its reference and interpreter tests); the runtime owns it as OwnedModule::ExtendedCanonical. - The runtime (extended_canonical.rs): after a blit into such a texture, or out of one into another texture of the format, the written regions go out to a scratch buffer, one dispatch per region rewrites them, and they go back; after a blit out of one into a buffer, or into a texture over a buffer's bytes, one dispatch rewrites the words in place at the layout's rows. A fill's texel is encoded before it is written (fills clear the low bits alone: Metal's fill keeps alpha codes 4 and 1023 on the M3 Max under 27.0.1). A buffer the device cannot bind (offset or pitch off 4, past maxStorageBufferRange) or a texture over a buffer whose rows share bytes keeps the bytes and announces extended-range-bits-kept, as under Kept. Under Canonical the note is not announced for the blits it makes exact. - copy_from_buffer_to_texture's body moved into buffer_into_texture, which a fill's row copies call with Writer::Fill (so a fill announces its own wording and is never rewritten as a blit). Why: Metal's GPU blits through the compression rewrite these bits (measured on the M3 Max under macOS 27.0.1, plain Metal, xr_matrix: compression iff allowGPUOptimizedContents, shorter side >= 16, neither ShaderWrite nor PixelFormatView usage; every storage mode alike; CPU copies keep the bytes; fills clear the low six bits only). The device's copy keeps the bytes. It is the runtime's choice, not a native answer (no device arithmetic is involved: a copy's bytes), so per rule 1 the fast form stays the default and the exact form is the switch. Ledger: FAST-PATHS row (fast defaults), API.md section 1 bullet and the extended-range-bits-kept catalogue entry, the Degradation doc, the conformance Policy doc. Known gaps: the 28 rows of compressed-blits-bgra10xr and -srgb (7 sites x 2 formats x Apple M3 Max and llvmpipe) dropped: under the suite's exact policy those sites now hold Metal's bytes. RUNTIME_VERSION 1728 -> 1731 (a run under the exact policy writes other bytes). Also fixes forward a clippy needless borrow in engine_arith's pack test (7a99b93af2). Verified (M3 Max, macOS 27.0.1, MoltenVK 1.4.2; and lavapipe in scripts/linux-gate, arm64, LLVM 21.1.8 128 bits): - runtime_lane::compressed_blits on MoltenVK: both tests pass; the new extended_range_blits_write_metal_s_encoding_under_the_canonical_policy checks every direction, level 3 into padded rows, Shared CPU/blit mixes, texture to texture both ways, a fill of a compressed and a plain texture, and a copy into a texture over a buffer with padded rows, under both values (Canonical: Metal's bytes and no notice; Kept: the bytes and the notice once). - conformance replay of the four compressed-blits cases on MoltenVK: exit 0, the ledger as edited (bgra10xr and -srgb `announced` only for staged-texture-copy/shadowed-texture). - the full `conformance replay --cpu` on lavapipe at 68074019a3 and at this change: the only difference is the 14 llvmpipe sites of the two XR cases, which no longer diverge (divergent 244 -> 242, exact 458 -> 460); the 265 other ledger mismatches of that arm64 venue are the same at both (it is not CI's amd64 lavapipe). - 154 touched validation lanes on MoltenVK (blits, fills, extended-range, NaN, pack, padded, rotated, no-copy, two-plane heap): 143 passed, 10 failed, 1 ignored; the same 10 fail with the same messages and the same differing texels at 68074019a3 (pre-existing). (cherry picked from commit 612ff50b86bc29515b158d9b2596b14a45431467) |
||
|
|
575ac2b103 |
Read a pixel-coordinate sample's texel as Metal's sampler does
A `coord::pixel` sampler handed the device the coordinate divided by the texture's size. At a texel edge whose quotient is inexact the device's normalized sampler read the texel before it: on the consumer's 258x258 matrix 28 of 1042 nearest clamp-to-zero and clamp-to-border cells on MoltenVK and up to 500 on an RTX 5080. Metal reads `floor(x)` for nearest and quantizes `x - 0.5` to its 1/256 grid for linear filters and gathers. Now, decided from the sampler's state and the access's structure: - A constexpr pixel sampler that Vulkan's unnormalized sampler can state (one filter, no mip filter or anisotropy, clamp to edge, zero or border; a 1D or 2D non-array image, no comparison, no status read) samples and gathers through the device's own unnormalized sampler at the coordinate itself, on a view of level 0 (`CombinedSampler::unnormalized`, `SamplerDesc::unnormalized`). A linear sample's or gather's constant offset folds into the coordinate; a nearest sample's offset is applied to its texel's centre (`floor(x) + 0.5 + k`). - A constexpr nearest pixel sampler the unnormalized form cannot take (an array, a mirror mode) samples at its texel's centre over the size, `(floor(x) + 0.5) / N`, which the device's normalized sampler reads as that texel exactly. - A runtime slot's sampler takes the centre where a new pipeline constant, `SpecKey::NearestPixelSampler`, says the bound state is a nearest pixel sampler (1 only for those, so normalized states make no new pipeline); an argument buffer's sampler tests its word (`SamplerWord::nearest_pixel`, which replaces `exact_fetch`). - Linear samples and gathers through runtime or argument-buffer samplers, arrays and 3D, comparisons, level queries and status reads keep the scaled coordinate and its note: their state is unknown where the shader is made, or Vulkan's unnormalized sampler forbids them. `PixelSamplerScaling` is now recorded only where a scaled form remains; `DeviceDenormals` where a centre's `floor` may read a subnormal coordinate as the device does. The pixel_samplers lane also asserts Metal's answer for every constexpr and nearest configuration on MetalSampler devices. The conformance case declares `pixel-sampler-scaling` for its linear cases alone, and the llvmpipe ledger rows follow the run: two `rgba16f-nearest-mirror` rows are gone (Metal's answer now), seven take the new digests. `SEMANTICS_VERSION` 1945, `ARTIFACT_FORMAT_VERSION` 482. No `RUNTIME_VERSION` bump: an unchanged artifact (no unnormalized sampler, no new constant) binds and runs as before. The new fixture `px_edges` (own MSL, through regen-air-fixtures) samples every form at texel and block edges, quarter offsets and each border colour on three NPOT sizes, and the new `runtime_lane::pixel_edges` holds each nearest cell to the CPU's `floor` rule on every device and every probe to Metal's digests on MetalSampler devices. Fixture comments in `sampling` and `sampling_completion` no longer say the coordinate is scaled (their AIR bodies are unchanged). Verified on the M3 Max under MoltenVK 1.4.2: the consumer's matrix compared with Metal's results, 0 differing cells on every kernel and size (28 of 1042 before on three kernels); lavapipe 0 before and after; `runtime_lane::pixel_edges`, `pixel_samplers` and `pixel_downscales` pass; conformance replay of the 23 pixel cases holds the ledger on MoltenVK; on arm64 lavapipe the whole set's replay departs from the parent's ledger, beyond what the parent's own replay does, at exactly the nine rows edited here (the answers are the report's own). Core suite 4988 passed; validation suite under `--cfg m2v_gpu` passes the new and pixel tests, its other failures fail the same on the parent commit; conformance 1007 passed; goldens, hashes and inventory blessed. Release translation of every px_edges and px_samplers kernel on four profiles: slowest 0.08 s, largest peak 6 MB. (cherry picked from commit 888ad9bae9f0aaaf769360740e1dd16817245ca4) |
||
|
|
ddccbfac5a |
Bump RUNTIME_VERSION to 1722 for ASTC passes, storage slots and 4x2 and 8x4 footprints
What: RUNTIME_VERSION 1721 -> 1722; the runtime-sources pin recomputed on this tree (3314ddbb...); api_signatures.tsv blessed (Degradation::AstcStorageNeutral and PlanDiagnostic::AstcStorageNeutral added); docs/CONFORMANCE-COVERAGE.md regenerated (one ledger row fewer, one more module declaring a notice); `cargo fmt` of the footprint case's allowance. Why: a run of an unchanged artifact and plan now does something else: a pass over an ASTC attachment drops it instead of refusing, a storage slot over an ASTC texture binds a neutral and announces `astc-storage-neutral`, and the 4x2 and 8x4 footprints make textures. docs/REFUSALS.md and docs/METAL-COVERAGE.md regenerate unchanged. Verified: `signatures.py --bless`, `refusal_surface.py`, `metal-coverage/coverage.py --check`, `conformance-coverage/coverage.py` on this tree (rebased onto fbc086020f). (cherry picked from commit a37ab781870cf9d3c1e9672026f9773f3f6dfdf2) |
||
|
|
81441ca877 |
Regenerate the surfaces for pull-model interpolation
- RUNTIME_VERSION 1719: the runtime answers supportsPullModelInterpolation and refuses a draw reading an interpolant at a sample at custom positions. - scripts/metal-coverage/coverage.tsv: supportsPullModelInterpolation implemented (DeviceProperties::supports_pull_model_interpolation); docs/METAL-COVERAGE.md and docs/CONFORMANCE-COVERAGE.md regenerated. - docs/REFUSALS.md regenerated: feature::PullModelInterpolation and gap::InterpolateAtSampleWithPositions (reach rows in reach.tsv). - crates/metal2vulkan/tests/api_signatures.tsv blessed: additions only but Query::ALL's length (8 to 9) and value. - crates/metal2vulkan-runtime/README.md: the query and what differs. - runtime-sources pin recomputed (pin-compute.py). Verified: refusal_surface.py --check, signatures.py --check, metal-coverage --check and conformance-coverage --check all current. (cherry picked from commit 2dcbbf39b6e5caeb3e87079d7f2f36540ceb0dd0) |
||
|
|
ceb666187a |
Answer Metal's supports32BitMSAA from the device's own textures
The runtime had no answer for supports32BitMSAA (METAL-COVERAGE listed it missing), so the consumer passed None through. Metal's answer promises a multisample texture of each 32-bit integer format and the resolve of each 32-bit float one; the M3 Max, a Radeon Pro 5300M and a UHD 630 all answer 1. What the runtime did before was read first: a multisample texture of each of the nine formats is planned as any texture is (image_plan), within the device's limits for the image (vkGetPhysicalDeviceImageFormatProperties2), and refused as a count its format lacks; draws and texture2d_ms reads of it, the float formats' AVERAGE resolves (Metal's own on MoltenVK, device-rounded-resolve elsewhere) and the refusal of an integer resolve (ResolveFormat, as Metal stops it) were all in place. The render pipeline, sample planes and interleave all take a format's own counts beside framebufferIntegerColorSampleCounts. Nothing was wrong; the query was missing. Device::supports_32bit_msaa answers yes where the device makes every texture and resolve the answer promises, each probed exactly as pixel_format_capabilities probes a capability (the probe closure of families::formats::answers is now a function both share): the texture sample counts hold 4, a 2D multisample RenderTarget|ShaderRead texture of each of the nine formats is made at every count above 1 the textures take, and each float format resolves (its Resolve capability). A device method, as supports_family is, because it reads the device's per-format limits: Vulkan floors an integer format at framebufferIntegerColorSampleCounts, one sample on RADV and lavapipe, while their 32-bit integer formats each take 1 to 8 (1, 4, 8 on lavapipe), as the venue profiles' captured per-format counts state. Tests: - runtime tests::msaa_32bit: every committed profile pinned, with the limits it states (a venue profile's own per-format color attachment counts, else Vulkan's floors). Yes on every venue (moltenvk-m3, both 780M RADV, both gate lavapipe, the ANV and NVIDIA ones) and on the Intel and NVIDIA profiles whose floors cover the counts; no on amd-rdna2/rdna3-radv, lavapipe, lunarg-desktop-baseline-2023, swiftshader and vk12-floor (R32Uint at the lowest count, naming FramebufferIntegerColorSampleCount), and roadmap-2022 (no 4 samples). A yes agrees with each format's Msaa and float Resolve capabilities; the rule needs 4 and every count, and a missing resolve texture says so. A negative control that probes 4 samples alone fails two of them. - validation runtime_lane::msaa_32bit (--cfg m2v_gpu): the answer is what the device makes; R32Uint and RGBA32Uint targets at 2 and 4 drawn at sample rate hold every bit, read back through texture2d_ms<uint> (Metal: every channel as written); an RG32Float 4-sample target keeps its samples and resolves to the probe's Metal texels, exact where the driver's average is Metal's; an RGBA32Uint resolve is refused. Verified: runtime tests msaa_32bit, families and capabilities, the metal_coverage and runtime-sources pin tests; on the M3 Max (MoltenVK 1.4.2, macOS 27.0.1) through the Mac GPU lock, runtime_lane msaa_32bit, families and capabilities 7/7: supports32BitMSAA true, counts [2, 4], nothing refused, 0 integer channels differ, 32 of 32 resolved channels as Metal's, device-rounded-resolve not announced. clippy with all features and with --cfg m2v_gpu, rustdoc -D warnings, refusal_surface --check (no refusal moved), api-signatures (one method added), METAL-COVERAGE and CONFORMANCE-COVERAGE regenerated (the item now implemented, not yet exercised by the suite). RUNTIME_VERSION 1718 (a new answer); runtime sources re-pinned. (cherry picked from commit 2376157b3bf7bf99221579f42a795ef351b8144c) |
||
|
|
bf3ce3813c |
Read Core Image kernel libraries and split whole aggregate accesses
A Core Image kernel library (metal -fcikernel, metallib -cikernel) is a
metallib of file type 1 whose kernels (!air.ci) are listed as function
TYPE 5 over one shared module. The container refused the file type
(Unsupported LibraryKind(1)), so newLibraryWithData: failed where Metal
succeeds; the consumer's graphics-kext lane hit it on Core Image's own
helper library in a macOS 26 guest, so every Core Image path stopped
there.
What Metal answers, measured with kernels written from scratch on an M3
Max under macOS 27.0.1 (probe programs over Metal's API and objc's message
log of a CIColorKernel render):
- newLibraryWithData: takes it as MTLLibraryTypeExecutable; functionNames
is empty; the private externFunctionNames lists the kernels in the
reverse of the table's order (libraries of two and four kernels);
- newFunctionWithName:, newFunctionWithDescriptor: and the private
newExternFunctionWithName: make each kernel with functionType 4 (no SDK
enumerator; its description prints "Unknown"); newExternFunctionWithName:
answers as newFunctionWithName: for any library, a kernel of an
executable one included, and nil for a missing name;
- a compute pipeline made from an extern function fails ("Function tint
was not found in the module");
- Core Image fetches each kernel and its own helpers with
newExternFunctionWithName: and links them on the CPU, in Metal.framework's
base device class, into an ordinary executable library holding one
kernel, ciKernelMain, of which it builds a plain compute pipeline.
So now:
- container: file type 1 is read (executable; its functions may share one
bitcode range, hashed once, as a dynamic library's); TYPE 5 is the new
FunctionStage::Extern, no stage: the ABI cross-check refuses it as a
mismatch, Library::Function compiles it as no entry (EntryNotFound,
available 0). Unobserved file types stay LibraryKind refusals.
- FunctionType gains the private enumerator Extern = 4
(regen-metal-enums PRIVATE); reflection maps Extern to it.
- runtime Library: function_names leaves extern functions out;
extern_function_names (reverse table order) and
new_extern_function_with_name are new.
ciKernelMain itself was refused next: Lowering(Arith) at its first
load, `load [4 x <4 x float>], ptr addrspace(2)`, a whole array loaded
from the constant buffer and passed by value to a helper. Lowering reads
and writes buffer and threadgroup memory a scalar or vector at a time.
The new canon pass `aggregates` (after SCCP, beside the other expansions)
replaces each non-volatile, non-atomic load or store of a pointer-free
array or struct in device, constant or threadgroup memory by its members'
accesses in layout order (a getelementptr i8 at the member's distance, the
access's alignment lowered to what the distance allows, joined by
insertvalue or split by extractvalue), at most 256 members, 8 deep.
Thread memory, pointer-holding aggregates (handles), volatile accesses
and larger types stay whole as before. The same-type pointer bitcast
beside the load was never the problem (verified alone).
Public surface: metal2vulkan-air FunctionStage::Extern; metal2vulkan
FunctionStage::Extern and FunctionType::Extern; runtime
Library::extern_function_names and new_extern_function_with_name
(api_signatures blessed: 5 added, none changed or removed). devtools
gains core_image_metallib. The metal-enum generation now records the
macOS 27.2 SDK (the host's Xcode); no SDK value changed, only Extern was
added. LibraryKind's doc and reach note name what it refuses now.
No cache version moves: file type 1 and aggregate accesses outside thread
memory were refused before, so no key reached them, and
golden_hashes_match_the_table passes unchanged (every public fixture
assembled: this Mac's Xcode 27.2 now has its Metal toolchain). The
runtime-sources pin moves (runtime library.rs): re-pinned here to
23766690fd75227c5333e976bfc1fdfafa6ff78f43e0c5ba8fa5183574cd9371.
Verified (M3 Max, macOS 27.0.1):
- Metal versus this tree's runtime on MoltenVK: Core Image's linked
ciKernelMain for a tint color kernel and for a sampler kernel (both
from-scratch CI kernels; the linked libraries captured from Metal in
scratch and deleted after), same constant buffer, source texture and
sampler, 4x4 RGBA32Float target: byte-identical texels, the early-out
column untouched on both. The parent tree answers FALLBACK (Lowering
Arith) for both. Release CLI: 0.01-0.03 s, 11 MiB each.
- Release CLI, parent vs this tree, largest public fixtures
(hfb_filter_bank render pair, tns_mm_flags), three runs each:
0.12-0.13 s vs 0.12-0.16 s and 0.05-0.06 s vs 0.04-0.05 s, 27 MiB both
(runs beside a test suite; the same within noise).
- New tests: canon aggregates (split loads, stores with nested arrays and
lowered alignments, threadgroup; volatile, pointer-holding and
300-element aggregates stay whole), an engine test running a
ciKernelMain-shaped kernel on the CPU interpreter on three profiles,
core_image_libraries (container types, stages, shared hash, functionType
4, EntryNotFound), and a runtime device test on MoltenVK (names, extern
names, both lookups, pipeline refusal, an executable library's kernel
through the extern lookup). Negative controls: the split and execution
tests fail with the pass disabled; the library tests fail with file
type 1 refused.
- cargo nextest -p metal2vulkan -p metal2vulkan-air -p metal2vulkan-runtime
-p metal2vulkan-devtools --all-features: 4927 passed (golden hashes and
the metal-as fixture parts included); -p metal2vulkan-validation
-p metal2vulkan-conformance: 2369, all passed after the re-pin; doctests
ok; clippy --workspace --all-targets --all-features -D warnings and the
runtime's under --cfg m2v_gpu: clean; rustdoc -D warnings and
scripts/api-docs: clean; REFUSALS, METAL-COVERAGE and
CONFORMANCE-COVERAGE re-derived (MTLFunctionTypeExtern is listed as not
yet compared by a conformance case). Not run: a corpus translation
census, and the device suites beyond the new runtime test.
|
||
|
|
7d1323ebcc |
Convert extended-range, padded and bfloat texels by the device's arithmetic
A read is float(c - 384) times the f32 nearest 1/510 (a padded code's float(c) times 1/1023), a write RoundEven(clamp(v)*510)+384 (padded *1023), an sRGB twin's colour the MSL transfer by the device's Pow on the magnitude, a half result the device's narrowing, a bfloat code its bit shift with NaNs as computed. Metal's correctly rounded quotients, exact-product rounding, ties-away half rounding and its extended/padded sRGB tables leave the shader path: extended_range/table.rs, R10X6_SRGB_DECODE_STEPS, round_exact_product(_lanes) and the plan's table fields are deleted. Each such module records DevicePackConversion; FAST-PATHS' air.pack row and API.md's catalogue state the bounds (one f32 ulp, one code, half a 2^-13 sRGB step, R10X6_SRGB 1.64 steps). The host-side clear_texel and the bicubic code still read extended_srgb.rs's tables, so on an sRGB twin a clear and a shader write can differ by one code. Verified: 331 touched lib tests; clippy plain and m2v_gpu; rustdoc; conformance ledger tests; M3 replay of 89 extended-range cases (exit 0, 276 ledger rows, +254/-57 against development); validation heap_extended on the M3 (6/6); the new tests fail with FDiv decode. Golden: 346 cells in 20 heap/argument-buffer subjects move (blessed on development). Translation words of an sRGB twin's read 4433 -> 588, write 5540 -> 632. One work packet, landed as 2 commits on archive/development-linear-2026-10-29: 8acec5a4a2, then 96d8394995 (the re-pin). |
||
|
|
63859d8cc1 |
Sum emulated filters' taps in the device's arithmetic
Rule 1: where the device has a native form it is the only form. The emulated filters reproduced Metal's datapath bit for bit: a 2^-16 Catmull-Rom weight table, two-word integer sums truncated onto grids and rounded half up, exact quotients, ties-away half rounding, a 12-bit sRGB grid snap, 64ths of a level and 256ths of a blend, and the anisotropic filter's piecewise log2 and chord exp2. All of it is gone. Bicubic (lower/sampler/bicubic.rs, bicubic/routines.rs): - One routine, `Plane::sum`: Catmull-Rom weights computed in f32 from the fraction (vec4 Horner), the sixteen taps summed by the device's multiply and add, rows then columns; Metal's bilinear rule (32-bit float formats, a level under four texels) is the device's FMix of the four inner taps already fetched; UNORM/SNORM clamps. - 1D: `Line::sum`, the device's FMix of its two taps. - An 8-bit sRGB twin's taps are the device's transfer, not the 1/4095 grid. A half result is the device's narrowing (`narrow::round`), not ties-away. - Kept: Metal's footprint, addressing, mirror pin, filter selection, `Quad::exact` (in-place YCbCr's filter, owner form H, not touched). - Deleted: the weight table routine, the exact/half/accumulated plane and row routines, the block and float-quad routines, their words and specials; metal::bicubic's test-only table and its test. Extended range (lower/sampler/extended.rs): - Linear, 3D and the linear mip filter's level blend decode their taps through xrconv's functions as they are, then FMix in f32 at the f32 fractions; the level weight is the f32 fraction, not 64ths; a half result is the device's narrowing. Bicubic clamps into the format's decoded endpoints. The in-place decode keeps `Quad::exact`. - Deleted: the step tables' callers (steps_of, step, level_taps, half_of) and, in xrconv's extended_range.rs and texel_round.rs, the helpers only they used (STEPS_WORDS, has_steps, steps, step_grids, ratio_by_255_to_f32, normal_half_bits; minimal edits in another lane's files). Anisotropic (lower/sampler/anisotropic.rs): - The device's Log2 and Exp2 replace Metal's piecewise log2, chord exp2 and truncations; the level and spacing are not rounded to 256ths, 4096ths or a 6-bit mantissa. - Each tap is one explicit-level sample: under a linear mip filter the fractional level, which the device's own linear mip filter blends. The two-samples-a-tap form existed because an RTX 3090's blend of a fractional level is not Metal's (1.03 codes off without anisotropy); under rule 1 that blend is the device's. A nearest mip filter's level stays whole (the 3090's anisotropic sampler blends the next level at a fractional level whatever its mipmap mode). - Kept: Metal's length, tap count thresholds, floor(256/n) weights, kappa fit and direction. Notes: PrecisionNote::BicubicFilterArithmetic is reused, broadened to the extended-range linear, 3D and level blends (select.rs records it); AnisotropicFilter's doc names the device's logarithm and blend. No new variant, no ARTIFACT_FORMAT_VERSION bump. FAST-PATHS: the two "not built yet / none known" bicubic rows are now one device-gap row (the device's sum is the form); the known-gaps bullet loses the sRGB grid snap. API.md's catalogue entries rewritten. SEMANTICS_VERSION 1922 -> 1923. Tests: the plane routine's interpreter differential against an f32 Catmull-Rom reference in the routine's order (fails on the old table and integer sum), the line routine's FMix, the routines' word bounds; engine_bicubic against the polynomial within 2^-18 (+ half ulp); extended-range engine tests compare within the filter's bound (`filtered_close`); xr_bicubic's `near` adds Metal's table's deviation from the polynomial (WEIGHTS_BOUND 2.1e-3); anisotropic and bias-reach tests count one sample a tap and two Exp2 per emulation. Lanes and the conformance suite: - runtime_lane::extended_range_samples compares linear samples within `xr_bicubic::filtered_close` (moved to devtools from the engine test, which re-exports it); two_plane_samples holds the digest of nearest cases only (a linear one's values are compared by the conformance suite's xr-two-plane-samples cases). - runtime_lane::anisotropic_filter's bounds re-measured on the M3 Max with samplerAnisotropy withheld: linear 10.375 codes max (mean 0.21), nearest mean 0.82 and 6.7% of channels a code or more off, clamp to edge 6.531 max. Other devices not measured. - conformance: the XR two-plane-samples and extended-range/padded extended-swizzles cases declare bicubic-filter-arithmetic; 32 known-gaps rows (Apple M3 Max) for the linear sites the device's FMix moves. - runtime-sources.sha256 re-pinned: metal/bicubic.rs lost its test-only table and docs; no run's behaviour depends on it. Verified (this M3 Max, macOS 27.0.1): metal2vulkan + devtools suites, 3302/3303 passed (golden_hashes_match_the_table fails: 1001 cells moved, not blessed). Module words of a bicubic sample (ANV Iris Xe profile): xr_bicubic xrb_edge 12990 -> 2093, a2_bicubic_weights 15731 -> 3858, bcx_rules 30727 -> 11388; anisotropic emulation (vk12-floor) 2705 -> 1884. Also in this packet: the padded 10-bit formats' linear samples join the known gaps (d326b293c0), and the conformance coverage document is regenerated for the filter rows. Anisotropic emulation (devices without samplerAnisotropy only) now takes the device's Log2/Exp2 and level blend, and Metal's spacing roundings (r' to 256ths, g*S to 4096ths, S to a 6-bit mantissa) are gone with them: on the M3 with samplerAnisotropy withheld, linear reads up to 10.4 codes from Metal (mean <= 0.21), bounded in runtime_lane/anisotropic_filter.rs. One work packet, landed as 2 commits on archive/development-linear-2026-10-29: abc366a2fa, then 8f506cb2fd (the re-pin). |
||
|
|
20287666c0 |
Blend extended-range attachments in the device's arithmetic; drop the 32-bit float Metal blend
Rule 1 (owner, 10-29): where the device has a native form, it is the only form.
An extended-range attachment's raw codes are something no blend unit reads, so the
shader still blends it (capability), inside the pixel interlock or over lavapipe's
input attachment. Its arithmetic used to be Metal's compiler's: lerps, common
factors, fusing by factor rank, half rounding at every step, a separate float4
model and computed-output tables. Now it is a blend unit's arithmetic: S*Fs op D*Fd
in float, in the order of the blend equation, with the source, second source and
blend color clamped to the form's range first (`extended_range::blend::native`).
- computed.rs is deleted. blend_color.rs keeps only the two source ranges.
- input_blend.rs and fetch.rs call native().
- The blend color is pushed as raw f32 bits (HalfBlendColor), so
PushField::BlendColor is gone.
- Every blended extended-range output that stores a channel now records
ExtendedRangeBlendSource (half) or ExtendedRangeFloatBlendSource (float).
- The refusals ConstantColorDifference, SrgbForm and FloatOutput are gone, as is
the fast-math DualSource refusal for extended range. Every factor, operation
and mask is built; only outputs other than four half or float lanes are
still refused (Output).
The 32-bit float storage-form blend (`Blend::float32`, `fetch::float32_blended`)
computed Metal's fused forms in float. Every committed profile except
roadmap-2022 and vk12-floor sets COLOR_ATTACHMENT_BLEND on R32/RG32/RGBA32_SFLOAT,
so that form copied Metal's bits where the device blends natively. It is removed:
- a fetched 32-bit float attachment takes the generic float blend
(UnmeasuredFetchBlend);
- one that is not fetched gets the device's blend after the pass splits.
The float4-output paths of the half/unorm8 model (Atom::Sf, Arith::Kept,
round_inner, Blend::float/narrow/takes_float) were dead after this and are pruned.
Removed:
- the Metal blend-table validation lane (extended_range_blend_table.rs)
- devtools xr_blends
- the xr_blend_table*.txt fixtures
- lower/arith/tests/blend32.rs
- the extended_range tests that pinned Metal's forms
Added:
- every_blend_is_the_devices_arithmetic: every form, 19 factors, 5 operations,
rotating masks and adversarial sources, bit-exact against a float model of
S*Fs op D*Fd
- every_blend_is_built_but_a_placeholder
Docs:
- FAST-PATHS: the "Metal's rounding per shape" fast row is removed. The
extended-range blend is now a device-gaps row with the two notes. The
32-bit float row and the interlock section are fixed.
- artifact.rs note docs and the API.md catalogue are rewritten.
- REFUSALS is regenerated, reach.tsv updated and api_signatures blessed
(removed ExtendedRangeBlend::{ConstantColorDifference, FloatOutput, SrgbForm},
PushField::BlendColor).
- Conformance: the two notes join replay::NATIVE_NOTES, and 16 Apple M3 Max
known-gaps rows hold the xr-blend add/premul sites the device's arithmetic
moves: one code, two at the sRGB premultiplied sites.
- SEMANTICS_VERSION 1923, ARTIFACT_FORMAT_VERSION 479.
Size: a premultiplied half4 fill into RGB10A8_2P_XR10 on moltenvk-m3 goes from
3275 to 1937 SPIR-V words (the blend itself from 2133 to 795). The float4 fill
goes from 3435 to 1951 words, and BGRA10_XR_sRGB premultiplied from 7992 to 6654.
Verified:
- metal2vulkan lib, touched modules: 511/511.
- Sabotage: rounding the source to half in native() fails
every_blend_is_the_devices_arithmetic; restored, it passes.
- clippy, plain and with --cfg m2v_gpu; rustdoc -D warnings.
- M3 Max conformance replay of 25 cases: half-output-blends-*,
blend-interaction-format-float32 and xr-blend-*-one-zero are justified; the 16
xr-blend add/premul sites are held by the new rows.
The replay exits 0 with the ledger held exactly. The conformance crate
passes 1007/1007, CONFORMANCE-COVERAGE is regenerated, and runtime
degradation/catalogue and api_signatures/api_surface/refusal_surface pass.
- M3 device tests (memcap + maclock, --cfg m2v_gpu): 11/11 of
runtime_lane::extended_range_blends and framebuffer_fetch::generic_blend.
The renamed blends_of_half_outputs_into_extended_range_texels asserts
Metal's bytes for one-zero and prints the 16 add/premul outputs the device's
arithmetic moves.
One work packet, landed as 2 commits on archive/development-linear-2026-10-29: 808143ef80, then 18431ee908 (the re-pin).
|
||
|
|
3ec4a69763 |
Record the native-answer work left open, and name lavapipe's pulled constant step
docs/FAST-PATHS.md's known gaps gain two entries. The first lists the places that still compute Metal's own answer where the device has one: fast::atan2's reciprocal flushed past 2^126, a bicubic sample of an 8-bit sRGB format through its UNORM twin snapping each decoded tap to Metal's twelve-bit step, and half fmod's zero sign on the exact remainder routine. The second is the shadow merge's per-word stores over PCIe, measured on an RTX 5080 over 4 MiB of host pages: 150 ms of GPU time with every other word changed, 0.40 ms with a 64x64 square, 0.86 ms with every word. Whole blocks take under 1 ms in each shape but would rewrite unchanged bytes a CPU may be writing, which Metal keeps. The five llvmpipe vertex-format-constant-step half/RG11B10 NaN rows said fixed-function vertex input; lavapipe reports no nonzero first instance, so the constant step is the vertex function's own fetch there, and device-nan-encoding is recorded on that pulled read (397e431a36). Their text now says so. docs/CONFORMANCE-COVERAGE.md regenerated. Verified: tests::fast_paths and the conformance ledger tests pass. One work packet, landed as 1 commit on archive/development-linear-2026-10-29: 189c16e23f. |
||
|
|
fa854417c0 |
Hold lavapipe's answers at the sites tonight's native commits moved
The native-answer commits were verified on the Apple M3 Max only. Replaying the whole conformance set on lavapipe (scripts/linux-gate --icd lavapipe, llvmpipe LLVM 21.1.8, Mesa 26.0.8) found ten llvmpipe sites the ledger did not hold: - vertex-format-constant-step, five rows added (UChar, UChar2, UChar3, UChar4, UChar4_BGRA normalized): 33a8839b7c expected none, but lavapipe reports supportsNonZeroFirstInstance = false (vulkaninfo in the gate image), so the constant step is the shader's own fetch there too; the sites read 0x3EFEFF00 where Metal reads 0x3EFEFEFF, the one-ulp product the stage-in rows hold (device-vertex-conversion). - Five rows updated to lavapipe's new answers after the sRGB transfer, maths and half-narrowing commits: math-frexp-ilogb-half's two mantissa sites (3 elements, largest 0x1FF: lavapipe's narrowing drops a NaN's payload, native-nan-encoding); pass-bytes-half-tanh-regimes half-tanh (63 words, largest 0x80008000, a NaN's sign first) and fast-float-tanh (2851 words, first one ulp); pass-bytes-srgb-decode-all-bytes words (1136 elements, largest 0x00F90001, the M3's same counts). Where a replay reads only the first and largest element, the row says so and leaves the element-by-element read open. docs/CONFORMANCE-COVERAGE.md regenerated: it also picks up the ledger changes of a049fcd0ee, d49cbcd398 and 0d7093d826, which left it stale. Verified on lavapipe, conformance replay --cpu over the whole case set at b7f6dec939 with these rows: exit 0 (487 exact, 407 announced, 177 divergent, 36 lacks-feature, 11 refused, 4 never-returned); without them exit 1 at exactly these ten sites. The five llvmpipe attribute-format-fetches rows (33a8839b7c) and the llvmpipe fetch-ordered-*-srgb rows hold unchanged. Mac: the conformance ledger tests and the conformance_coverage binary, 14/14. One work packet, landed as 1 commit on archive/development-linear-2026-10-29: e3a4094d6e. |
||
|
|
5f2c69e087 |
Decode a pulled normalized vertex field by the device's reciprocal product
Pulled normalized fields (vertex, [[stage_in]], post-tessellation) take the device's product,
and a post-tessellation pulled read records its NaN note as the vertex and stage-in reads do.
One work packet, landed as 2 commits on archive/development-linear-2026-10-29, in order:
* Decode a pulled normalized vertex field by the device's reciprocal product (33a8839b7c)
The owner's ruling of 10-29: no exact emulation where the GPU has a native
answer. A normalized field the shader pulls (a vertex attribute fixed-function
input cannot fetch, a kernel's [[stage_in]] attribute, a post-tessellation
function's) was Metal's correctly rounded quotient via exact_division::div_exact.
It is now the device's product float(c)*float(1/m), rounded once, the signed one
max(., -1), as fixed-function fetch already converts it (
|
||
|
|
487e23f3ee |
Declare a half color output 16-bit where the device enables storageInputOutput16
A fragment function's half color output is declared 16-bit where the device enables storageInputOutput16 and shaderFloat16, so the device blends the half Metal's attachment receives (the M3's 52 half-blend rows no longer diverge). SEMANTICS 1909, ARTIFACT 476. One work packet, landed as 6 commit(s) (9e8b40289e..f5e9c26fe3 on archive/development-linear-2026-10-28-evening), in order: * Declare a half color output 16-bit where the device enables storageInputOutput16 What: a fragment function's `half` color output through a variable of its own type (not an extended-range or word attachment's raw texel, not an attachment held with its channels rotated) is declared with 16-bit float lanes on a profile that enables `storageInputOutput16` and `shaderFloat16`, and stored by one OpFConvert of the f32 that holds the half (exact: the value is a half). The module then requires StorageInputOutput16 (derived from the Output pointer as before). `StageIo::half_outputs` lists the keys so link's contract check holds the module to the 16-bit declaration (`io_type_matches` takes the float width); the artifact codec carries the field. Every other interface variable stays 32-bit, and a device without the feature (lavapipe, NVIDIA's 615.71.09) keeps the half widened to float. Why: the widening hid the output's type from the device. With the half declared as a half, the device blends and converts the value Metal's attachment receives as its own half output: on MoltenVK that is Metal's compiler handling Metal's own output type. No Metal arithmetic is emulated and no note changes (HalfOutputPrecision and HalfOutputFastMathBlend fire as before; a computed fast-math output may still differ). Verified: - M3 Max, MoltenVK 1.4.2, macOS 27.0.1: `conformance replay` of the six `half-output-blends-*` cases: every value exact (verdict `announced`, the case's declared notice only); the 52 M3 rows of known-gaps.tsv (17, 17, 18 sites of r16f, rg16f, rgba16f) all read "no longer diverges", so they are removed. The 32-bit float formats stay exact. A replay of the 40 cases whose recorded fragment functions return half (half-output-blends-*, xr-*, rgb10a2-srgb-stores-h, render-then-sample-magnified-*, fragment-imageblock-reflection): 39 announced, 1 exact, no other ledger difference. - New unit test `a_half_color_output_is_declared_16_bit_where_the_device_enables_it` (moltenvk-m3 and amd-rdna3-radv 16-bit, lavapipe 32-bit; a float output and a rotated attachment 32-bit everywhere; L3 on each module). * Bump the cache versions for 16-bit half color outputs SEMANTICS_VERSION 1907 -> 1908: a fragment function's half color output is declared 16-bit on a profile that enables storageInputOutput16 and shaderFloat16, so its module's words and requirements change under an unchanged key (golden_hashes reports 657 cells changed; the table is re-blessed on the lane branch, not here). ARTIFACT_FORMAT_VERSION 475 -> 476: StageIo gains `half_outputs`, which the artifact codec encodes. Verified: cargo check; the version constants alone moved. * Regenerate the conformance coverage document for the 52 removed M3 rows What: docs/CONFORMANCE-COVERAGE.md, written by `python3 -I scripts/conformance-coverage/coverage.py`. Its ledger count goes from 1129 to 1077 rows and its ledger table loses the 52 Apple M3 Max rows of `half-output-blends-r16f`, `-rg16f` and `-rgba16f`, which the 16-bit half output commit removed from known-gaps.tsv (they read "no longer diverges" on the M3 replay). Why: the document is derived from the ledger, and `conformance_coverage::the_conformance_coverage_document_is_what_the_sources_derive` failed on the stale copy. Verified: the diff is those 52 lines and the count, nothing else. * Record the M3's safe-math half blends under the 16-bit half output What: PrecisionNote::HalfOutputPrecision's documentation said MoltenVK on the M3 Max stores Metal's bytes in every draw of the safe-math sweep. It now states what the lane measures with the output declared 16-bit, and that the NVIDIA, RADV, ANV and lavapipe bounds were measured with the output widened to float (RADV and ANV, which enable storageInputOutput16, now take the 16-bit form and are not re-measured: host away). Measured on the M3 Max, MoltenVK 1.4.2, macOS 27.0.1, with `runtime_lane::half_output_blends::half_output_blends_against_metals_rule` under --cfg m2v_gpu (the measurement prints HALF-BLEND-SUMMARY lines): - at this branch (16-bit output): R16Float, RG16Float, RGBA16Float 28 of 28 measured blend draws Metal's rule's value in every channel, largest distance 0; R32Float 28, RG32Float 28, RGBA32Float 26 of 28 (zero-1msa k0 and k4: one channel of 262,144 off by a zero's sign, distance 0); - at |
||
|
|
7cce610704 |
Delete the shader-side dropped-store mask
One work packet, landed as 5 commits (a31d02e99a..46c3156d42 on archive/development-linear-2026-10-28), in order: * Delete the shader-side dropped-store mask What. The per-stage mask of buffer slots whose stores the shader drops goes, with everything that existed only for it: - translator: the store-dropping lowering (lower/access/sink.rs; the guarded stores in emit, psb, pulled, dynamic, atomic and blob; the write-only store-sink binding and the OpSelect of two storage-buffer pointers that chose it, with its VariablePointers requirement), the specialization key, the stage-table field and their codec tags; - runtime: argument_table's dropped_store_buffers and its refresh, Buffer::drops_writes (now unused), the two variable-pointer enables, and SetZeroChoice.store_sinks (now the layout's set-0 bindings); - tests: engine_dropped_stores, engine_dropped_store_sink, the sink cases of neutral_zeros_shared, and dynamic_multi_variable's two encoders_plain tests, whose only binding of several variables was the sink. The narrow-unit kernel now runs at its buffers' starts and at moving offsets: the moved run checks that a dynamic offset reaches every variable of its three-variable binding, and no dispatch at a moved offset reuses its predecessor's set in either form, since a slot read to its buffer's end has a range that moves with its offset; - the Apple M3 Max known-gaps row for host-page-writes-kernel-store-read-only at case/bytes-in-the-same-command-buffer-bytes, which this fixes. Removed public items: - metal2vulkan::bind::StageTable::dropped_store_buffers (field) - metal2vulkan::bind::StageShape::dropped_store_buffers (field) - metal2vulkan::pipeline::SpecKey::DroppedStoreSlots(Stage) - metal2vulkan::pipeline::SyntheticBinding::StoreSink - metal2vulkan::device::VkFeature::VariablePointers - metal2vulkan::device::VkFeature::VariablePointersStorageBuffer (the two features were asked for only by the sink's pointer select) Why. The mask was set only from Buffer::drops_writes, which is true only for host pages imported through a read-only view, and only macOS makes one (VIEWS_DROP_WRITES; ReadOnlyView::of is None elsewhere, and no_copy_options keeps the private bit off it). No other path set it: Linux writable imports, dma-buf imports (excluded where writes drop), heaps (the same import) and argument buffers (which name no slot). On that memory the view already takes the GPU's writes nowhere, so the shader-side drop was redundant there. It was also wrong: a later command of the same command buffer reads the stored words back from the GPU's caches on Metal (8 runs of 8 on the M3 Max), and the shader-side drop made it read the pages' own bytes. Versions, placeholders for the landing to renumber: SEMANTICS_VERSION 2000, ARTIFACT_FORMAT_VERSION 500 (the codec loses four tags), RUNTIME_VERSION 1840. api_signatures.tsv re-blessed, docs/REFUSALS.md and docs/CONFORMANCE-COVERAGE.md regenerated, the runtime sources re-pinned. FAST-PATHS: the read-only-memory known gap now says what is true (writes reach the pages off macOS), and the dynamic multi-variable row is scoped to bindings whose range stays as their offset moves. Verified: - metal2vulkan suite: 3329 of 3330 pass. golden_hashes moves 3391 cells (every module with a device store loses its guard); the table is re-blessed on development. - clippy -D warnings clean, plain and with --cfg m2v_gpu; rustdoc -D warnings clean for the four touched crates. - MoltenVK 1.4.2 on the M3 Max: conformance replay of the four host-page-writes cases exits 0, both kernel-store cases exact (the visibility pair "announced", the fast-math notice, as before). The host-page, read-only and private-bit lanes and argument_table, neutral_zeros_shared and dynamic_multi_variable pass. - lavapipe (arm64, linux-gate): full conformance replay exits 0, its 891 gap rows exactly the ones the ledger expects on the venue (none unlisted, none stale); the same lanes pass. * Lane: a kernel's stores into private-bit memory reach only its own command buffer What. runtime_lane::degrade_notices gains a_kernel_s_stores_into_private_bit_memory_reach_only_its_own_command_buffer. It dispatches a4_index_word into no-copy memory of an anonymous mapping, filled with 0xab and made with Metal's private option bit 24, bound 512 bytes in, then copies the first 1024 bytes in the same command buffer and in a later one, and reads them from the CPU. Why. It holds Metal's measured answer where the runtime gives it: the same command buffer's copy reads the stored words, everywhere; on macOS, where the pages come through a read-only view, the later command buffer and the CPU read the pages' own bytes and nothing is announced; elsewhere they read the stores, announced once as the private-option notice. Every byte the stores do not name keeps 0xab at every site. Verified: MoltenVK 1.4.2 on the M3 Max prints "drops writes true; same command buffer stored true, later command buffer stored false, CPU stored false" and passes; lavapipe (arm64) prints "drops writes false; ... true, true, true" and passes. * Number SEMANTICS_VERSION 1907, ARTIFACT_FORMAT_VERSION 475 and RUNTIME_VERSION 1681, past development's The dropped-store mask's deletion took the placeholders 2000, 500 and 1840; development is at 1906, 474 and 1680. * Re-bless the golden tables after the dropped-store mask's deletion Every module with a device store loses its read-only guard (a31d02e99a), so bless_golden_hashes moves 1330 rows of golden_hashes.tsv; bless_engine_inventory, bless_engine_goldens and tests::air_input wrote nothing new. Verified: the three bless runs and air_input exit 0 at 623f8d2170. * Re-bless the authored compile census after the dropped-store mask's deletion corpus-triage --audit authored-compile --bless over 2253 cases and 21 profiles: 0 differences, 0 regressions, 0 failed, 20159 artifacts moved by hash alone (the store guard's words). Slowest compile 586 ms, slowest case across all profiles 18.5 s, peak worker RSS 231 MB. Verified: the census run above at 623f8d2170. |
||
|
|
4c07cde4d2 |
Announce set-past-layout-support at every bind of a variant past its driver's support
One work packet, landed as 9 commits (332aebcc0c..c0ffb238b1 on archive/development-linear-2026-10-28), in order:
* Announce set-past-layout-support at every bind of a variant past its driver's support
What. A variant's kinds (`Kinds::of`), which a bind tests before it
announces anything at every occurrence, now hold `SetPastLayoutSupport`
where a set of the pipeline's layout is past the least
`maxPerSetDescriptors` (1024) on a driver that understates its layout
support (`RuntimeDriverDefect::SetLayoutSupportUnderstated`, MoltenVK):
`pipeline::objects::may_pass_support`, the same test `set_support` makes
before it asks the driver.
Why. The kinds held the stages' notes and the vertex-simdgroup property
alone, though `Device::degrade_pipeline` announces the layout notice too.
So a device announcing it at every occurrence (`announce_each`, which the
conformance suite's device sets) announced it only for a variant that
also recorded a precision note: the heap set of a kernel reaching a
texture through an argument buffer (65536 descriptors per array on the M3
Max, which MoltenVK's `getDescriptorSetLayoutSupport` refuses at a sum of
1212 or more) went unannounced until the native-arithmetic round gave 36
conformance cases' kernels a note (device-nan-encoding,
pixel-sampler-scaling), and then it surfaced in exactly those. The notice
is true of the driver: the layer reports VUID-09582 for each such layout.
Without announce_each nothing changes: the making announces it once.
RUNTIME_VERSION 1820 (placeholder, to be renumbered at landing): a bind
can announce what it did not.
Verified: tests::driver_defects::a_set_past_the_drivers_support_is_among_its_variants_kinds
(hsw_held compiled for the committed MoltenVK profile: sets of 4 and
65536 descriptors; the kind held where the driver understates, not where
it does not; the kinds' test agrees with set_support's Understated) passes,
and fails with the kind's addition disabled ("sets of [4, 65536]
descriptors, the driver understating its support: true"). A full MoltenVK
replay (M3 Max, 1.4.2) with the change reads the same 152 unlisted lines
as without it: the 36 cases that announce it already did.
* Declare set-past-layout-support where a case's kernel reads an argument buffer's texture
What. replay::set_past_layout_notice(), a declaration like
shared_memory_notice, and its use by the cases whose kernels reach a
texture or a sampler through an argument buffer: every pixel-samplers and
pixel-downscales case (the arg source), every norm-storage case (the held
route), the three half-storage-writes held rows, read-write-tier-held, and
the two argument-encoder cases that dispatch.
Why. Such a kernel takes the handle heap, set 1, of 65536 descriptors an
array on the M3 Max. MoltenVK 1.4.2 answers vkGetDescriptorSetLayoutSupport
by the sum of the counts against maxPerSetDescriptors (1212), so it refuses
the set though it makes and runs it; the runtime makes it and announces
set-past-layout-support, and the layer reports VUID-09582 for it. That is
a notice of what the driver lacks, which NATIVE_NOTES leaves to each case
to declare. The query is a true one, asked of the create info the layout
is made from, so the runtime keeps announcing it. The 36 cases' MoltenVK
replay read it as undeclared (42 sites, the argument-encoder cases' four
each, since their shared-memory declaration loosened the notices site with
nothing announced to justify it).
Verified: the MoltenVK replay of the 36 cases on the M3 Max (1.4.2) exits
0, 27 announced and the 9 divergent at their ledger rows, nothing
unlisted.
* Ledger the M3 Max's own NaN bits at 37 half-NaN sites
What. Apple M3 Max rows for the sites where this venue answers the
canonical quiet NaN 0x7E00 for a `half` NaN Metal keeps the bits of:
attribute-format-fetches' 29 attribute3 sites (a Half or Half2 attribute
fetched through stage_in into a half2 and reinterpreted), the three
half-write-nans 16-bit float stores, the three half-texel-nans `read`
sites, and math-frexp-ilogb-half's two frexp mantissa sites.
Why. Read off every element of each site (both sides' bytes dumped from
the replay): every differing element is a NaN on Metal's side -- 0x7E01
and 0xFE01 for the attributes, the stored halves' own codes, the texels'
own codes, frexp's 0x7E01, 0xFE55 and 0x7C01 -- and 0x7E00 on ours; no
other code differs. This M3 widens a half NaN to the canonical one, so
the bits are gone at the device's widening (the attribute's and texel's
reads, the store's widened conversion) or at the device's NaN result
(frexp). Each is announced and recorded: native-nan-encoding (a module
reading a half from its bits; an operand's bits where Metal answers
them) and device-nan-encoding (a half texel's write; a half texel's
read), both native notes whose bound is the device's sign and payload,
validation deriving no tolerance from them. The `read` rows carry the
words of the M3 rows at the family's two other sites, now that the read
also goes through the device's decode. So the 32769 the attribute rows
show is the negative NaN's sign and payload, not wrong data.
Verified: MoltenVK replay of the 8 cases on the M3 Max (1.4.2) exits 0
with nothing unlisted.
* Ledger the M3 Max's sRGB pack and unpack at the device-pack-conversion bound
What. Apple M3 Max rows for pass-bytes-srgb-decode-all-bytes and
pass-bytes-srgb-encode-sweep, at their one site each.
Why. The module decodes and encodes sRGB by the MSL transfer function
through the device's Pow (device-pack-conversion, a native note, recorded
on every device for the sRGB forms), where Metal goes through its
twelve-bit table. Read element by element off the replay's bytes against
the committed recordings: every decoded float is within 1.2205e-4 of
Metal's step (under half a twelve-bit step, 1/8190), every decoded half
within that and one half ulp (at most 0.97 of the sum), the alpha lanes
exact; every encoded colour channel that differs (1,821 of them) is one
code from Metal's, no alpha. That is the note's recorded bound. The
largest raw differences (0x00F90001, 0x00010101) are a small half 249
ulps off beside a one-ulp half, and one code in each colour byte.
Verified on the M3 Max (MoltenVK 1.4.2) by the replay of the two cases,
after the rows' rebuild (see the next commit's run).
* Ledger the M3 Max's own half-output blend at the fast-math-blend bound
What. The 18 Apple M3 Max half-output-blends rows go and 52 come: every
site the three 16-bit float formats now differ at, none for the 32-bit
float formats. The family's module docs say what each side does now.
Why. The exact shader blend of a half output is gone (the
native-arithmetic ruling), so the device blends. Read word by word off
the replay's bytes against the committed recordings and the case's own
source sweep and destination generator: this M3 blends the half widened
to float in float and converts into a 16-bit float format toward zero
(every word of the 43 divergent sites whose sum adds no blend-colour
product, 97 to 99.6 per cent of the other nine's), where Metal's compiler
folds the blend into the function (round(round(Sf*S) + Df*D) at the sites
the case's tests measure). Every differing word, 52 sites of 6 to 559
words, is within 2 half ulps of Metal's at the operands' magnitude (the
largest of the source, the destination, a factor and the two products'
magnitudes summed; the worst exactly 2), which is
half-output-fast-math-blend's recorded bound; the case declares that
note and it fired. Raw-code distances up to 1,582 are results near zero.
The 32-bit float formats now store Metal's codes at every word, so their
8 rows are stale, and the 10 old 16-bit rows' counts no longer hold.
Verified: MoltenVK replay of the six blend cases and the two sRGB cases
on the M3 Max (1.4.2) exits 0, nothing unlisted and nothing stale; the
32-bit float cases read announced.
* Ledger the M3 Max's same-command-buffer read of a dropped kernel store
What. One Apple M3 Max row for host-page-writes-kernel-store-read-only
at case/bytes-in-the-same-command-buffer-bytes, an open bug of ours.
Why. Metal drops a kernel's stores into read-only backing, and a later
command of the same command buffer reads them back from the GPU's caches
(every one of the 8 recorded runs); ours reads the pages' own bytes.
Measured cause: the shader drops its own stores through a slot bound to
such a buffer (StageTable::dropped_store_buffers, SpecKey::DroppedStoreSlots),
so the store never reaches the caches, though on macOS the read-only view
the pages are imported through already drops the write. With that word
forced to zero (a local probe, not committed) the case is exact on this
M3, 3 runs of 3, its later-command-buffer and CPU sites still the dropped
write. The gap predates the native-arithmetic round: the same divergence
replays at
|
||
|
|
524c2f7346 |
Record the device's own alpha to coverage as a native precision note
One work packet, landed as 4 commits (f6834405b7..7ec539ceb2 on archive/development-linear-2026-10-28), in order: * Record the device's own alpha to coverage as a native precision note What: a render pipeline that keeps alpha to coverage now records `PrecisionNote::DeviceAlphaCoverage` on its fragment stage, which the runtime announces as `device-alpha-coverage`, on every profile not measured to cover as Metal does. `link::graphics::coverage_notes` decides it from the graphics state alone and hands it through `Linked`'s new `fragment_notes` and `fragment_properties`, as the vertex stage's fixed-function notes already go. A profile that takes the new measured driver fact `DriverDeviation::MetalAlphaCoverage` (MoltenVK on Apple's GPUs of the M3 Max's macOS 27 identity, the APPLE9 row) records no note and requires `VkProperty::MetalAlphaCoverage` instead. Why: Vulkan specifies no algorithm for turning an alpha into a coverage mask, and Metal's is not the floor rule we assumed. Measured on the M3 Max (macOS 27.0.1) over 639 alphas a sample count with our own probe (probes/alpha_coverage_sweep.m): one sample covers above an alpha of 1/2; two and four samples cover ceil(alpha * n - t), t a 2x2 ordered dither. Under rule 1 the device's answer is the contract, so the note records it and nothing in the shader or the sample mask imitates Metal's. Bound, pixel by pixel against Metal's committed reading (runtime_lane::alpha_coverage, 10,224 pixels a count): lavapipe (Mesa on LLVM 21.1.8, arm64) dithers at one sample too, 2,560 pixels apart (a whole fragment stored or dropped), and at four samples 96 pixels one sample apart, all within an f32 ulp of a threshold; every pixel within floor..ceil of alpha * n. MoltenVK 1.4.2 on the M3 Max: 0 apart at 1, 2 and 4 samples (its reading is byte-identical to plain Metal's). NVIDIA is unmeasured beyond its known-gaps row. Stated in the note, the runtime kind, docs/API.md's catalogue and docs/FAST-PATHS.md's device gaps; `CoverageReadsRoundedAlpha`'s docs now say its bound is the rounding's alone. Validation derives no tolerance from it (`Allowance::Unbounded`). Versions: SEMANTICS_VERSION 1980, ARTIFACT_FORMAT_VERSION 490 (the codec gains a note and a property), RUNTIME_VERSION 1790. Verified: tests::engine_alpha_coverage (five profiles, 1 and 4 samples, coverage on and off) passes and fails with the note's recording removed; the lane passes on lavapipe (linux-gate arm64) and on MoltenVK (maclock), printing the counts above and asserting the announcement iff the note; nextest of metal2vulkan, -runtime, -conformance and -validation pass but for the golden table (stale at this base; against development's re-blessed table only the moltenvk-m3 profile fingerprint moves) and the runtime sources pin, both re-blessed on development; clippy (all features, and --cfg m2v_gpu) and rustdoc clean; api_signatures.tsv re-blessed. * Declare device-alpha-coverage native in the suite and fix Metal's coverage rule What: `replay::NATIVE_NOTES` gains `DeviceAlphaCoverage` (the coverage class), so no a2c case must declare the notice the device announces at its own coverage; values still compare field by field. The two `a2c-on-1-alpha-50` known-gaps rows (llvmpipe, RTX 5080 Laptop) keep their identity and now name the note and its bound: on llvmpipe the measured dither and counts; on NVIDIA the bound is open until the coverage lane's sweep runs there. `alpha_coverage_pairs`' model and docs, and `render.rs`'s field doc, said Metal covers floor(alpha * n) samples; they now state the measured rule (above 1/2 at one sample; ceil(alpha * n - t) under a 2x2 ordered dither at two and four), and the model's test holds the cases' recordings to it. docs/CONFORMANCE-COVERAGE.md regenerated. Why: the suite's standing declarations name every note that is the device's native answer, and the rows must say what differs and whose answer it is. Verified: the conformance suite passes (nextest); coverage.py and refusal_surface.py regenerated (REFUSALS.md unchanged). * Number SEMANTICS_VERSION 1906, ARTIFACT_FORMAT_VERSION 474 and RUNTIME_VERSION 1679, past development's The alpha-coverage note took the placeholders 1980, 490 and 1790; development is at 1905, 473 and 1678. * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
12e64034b3 |
Hold back the clear's conversion note where MoltenVK's load operation clears as Metal's
One work packet, landed as 5 commits (36c1f6d2ed..bad631efa8 on archive/development-linear-2026-10-28), in order: * Hold back the clear's conversion note where MoltenVK's load operation clears as Metal's A render pass's CLEAR load operation of a colour attachment its render area covers is, on MoltenVK, Metal's own Clear load action, so the texel it stores is Metal's. The new DriverFact::ColorClearIsMetals records that for MoltenVK on the Apple9 GPUs under macOS 27, and the pass layout withholds device-color-conversion for such a clear there. A clear that is not that load operation still announces the note on every device: a clear over a smaller render area (vkCmdClearAttachments, a quad draw on MoltenVK), a clear made before the pass of an attachment its first instance leaves out, and a memoryless attachment's backing. Measured with the renders lane's clear case set (clears_are_the_device_s_conversion_of_the_clear_value) under MoltenVK 1.4.2 on the M3 Max, macOS 27.0.1, before the change: 71 colour clears, 11 depth and 4 stencil, all 86 texels Metal's bytes, none a code apart. The lane now also asserts the note stays unannounced where the fact holds; the dont-care and colour-reformat lanes expect it only where their clears are not a covering load operation (tie_cleared's new flag). RUNTIME_VERSION 1760; api_signatures re-blessed for the new variant. Verified on MoltenVK (M3 Max, --cfg m2v_gpu): the renders clear lane (86 checked, 0 apart, no device-color-conversion), runtime_lane::dont_care_stores (4) and runtime_lane::color_reformat (6) pass; device::tests::driver_facts passes. * Resolve into an sRGB twin by the device's own sRGB decode and encode A multisampled 8-bit UNORM attachment resolving into its sRGB twin is the crate-owned resolve on every device, and it applied Metal's 12-bit sRGB tables. Under the native-arithmetic rule the device's conversions are the only form where the device has them, so where the device renders the sRGB format the resolve now reads the samples through a view in the sRGB format (the device decodes each sample), averages the decoded values (their f32 sum times 1/n) and writes the average through the resolve attachment's own sRGB view (the device encodes it); the alpha keeps the unorm rule. An attachment read from a copy gets a scratch image mutable to the sRGB view. A device without the sRGB format keeps the tables through the raw UNORM views. bind: ColorResolveFormat::device_srgb / decodes_on_device, the device_mean lowering, and the tables only for the table form. runtime: of_resolve picks the form (color_resolve::decodes), the plan reads through the sRGB view and skips the raw write, twin_read_view makes a stand-in mutable to the sRGB view, resolve::scratch_viewed. device-rounded-resolve is announced for such a resolve on every device; docs (degradation, API.md, FAST-PATHS sRGB row, the module docs) say so. Measured with the new lane resolve_rounding::a_twin_resolve_into_srgb_rounds_as_announced (every pair of codes at 2 samples, the lane's pattern at 4, RGBA8 and BGRA8): MoltenVK 1.4.2 on the M3 Max 696 of 262,144 channels one code below Metal's at 2 samples, 880 of 524,288 at 4; lavapipe (Mesa 26.0.8, 4 samples only) 57,865 of 524,288, above and below; none past one code. The model in the bind tests gives 1,758 of 65,536 pairs one code apart with correctly rounded conversions. The resolves lane's twin texels now hold each colour channel to the note's two codes (lavapipe writes 0xbb where Metal's is 0xbc). Verified: the twin lane, runtime_lane::resolves (19), runtime_lane::resolve_rounding (4) and the dont-care twin case pass on MoltenVK (--cfg m2v_gpu) and on lavapipe (--cfg m2v_cpu_icd); the bind color_resolve tests (20) and the runtime color_resolve, image_plan and stand-in unit tests pass; clippy clean plain and with --cfg m2v_gpu. api_signatures re-blessed for the two new methods. * Make a plain colour fill the device's clear where the device renders the format fillTexture:level:slice:region:color: (Apple SPI) packed the colour on the host by Metal's fill rules in every format. Under the native-arithmetic rule the device's own colour conversion is the only form where it has one, so a plain fill (no pixelFormat:) of a texture whose format's fill converts a float (normalized, sRGB, half, float, small float, shared exponent; fill_value::device_converts), whose image holds Metal's bytes of the format, and which the device renders and copies both ways, is now the device's clear: a scratch image of the region in the texture's image format, samples and dimension, cleared whole by vkCmdClearColorImage, copied into the region of each image the fill writes through the blit copy path, placed as the fill. Integer formats (no conversion), the extended-range and bfloat formats, texture buffers and every format the device does not render keep the host packing; the pixelFormat: variant keeps it everywhere (capability). The clear's note is recorded where it applies against Metal's fill packing, not its clear: device-color-conversion where fill_value::device_apart holds (a normalized value within 1/1024 of a tie, widened by the fill's float product and, for the packed 16-bit formats, a step through half; an sRGB value inside (0, 1); a value a half, small float or shared exponent does not hold), device-nan-encoding for a half or small-float NaN. The fill slot still takes the packed texel. The call is logged as itself (BlitCall::FillTextureColor) so a re-encode clears again. Lanes: color_fills::plain_color_fills_are_the_device_s_clear fills the probes' 762 colours into each of the 70 formats plain and packed, notices asked for at each fill, and holds every texel to Metal's or, where that fill announced, to a code (a NaN for a NaN); it asserts an RGBA8Unorm_sRGB fill announced device-color-conversion, which the host packing never does. color_fills::plain_color_fills_land_where_packed_ones_land checks the 31 placement cases byte for byte. The Metal-hash test now packs by pixelFormat:, texture_fills runs its plain colour cases packed (Metal's bytes), and the RGBX fill test accepts an announced code. Unit test for the predicates in tests::fill_value. Measured (plain against packed, 762 colours a format): lavapipe (Mesa 26.0.8) rounds a half toward zero (RGBA16Float 420 texels a code apart), an 8-bit tie down (RGBA8Unorm 20), and writes its own RG11B10 NaNs (275); MoltenVK 1.4.2 on the M3 Max keeps RGBA8Unorm exact, stands RG11B10Float 186 and RGB9E5Float 150 texels a code apart, and writes 0x7e00 for Metal's 0xfe00 half NaN; every one announced. Verified on MoltenVK (--cfg m2v_gpu) and lavapipe (--cfg m2v_cpu_icd): runtime_lane color_fills, texture_fills, rgbx_textures, sample_fills, surface_fills, texture_buffer_fills and two_plane_copies pass; runtime unit tests (fill, replay, blit) pass; clippy clean plain and with --cfg m2v_gpu; rustdoc clean. * List lavapipe's own clear at seven plain texture fills A plain colour fill of a format the device renders to is now the device's clear (6cdfe023d9), so the texture-fills conformance case's digest moves on the gate container's arm64 lavapipe at seven formats: ABGR4Unorm, RGBA8Unorm, RGBA8Unorm_sRGB, BGRA8Unorm, BGRA8Unorm_sRGB, RGBA16Unorm and RGBA16Float. The site is digest-only, so the same fills were run per texel through the color_fills lane's helper on that venue (a throwaway probe, not committed). Of the case's four plain colours only c5's (2, -1, 0.5, 0.3) differs, in its alpha alone, one code below Metal's: 0.3 is a tie in 4, 8 and 16 bits (4.5, 76.5, 19660.5 codes) that lavapipe rounds to even, and lavapipe truncates the half (0x34cc for Metal's nearest 0x34cd). device-color-conversion records it at every such fill and its one-code bound covers it, so each row is the device's native answer, scoped to the measured build, with nothing open. Verified: conformance replay --cpu on lavapipe (llvmpipe LLVM 21.1.8, 128 bits) exits 0, the 825 rows exactly the ledger's (no unlisted, no stale); the ledger's unit tests pass; replay --gpu of the 54 texture-fills cases on MoltenVK 1.4.2 / M3 Max: 37 announced, 17 exact, none divergent. * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
44910ecabd |
Hand pixel samplers' scaled coordinate to the device; test the unflushed subnormal coordinate
One work packet, landed as 2 commits (255f93b252..aba772e24d on archive/development-linear-2026-10-28), in order: * Hand pixel samplers' scaled coordinate to the device; test the unflushed subnormal coordinate Rule 1: the device's sampler is the contract. A pixel-coordinate sampler keeps its capability (the shader divides the coordinate by the level-0 size, since Vulkan's unnormalized samplers take no gather, offset, comparison, array, 3D image or level of detail) and drops the correction that reproduced Metal's position at texel edges. Deleted: `AxisSnap`, `SnapKind`, `Snap` and the snap plan (`snapped_axis`, `gathered_by_word`, `celled_by_word` and their word estimates), the texel centring of nearest pixel samples (`centred`, `centre_word`, `pixel_centre`, `PIXEL_CENTRE_WORDS`), the snapped census names, the shared switch's sampled-image arms (it is bicubic only now), `SamplerWord::PIXEL_GATED` and `PIXEL_NEAREST`, the binder's gated keying and `lower::select::pixel_gated`. A runtime slot now specializes on its word's coordinates bit alone. Kept: the division by the size, `SampleOp::PixelFetch` (a constexpr nearest clamp-to-edge sampler's exact fetch) and the argument buffer's flagged exact fetch, and Metal's position, wrap and offset rules the emulated filters still use. `PixelSamplerScaling` is now recorded on every device, MoltenVK included: always for a constexpr pixel sampler but its exact fetch, and for a runtime slot under the clause that the bound word states pixel coordinates. `ArgumentPixelSamplerScaling` is recorded for every heap access and announced at a dispatch while any pixel state lives (not only a filtering one). The notes, the API.md catalogue and a new FAST-PATHS device-gap row state the measured bound: the device's normalized sampler at a coordinate within one f32 ulp of x/N on MoltenVK and at x/N on lavapipe; a linear downscale by 8 within 1/255 of Metal's on MoltenVK, 2/255 on lavapipe. Lanes: pixel_samplers holds each pixel configuration to its normalized control within REACH ulps of the quotient and asserts both notes on every device; pixel_downscales holds every set within 2/255 of the snapped control; mirror_clamp counts a pixel lane that reads Metal's normalized answer within REACH ulps apart; resource_ids expects the argument note where a pixel state lives at the dispatch; the argument-note test waits for any pixel state. The pixel conformance cases declare `pixel-sampler-scaling`; known-gaps rows for their llvmpipe sites are replaced (38 stale, 40 new, at the end) and 22 Apple M3 Max rows appended, each naming the note. Subnormal coordinates (e7775e4c82 removed the flush): `a_subnormal_coordinate_reaches_the_device_unflushed` traces every sample and gather coordinate of constexpr border samplers (1D, 2D, 3D, gather; nearest and linear; zero and white borders) back to the loaded value through bit moves alone, on every committed profile, and holds a kernel whose AIR flushes the coordinate as not passing through. SEMANTICS_VERSION 1960; RUNTIME_VERSION 1676 (the argument note's announcement and the binder's sampler key changed). Verified: - cargo clippy --workspace --all-targets --all-features -D warnings, plain and --cfg m2v_gpu; RUSTDOCFLAGS=-D warnings cargo doc --workspace --all-features --no-deps. - Core suites (4953 tests): all pass but golden_hashes (3776 cells move, left for the re-bless); api_signatures fixed here. - Negative controls: on development's code, 7 of the new or changed sampler tests fail; with the removed flush put back in plane_coord, the subnormal test fails (border 1d zero). - Words (lavapipe; MoltenVK and NVIDIA alike in step): px_sample_argument 2869 -> 2641, xr_sample_runtime 1175 -> 967, px_const_linear_* 1078 -> 943, pix_gather_edge 1089 -> 920, runtime_gather 1165 -> 944; constexpr nearest-edge and the normalized control unchanged; spirv-val PASS on each. - Lanes on lavapipe (linux-gate arm64) and MoltenVK (M3 Max): pixel_samplers, pixel_downscales, resource_ids, mirror_clamp pass; on MoltenVK argument_linear_samples' half RGBA32Float heap groups, driver_deviations and one degrade_notices test fail, none through a pixel path. - conformance replay --cpu (whole set, lavapipe): exit 0, nothing unlisted, no stale row. The pixel cases on MoltenVK: every value site as listed; each case's set-past-layout-support notice is unlisted there, as in the untouched argument-encoder-texture-sampler. * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
8fb8b51f4e |
Hold the kept compressed-blit encodings to the ledger on the M3 Max
One work packet, landed as 2 commits (4a74bd7248..aa6286b711 on archive/development-linear-2026-10-28), in order: * Hold the kept compressed-blit encodings to the ledger on the M3 Max Since 62c7d7a9f5 a blit through a texture Metal keeps losslessly compressed is the device's copy, which keeps the bytes Metal's compression rewrites into its canonical encoding. dbd18ad126 held the lavapipe replay to that; the MoltenVK replay on this M3 Max read 24 value sites the ledger did not list. Each is now a known-gaps.tsv row (venue Apple M3 Max) naming the note that records it: - compressed-blits-bgra10xr and -srgb, all seven sites: the runtime holds the format in an R16G16B16A16_UINT image, whose blits under MoltenVK keep the bytes. extended-range-bits-kept. - compressed-blits-rg11b10f and -rgb9e5f, the five sites through the Shared texture (blit-in-cpu-out, cpu-in-blit-out, out-of-compressed, into-compressed, over-a-buffer): MoltenVK makes that texture's image of PixelFormatView usage, which Metal keeps uncompressed, so its copies keep the bytes. device-nan-encoding and shared-exponent-kept. The Private compressed sites (tall, level-3-padded) are MoltenVK's own blit through Metal's compression and match Metal there. This is the same value in another encoding, not wrong data. The bytes the case feeds, set against Metal's recorded words site by site, give exactly the replay's counts and largest differences at all 24 sites (for example tall 8191 words, largest 1610547199: Metal's alpha code clamped up to 384 from below). Every texel of those bytes decodes to Metal's value: the top ten bits of each field with alpha read clamped for BGRA10_XR, NaN for NaN for RG11B10Float, the exact value for RGB9E5Float. Nothing is open: rule 1 rules out a pass that writes Metal's encoding. docs/CONFORMANCE-COVERAGE.md regenerated (the ledger's row count). Verified on the Apple M3 Max, MoltenVK 1.4.2: - conformance replay of the four cases at 46bd06ec2f (the parent of 62c7d7a9f5): all four announced, every value exact. - the same replay at 19b0dafb5a: 24 unlisted divergent sites, exit 1; with these rows: exit 0, the 24 rows exactly the ledger's. - runtime_lane::compressed_blits under --cfg m2v_gpu: passed; every kept site held byte for byte, ExtendedRangeBitsKept, DeviceNanEncoding and SharedExponentKept each announced, MoltenVK's own copy of the Private compressed images rewrote 374 (RG11B10Float) and 507 (RGB9E5Float) words. - cargo nextest -p metal2vulkan-conformance known_gaps, compressed_blits and coverage tests (19 passed); clippy -D warnings; coverage.py --check. * Say in the notice catalogue that a compressed RG11B10Float blit announces device-nan-encoding The catalogue's device-nan-encoding entry named only float arithmetic's NaN results, while PrecisionNote::DeviceNanEncoding's doc and the runtime also announce it for a GPU blit through an RG11B10Float texture Metal keeps losslessly compressed, as the extended-range-bits-kept and shared-exponent-kept entries already say for their formats. Docs only. |
||
|
|
e656074087 |
Name no native note in any conformance case, at the notices site or at a value
One work packet, landed as 5 commits (647aeae138..19b0dafb5a on archive/development-linear-2026-10-28), in order:
* Name no native note in any conformance case, at the notices site or at a value
The suite declares every note of the device's native answers for every case
(replay::NATIVE_NOTES), so a case's own declaration of one stated the suite's rule a
second time, and a value tolerance justified by one was the suite deriving a tolerance
the note's own documentation says validation derives from none.
What changed:
- 237 notices-site declarations of native notes, over 180 cases from 28 case modules
(depth-denormals 76, device-color-conversion 33, float-sample-filter 31,
device-nan-encoding 27, srgb-texel-decode 25, signed-depth-test 17,
device-arithmetic 10, device-sampling 8, device-texel-conversion 8, one each of
device-transcendentals and unorm-depth-rounding), are gone. The shapes that existed only
to choose them go too: fresh_contents' per-row notices, half_write_nans' `packed`,
render_chains' and compute_render_chains' `divides_a_float`, alpha_coverage_pairs'
separate on/off and single-sample sets, and sampler_filtering's name-keyed branch.
- Four value tolerances justified by native notes are removed: border_swizzles'
one-word `Absolute` and compressed_decode's and etc_textures' one-ulp `Ulps`
(device-texel-conversion, whose note says validation derives no tolerance from it), and
pass_bytes' `Unchecked` tanh column (device-transcendentals, device-arithmetic). Those
sites compare exactly; where a venue's device answers otherwise the site is a
known-gaps.tsv row, which the ledger commits that follow carry. border_swizzles'
word-range test, which existed only to make its tolerance mean one ulp, goes with it.
- tests::no_case_names_a_native_note holds it: it failed listing 765 allowances before
this change and passes after.
- docs/CONFORMANCE-COVERAGE.md regenerated (tolerances 12 to 8, `Ulps` no longer used).
Verified: cargo nextest run -p metal2vulkan-conformance --all-features, 1007 passed;
clippy -p metal2vulkan-conformance --all-targets --all-features -D warnings clean.
* Count no native note in the cost and times halves' degraded-set rule
The rule is there because a notice can say the device lacked the exact form and the
runtime did something cheaper, so a count or a time taken with it is of a different amount
of work. A native note (replay::NATIVE_NOTES) never says that: the native form is the only
one the runtime builds, under either policy. Counting them made a cost record incomparable
with the same work whenever a run did or did not provoke one (the MoltenVK replay before
this change read 45 cases `unmeasured` for native notes alone: device-color-conversion,
device-filtered-mipmaps, device-nan-encoding, native-nan-encoding, native-half-conversion,
fast-math-rewrites), and withheld a times verdict from every case that computes, converts
or samples.
replay::degrading filters them out, sorted and once each. run.rs takes it for the replay's
cost row, the cost measurement and the times round; cost::judge and times::classify apply
it to the stored side as well, since records and figures taken before still hold native
codes (fast-math-rewrites in 56, device-nan-encoding in 33 of the committed ones), so no
re-bless is needed for the rule itself.
Tests: tests::the_degraded_set_rule_counts_no_native_note (a record holding a native note
judges `within` against a run that announced none, and the other way, while a non-native
difference stays `unmeasured`) and times::tests::a_leg_that_announced_only_native_notes_is_judged.
README's two statements of the rule say so.
Verified: cargo nextest run -p metal2vulkan-conformance --all-features, 1007 passed;
clippy -p metal2vulkan-conformance --all-targets --all-features -D warnings clean.
* State the measured bounds of the device's texel and colour conversions
device-texel-conversion's recorded bound named 8- and 16-bit codes and said a
4-bit channel's widening is exact, so two lavapipe ledger families had no
stated bound: a 10-bit BGR10A2Unorm code read one f32 ulp low, and ABGR4Unorm
codes read one ulp high (the device converts by the reciprocal product, where
it does not replicate bits). The bound now covers 8-, 10- and 16-bit codes and
a 4-, 5- or 6-bit channel converted by the reciprocal, within one f32 ulp.
device-color-conversion stated only that near a tie the device may store the
other code. On lavapipe it stores past one code in three shapes, which the
note now states: a blend into an 8-bit unorm attachment within 2 codes, a
fetched-and-rewritten 8-bit sRGB attachment within 2 codes once a later draw
reads an earlier one's code, and a blend into an 8-bit sRGB attachment within
4 codes. Another device is not bounded past one code; the NVIDIA RTX 5080
Laptop GPU ledger rows record up to 11 codes at an sRGB blend.
The same text goes into the translator's PrecisionNote docs, the runtime's
Degradation docs (DeviceColorConversion gains one) and docs/API.md's
catalogue. Docs only; no behaviour changes.
Verified: the lavapipe replay (scripts/linux-gate, arm64, LLVM 21.1.8) shows
every row of those families within the stated figures (the ledger's answers);
rustdoc -D warnings for metal2vulkan and the runtime; the runtime's
degradation and catalogue tests.
* Reword the ledger rows that proposed emulating Metal's bits, and list lavapipe's exact rows
Under the native-arithmetic contract, the device's blend, conversion and
sampler are the answer. Some known-gaps.tsv rows still proposed reproducing
Metal's bits: folding the blend into the fragment function, encoding through
Metal's table, or emulating an argument buffer's sampler. Those rows now name
the note that covers the difference and its stated bound, or the open work
where there is some. Only field 6 changes, and no row moves.
- Apple M3 Max half-output-blends (18 rows) and NVIDIA half-output-blends
(39): half-output-fast-math-blend and its stated bound, with no fold. The
sign-bit sentence is kept only where an NVIDIA bound is the sign bit.
- NVIDIA a2one (2) and argb8-targets (23): device-color-conversion. The
llvmpipe argb8 rows at 2 codes (9) now cite the bound the note states.
- blend-interaction-format-srgb8 (14, both venues): device-color-conversion.
lavapipe's sites are within its 4 codes. NVIDIA's 11- and 5-code sites are
past it and need an element-by-element read.
- fetch-ordered sRGB (8), ABGR4Unorm swizzles (26) and the BGR10A2Unorm
round trip (1) cite the bounds the notes now state.
- RADV sample-fills (3): depth-denormals is a native note the suite declares
for every case, not one the case declares.
- NVIDIA pixel-samplers nearest norm (6): device-sampling's nearest-boundary
bound. Open: an element-by-element read.
- a2c-on-1-alpha-50 (2): no note covers the device's coverage mapping. Open:
the owner's call between recording it and computing Metal's floor rule.
- format-footprints-plain-stragglers: the raw sRGB path and
`texel_format::srgb_raw` are gone. The row names the UNORM twin path that
is there today (`srgb_raw_twin`, `srgb_twin_on`, `RuntimeFact::SrgbTexture`)
and drops the todo-list wording.
Removing the old one-ulp and as-words tolerances showed lavapipe's own
conversion at exact sites. That adds 64 rows beside their families
(border-swizzles rgba8/bgra8 30 each, ETC2/EAC 8-bit 3, pass-bytes
fast-float-tanh 1) and updates 35 BC rows' answers, their counts now
including the one-ulp elements.
Verified: the lavapipe replay through scripts/linux-gate (arm64, 4 CPUs)
went from 99 unlisted and 35 stale before these rows to 0 unlisted and 0
stale ("the 882 row(s) above are exactly the open gaps known-gaps.tsv
expects"; 818 before the tolerance removal). The conformance host suite
passes (1007 tests), and docs/CONFORMANCE-COVERAGE.md is regenerated.
* Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
|
||
|
|
9afdb1e150 |
Take the device's instruction for pack, dot, mix, sqrt, exp, log, sign, fract, median3, fneg and fabs
One work packet, landed as 6 commits (3d6b2488ea..f1693ce8c4 on archive/development-linear-2026-10-28), in order: * Take the device's instruction for pack, dot, mix, sqrt, exp, log, sign, fract, median3, fneg and fabs Rule 1: where the device has a native form it is the only form. The translator still computed Metal's own bits for several functions the device has an instruction for. Each now takes the instruction, its difference from Metal recorded as a note: - air.pack/air.unpack: GLSL.std.450 Pack/Unpack Unorm4x8, Snorm4x8, Unorm2x16 and Snorm2x16; rgb10a2 and rgb565 by the device's NClamp, multiply, RoundEven, and multiply by the reciprocal; unorm4x8_srgb by the MSL transfer functions with the device's Pow around the 8-bit instruction (no table read, no NaN select). New note DevicePackConversion (device-pack-conversion), not recorded for a float conversion of the four named formats on MoltenVK. - dot, mix, fast::sqrt: OpDot, FMix and Sqrt on every device, MoltenVK included (the Mix/Dot/ChunkedChain strategies, Metal's fma chains and x * rsqrt(x) are deleted). NativeDot/NativeMix everywhere but a float one on MoltenVK; a chunked dot sums each chunk's OpDot. - precise exp/log and half exp/log/pow/powr/sinh/cosh/tanh: GLSL Exp, Log, Pow, Sinh, Cosh, Tanh (Metal's compositions, half_tanh and the half remaps deleted); half Fun kinds keep the notes honest on MoltenVK. - fract, sign, median3: Fract (bounded below one, the definition), FSign, NMin/NMax; their special-value fixes are deleted. median3 is NativeMinMax on every device (two NaNs, f32 denormals). - round keeps half-away-from-zero from Trunc without the +0 fix: C99's -0, NativeTranscendentals on every device. - float fneg/fabs: OpFNegate and FAbs, the NaN payload NativeNanEncoding and fneg's denormal DeviceDenormals. Kept: exp10/log10 compositions, fmod's routine, ldexp on bits, sinpi/cospi/tanpi, the fast_ formulas, pow/atan2 C99 specials, the saturating convert, round_integer. math::pack/unpack stay for the tile, attachment, fetch and texture callers. The interpreter models the normalized packs. SEMANTICS_VERSION 1920, ARTIFACT_FORMAT_VERSION 469 (a PrecisionNote variant). Verified so far: clippy -p metal2vulkan --all-targets --all-features -D warnings; rustdoc; nextest lower::arith (244 tests) and the engine_arith, engine_float_call_notes, engine_native_maths, engine_spirv_cross_forms, engine_native_half modules. * Delete the measured half quantize deviation; hold dot and median3 lanes to the device After the half follow-ups, no module requires VkProperty::MetalHalfQuantize: a module that rounds to half through OpQuantizeToF16 records NativeHalfQuantize on every profile, and nothing decides on DriverDeviation::MetalHalfQuantize. Delete it with its property, its derive and profile arms, its codec entry, its four measured rows (MoltenVK on Apple9, RADV on the 780M, ANV on the UHD 770 and the Iris Xe), the driver-facts test rows, and the lane assertions that it required nothing (engine_native_half, engine_arith, driver_deviations' half quantize and owned half edge lanes, native_maths' half rounding lane). Docs that named it (NativeHalfQuantize, narrow::quantizes, driver_facts) now say Vulkan leaves the quantize's rounding to the device. The lanes follow the previous commit's native forms: - driver_deviations' dot lane: dot is the device's OpDot on every device, so the half words (a dot of half lanes held as float) are no longer checked against Metal's fused 16-bit chain; the float words stay checked where the profile takes MetalFloatFunctions (MoltenVK, whose OpDot is MSL's own dot), and every kernel must record NativeDot. - driver_deviations' min/max lane: median3 is NMin/NMax on every device and records NativeMinMax, so its word (the seventh of each lane) is printed, not checked; every kernel must record NativeMinMax. - the denormal probe and native_maths docs name the device's OpDot and FMix. api_signatures re-blessed (DevicePackConversion added on both crates; the two MetalHalfQuantize variants removed). REFUSALS.md regenerated, unchanged. Verified: see the branch report. * Hold the sRGB pack bound and round's zero to what the devices answer The conformance replay on lavapipe and the MoltenVK lanes read the previous two commits' native forms against Metal: - sRGB unpack and pack: Metal decodes through its twelve-bit table (the step k / 4095 nearest the transfer) and encodes by that table's byte, where the module takes the MSL transfer by the device's Pow. DevicePackConversion's bound (artifact, runtime, API.md, FAST-PATHS.md) now says so: a decoded colour within half a twelve-bit step (1/8190) of Metal's step, beyond Pow's bound. Measured on the authored cases (lavapipe and MoltenVK): every float decode within 1.2205e-4 of Metal's, every half within that and one half ulp, every encoded channel within one code, no alpha differing; normalized packs a code apart at ties, a NaN channel the device's. - known-gaps.tsv: pass-bytes-srgb-decode-all-bytes's row takes the new answer (1153 elements, largest 0x00F90000) and names device-pack-conversion; a new row for pass-bytes-srgb-encode-sweep (772 elements, largest 0x00010101); pass-bytes-half-tanh-regimes's answer moves to 1257 elements (half tanh is the device's Tanh). CONFORMANCE-COVERAGE.md regenerated. - driver_deviations' denormal probe: round is C99's on every device (NativeTranscendentals), whose zero below zero is -0 where Metal answers +0, so its word (15) is printed, not checked. On MoltenVK it was the lane's only failing word (48 of 4096). Verified: conformance replay on lavapipe (arm64 gate container) exit 0, nothing unlisted or stale; driver_deviations' float_denormals, owned_dot and minimums lanes pass on lavapipe and on MoltenVK (M3 Max); conformance and degradation tests pass. * Hold the engine maths tests to the device's instructions engine_metal_math and engine_native_maths still asserted Metal's forms that the native change replaced; they skip without llvm-as, so the earlier focused runs missed them. - engine_metal_math: a half fast_tanh is Metal's half tanh (Metal's half functions are the same in both math modes, and MSL's fast-math formulas are its float ones), so it is the device's Tanh, no Exp2 and no division, as the code already lowers it; the float fast_tanh keeps the MSL formula and its assertions. sign is the device's FSign with and without fast math. Both record NativeTranscendentals wherever the device's functions are not Metal's own; on MoltenVK sign is MSL's own (no note) and a half tanh is MSL's float tanh rounded to half (DeviceTranscendentals). The sRGB fixtures now assert Pow beside UnpackUnorm4x8 / PackUnorm4x8, no table, and DevicePackConversion; the interpreter models no Pow, so the table reference values and the interpreter run go (their values are the device lanes'). The test is renamed metal_math_variants_select_their_forms. - engine_native_maths: dot, mix and fast::sqrt are OpDot, FMix and Sqrt with no Fma on lavapipe and on MoltenVK, a float dot and mix noting nothing on MoltenVK and a half mix NativeMix; the values hold their notes' bounds on both profiles' interpreter runs, where the test used to claim Metal's fused chains word for word on MoltenVK. - refine_float's doc: air.fast_sqrt is the device's Sqrt; engine_tiny_products' doc: the module's dot is the device's OpDot. Verified: with llvm-as set, every engine_ and lower::arith test passes (1610); clippy clean. * Number ARTIFACT_FORMAT_VERSION 473 and SEMANTICS_VERSION 1904, past development's The fast-math landing took ARTIFACT_FORMAT_VERSION 470 and the sampler-details landing 472 and SEMANTICS_VERSION 1903, so this series' encoding (the new DevicePackConversion note and the removed MetalHalfQuantize property in the codec) takes 473, and its translation changes 1904 (set in the series' first commit at the rebase onto 322dc6354d). * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
ae70850097 |
Take the device's native texel rounding, residency, level clamp and stores
One work packet, landed as 7 commits (d1161d6b38..322dc6354d on archive/development-linear-2026-10-28), in order: * Take the device's native texel rounding, residency, level clamp and stores Rule 1: where the device has a native form it is the only form, noted where it can differ. - Half texels on MoltenVK: a `half` read, sample or gather is the device's `float` texel (Metal's there) rounded to nearest even. The routine keeps only the YCbCr 8192 grid's ties away (the YCbCr work's), so the Metal-sampler families (32-bit float sample toward zero, the 16-bit normalized grids' exact half, the unmeasured class) go, with `HalfFamilies`, `HalfForm`, the grid constants and `texel_round::ones_ratio_*`. `HalfTexelConversion` is recorded under the bound format for a 32-bit float sample, a 16-bit normalized texel and an unmeasured format. - Subnormal coordinates: the clamp-to-zero flush is gone; the device reads the coordinate (`DeviceSampling`). - Residency: on a device with `shaderResourceResidency` a sample's or gather's word is the device's sparse residency (`SparseResidency`); Metal's footprint rule and the tile map stay only where the device has no residency of its own. `Probe`, the named footprint taps and the zeroing of them go. - Level clamps: a sampler's `lodMinClamp`/`lodMaxClamp` reach the device as given, not snapped to Metal's 1/64 grid; MoltenVK's Metal sampler snaps itself. Level queries are noted `DeviceSampling` off MoltenVK. - Stores: an integer texel written into a half-float or `RG11B10Float` storage texture of the float class is the store's to convert (noted `DeviceColorConversion`), and a `float` blend into a 16-bit float attachment through the pixel interlock is the store's to round (Metal's where the profile takes `MetalHalfStorageWrites`, else noted). Only `TextureWriteRoundingMode::NearestEven` keeps the shader's rounding (no store gives it). - color_writes.rs docs: drivers round small floats toward zero as measured. Docs: FAST-PATHS rows 60/61 and the subnormal gap removed; API.md catalogue entries; `PrecisionNote` and `DriverDeviation` docs. SEMANTICS_VERSION 1950, RUNTIME_VERSION 1750 (the runtime's sampler cache docs and test). Verified: cargo clippy --workspace --all-targets --all-features -D warnings clean; the metal2vulkan suite (3370 tests) with every failure fixed or updated to the native answer (half_texel, texture_interp's 16-bit grid, srgb_decode, the sparse binder tests, cross-class writes on the interpreter, fetch_blend16_narrow); golden_hashes moves and is left for development's re-bless; api-signatures and refusal-surface checks unchanged. * Take Vulkan's cube-gradient rule on a driver whose route is not measured A MoltenVK release or GPU whose cube-gradient route no measurement covers took Metal's anisotropic level and taps in the shader (`CubeGradientRoute::Unmeasured`), and elsewhere an isotropic sampler made for the use. Rule 1: the device has a native gradient sample, so it is the only form. Such a driver now takes `CubeGradientRoute::Vulkan` (the form Vulkan's derivative rule reads), the device's reading recorded as `CubeGradientFootprint`; the emulation stays only for a device without `samplerAnisotropy`. With the variant gone nothing sets the isotropic-sampler use, so it is deleted throughout: `SamplerUse::cube_gradient` and `with_cube_gradient`, `CombinedSampler::cube_gradient` and its index bit, `HandleClass::Sampler`'s `cube_gradient` (four heap sampler classes, not eight), the binding keys, the plan's `WriteSource::Sampler`/`ArgumentSampler` and `SamplerSource::Slot` fields, the codec, the runtime's and the validation executor's binders. The anisotropic emulation loses its isotropic one-tap form and the `answered` input. Consumer-visible: `SamplerUse`, `CombinedSampler`, `HandleClass::Sampler`, `WriteSource` and `SamplerSource` lose the field; `CubeGradientRoute::Unmeasured` is gone (api_signatures blessed). ARTIFACT_FORMAT_VERSION 470 (the encoded classes and symbols changed). Docs: profile.rs and error/mod.rs route docs, the AnisotropicFilter and CubeGradientFootprint notes, API.md's catalogue, FAST-PATHS's unmeasured-route gap removed. Verified: workspace clippy (all targets, all features) clean; nextest of the touched families (engine_sampler_unk, engine_heap_binder, engine_handles, anisotropic, driver_facts, cache, bind heap/plan, sym, metal::sampler, link, runtime sampler_cache, validation argument_buffer_members, api_signatures/api_surface/fast_paths): 429 run, all pass after updating the tests to the Vulkan route. * Ledger lavapipe's halfway nearest-mip level under a descriptor clamp With the level clamp handed to the device as given, lavapipe rounds a nearest mip filter's level at `lodMinClamp` 1.5 up to level 2 where Metal reads level 1; Vulkan allows either rounding at a half. The five `sampler-mip-*` sites are the device's native level selection: `DeviceSampling`'s docs (and API.md's entry) now state the shape, and known-gaps.tsv holds the five llvmpipe rows. Verified: `conformance replay --cpu` on lavapipe (linux-gate, arm64) listed exactly these five sites as unlisted and nothing stale; the conformance ledger tests pass. * Ledger the two filter-pair sites at their measured difference The two mixed-filter sites of sampler-mip-filter-pairs-nearest differ by 1000, as the other three do; the rows copied a truncated figure. Verified by conformance replay --cpu on lavapipe, whose rerun named these two rows both unlisted and stale. * Number ARTIFACT_FORMAT_VERSION 472 past the fast-math change's 470 Both the fast-math change and this series moved the artifact format to 470, so the rebase merged them silently; 471 is held for the maths-functions series. * Drop the YCbCr sample module's cube_gradient field, gone from CombinedSampler This series removed CombinedSampler::cube_gradient with the isotropic sampler use; the YCbCr sample module landed meanwhile still set it. Verified: clippy --workspace --all-targets --all-features -D warnings clean. * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
12cd1535a8 |
Keep the device's copy for blits through a texture Metal compresses
One work packet, landed as 9 commits (62c7d7a9f5..378d636d2f on archive/development-linear-2026-10-28), in order:
* Keep the device's copy for blits through a texture Metal compresses
Metal's GPU blit into or out of a texture it keeps losslessly compressed
writes three families' texels in its compressor's canonical encoding:
BGRA10_XR (and its sRGB twin) with each field's low six bits cleared and
the alpha code clamped, RG11B10Float with a NaN made the quiet NaN, and
RGB9E5Float with the shared exponent lowered. The runtime reproduced that
with a crate-owned compute rewrite of the copied rows (bind::CompressedBlit
and its module) after every such blit.
That is Metal's compressor's encoding, not the format's: Metal's own
uncompressed texture of the format keeps the bytes through the same blit,
and every rewritten texel reads the same value either way. The device's
copy, which keeps the bytes, is now the only form. A blit through such a
texture announces the note of the encoding it keeps, once per device:
extended-range-bits-kept (BGRA10_XR), device-nan-encoding (RG11B10Float)
and shared-exponent-kept (RGB9E5Float), each existing kinds; no new kind.
Where the device's own copy already writes Metal's encoding (MoltenVK,
RuntimeDriverDefect::CompressedImageCopiesRewriteTexels) nothing is
announced; the defect's PixelFormatView usage, which keeps CPU copies
byte-exact there, stays.
Removed public items: bind::CompressedBlit, bind::CompressedBlitModule,
bind::compressed_blit_module, WorkCounts::compressed_rows_rewritten.
RUNTIME_VERSION 1740. The conformance recordings' runtime cost records
that count compressed_rows_rewritten (compressed-blits-*, fresh-pattern-*,
xr-clear-routes-*, xr-draw-*) move at the next re-bless.
The compressed-blits lane now asserts the bytes are kept and each format's
note is announced; the conformance case declares the note where it is not
one of the suite's native notes.
Verified: cargo clippy --workspace --all-targets --all-features -D warnings;
RUSTFLAGS='--cfg m2v_gpu' cargo check of runtime and validation; nextest
of blit_plan, degradation, degradation_catalogue, conformance
compressed_blits, unused_bits, fast_paths, owned_divisions, api_surface,
api_signatures and refusal_surface (77 passed). Device lanes and replay
run after the whole series.
* Resolve a fetching pass's sample planes by the device's average
A color attachment whose sample planes held its samples as the pass ended
(framebuffer fetch in the pixel interlock on a device without multisampled
storage images: ANV, MoltenVK) was resolved from the planes by the
crate-owned resolve, which computes Metal's closed rules for every unorm,
snorm, sRGB, 32-bit float, half, packed 16-bit, RG11B10Float and
RGB9E5Float format. Every other color attachment resolves by the device's
AVERAGE. The average is the device's native answer, so it is now the only
form here too: the planes merge back and one more instance of no draws
resolves the attachment, announced device-rounded-resolve where the
driver's average is not measured to be Metal's (on MoltenVK it is,
DriverFact::ColorResolveAverageIsMetals, so nothing is announced there).
The crate-owned resolve keeps the two resolves no device's average writes:
into the attachment's format's sRGB twin (the 8-bit unorm and sRGB rules)
and of an extended-range attachment. Its rules for every other format, and
their tests, are deleted. ColorResolveFormat::of names the twin's eight
formats; sample planes are read only for an extended-range form, and a
module of a twin format from planes is refused.
Removed public items: ResolveRule::{HalfUnorm, Snorm, Float32, Float16,
SmallFloat, SharedExponent}, ResolveRule::bits, ResolveRule::resolves,
ColorResolveFormat::resolves; ResolveRule::Unorm loses its bits field.
Cost: such a pass now merges its planes back and resolves in one more
render pass instance, where it drew one resolve pass from the planes; a
memoryless attachment the pass only fetches and resolves needs a backing.
The ColorResolveAverageIsMetals docs, the shader-resolve and
device-rounded-resolve entries (degradation.rs, docs/API.md) now say what
resolves where. The fetch lanes expect no shader-resolve for a fetched
attachment.
Verified: cargo check --workspace --all-targets --all-features; the GPU
cfg check of runtime and validation; nextest of color_resolve,
sample_planes, degradation, driver_facts, fast_paths, api_surface,
api_signatures, refusal_surface (84 passed). Device lanes run after the
series.
* Clear a float attachment to the clear color as the device converts it
A render pass's Clear of a normalized, sRGB, packed 16-bit, half, float or
small-float color attachment computed Metal's texel on the CPU (its
rounding, its trip through half for the packed 16-bit formats, its
truncated small-float and shared-exponent mantissas) and handed the device
a value that converts back to it; a Depth16Unorm clear took a quarter step
above Metal's truncated code. The conversion is the device's native
answer, so the clear value is now the color (or depth) as a float, which
the device converts.
Where the device's conversion can stand a code from Metal's it is
announced, once per device: device-color-conversion where a normalized
channel's scaled value lies within 1/1024 of a midpoint between two codes
(a packed 16-bit channel's within Metal's half step too), an sRGB channel
lies inside (0, 1), or a half, small float or shared exponent does not
hold the value exactly; unorm-depth-rounding where a Depth16Unorm depth's
scaled value lies at or above a midpoint, which Metal truncates and a
device rounding to nearest takes up. Vulkan asks for rounding to nearest
and leaves ties, sRGB encodes and float rounding to the device. A NaN in a
normalized or RGB9E5Float channel still clears as 0 (Vulkan states no such
conversion); integer, extended-range, word and YCbCr attachments keep
Metal's conversion, which no device makes for them.
Metal's measured conversion moves into the tests as the model they compare
with. The renders lane accepts a device texel a code from Metal's where
the note is announced and prints it; the cleared sRGB resolve lane
compares the resolve with the device's own 1x clear.
UnormDepthRounding's docs and cost, PrecisionNote::DeviceColorConversion's
docs and both docs/API.md entries say so.
Verified: cargo clippy --workspace --all-targets --all-features -D
warnings; the GPU cfg check of validation; nextest of clear_value,
heap_tiled, fresh, nan_clear and degradation (55 passed). Device lanes and
replay run after the series.
* Expect the device's clear conversion in the lanes that clear at a tie
Since 5925c303f8 a clear converts the clear color (and a 16-bit depth)
the device's way, announcing device-color-conversion where a channel
lies at a rounding question (0.5 on an 8-bit unorm channel is 127.5
codes, a tie; any sRGB channel's encode) and unorm-depth-rounding where
a Depth16Unorm clear's fraction reaches the midpoint (Metal truncates).
Lanes that hold exact notice sets or Metal's truncated depth codes now
expect them:
- dont_care_stores: every pass clears through color_pass or earlier()
at 0.5; clear_tie() adds the note to each expected set (MoltenVK's
pipelines record no color-conversion note, so it showed there first).
- resolves: the depth stand-in clears Depth16Unorm to 0.5 (32767.5
codes): Metal's 0x7fff or the device's 0x8000, and the note announced
exactly for that format.
- buffer_depth_samples: the 16-bit clear to 0.25 (16383.75 codes)
announces unorm-depth-rounding.
- buffer_texture_blits: the planar depth clears (0.375, 0.625, 0.875)
hold Metal's truncated code or the one above it, the note's bound.
Verified: the four lanes' failing tests on lavapipe (linux-gate
halfnative) failed before these edits; on MoltenVK (Apple M3 Max,
maclock) dont_care_stores, resolves' depth stand-in,
buffer_depth_samples and the planar depth lane pass with them.
* Merge a fetched attachment's sample planes back before its twin resolve
A pass whose last draws fetch a multisampled attachment through sample
planes (the pixel interlock without multisampled storage images: ANV,
MoltenVK) left the planes unmerged after it under MultisampleResolve
wherever the crate-owned resolve drew the attachment's resolve, on the
reading that that resolve reads the planes. A resolve into the
attachment's sRGB twin is crate-owned but reads the attachment itself
(color_resolve.rs filters its planes out), so it resolved samples the
pass never wrote: on MoltenVK a 4x RGBA8Unorm attachment cleared to 0,
fetched once and resolved into RGBA8Unorm_sRGB read all zeros, where
the same pass stored too resolves (255, 225, 0, 0).
The planes steps now skip the merge only for a resolve that reads the
planes, an extended-range attachment's (the flag is renamed
planes_resolve to say so); a twin resolve merges first, as a stored
attachment does.
Test: runtime_lane::framebuffer_fetch::planes::
a_twin_resolve_of_a_fetched_attachment_reads_its_samples holds the
MultisampleResolve answer to the StoreAndMultisampleResolve one.
Verified on MoltenVK (Apple M3 Max, maclock): the test failed without
the fix (zeros) and passes with it, beside the planes, memoryless,
kept_resolves and twin-resolve lanes (18 passed); the runtime's
sample_planes unit tests pass.
* Expect the clear note in color_reformat's passes, through one helper
color_reformat's passes clear to (0.5, 0.25, 0.75, 1.0), whose red is a
tie in an 8-bit unorm channel, so the device's conversion of the clear
announces device-color-conversion at the device's first such pass.
Lavapipe's pipelines record the note already; MoltenVK's record none
(VkProperty::MetalColorWrites), so its exact notice sets failed there.
degrade_notices::tie_cleared() names that note for every lane whose
passes clear at a tie; dont_care_stores' local helper moves there.
Verified on MoltenVK (Apple M3 Max, maclock): color_reformat and
dont_care_stores pass (they failed in the full runtime_lane run before
this change).
* Hold the kept compressed-blit encodings to the ledger, and declare their notes
Since 01f733c6f0 a blit through a texture Metal keeps losslessly
compressed is the device's copy, which keeps the bytes Metal's
compression rewrites into the canonical encoding. The lavapipe replay
then read 46 rows the ledger did not expect:
- 28 value sites of compressed-blits-{bgra10xr,bgra10xr-srgb,rg11b10f,
rgb9e5f}: the device's bytes against Metal's canonical encoding. Each
is now a known-gaps.tsv row (venue llvmpipe) naming the note that
records it: extended-range-bits-kept, device-nan-encoding,
shared-exponent-kept, whose bound (the same value, another encoding)
covers it. Nothing is open: rule 1 rules out writing Metal's encoding.
- 18 notice sites of fresh-pattern-{552,553,93}, xr-draw-bgra10xr*
and xr-clear-routes-bgra10xr*: their read-backs blit out of such a
texture and announce the note, every value exact. They now declare
it through compressed_blits::kept_encoding_notice, the one table of
which format announces which note (device-nan-encoding is native and
declared for every case already). fresh_contents' row-notice test
counts the three pattern rows' second allowance.
docs/CONFORMANCE-COVERAGE.md regenerated (the ledger's row count).
Verified: conformance replay --cpu on lavapipe (linux-gate halfnative,
arm64): exit 0, 751 rows, exactly the ledger's (723 before the series
plus these 28), 0 unlisted and 0 stale; cargo nextest -p
metal2vulkan-conformance (1005 passed); clippy -D warnings.
* Format owned_divisions' bind import after the rebase
The rebase onto development dropped both CompressedBlit (this series)
and BlockDecode (development's BC twin removal) from the import, which
rustfmt now joins onto one line. No behaviour changes.
Verified: cargo fmt --all --check.
* Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
|
||
|
|
2ec1f9fdc8 |
Read an sRGB texel through the device's own decode wherever the device samples its format
One work packet, landed as 2 commits (9835965499..1a930f5dc1 on archive/development-linear-2026-10-28), in order: * Read an sRGB texel through the device's own decode wherever the device samples its format Rule 1 makes the device's texel conversion the answer wherever it has a native form. A texture bound in an 8-bit sRGB format (and the sRGB forms of BC1 to BC3, BC7, PVRTC, ETC2, EAC and ASTC) was read through a second UNORM "raw" view and decoded through Metal's twelve-bit table on every device; that emulated Metal's bits where the device decodes sRGB itself. What changed: - Every read, nearest and filtered sample, pixel fetch, gather and bicubic tap of a sampled sRGB texture now reads the device's decode through the slot's sRGB view (a decoded twin's R8G8B8A8_SRGB view where the device lacks the compressed format). An input-attachment read of an sRGB color attachment reads the device's decode too (the snap-to-byte and table decode in lower/fragment/color.rs is gone). - The note is the existing PrecisionNote::SrgbTexelDecode: specialized on the bound format's class (BicubicTexels::SRGB, SpecKey::BoundTexelFormat, announced at the draw or dispatch), outright for a heap element, and at link for a float input attachment over an sRGB attachment (StageIo::decoded_fetches). On MoltenVK the module requires VkProperty::MetalSampler instead. - The capability fallback stays: a format the device cannot sample, held as its UNORM twin (R8Unorm_sRGB and RG8Unorm_sRGB on lavapipe, RG8Unorm_sRGB on ANV and NVIDIA among the committed profiles), joins the SrgbTexture variant (srgb_twin_on) and decodes the twin's codes through Metal's table through the slot's own binding: exact for one texel's codes, the device's filter of the codes otherwise (noted). The storage alias, tile, word-attachment and pack/unpack table uses are untouched. - Deleted: the raw view and its plumbing (ResourceKind::RawTexture, BindingSource::RawTexture, CombinedSampler::raw/with_raw/sampler_binding_use, TextureDecls::raw, SlotPlan::raw, BindingKey::raw), texel_format::srgb_raw_view and srgb_raw_on, RuntimeFact::SrgbDeviceDecode, VariantKey/LoweringInputs::srgb_twins (merged into srgb_textures), LoweringInputs::srgb_fetches and the input attachment's snap, the runtime image plan's extra UNORM view of sampled sRGB images, and the ASTC-native bicubic refusal. srgb_raw is renamed srgb_coded. - Versions: SEMANTICS_VERSION 1891, RUNTIME_VERSION 1672 (the image plan lists no raw view; a notice text changed), ARTIFACT_FORMAT_VERSION 469 (CombinedSampler::raw removed, StageIo field renamed). The runtime-sources pin is left for the landing. - Docs: FAST-PATHS rows (sampling, texel conversion with the measured bound, ASTC twin), the stale "runtime sampler's nearest sRGB sample" known gap removed, SrgbTexelDecode moved to the device-gap class in tests::fast_paths; PrecisionNote docs, DriverDeviation::MetalSampler, docs/API.md's catalogue, decode module docs, runtime notice texts. - Lanes: a new runtime_lane::srgb_decode reads every code of RGBA8Unorm_sRGB; the ASTC, ETC, PVRTC, BC, cross-class and fetch lanes hold an sRGB color channel to the device's decode of its own code (srgb_decode_holds: bit for bit through Metal's own texture unit) and assert where the note is announced. The BC lane keeps development's no-twin structure: an sRGB color channel off a measured driver holds as the device's sRGB decode of a code within compressed-texel-decode's bound; the ASTC CPU-write lane's check takes the device's exactness. - known-gaps.tsv: 21 new llvmpipe rows (ETC2, EAC, ASTC sRGB reads, the read-write tier's sRGB round trip), the 12 BC1 to BC3 sRGB rows' answers and words (the device's BC decode, then its sRGB decode: both notes), the 8 sRGB fetch rows' answers updated; CONFORMANCE-COVERAGE.md regenerated. Measured: llvmpipe (LLVM 21.1.8, arm64) decodes every color code within 5.25 table steps (0.00128) of Metal's value; MoltenVK on the M3 Max equals Metal at all 1024 lanes, read and sampled, and in the cross-class gathers (0 of 240 words differ through each class). Words (lavapipe, one-access kernels, a slot bound in RGBA8Unorm_sRGB): read half 2941 -> 1131, read float 2513 -> 836, fetch half 3062 -> 1264, nearest float 2580 -> 915, gather alpha half 2934 -> 1191, gather red float 2571 -> 896; linear and runtime samples unchanged (1210, 1163); a bicubic sample grows, 10524 -> 13254 half and 10318 -> 13048 float (the emulated sum of the device's decoded taps). The twin variant loses its raw binding (read half 2941 -> 2929). Verified, on this tree (rebased onto 7b5cf8328d): cargo fmt; clippy --workspace --all-targets --all-features -D warnings, plain and under --cfg m2v_gpu; rustdoc -D warnings; scripts/api-docs; api_signatures re-blessed (the 9 removals listed above); REFUSALS.md unchanged; 700 of 701 focused metal2vulkan tests (lower::texture/sampler/fragment/select, pipeline, metal, spirv::requirements, the texture/sampler/fragment/srgb engine tests, fast_paths, surfaces) pass, the golden table failing as it does on 7b5cf8328d itself (1608 cells changed under unchanged keys): blessed on both trees, this change moves 0 cells; the conformance suite's 1007 tests pass. On lavapipe (scripts/linux-gate, arm64): 168 touched runtime-lane tests pass; the runtime crate passes 1368 of 1369, the one failure deferred_calls::a_commit_after_an_end_in_flight_returns_and_keeps_its_order (status Scheduled where Committed is expected, no texture involved) failing again in 1 of 5 reruns, a timing flake; `conformance replay --cpu` exits 0 with no unlisted or stale row. MoltenVK lanes were not rerun after the rebase. * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
8acf6ae154 |
Sample a BC texture's own image through the device's decode, keeping no twin
One work packet, landed as 3 commits (d8bb73078f..862d4c13a1 on archive/development-linear-2026-10-28), in order: * Sample a BC texture's own image through the device's decode, keeping no twin Under the native-arithmetic rule a device that has a BC format decodes it itself: its decode is the answer, recorded where it can differ from Metal's. The BC1 to BC5 decoded twin emulated Metal's 6-bit-weight decode on drivers not measured to make it (lavapipe, NVIDIA, ANV, RADV's BC4/BC5), at the cost of a second image 4 to 8 times the blocks and a decode after every write. It goes, and with it every piece only it used: - the translator's `bind::BlockDecode` and `bind::block_decode_module` (Metal's fitted BC1 to BC5 decode, its kernel and its tests); `bind/block_decode.rs` keeps only what the carriers' decode modules share (`BlockDecodeModule`, the bindings, `table`, `decode_module`); - the runtime's `TwinDecode::Block`, `Device::twin_decode`, the twin's announcement `decoded-block-twin` (`Degradation::DecodedBlockTwin`, removed), the view-decode notice for a view of another decode (`degrade_view_decode`, `degrade_device_decode`), and the device-test-only `Scheduler::decodes_pending`, which only the BC twin's CPU decodes needed. A BC texture (BC1 to BC7, the sRGB forms too) is now its own BC image on every device, and on a device whose driver lacks the format's fact (`ColorBlockDecodeIsMetals`, `ChannelBlockDecodeIsMetals`, `Bc6hBlockDecodeIsMetals`, `Bc7BlockDecodeIsMetals`) announces `compressed-texel-decode`, now also for a sparse texture and a texture over the caller's `VkImage`, which announced nothing before. The facts still decide the note. The carriers' twins (ASTC, PVRTC, ETC2/EAC, 4:2:2) and their CPU decode thread are unchanged; a carrier whose twin's format the device cannot sample is now refused typed instead of read as its carrier (no conformant device lacks those formats). The sRGB forms' read through Metal's table is unchanged here (another change replaces it). Lanes and suite: - `runtime_lane::compressed_decode` reads the device's decode: exact where the driver has the fact (within `device-texel-conversion`'s ulp off Metal's sampler), else within the note's stated per-format bound, with the note announced; no write makes a decode pass or CPU decode. - `cpu-block-decode` keeps a lane site in `astc_textures` (`astc_cpu_writes_decode_on_the_cpu`, the CPU decode thread's ordering behind work in flight), and `chroma_pairs` holds its notice to the CPU decodes on every device. - conformance: `compressed-texel-decode` joins `replay::NATIVE_NOTES`; the BC cases declare no twin notices; 40 llvmpipe rows in known-gaps.tsv, one per BC1 to BC5 round, each within the note's lavapipe bound. The cross-check `every_recorded_texel_is_the_lanes_fitted_rule` still holds the M3 Max's recorded texels to the case's own model of Metal's decode. - new device test `tests::bc_own_image`: every BC format, `Shared` by `replaceRegion`, `Private` by a blit and a heap's, has no twin, keeps its blocks, makes no decode, and announces the note exactly where the fact is missing. Docs: API.md's `compressed-texel-decode` entry and cost (lavapipe's BC4/BC5 bound widened to 2.4/255, signed 0.022, as measured below), `decoded-block-twin` removed; a FAST-PATHS.md device-gap row; REFUSALS.md, api_signatures.tsv, api_surface and CONFORMANCE-COVERAGE.md regenerated. RUNTIME_VERSION 1669 -> 1710 (renumbered at landing). SEMANTICS_VERSION stays: no translation changes, so the golden hashes do not move. The runtime-sources pin is not re-pinned here. Verified: - clippy `--workspace --all-targets --all-features -D warnings`, plain and `--cfg m2v_gpu`; rustdoc with `-D warnings`; the refusal, signature, Metal and conformance coverage checks. - macOS, no device: metal2vulkan-runtime + metal2vulkan-conformance 2139 passed; metal2vulkan's fast_paths, owned_divisions, bind, api_surface, api_signatures, driver_facts and cache tests 568 passed; conformance again after the ledger rows, 1007 passed. - lavapipe (linux-gate arm64, `--cfg m2v_cpu_icd`): 145 tests of the touched families passed (bc_own_image, compressed_decode, astc_textures, chroma_pairs, pvrtc/etc textures, degrade_notices, texture_blits/fills, cpu_copy_layouts, image_plan, first_moves, the degradation tests). Largest differences from Metal: BC1/BC2 2/255, BC3 3/255, BC4 2.28/255 (signed 0.0172), BC5 2.31/255 (signed 0.0212); BC6H has its fact there, BC7 announces. `conformance replay --cpu`: the only unlisted gaps were these 40 BC rounds, no stale row. - MoltenVK on the M3 Max (maclock, memcap): 43 tests passed, every BC1 to BC5 channel exactly Metal's, no `compressed-texel-decode`; the replay of 105 touched cases left all 41 BC cases exact (one unrelated divergence, `read-write-tier-held`'s `set-past-layout-support` notice). * Count the ASTC CPU-write lane's behind-work decodes from before the making `astc_cpu_writes_decode_on_the_cpu` failed once on lavapipe after the rebase onto cb759a4c4a: "ASTC4x4LDR Event: 2 CPU decodes, not 1". The cause is the test's window, not a second decode. `WorkCounts::cpu_block_decodes` counts a write's decode when the device's decode thread finishes it (`Image::finish_twin_decode`). The case writes the old blocks, commits the reader, and only then took `before`. In the Busy case `scheduled(&reads)` waits for the reader's batch, which the scheduler holds until the old blocks' decode finished, so `before` already holds it. In the Event case nothing waits, so the old blocks' decode could land after `before` and be counted with the new ones'. Each write queues exactly one job, and the thread takes them in order, so 2 is the old write plus the new. Now the case counts from before the texture's making and expects exactly two CPU decodes (its two writes) where the copies go on the host or the staging queue, and none elsewhere. The count is read after the later reader completed. That reader's batch waits for the new write's decode, the thread finished every earlier job by then, and it counts each job before it releases the batches that wait for it. Every earlier case's decodes landed before its own later reader completed too. No sleep, and no looser bound. Verified: clippy of the validation crate under `--cfg m2v_gpu`; on lavapipe (linux-gate arm64, `--cfg m2v_cpu_icd`), the test 20 times and the families bc_own_image|cpu_copy_layouts|compressed_decode|degrade_notices|astc|etc_textures|chroma_pairs| event_round_trips|grouped_submissions|waiter_submits|scheduler. The 20 runs all passed: each of the 80 behind-work cases (two formats, Busy and Event) counted exactly 2 CPU decodes, 0 cases wrong; 13 Busy cases were void (the reader ran before the write) and 2 to 4 cases a run held. The families: 86 tests passed. * Re-pin the runtime sources at the landing tip The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
ce0ffcb27a |
Ledger the llvmpipe mipmap chain's one-code bytes under device-filtered-mipmaps
blit-generated-mipmaps now takes the device's blit chain on llvmpipe and announces device-filtered-mipmaps (a native note); two bytes of its levels are one code from Metal's. The note states no bound against Metal's answer, so the row says the open item is that bound. CONFORMANCE-COVERAGE.md regenerated. Verified: conformance replay --cpu on lavapipe (linux-gate arm64, LLVM 21.1.8) at 1af72fc0d8 plus this row: the 723 rows are exactly the open gaps known-gaps.tsv expects (exit 0); before the row, the one unlisted divergence was this site. coverage.py --check: as derived. Originally f3ff805eb4 (archive/development-linear-2026-10-28). |
||
|
|
041cdad847 |
Declare the device's native answers at the notices site for every case
One work packet, landed as 7 commits (8c74f645e2..5a1a62bb0e on archive/development-linear-2026-10-28), in order: * Declare the device's native answers at the notices site for every case Under the owner's native-arithmetic ruling the device's own answer is the contract wherever it has a native form, and the note that says so fires in almost every case that computes, converts or samples: on llvmpipe 270 cases differed only by announcing such notes (2,123 unlisted gaps in all, against 62 before the exact paths' deletion). The suite now holds a fixed set of those notes declared for every case (replay::NATIVE_NOTES), chosen from the PrecisionNote and Degradation docs: the native maths, half and sampling classes, the device's denormals, NaN bits, functions and precision bounds, tiny-product rounding, depth conversion and depth test, texel and colour conversions, sampling level and filters, and the device's resolve. compare_run holds them beside a case's own allowances under the same rules (the notices site alone, justified only where the code was announced), and they never count among a case's named or unfired allowances. They declare nothing about a value: every value still compares field by field, and the README says a value the device's answer moves is a known-gaps row where the note derives no tolerance. Notes of what the device lacks, of an emulation's own precision, or of a Metal form not measured or not built stay each case's. Also: Policy::Exact and the replay docs now say what DevicePolicy::exact_answers() selects (the five runtime switches) and that no switch touches arithmetic. Tests: a native note is declared for every case and counted nowhere; it declares no value and excuses no other notice; every native-* kind is in the set, each once, each a precision kind. The first two fail with the set emptied (checked by chaining an empty iterator). The undeclared-notice test moves off two kinds that are now native. Verified: cargo nextest run -p metal2vulkan-conformance --all-features (1006 passed); on lavapipe in linux-gate (arm64) the replay's unlisted gaps fall from 2,123 to 584. * Drop the shader-color-conversion declarations that can no longer fire Since color writes were left to the device's own conversion, the runtime announces shader-color-conversion only for a half-float attachment of a pipeline under TextureWriteRoundingMode::NearestEven (StageModule's rounded_colors), whatever the device. No case of the suite sets that rounding mode, so the 18 case files that declared the notice for normalized attachments declared something no venue can announce: the lavapipe replay reported 81 such declarations as never fired. The normalized store is now the device's colour conversion, a native note the suite declares for every case. The declarations, the comments that explained them, the one helper only they used (blend_interactions' converts_in_the_shader) and the tests' allowance counts go; rotated_targets also drops its per-state choice, since blended and unblended states both store through the device's conversion. Verified: cargo nextest run -p metal2vulkan-conformance --all-features (1006 passed) and clippy on the crate clean. * Declare three cases' own notices; keep unannounced native declarations out of loosening reports read-write-tier-descriptors now names carried-decoded-twin and decoded-block-twin, read-write-tier-held names unnamed-texture-unviewable beside the shared-memory notice, and texture-pairs-usage-crossings' usage row names decoded-texel-precision. Each fired on llvmpipe (LLVM 21.1.8) at the notices site and nowhere else; they are not the device's arithmetic, so they stay per case. The walk tried every covering allowance and, where none held, reported the first unjustified one as "the case loosens this site". With the native-note declarations covering case/notices/* for every case, a case that named nothing read as loosening its notices site with native-transcendentals. Only the case's own allowances can be such a loosening now; a native declaration the run did not announce is as if absent. Verified: cargo nextest run -p metal2vulkan-conformance --all-features, 1007 passed; the new test an_unannounced_native_note_is_no_unjustified_loosening fails with the guard removed. The arm64 lavapipe replay (linux-gate) before the guard and after the declarations shows no notice-site row left: 576 unlisted, 573 divergent values and 3 refusals, all in value sites. * Hold the device's vertex conversion among the suite's native notes device-vertex-conversion, which landed on development, is the device's fixed-function conversion of a normalized vertex attribute's codes: a conversion the device answers natively, as the texel and colour conversions are. The suite now declares it at the notices site for every case with the rest of the set. Verified: the native-note tests of the conformance crate pass (the set test holds every member a precision kind, once). * Bring the llvmpipe known-gaps rows to the device's native answers With the native notes declared for every case, the arm64 lavapipe replay left 576 unlisted sites (573 divergent values, 3 refusals) and 14 rows that looked fixed. Each is now a row that says what differs, which note records the device's answer, whether that note's recorded bound covers the site, and what is open; the header gains a paragraph on such rows, the one kind that is not a bug of ours in itself under the owner's rule 1. - 13 rows take their new answers: half-texel-nans r16f/rg16f/rgba16f at three sites each (472/940/1874 elements, bound 511), the RGB9E5 rows of vertex-format-float4 and -half4 (32, 65407), and blend-interaction-format-srgb8 one-one-add (55) and one-one-reverse-subtract (90). - sampler-mip-linear's clamp-float-max row is dropped: the site is exact now. - 19 rows scoped to the CI venue (LLVM 23.1.1) whose answer the arm64 venue matches exactly are widened to every llvmpipe; blend srgb8 one-one-subtract, which differs (78 on CI, 81 here), gets a row scoped to the arm64 venue. - 543 new rows, venue llvmpipe, in families: texel and storage NaN encodings, half and vertex conversions, 8-bit one-ulp texel conversions, colour conversions at ties, the device's linear filter, 3D and border addressing (open: unmeasured against the note), digests (open: an element read), and read-write-tier-held's three refusals of a held read-write texture (open: runtime and translator work). - Rows asking for an exact fix the ruling rules out are reworded: the fast-math blend families (half-output-blends, argb8-targets, blend srgb8, blend-sweep-operations), half-texel-nans, and the nine 8-bit normalized vertex rows, which device-vertex-conversion now records within its stated bound. The RGB9E5 rows keep their fix: a missing component's default and a vertex format the device need not offer are capability, not arithmetic. Verified: scripts/linux-gate --platform arm64 replay --cpu on lavapipe (llvmpipe LLVM 21.1.8, 128 bits) exits 0: 0 unlisted, 0 looking fixed; verdicts announced 419, divergent 130, exact 522, lacks-feature 36, never-returned 4, refused 11. The ledger tests of the conformance crate pass. The CI venue's (amd64, LLVM 23.1.1) answers for the new llvmpipe rows are not verified here. * Regenerate CONFORMANCE-COVERAGE.md for the llvmpipe ledger rows The coverage document lists the known-gaps ledger's rows, which the previous commit brought to the device's native answers (298 ledger rows before, 841 now). Verified: python3 -I scripts/conformance-coverage/coverage.py --check passes, and so does the conformance crate's conformance_coverage test. * Say that sampler-border-colours' rows sample a 3D texture The case samples an RGBA 3D texture (sampler_filtering.rs, Family::Border), and device-sampling's probe measured 2D textures only; the six rows now say so. Text only, the waiting-on field, which the replay does not match. Verified: the ledger and coverage tests of the conformance crate pass, and coverage.py --check reads the regenerated document as derived. |
||
|
|
6d814a512f |
Compare a compute stage input whose descriptor states more attributes than its kernel reads
The steps this packet landed as, in order: - Record the new stage-input case's cost bounds and its timings - Re-derive the conformance coverage document for the new case - Measure what a compute kernel's unread stage-input attributes cost its translation - Build the stage-input case's element words with iterators Content: the tree of `development` at 63136aa1e4, unchanged. |
||
|
|
dd9868c0fc |
Author the sparse move past the bounds against Metal's measured rule
The steps this packet landed as, in order: - Record Metal's answers for the four sparse move cases - Record the seven gaps the sparse move cases' replay found - Re-derive the generated documents at the landing tip Content: the tree of `development` at 92107f95a7, unchanged. |
||
|
|
588c40f91e |
Credit the format-by-type grid the read-write tier case puts to Metal
Content: the tree of `development` at 294fa689f9, unchanged. |
||
|
|
87d4d3b881 |
Copy the levels plain Metal copies and refuse only what it refuses
The steps this packet landed as, in order: - Give BGRA4Unorm its texture round-trip row, recorded on Metal - Re-derive the generated documents at the landing tip - Record the runtime sources' hash after the level-copy narrowing Content: the tree of `development` at 233e95d38e, unchanged. |
||
|
|
0552f2b971 |
Compare the two device tiers and the behaviour each one promises
The steps this packet landed as, in order: - Re-derive the generated documents at the landing tip Content: the tree of `development` at 238b032f74, unchanged. |
||
|
|
25ab1ea82b |
Read the storage mode the suite's cases actually state
Content: the tree of `development` at 1f1ac002e7, unchanged. |
||
|
|
fb5c65e808 |
Compare a sparse mapping update of a slice past the texture's slices
The steps this packet landed as, in order: - Re-derive the conformance coverage document for the new sparse case - Move the sparse tiles Metal's run of destination tiles moves - Recompute the runtime sources' pin after the sparse move's rule Content: the tree of `development` at 66fac14c19, unchanged. |
||
|
|
04820f0bed |
Read the conformance suite's unit tests out of its Metal leg
The steps this packet landed as, in order: - Read the selectors the suite's Metal leg sends by hand - Type the receivers the suite's Metal leg binds by pattern - Read the receiver, the chain and the closure the leg actually writes - Say what still costs an unresolved call site - Re-bless the golden tables after the extension vocabulary grew Content: the tree of `development` at 1116f3a6d0, unchanged. |
||
|
|
aaad039149 |
Cross the shared texture creator with the storage mode it is asked in
The steps this packet landed as, in order: - Read a shared texture's own getters again after its handle is made - Record Metal's shared-creator answers across the four storage modes Content: the tree of `development` at 30a6626a9d, unchanged. |
||
|
|
31b627b001 |
Bump SEMANTICS_VERSION to 1852 and RUNTIME_VERSION to 1591 for the held straggler
The steps this packet landed as, in order: - Re-derive the generated documents at the landing tip Content: the tree of `development` at 3595519179, unchanged. |
||
|
|
340308a8dc |
Cross a degenerate rate-map screen with every construction route
Content: the tree of `development` at 1a8ba15c30, unchanged. |
||
|
|
4bd4af9323 |
Attribute a wait for a completion to submission, where a wait belongs
The steps this packet landed as, in order: - Move the six footprint rows to the refusal that is left, and drop the one that is gone - Re-bless the whole set's cost, and re-take the 24 times rows a retired notice excused - Assert the submission counters' own arithmetic, which a bless got wrong unseen Content: the tree of `development` at 4c75e9f795, unchanged. |
||
|
|
1b816c3cd3 |
Take the fixed read site out of the half-texel NaN gap rows
Content: the tree of `development` at 6b9aa3881f, unchanged. |
||
|
|
b13100744b |
Make the llvmpipe venue's ledger current in both directions
The steps this packet landed as, in order: - Re-derive the refusal surface after the sparse tail moved its line numbers Content: the tree of `development` at d6b44d626e, unchanged. |
||
|
|
13e6398141 |
Compare each indirect command's own imageblock extent and vertex stride
The steps this packet landed as, in order: - Compare each mesh command's own object threadgroup memory lengths - Measure the three new rows' cost on this M3 Content: the tree of `development` at 29502b8450, unchanged. |
||
|
|
b458d7e26d |
Pad a sparse tail level and floor it at a tile row, as Metal does
The steps this packet landed as, in order: - Correct the search size quoted for the sparse tail fit Content: the tree of `development` at 5c1367e15f, unchanged. |
||
|
|
cb0ced8bdc |
Make the memoryless texture buffer plain Metal makes
The steps this packet landed as, in order: - Say in the notice what the footprint now is Content: the tree of `development` at c8cee22aa9, unchanged. |
||
|
|
f7d857ec55 |
Answer a heap's and a heap texture's footprint Metal's numbers
The steps this packet landed as, in order: - Say in the ledger that the ASTC heap size query answers - Make the holding rule a named function and hold it to a table Content: the tree of `development` at 74da346075, unchanged. |
||
|
|
6903d652e8 |
Declare the system-memory notice the maths routines provoke
The steps this packet landed as, in order: - Declare the system-memory notice the mesh passes provoke - Declare the system-memory notice the nearest positions provoke - Declare the system-memory notice the storage-write families provoke - Declare the notices the render-pass families provoke - Declare the system-memory notice the pixel-sampler families provoke - Declare the notices the draw-form and point families provoke - Declare the system-memory notice 27 more families provoke - Say the system-memory notice once, and only where a run announced it - Declare the device notices nine more m-z families provoke - Keep two declarations to the rows the evidence covers - Answer no device for a shared event, as Metal does - Drop the narrow-float NaN rows the three Linux venues no longer hold Content: the tree of `development` at 6c29796205, unchanged. |
||
|
|
302b45d57a |
Carry a venue's own gap in the failure's recorded value
The steps this packet landed as, in order: - Flag what moves between runs of one replay selection - Read a leg function handed to a combinator as an edge Content: the tree of `development` at f3069fdc8e, unchanged. |
||
|
|
9ed028eb5c |
Take the empty switch for a table call nothing linked can answer
The steps this packet landed as, in order: - Take the table's own count off the runtime's public surface Content: the tree of `development` at 5a23469901, unchanged. |
||
|
|
02652f2206 |
Fingerprint a case's AIR by its committed text, not by llvm-as's bitcode
The steps this packet landed as, in order: - Scope the discard-quad rows to the lavapipe build they were measured on - Recompute the runtime-sources pin for the blend and line-mode landings - Re-bless the golden tables for the line-rasterization profiles Content: the tree of `development` at 048adc8335, unchanged. |