6db36df1587bbbb2079ad992f3e06cbbd272c7d6
2210
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6db36df158 |
Tests: the refused device's memory view has three doors, and a device opens through it only by the floor's choice
What: cached_types_incoherent moves from tests/mod.rs into tests::command::on_device and is no
longer crate-visible. The tests reach it through three doors alone:
- each_device_under_the_view, the one way a test opens a device through the view; the floor's
choice over the viewed types decides the arm, and a refused make is asserted and printed;
- viewed, which returns a device's memory properties read through the view (the coherence test's
read of the types a device under m2v_shared_view reads); it takes and returns a value, so it is
no DeviceOptions::memory;
- suite_view, compiled only under m2v_shared_view, the suite-wide hook in Device::new that gives
every device the view where the test gives none.
The doc mentions of the old path (coherence.rs, floor.rs, the settle test, docs/VALIDATION.md)
name the new one.
Why: the planner's ask after the second red of this class today. kkview (
|
||
|
|
e9484b7d03 |
Replay dumps: a texture the cover rule holds covered is dumped with a whole-texture cover
A heap texture that another placement's texture wrote over after its last write was reported by compare-dumps as a difference: the dump loop passed no cover for a texture (dumps.rs: "always `-` for a texture"), so the bytes Metal leaves undefined there were compared. Each texture a listed command buffer stores or binds is now dumped, when the dump reads it (after the wait that saw the command buffer complete, the moment a buffer's ranges are taken), with the cover 0..N, N its dump's length, where the cover rule holds any byte of it covered (Covers::covered), and `-` otherwise. A texture's ranges in the rule are its bytes in its heap, which the dump's parts are not laid out as, so a covered texture is covered whole. The compare then leaves its words out as it leaves out a covered buffer word. dumps.rs and docs/REPLAY-STREAM.md section 10 say so. Test: the_dump_compare_leaves_out_a_covered_texture_and_reports_one_outside_every_cover (no device; Kept reads a texture part's first word from a per-texture word where it holds one). Of three textures placed in a heap, #5 and #6 over each other and #7 apart, two dispatches of a state that writes slot 0 write #5 then #6, which covers #5; the second play reads #5 and #7 otherwise. #5's cover is 0..32 and its differing word is counted covered; #7, covered by nothing, is the one difference reported. Verified at this commit: nothing yet; the lane's jobs follow. |
||
|
|
f6b1adf204 |
Replay player: a layered pass plays as the runtime builds it, and its dump holds each slice
The player marked a pass whose renderTargetArrayLength is 2 or more as one the runtime's descriptor does not hold (Unheld(renderTargetArrayLength)) and skipped its encoder, though RenderPassDescriptor::render_target_array_length takes it: the runtime renders that many slices from each attachment's slice, refuses an attachment with fewer slices (AttachmentPlace) and answers a length past maxFramebufferLayers with Gap::RenderPass of ArrayLength. The player now sets render_target_array_length from the recorded value (narrowed to u32 as the other counts are) and lets the runtime decide: a gap is a skipped encoder counted by the gap, and a refusal stays the play's error. The attachments already carry slice and resolveSlice into the runtime's descriptor; no other field is dropped for a layered pass. The dump's stores read a layered pass's attachment as its first slice alone. They now keep each pass descriptor's renderTargetArrayLength from its m2v.setPass record and store that many slices from the attachment's slice (or the resolve's), through the MTLStoreActionUnknown path too. dumps.rs and docs/REPLAY-STREAM.md (sections 10's skipped encoders and the dump) say so. Tests: a_layered_pass_plays_and_its_draw_renders_the_layer_it_selects (device cfg; a stream of a 2D array of two slices, R32Uint, renderTargetArrayLength 2, cleared to 7, and rt6_layered's triangle selecting layer 1: no encoder or draw skipped, the blit's check of both slices matches 7 then 0x101, and the dump of the command buffer holds both slices) and a_layered_pass_s_dump_holds_each_slice_it_renders (no device; Kept: length 3 stores slices 1 to 3 of a Store attachment and 0 to 2 of an Unknown one, length 1 the slice alone). Verified at this commit: nothing yet; the lane's lavapipe job and the quick check follow. |
||
|
|
c43f1a5447 |
Replay player: setSamplePositions:count: plays on a pass descriptor, and passes at other positions are counted
The runtime player refused setSamplePositions:count: on a render pass
descriptor ("not played on a render pass descriptor"), so every play of a
stream whose 2D renderer sets positions on its 4-sample pass stopped before
that pass.
It now plays the call as the runtime treats it: the runtime's descriptor has
no field for the positions and every multisample pass rasterizes at Vulkan's
standard sample locations, so nothing is set and nothing is refused. The pass
keeps the positions its last call set, and each render encoder the runtime
makes of a pass whose positions differ from Metal's defaults for the pass's
sample count (its attachments', or defaultRasterSampleCount with none) is
counted on a report line, with the first one's frame and call:
"passes at sample positions other than Metal's defaults N: rasterized at the
defaults, Vulkan's standard locations; the first at frame F, call C".
Metal's defaults are taken as Vulkan's standard locations at 1, 2 and 4
samples (the spec's Standard Sample Locations table; the runtime's floor row
standardSampleLocations and its known gap name them Metal's defaults at those
counts; the conformance rows sample-positions-default-4x/-2x). No other
count's defaults are held, so a set at any other count counts as differing;
an empty list (count 0) is the defaults.
Tests: rt_replay's sample_positions_play_and_a_pass_at_other_positions_is_counted
writes its own stream, two passes over a 4-sample target, one at the 4x
defaults and one at four others; it plays through with nothing skipped and
the line counts only the second (call 12). Without the fix the play stops
refused at call 5. new_runtime's
sample_positions_differ_from_metal_s_defaults_of_the_pass_s_count checks the
comparison (defaults, one coordinate off, reordered, fewer positions than
samples, Vulkan's 8x locations) and the line at zero, without a device.
Docs: docs/REPLAY-STREAM.md lists the call among the pass descriptor's
setters and says how the backend plays and counts it.
|
||
|
|
e6df09cddd |
Docs: under m2v_shared_view a card that offers imports only cached types refuses every import
What: VALIDATION.md's m2v_shared_view entry gains the planner's sentence: under the view a card whose host-pointer and dma-buf queries offer only its cached types refuses every import; run it with the import families filtered. Why: on the RX 7900 XTX (RADV) the host-pointer query offers type 5 alone (0x20) and the dma-buf query types 5 and 10 (0x420); the view leaves neither coherent, so import.rs's rules refuse every import there: 17 tests of the view's suite failed on that alone (job m3-max-73943). The planner's ruling keeps the view and import.rs unchanged and filters those tests in the leg's command line. Verified: docs only. |
||
|
|
6c1eb0e77c |
Runtime tests: m2v_shared_view runs the device suite through the refused device's view
What: a test-only cfg, m2v_shared_view, declared in metal2vulkan-runtime's check-cfg list beside m2v_gpu_hazards and added to docs/VALIDATION.md's cfg table. Under it, Device::open gives every device the tests make with no memory view of its own the refused device's view through the landed seam: options.memory.or(Some(crate::tests::cached_types_incoherent)), which takes HOST_COHERENT from every host-visible, host-coherent, host-cached type. A test that sets its own view keeps it. The existing device suite then runs, unchanged, with Shared in a cached type that reads not coherent, so it runs Shared memory's flushes and invalidates on memory that is coherent in fact, which Vulkan allows. tests::coherence's every-device test asserts, under the cfg, that every device builds the coherence state, and prints the Shared type and the calls. Why: the planner's condition for A-narrow's proof on lab cards, which have no cached type that is not coherent: a test that sets the option, no second suite, no env var. Verified: not yet run (cargo fmt only). |
||
|
|
db3a88526b |
Validation: the stencil rule's Counting clause has nothing to read in the case schema
The runtime's BitDraws rule refuses a draw through a [[stencil]] output drawn by bits in two places: a face whose compare is other than Always and Never (DrawDepthStencil:: stencil_reference_face reads it), and, where the state replaces a stencil bit, a draw inside a Counting visibility result's segment. The second needs a visibility result mode, and the case schema has no way to state one: - crates/metal2vulkan-validation/src/case.rs:19-21, AuthoredCase: #[serde(deny_unknown_fields)], and none of its fields is a visibility result mode, offset or buffer; - src/case.rs:1819-1821, Draw (primitive, vertex_start, vertex_count, instance_count, index_buffer, base_vertex, base_instance): deny_unknown_fields, no visibility field; - src/case.rs:1388-1390, DepthStencilResource, and src/case.rs:1406-1408, DepthStencilStateLiteral: deny_unknown_fields, no visibility field; - neither executor sets a mode or gives its pass a visibility result buffer: no "visibility" in src/metal/ or src/candidate/ (grep -rni visibility), and runtime_render.rs's Targets::pass (line 661) builds the pass from its attachments, array length and default size alone. A manifest naming such a field is refused at parse, so no case's draw is in a segment and the classifier carries no clause for it. When the schema grows a visibility result mode, the clause belongs beside the compare rule, with its own classification test. The doc comment of stencil_reference_face and docs/VALIDATION.md now say this instead of "a case sets no mode". Verified at this commit: cargo fmt; doc comment and docs only, no code changed. |
||
|
|
5517e2df1b |
Validation: a stencil output whose test it decides needs VK_EXT_shader_stencil_export on a device without it
What: the engine's render route through the runtime now reads, from the case's own structure, the
draws the runtime refuses on a device without VK_EXT_shader_stencil_export, and records them as the
device's refusal (NotSupported::NotEnabled, not_supported{not_enabled}, class device) naming the
extension, the face and its compare function, instead of drawing them and failing on the runtime's
Gap::Draw { kind: StencilOutput }.
- RenderCase::stencil_output: the case's own fragment function writes a live [[stencil]] output,
read from its AIR outputs' roles (executor_contract::depth_stencil_test), false for a vertex case.
- DrawDepthStencil::stencil_reference_face (executor_contract/depth_stencil.rs): the first face
whose stencil test the output decides. It is the runtime's rule, depth_stencil::BitDraws::of, on
the same Vulkan state (metal::state::depth_stencil_state of the same descriptor): None where the
stencil test is off; otherwise a face whose compare op is other than ALWAYS and NEVER, whatever
its operations and masks (BitDraws::of returns None before it reads the replaced bits).
- runtime_render::run: once the state is made, a case with a stencil output, on a device whose
translator profile lacks fragment.stencil_export (the bit the translator chose the bit-draws form
by), under a state with such a face, is NotEnabled. After the make, so the product's own refusals
at creation (a colour beside the output: StencilExport) keep their records.
The runtime's second refusal, a draw that replaces a bit inside a Counting visibility segment,
meets no authored case: the case schema and the executor set no visibility result mode, so no
draw is in a segment. The doc comment and docs/VALIDATION.md say so.
Why this form and not the runtime limit: a ToolingRequirement with Limit::Runtime stops the engine
on every device, and lavapipe, RADV and ANV list the extension and run and match these cases. The
refusal holds only on a device without the extension, which is what a device's NotEnabled records.
Before the stencil form (
|
||
|
|
31b3470a3e |
Bitcode: read the pre-LLVM-4 metadata and typed-pointer records of AIR 1.8
A game launcher's metallib (AIR 1.8, language 1.1) parses since the container fix, but each of its 7 functions stopped in the bitcode reader at METADATA_STRING_OLD. A structure-only census of its 7 modules (job m3-max-73828) found six refused forms in all and nothing else unknown: METADATA_STRING_OLD, METADATA_KIND inside the METADATA block, METADATA_OLD_NODE, FUNC_INBOUNDS_GEP_OLD, LOAD without its type, and CALL without the explicit-type flag. Each is now read as LLVM's reader reads it at llvmorg-23.1.2: - STRING_OLD (MetadataLoader.cpp:2424-2433): one MDString of the operands as bytes, the next metadata id. Its llvm.vectorizer. loop-key upgrade (AutoUpgrade.cpp:6979-7026) renames keys the IR keeps in neither spelling, so the decoded loop hints are unchanged. - KIND in the METADATA block (2457, parseMetadataKindRecord 2631-2643): the METADATA_KIND block's record. Both places now refuse a record with fewer than 2 operands and a kind id stated twice, as LLVM does. - OLD_NODE (1401-1428): a uniqued node of (type, value) pairs. A metadata-typed operand is a metadata id, a void one is null, and any other is the module value of that type and id, as ValueAsMetadata. LLVM numbers no id for such a value; the arena keeps one Md::Value entry per value after the block's own ids, and MdIds moves every id LLVM numbers later (later module blocks, function blocks, attachments, call operands) past them. - INBOUNDS_GEP_OLD (BitcodeReader.cpp:5383-5450), LOAD (6418-6436) and CALL (6886-6964) without their types: the source element, loaded or function type is the pointer operand's contained type. The reader follows LLVM's type ids (getContainedTypeID, 1510; getVirtualTypeID, 1532) for every value: TypeIds keeps the virtual ids for pointers made by alloca, GEP and the module's globals and functions, shuffles and cmpxchg; each instruction's result takes the id LLVM's reader gives it. Still refused, by name: METADATA_OLD_FN_NODE; KIND and OLD_NODE in a function's block; an OLD_NODE value in a module block after one whose old nodes kept values; a load atomic without its type; GEP_OLD (not inbounds) and STORE_OLD. None is in the file. A typed-pointer load, call or GEP whose operand has no contained type (an opaque pointer, a non-pointer) is BadType or a malformed record. Tests: typed_pointer_records_without_their_types_read_as_with_them decodes one typed-pointer module in both spellings (a struct field, an array element, a loaded pointer, a cast, an argument, and a function whose record names a pointer to its type) and asserts the tables are equal, plus the refusals. legacy_metadata_records_read_as_their_modern_twins decodes the function-test module with its metadata in the old records, asserts the body equals the modern twin's, the arena's layout, and the shifted ids in a second module block and in a function block, plus each refusal. Both fail without the fix: the old records were refused. The tests that asserted those refusals now assert the remaining ones (OLD_FN_NODE). docs/REFUSALS.md regenerated. Not yet run at this commit: the suite job follows. |
||
|
|
8f74582eb3 |
Docs: CONFORMANCE-COVERAGE.md regenerated for pass-sequence-aspect-actions' NVIDIA ledger row
|
||
|
|
a1b955eec9 |
indirect_commands: the plumbing only the deleted runtime drove goes
`bind::indirect_commands` kept entry points that the removed in-crate runtime used to execute
indirect command buffers. Nothing calls them now: not the runtime crate, not the command line,
not validation, conformance, harness, devtools or the translator, and not the consumer. Deleted,
each with its own tests, its re-export, its api_surface row, its api_signatures rows and its
docs/API.md sentence:
- `RecordField` (referenced by nothing at all);
- `records_address`, `RECORDS_ADDRESS_BASE`, `RECORDS_ID_LIMIT`, and the crate-private
`RECORDS_ADDRESS_SHIFT` that only `records_address` read;
- `written_flag_offset`, `WRITTEN_FLAG_BYTES`;
- `BufferBinding::resolve_buffer`, `RegisteredBuffer` (+ `new`), `ResolvedBuffer`, `AddressError`;
- `CommandRecord::resolve_bindings`, `ResolvedBindings`, `BindingError` (tests/inheritance.rs
tested only these and goes whole);
- `RenderDraws::PRIMITIVES` (its one user, a test, now spells the struct out);
- `RecordView::action`, `barrier`, `kernel_pipeline`, `buffer`, `writes`.
The fixed point inside the module adds `RecordError::Index`, which nothing constructs (its
Display arm alone named it; it was the error of `RecordField`'s indexed fields), and an empty
`impl CommandRecord {}`.
Kept, because a live path calls them inside the module (validation's `CommandBuffer::decode` and
`CommandDescriptor::validate_record`): `BufferStage::of` (descriptor.rs `validate_record`,
host.rs `decode`), `CommandDescriptor::holds` (`validate_record`), `validate_header` (`decode`),
and `RecordView` with the accessors `CommandRecord::decode` reads through `record_into`
(`pipeline`, `retained_pipeline`, `threadgroup_memory_length`, `stage_in_region`,
`imageblock_size`, `record`, `record_into`).
`Bindings::buffers` becomes private: only descriptor.rs and host.rs call it, and validation reads
a record's buffers through `buffers_mut` only. The build at the stack's tip answers whether
anything else used it (an error would mean a user). `BufferBinding`'s doc no longer links it.
Docs that named the deleted items or the deleted runtime say what is true now: the
`bind::indirect_commands` module docs (validation's case model and Metal executor use it),
host.rs's module docs, `BufferBinding::address`, `RecordError`, provenance.rs's
`object_handle_load`, and docs/API.md's indirect-command-buffer section.
Zeros, outside crates/metal2vulkan/src/indirect_commands* and the facade, at metal2vulkan
|
||
|
|
dd3f16a656 |
Conformance: Metal's answer for the compressed small-level copies, recorded with its times
What: the recordings of compressed-small-levels-bc1-rgba and compressed-small-levels-bc3-rgba.
Metal's times are kept in each. docs/CONFORMANCE-COVERAGE.md is regenerated: 188 case modules,
1335 recordings, compressed_small_levels 2 cases, every field compared. A new unit test,
the_recorded_copies_are_the_model, holds each recorded site to the case's model. program()'s doc
no longer links to the private `reads`, which rustdoc refused (job m3-max-73736).
Why: this is the recorded Metal answer the suite holds the runtime to, for the guest's 4 x 4 copy
of a level smaller than one block.
Verified:
- Job m3-max-73751 (Apple M3 Max, macOS 27.0.1, build 26A434), in the workspace job m3-max-73737
built `conformance` in, release, at 7af2733ddc.
- It ran `conformance record` of both cases: plain Metal 3 runs, one outcome, three command
buffers Completed.
- The validated leg stopped at the work, on the copy from a buffer: "(destinationOrigin.y +
sourceSize.height)(4) must be <= height(2)".
- It then ran `conformance times --runs 8 --write` of both.
- Every recorded byte site equals the case's model: levels 8 to 11 of the t2t, b2t and replace
destinations, and the 64 bytes of t2b and get at levels 9, 10 and 11. I checked this with a
Python decode of the recordings here. The new test checks the same and has not run yet.
- coverage.py --check: as derived.
|
||
|
|
88beca43a0 |
Docs: CONFORMANCE-COVERAGE.md regenerated for the stencil form's four known-gap rows
The stencil form (
|
||
|
|
5a722b5c3f |
Stencil output: a device without VK_EXT_shader_stencil_export draws it by bits, the owner's tenth form
A fragment function's [[stencil]] output is the reference of both faces' stencil test for its
fragment (MSL Table 5.7, 5.2.3.5). On a device without VK_EXT_shader_stencil_export it was refused
at creation (StencilExport). Under the owner's grant (rule 2's tenth form, chosen by that
extension's query alone), such a device now draws it by bits; a device with the extension is
unchanged (FragStencilRefEXT, no fact, no note, the draw issued once).
Translator: the function stores no reference; each return kills the fragment where the draw's new
push field PushField::StencilBit k is below 8 and bit k of the output's low 8 is 0, and keeps
every fragment at 8 or more (one module, no specialization). The function states
RuntimeFact::StencilBitDraws (Mechanism::PushConstant) and its fragment stage the static note
PrecisionNote::StencilOutputOverlap. Refused there, naming the extension (Unsupported
StencilExport): a function that also writes a colour (the colour would be written by every
repeat) or memory, one whose returns cannot kill (an interlocked body, a loop over its covered
samples), a mesh pipeline, and a render pipeline made for indirect command buffers. Where the
device also lacks the pixel interlock, a function writing memory in a raster order group meets
that refusal first (RasterOrderGroups). SEMANTICS_VERSION 2301 -> 2302, ARTIFACT_FORMAT_VERSION
595 -> 596 (new codec members).
Runtime (depth_stencil::BitDraws, render_encoder::draw): with w the low 8 bits of the write masks
of the faces having a Replace operation, a draw whose stencil test is on and w is not 0 is drawn
once with every fragment kept under the reference 0 (Replace zeroes w's bits, every other
operation runs once), then once per bit k of w keeping the fragments whose output holds bit k,
under the reference 255, write mask (1 << k) & mask, Replace kept and every other operation Keep,
and no depth write; where the state writes depth under a compare other than Always and Never, the
first draw writes none and a last draw writes it with stencil write masks of 0. Each draw records
only the dynamic state that differs from the last; the encoder's tests and reference are recorded
again at the next draw. Counted in Metrics::stencil_bit_draws (the draws beyond the first).
Refused at a draw, Gap::Draw of DrawKind::StencilOutput: a face compare other than Always or Never
(the output decides that test), and, where w is not 0, a draw inside a Counting visibility
segment (every draw would add its samples). A Boolean segment is drawn. Vulkan Appendix I: the
repeats change stencil reference, operations and write masks between draws of one pipeline,
which Rule 2 lists as required (write masks) and strongly suggested (stencil parameters) to be
invariant; the note records the one difference the repeats make.
The note (rule 1): fragments of one draw that overlap leave the OR of their values. Where two
fragments of one draw reach one sample under Replace, the sample stores the OR of their outputs'
low 8 bits within the write mask, where Metal stores the later fragment's value; under a depth
test that writes, each fragment's stencil operation is chosen against the depth from before the
draw. Measured on an RTX 3090 (NVIDIA 620.70.06) under the validation layer 1.4.363.0, job
m3-max-73635: two triangles of one draw outputting 0x35 then 0x4a store 0x7f on the 32 texels both
reach, where Metal stores 0x4a, and 0x35 on the 32 one reaches, in 8 bit draws; the 780M (RADV)
and the Iris Xe (ANV), which list the extension, store 0x4a with 0 bit draws.
AGENTS.md rule 2: "for nine only" becomes "for ten only", the list ending with fragment stencil
output (the planner's text, relayed by main, word for word).
Tests: the translator's engine_stencil (every committed profile: the extension or the draws by
bits, L3 both ways; refusals for colour, memory, mesh and indirect command buffers); rt's host test
of BitDraws::of; rt's device cells (stencil_export.rs): the stencil alone and the stencil with the
depth under Always and Less over a quad, exact, texels of stencil 0 among them; the overlap row;
the refusals; the route of a 4-sample Depth32Float_Stencil8 source read at sample 0 into a
single-sample target under Always/Replace 0xff and depth Always with write, beside colour 0
RGBA8 of write mask none; the codec round trip; the mechanism table.
Docs: docs/API.md (the stencil output passage and the catalogue entry
metal2vulkan-degrade-stencil-output-overlap), rt README known gap and floor row,
docs/REFUSALS.md regenerated, api_signatures blessed. The conformance degradation and the
validation allowance (unbounded) of the note. known-gaps-rt.tsv: stencil-output and
stencil-output-loaded on NVIDIA, refused at renderCommandEncoder (draw 3's back face Equal against
the output) and divergent at case/stencil as a result. runtime-sources.sha256: the guard's inputs
changed only by mechanism.rs gaining the new fact's arm, which no existing artifact states, so no
run of an existing artifact changes.
Golden rows and the engine inventory (22 cells) are re-blessed on development: 20 move from the
StencilExport refusal to a module (stx_stencil_by_pixel, stx_stencil_discard,
stx_stencil_with_depth, stx_stencil_ms_by_sample, fragment_depth_stencil on nvidia-pascal-linux,
nvidia-rtx50-linux, nvidia-rtx5080-laptop and runtime-floor), and the 2 cells
stx_stencil_in_order and stx_stencil_ms_in_order on runtime-floor move from StencilExport to
RasterOrderGroups, still refused. Why: the memory-write refusal now runs on the emitted module
(pipeline/compile.rs), after the body's own refusals, so on a profile without the pixel interlock
the raster order group these functions write memory in is refused first; at the base the plan's
entry refused every [[stencil]] output on such a device before any body was lowered.
Verified (this tree, or the rt archive of d6bd77d203 where named; the rt and translator sources
there differ from this tree in the translator's test and a doc comment alone):
- msi check, job m3-max-73648 (this tree): fmt, signatures, refusals, clippy -D warnings with all
features plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Rustdoc, the rt nextest archive and the
conformance binary built; rt's whole suite on lavapipe under the validation layer 1.4.363.0,
738 tests run: 738 passed, 3 skipped; the lavapipe leg, 7 tests run: 7 passed: export enabled,
the overlap row storing {4a}, bit draws 0 on every cell.
- RTX 3090 (NVIDIA 620.70.06, layer 1.4.363.0), job m3-max-73635 (d6bd77d203): 7 passed; the
overlap row above, bit draws 8; the stencil alone and with depth under Always and Less, 64
texels exact, bit draws [8, 8, 9]; the route exact, bit draws 8; refused a colour beside the
stencil (StencilExport), Equal and a Counting segment (DrawKind::StencilOutput), a Boolean
segment drawn. Conformance stencil-output and stencil-output-loaded: refused at
renderCommandEncoder and divergent at case/stencil (4 elements, largest difference 80), the
four known-gaps rows.
- RTX 5080 Laptop GPU (NVIDIA 615.71.09, layer 1.4.363.0), job m3-max-73652 (this tree): 7
passed; overlap {7f} where both reach, {35} where one, bit draws 8; cells exact, bit draws
[8, 8, 9]; the route exact, bit draws 8; the same refusals; conformance replay with this tree's
binary matched the four NVIDIA rows (exit 0).
- Radeon 780M (RADV, Mesa 26.2.6), job m3-max-73636 (d6bd77d203), and Iris Xe (ANV, Mesa
26.2.6), job m3-max-73650 (this tree): 7 passed each, export enabled, overlap {4a}, bit draws 0.
- States-only plays of recorded streams, base
|
||
|
|
d2e8ab2a85 |
Replay player: a colour attachment's depthPlane is played
What: the new-runtime player forwards a colour attachment setter's `depthPlane` into the
runtime's RenderPassColorAttachmentDescriptor::depth_plane, as it forwards resolveDepthPlane, and
no longer holds the pass for a plane but 0 ("Unheld(depthPlane)", the encoder skipped). A depth
or stencil attachment's depthPlane is not played and holds nothing: Metal reads it of a 3D
texture alone (Apple's page for depthPlane, as fetched: "If the texture isn't a 3D texture, then
Metal ignores this property."), and the runtime refuses a 3D texture's depth or stencil
attachment by its type (TextureType) whatever its plane, which the player counts as any gap.
Why: since
|
||
|
|
3c52ee1cf1 |
Render pass: a colour attachment renders one depth plane of a 3D texture's level
What: RenderPassColorAttachmentDescriptor takes `depth_plane` (Metal's `depthPlane`). A 3D texture of RenderTarget usage is made 2D-array-compatible (VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, in its image format query too: Plan::flags, from the image's type and its colour attachment usage, no query). attachment_view then takes the plane of a 3D texture's level as a 2D view of that one layer (base layer = depthPlane, at the level), checked against the level's depth (Refusal::AttachmentPlace past it). Every barrier on a 3D texture's image (its attachment's, its copies' and its moves', texture::barrier_layers) names the image's layers as 0 and VK_REMAINING_ARRAY_LAYERS, so each moves every plane of the level it names. Before, every such pass was Gap::RenderPass of RenderPassKind::TextureType. Still TextureType: a 3D texture in a layered pass (renderTargetArrayLength 2 or more), a depth or stencil attachment of a 3D texture, a 3D resolve texture, and a resolve's depth plane but 0. A draw that reads, through a shadow (a device without the attachment feedback loop), a 3D texture whose plane its pass renders is Gap::Draw of DrawKind::AttachmentRead: a shadow's copies are of layers. The floor asks a device that lists VK_KHR_portability_subset for imageView2DOn3DImage too (VUID-VkImageCreateInfo-imageView2DOn3DImage-04459), as it asks multisampleArrayImage. Why: a guest route meets the refusal. A browser's GL layer clears every 3D texture of an RGB-family format (RGB8, RGB16F) at creation through a pass on each plane, to set the alpha it emulates; it also renders into a plane for framebufferTextureLayer(TEXTURE_3D, k) then a clear or a draw, for a level sampled before a full upload, and for copyTexSubImage3D. The consumer's route showed the key at |
||
|
|
50a851487c |
Conformance: a copy between two Depth32Float_Stencil8 textures, recorded on Metal
What: the case depth-stencil-copies-d32s8 (cases/depth_stencil_copies.rs), its recording from the
M3, and docs/CONFORMANCE-COVERAGE.md regenerated with it. Two 8 x 4 Depth32Float_Stencil8 textures
of ShaderRead | RenderTarget | PixelFormatView usage, private. Each plane of each is written from a
buffer through the plane options, every texel a depth and a stencil of its own, the two textures'
apart. One copyFromTexture:...toTexture:... moves 5 x 2 texels from the source's (1, 1) to the
destination's (2, 2). Both planes of both textures are then copied out through the plane options
and read: four byte sites, laid out in the textures' rows.
Why: the runtime now copies such a texture whole, both aspects in each vkCmdCopyImage region,
because Metal's texture-to-texture copy takes no plane option. The case puts that to Metal and
holds the runtime to Metal's own bytes. The unit test the_recorded_copy_moved_both_planes holds
the recording to the host's model, so a release in which Metal moves one plane alone shows as a
failing test naming the site. The case declares the restricted-depth-upload notice allowance, as
format_copies does: the depth planes take their bytes from a buffer, and every depth written lies
in [0, 1], so the note moves no byte the case reads.
Verified:
- Job m3-max-73350 (Apple M3 Max, macOS 27.0.1) ran `conformance record
depth-stencil-copies-d32s8`. Plain Metal: 3 runs, one outcome, status Completed. The
destination's region holds the source's depth and stencil, every other texel of both textures
is what was written. The validated leg ran. An earlier attempt, m3-max-73338, ended in its build
(the compiler cache's daemon) before any Metal call.
- Job m3-max-73383 (msi, lavapipe, Khronos validation layer 1.4.363.0) at the case and its
recording, the coverage doc regenerated in the job:
- coverage.py wrote docs/CONFORMANCE-COVERAGE.md, the one committed here (187 case modules,
1333 recordings, depth_stencil_copies one case, every field compared);
- fmt; clippy of metal2vulkan-conformance plain, --cfg m2v_gpu and --cfg m2v_cpu_icd;
- the case's three unit tests passed, the_recorded_copy_moved_both_planes among them;
- rustdoc -D warnings; coverage.py --check;
- `conformance replay --cpu depth-stencil-copies-d32s8` exited 0: verdict announced, every
byte site Metal's, the one difference the restricted-depth-upload notice the case declares
(its allowance fired);
- the conformance suite on lavapipe under the validation layer: 1038 run, 1037 passed. The one
failure was times::every_case_is_timed (the new recording held no timing), which the next
commit, Metal's times for this case, answers.
|
||
|
|
b573e68c11 |
rt: a Direct3D 11 plane's texture is made by one function of an explicit usage and format list
What: import_d3d11_surface derives every plane's usage and list first (d3d11_plane_form, from the bind flags and the descriptor, its refusals before any plane is made), then makes each plane's texture through d3d11_plane_texture(plane, usage, list, unit): the image of the plane's format with that usage, mutable over that list where it is not empty, imported, bound, and the texture over it under the plane's descriptor at its index. A plane's error drops the textures made before it, which frees their images. A test can call the same function with other values, so a cell can make an image the old way over the same Direct3D 11 texture and read it beside the import's, with nothing of the old form in product code. docs/REFUSALS.md names the new site functions. Docs: a plane is viewed in place in the image's own format, the descriptor's and the descriptor's sRGB sibling. A view in another format has no in-place form on the import (Gap::TextureView of SurfacePixelFormat), and the consumer takes the copy form of the same call for it, a counted copy of the plane: the README's plane paragraph and a new entry in the known gaps of memory blocks say so. Correction to d310504408: it says the import never receives a view in another format. The consumer does view a drawn plane (PixelFormatView) on the import itself in any format the guest asks (surface_shapes.rs:233 and 247-257), so the narrow list does refuse views a guest reaches. The ruling: the narrow list stays, and the consumer routes a texture over a drawn plane viewed in another format to its counted copy shape. Still owed on the same principle: the chroma's uint/unorm pair (R16_UINT under RG8Unorm, R32_UINT under RG16Unorm) is the one reliance left past the texture Direct3D 11 made, besides the sRGB sibling and the feedback usage. It is its own row, behind the diagnostic, and goes once the consumer makes chroma R8G8_UNORM or R16G16_UNORM. How verified: refusal_surface.py --check passes here. The Windows cross-build, the runtime's checks, and the device run on the lab's Windows host (red at the parent, green here) are reported with their job ids to the lander. |
||
|
|
737906832c |
Runtime: a compute pipeline's module reaches the driver with every specialization constant fixed, its workgroup size the entry point's LocalSize literals
Every compute VkPipeline rt makes is now created from a shader module of its own, made of the kernel's words with each specialization constant the plain constant of its value and destroyed once the create returns; the create names no VkSpecializationInfo. Vulkan defines specialization as exactly this conversion (VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849), so what a kernel computes is unchanged; what changes is that no driver is handed a specialization constant to size a workgroup or an array from. - Translator: pipeline::specialize(words, values) (spirv::specialize). OpSpecConstant, OpSpecConstantTrue/False become OpConstant/OpConstantTrue/False of the given value or the default; each OpSpecConstantOp becomes the constant it computes (SpecOp::eval, now product code, and SpecOp::opcode, which the serializer shares); OpSpecConstantComposite becomes OpConstantComposite; the SpecId decorations go; a WorkgroupSize composite loses its BuiltIn decoration and the entry point takes its values as OpExecutionMode LocalSize. The translator's output is unchanged (no SEMANTICS_VERSION bump). - rt: Kernel holds its words (Code::Module(Arc<[u32]>)) instead of a VkShaderModule made at Kernel::new; Kernel::make specializes per variant and makes, uses and destroys the module. Heavy kernels specialize the same way: the stage request carries the specialized words and no ids or data (WIRE_VERSION 3), and the helper compiles them as they are (HELPER_VERSION 2). Lowered::Failed and Unmade go: nothing creates a shader module at Kernel::new now. - Tests: serializer tests specialize (a deep kernel's spec constants, its bool, two Workgroup arrays sized by OpSpecConstantOps: values given and defaults, spirv-val under Vulkan 1.2 and 1.3); rt deep_threadgroups a_kernel_reaches_the_driver_with_its_workgroup_size_as_literals. - Docs: API.md (section 3), rt README. |
||
|
|
a38145f53c |
Translator: a flat grid's tangled instructions take the profile's reconvergence mode, as the partial-threadgroups variant's do
A flat-grid module (LoweringInputs::flat_grid) returns its invocations past the grid before the
body (lower::dispatch::emit_entry), and under call_threadgroups it admits SIMD-group operations
(select.rs's flat call-threadgroups check). lower::simd::together excluded only
partial_threadgroups, so such a module's SIMD-group operation in a block the workgroup uniformity
proves uniform was stated Guaranteed with no mode, which SPIR-V does not support.
The words, SPIR-V 1.6 Revision 8:
- A threadgroup barrier is OpControlBarrier at Workgroup scope (3.3.20): "When Execution is
Workgroup or larger, behavior is undefined unless all invocations within Execution execute the
same dynamic instance of this instruction." A module whose past-grid invocations return early
cannot hold one at all. The partial variant walks them predicated instead, and a flat
call-threadgroups module refuses one. So this kind is unaffected.
- A SIMD-group operation or simdgroup barrier (OpGroupNonUniform*, 3.3.24; OpControlBarrier at
Subgroup scope) acts on "the scope restricted tangle". Who is tangled is 2.2.5's rule:
"Invocations will continue to execute the same dynamic instances as long as they follow the same
control-flow path"; after a divergent branch, "Invocations may only resume executing the same
dynamic instances when all invocations reach the same static instruction", and the merge rule
("Uniform Control Flow") needs control flow "uniform upon entry", which no longer holds once some
invocations returned. Only SPV_KHR_maximal_reconvergence lets an invocation that ran OpReturn
escape reconvergence.
A predicate on the AIR ("no divergent construct passed since entry") is not enough to keep a
narrower set. The lowering adds selections of its own, whose condition differs between
invocations, before a tangled instruction: the bounds-checked load (lower/access/psb.rs:660), the
guarded store (lower/access/emit.rs:411), an atomic's (lower/access/atomic.rs:1064) and a copy's
(lower/access/copy.rs:1343). So a module that returns past-grid invocations early has no tangled
instruction reached together. The partial-threadgroups variant's exclusion is unchanged.
No runtime or consumer path makes a flat-grid module today. `grep -rn 'flat_grid\|call_threadgroups'
crates/metal2vulkan-runtime/src`, tests excluded, gives 0 hits at
|
||
|
|
d16eb39e8f |
Tests: METAL2VULKAN_TEST_UNVALIDATED=1 runs rt's device tests without the validation layer, and says so
Every rt device test opens its instance through tests/validation.rs instance(), which fails unless each device lists an active VK_LAYER_KHRONOS_validation. A Windows machine whose only Vulkan pieces are its GPU driver and the loader it ships therefore cannot run the device suite at all, and a machine of that kind is the only place some drivers are ever covered (AMD's proprietary Windows driver: the lab has no AMD card under Windows). The setting is test-only and off unless its value is 1; product code and the lab's runs, which never set it, are unchanged. Under it, instance() enables nothing and checks the opposite: every device lists no validation tool, so a run that says it is unvalidated is. No layer writes a log, so the guard checks none. Each test process writes "M2V-UNVALIDATED unvalidated run: ..." once to its standard error, past libtest's capture of a passing test's output, so the run's output says it whatever passes. The test of the layer's log itself (every_device_logs_a_deliberately_invalid_call_once) skips: without the layer its call is only invalid. The new device test the_setting_runs_the_device_tests_without_the_layer_and_says_so runs the test binary's unvalidated_child in a process of its own under the setting, with VK_INSTANCE_LAYERS and VK_LOADER_LAYERS_ENABLE removed, and requires it to pass and to print the line. Without this change the child opens a validated instance (the layer is on VK_LAYER_PATH in every lab job) and prints no such line, so the test fails; on a machine without the layer the child fails outright. Docs: the setting in tests/validation.rs's module doc, docs/VALIDATION.md (the layer section), CONTRIBUTING.md, and env_vars.rs's module doc, which now says the test suites' own METAL2VULKAN_TEST_* variables are not in REGISTRY. |
||
|
|
b4aeaab757 |
Tests: a partial-threadgroups variant may add DeviceReconvergence on a device without maximal reconvergence
The rt test every_device_s_observers_answer_the_same_on_their_variant failed on the UHD 630's Windows leg (job 72531) after |
||
|
|
1b9ea536f6 |
Translator: a threadgroup barrier, and a kernel's group operation in uniform control flow, state the reconvergence mode only in a re-entered loop
A program's threadgroup barrier, and a kernel's tangled instruction in a block the workgroup uniformity proves every thread of the threadgroup runs together, now count as fragreconv counts a fragment's derivatives: an entry whose tangled instructions are all such (or a fragment's derivatives) states no MaximallyReconvergesKHR (or SubgroupUniformControlFlowKHR), records Reconvergence::Guaranteed and no DeviceReconvergence, except where its emitted module holds a tangled instruction, itself or through a call, in the construct of a loop whose continue target two or more blocks of the construct branch to; there it takes the profile's mode and note as before. An entry whose every group operation stands in a block the pass proves uniform for the threadgroup, with no re-entered loop around it, states no mode and records Guaranteed. An entry with any other tangled instruction keeps the mode; a kernel compiled for partial threadgroups proves no block uniform, and the emulated tier keeps its own rule. Why: without a mode SPIR-V reconverges invocations at the merge of a construct they entered together and all leave by it (2.2.5, Uniform Control Flow), and an OpControlBarrier of Workgroup execution scope is defined where every invocation executes the same dynamic instance of it, which invocations resume only under those conditions (2.2.5, Dynamic Instance). Metal requires every thread of the threadgroup to reach a threadgroup barrier, and a group operation in a block every thread runs together sees every lane, so both are Metal's wherever SPIR-V reconverges, which is everywhere but a continue target entered from several blocks. On the 780M under AMDVLK the mode with the group operations of one kernel family costs 9.4-11.4x RADV on its own command buffers, and 2.8-3.0x without the mode (m3-max-72248, m3-max-72261). How: BarrierPlan::threadgroup records every threadgroup barrier; simd::finish defers an entry whose tangled instructions are all a fragment's derivatives, threadgroup barriers or a kernel's instructions in workgroup-uniform blocks (simd::together: partly_live's uniformity, or the same analysis where it computed none) to SimdPlan::reentry; lower::simd::reentry (quad_loop, renamed) settles it on the emitted module, its re-entered-loop test now over every tangled instruction (derivatives, implicit-LOD samples, LOD queries, control barriers, group operations). The emulated tier clears the deferral where it clears the mode. The simd module doc, the PrecisionNote and Reconvergence docs and docs/API.md's Precision sentence and catalogue entry say the same. SEMANTICS_VERSION 2300. Tests (src/tests/engine_reconvergence_together.rs): a threadgroup barrier alone states no mode on every committed profile; one in a loop two latches inside a selection re-enter keeps the mode; a shuffle in a counted loop states no mode; a shuffle after a merge inside a per-thread branch, and one in a loop with a per-thread exit, keep it. |
||
|
|
14c6cab653 |
Conformance coverage: regenerated with quad-helpers
scripts/conformance-coverage/coverage.py at |
||
|
|
7360a148bb |
Translator: a fragment's derivatives state the reconvergence mode only in a loop a back edge re-enters from inside a selection
A fragment entry whose only tangled instructions that depend on reconvergence take derivatives (dfdx, dfdy, fwidth, implicit-LOD samples, LOD queries) no longer states MaximallyReconvergesKHR (or SubgroupUniformControlFlowKHR), records Reconvergence::Guaranteed and carries no DeviceReconvergence, on every device, except where its emitted module holds such an instruction, itself or through a call, in the construct of a loop whose continue target two or more blocks of the construct branch to (a continue from inside a selection, or two latches). There it takes the mode the profile gives a tangled entry, and the note where the profile has no maximal reconvergence. Entries with group operations or barriers keep today's behaviour. Why: MSL 6.11.1.1 leaves derivatives undefined within nonuniform control flow, and an implicit level or LOD query is the derivative of its coordinate, so such an instruction is Metal's only where the quad reaches it together. Without a mode SPIR-V reconverges invocations at the merge of a construct they entered together and all leave by it (2.2.5, Uniform Control Flow); only the continue target of a loop entered from several blocks needs SPV_KHR_maximal_reconvergence to rejoin the quad for the next iteration. AMDVLK 2025.Q2.1 miscompiles a large fragment function under the mode (an 8x8-cell grid on the 780M, blockiness 9.15 against RADV's 2.87; the same play with the mode stripped reads 2.92, job m3-max-71921), and the note logged on every device without the feature for a case Metal leaves undefined. How: SelectCx::derivatives marks the derivative and implicit-LOD tangled values; simd::finish defers a fragment entry with only those to SimdPlan::quad_loops; lower::simd::quad_loop::settle decides on the emitted module, before verification, and declares the mode with TypedModule::declare_modes where it applies. The PrecisionNote and Reconvergence docs, the docs/API.md catalogue entry and its Precision sentence, and the simd module doc say the same. SEMANTICS_VERSION 2298. Verified: - Metal-defined reconvergence cases with the mode stripped equal them with it, and Metal, on the 780M under AMDVLK 2025.Q2.1 and RADV (m3-max-72068), the RTX 5080 (m3-max-72069), the RTX 3090 (m3-max-72071), the Iris Xe (m3-max-72070) and lavapipe (m3-max-72077): 0 of 4096 pixels differ from Metal either way. Each entry under this change reads one of the two. - The lettering play on the 780M under AMDVLK to frame 4016 (m3-max-72116, this change against its base |
||
|
|
62ab49b966 |
Conformance ledger: the reconvergence rows on the Iris Xe
The Iris Xe (RPL-P, Mesa ANV; job m3-max-72186) answers the four trilinear sites of reconvergence-handle-choices exactly as every AMD venue does: 1128, 1136, 2240 and 490 elements, each one step of a half, on the second source only. Everywhere else it matches Metal, so four rows are scoped to "Iris(R) Xe". The llvmpipe diagonal rows now list every GPU replayed that answers Metal's there. CONFORMANCE-COVERAGE.md regenerated. |
||
|
|
17802357be |
Conformance ledger: the AMD trilinear rows hold on every AMD venue
The four trilinear rows of reconvergence-handle-choices were scoped to the 780M. The RX 550 (POLARIS12, job m3-max-72170) and the RX 7900 XTX (NAVI31, job m3-max-72171) under RADV answer the same four sites with the same counts (1128, 1136, 2240 and 490 elements, each one step of a half) as the 780M under RADV and AMDVLK, and match Metal everywhere else. So the rows are now scoped to "AMD Radeon", which every one of those venue names holds. The RTX 2080 (job m3-max-72171) matches Metal on both cases. CONFORMANCE-COVERAGE.md regenerated. |
||
|
|
baae603de4 |
Conformance ledger: the llvmpipe diagonal rows say what differs, and point at nothing private
The two level-and-pair rows on llvmpipe (rc_loop, rc_break) pointed at a bug list outside the repository. Each now says, on its own, what differs: the fine pair along the full-screen triangle's diagonal x + y = 62 to 63, the same with and without MaximallyReconvergesKHR. It also says where it was measured (LLVM 23.1.1, 256 bits, AVX2) and which drivers answer Metal's. Only the text field changed, so neither row's identity (case, verdict, site, answer) moved. CONFORMANCE-COVERAGE.md, which quotes the rows, was regenerated. |
||
|
|
2a8cfdec04 |
Docs: CONFORMANCE-COVERAGE.md regenerated for the reconvergence ledger rows and declarations
The doc derives from the ledger and from each module's declarations as well as from the recordings. It went stale at dbcc0a89df (the reconvergence module stopped declaring notices: modules declaring a notice 43 -> 42) and at 853a406696 (18 ledger rows, 7969 -> 7987). 884a70ab0d's body says coverage.py --check still passed there. That is wrong: the check failed there, for these two causes. It passes at this commit. |
||
|
|
5216a5cde1 |
Conformance: Metal's answers for the reconvergence cases, recorded on the M3; coverage regenerated
reconvergence-constructs and reconvergence-handle-choices were recorded on the reference M3 Max (macOS 27.0.1, 26A434) by `conformance record` at a1ffe24d32 (job m3-max-72140, after the build m3-max-72139). Each case ran 3 times with 1 distinct outcome, and the validated leg ran. A script over the recordings checked Metal's nearest samples against the module's hash model, and rc_pick's fine pair too: every draw matches. That is 4096 pixels for each full-screen draw and 896 for rc_pick over the small triangles. The module's test makes the same check in Rust. docs/CONFORMANCE-COVERAGE.md was regenerated by scripts/conformance-coverage/coverage.py. |
||
|
|
932ef756df |
Lowering: a quad-only kernel takes its quads from the subgroup at the size the device gives below 32
The 32 lanes of a Metal simdgroup are needed only by operations that read outside a quad. A kernel whose every cross-lane operation is a quad operation (lower::simd::quad_only: some group operation, each of quad scope, and no simdgroup-scope operation, AGX or matrix multiply-add, or subgroup-scope barrier or fence) now takes the Direct tier with full subgroups and no required size where the kernel stage runs full subgroups of its operations and its narrowest subgroup is below 32 lanes (device::subgroup::quad_free, read from the stage's size range alone). Its requirement (quad_requirement) sets ALLOW_VARYING_SUBGROUP_SIZE where the stage can take a size, and a local size that is a multiple of the stage's largest size (VUID-VkPipelineShaderStageCreateInfo-flags-02758); a threadgroup that is not runs the emulated-simdgroups variant, as a pinned kernel's does. Such a kernel pins nothing, so the widest-pin rule does not weigh it. The pin to 32 stays where 32 is the device's narrowest size. Why it is exact: a quad is four subgroup lanes from a multiple of 4, all in one subgroup (Vulkan 9.27.9), and a compute dispatch runs one subgroup size (9.5.2); the kernel's simdgroup builtins derive from the linear index (SubgroupId * SubgroupSize + SubgroupLocalInvocationId, reading the SubgroupSize builtin where no size is pinned), and its quad operations from SubgroupLocalInvocationId & 3 and & ~3, so every size of 4 lanes or more gives Metal's quads. The guard min >= 4: a quad must be four lanes of one subgroup. A stage whose narrowest subgroup is 1 or 2 lanes could split a quad across subgroups, so such a stage keeps the tier its class takes. A kernel with compute derivatives keeps the tier its class takes: their quads need its two-dimensional local size, which the flattened tiers refuse (ComputeDerivativesWithSimd). Without this exclusion lavapipe's quad kernels with derivatives, which run emulated today, would be refused. Where it applies among the committed profiles: the four Intel ANV profiles (8 to 32: multiple 32, varying), lavapipe and gate-lavapipe-x86_64 (8: multiple 8) and gate-lavapipe (4: multiple 4). Not on NVIDIA (32), RDNA (32 to 64), moltenvk-m3 (its kernel stage takes no size, so it runs the API's 32 alone) or runtime-floor (no quad class). Measured on the Iris Xe (RPL-P, ANV), job m3-max-71702, the lane-only form of this change (E: the base at eda92e1207, Q: this form, E2: the base again; cold plays of the consumer's recording to frame 345): the regression row's kernel took Q in all 21 of its constant sets (15832 dispatches, 100%); per dispatch E 1.6018 ms, Q 0.7314 ms, E2 1.6006 ms (Q/E 45.7%); values E/Q and E/E2 0 differing of 261 buffers; translation 18 s and 0.92 GiB peak against 17 s and 0.92 GiB. The driver's executable statistics (job m3-max-71726): Q compiles at SIMD8 (SIMD16 for one state), 15 to 50% fewer instructions than the emulated form, against about 2800 spills a state when pinned to 32. SEMANTICS_VERSION 2297 (modules change on the profiles above); ARTIFACT_FORMAT_VERSION 595 (SubgroupRequirement gains `varying`). Tests: device::tests::subgroup (the predicate over size ranges, the guard, and the committed profiles it takes), engine_simd (a quad-only kernel's requirement on every committed profile, and the flattened kernels' constraint), engine_quad_ops (the quad fixture's kernels in the Direct tier at 8 on lavapipe and at 8, 16 and 32 on an Intel profile; the emulated variant on lavapipe), engine_dispatch (derivatives beside a quad keep lavapipe's emulated tier), and the runtime's every_device_runs_a_quad_only_kernel_at_the_size_it_gives under a device cfg. |
||
|
|
c54fa438a2 |
Player: a dump holds each texture a listed command buffer's compute encoders bind
--dump-command-buffers wrote every buffer a listed command buffer's encoders named and every colour attachment its render passes stored, so a texture a compute pass wrote showed only through a later pass that sampled it. A play that parts between two drivers in a render pass that samples a compute pass's textures could not say which of the two passes parted first. dumps::Stores now keeps the compute encoders made and not yet ended, and each texture such an encoder binds (setTexture:atIndex: and setTextures:withRange:, a nil one left out) is a part to dump: its first level and slice, read once the command buffer completed, as an attachment's parts are, into cbC-objT.bin with the cover "-". A texture both stored and bound holds each part once, in Part order. An argument encoder's setTexture:atIndex: is none: its receiver is no compute encoder. docs/REPLAY-STREAM.md and the module docs say what a dump holds. Test: a_listed_command_buffer_dumps_the_textures_its_compute_encoders_bind (one bound texture, a range with a nil, a texture bound twice, a render encoder's fragment texture and an unlisted command buffer's compute texture left out). Verified: clippy -D warnings over the workspace with all features, and the validation suite, the new test among them (job in the land line). |
||
|
|
06c8ebccd6 |
Player: a tessellation factor scale of 1 plays as nothing, any other is a skipped render command
The player refused setTessellationFactorScale: ("not played on a render
encoder"), so a recording that sets the scale stopped at its first
setter. The runtime's render encoder has no scale setter: Metal reads
the scale only in a patch draw through a post-tessellation pipeline
state that enables it (tessellationFactorScaleEnabled), and the runtime
refuses every such state at its making (RenderPipelineKind::Tessellation),
which the play counts as a skipped render pipeline state.
render::factor_scale reads the setter's scale: Metal's default of 1
plays as nothing, and any other scale is a skipped render command of
kind TessellationFactorScale, counted in the report's headline with its
first frame and call. This is faithful only while the runtime refuses
every scale-enabled state; once it builds the scale, its encoder takes
the setter and the player passes the scale on. The code comment and
docs/REPLAY-STREAM.md say so.
The recording that met it (m3-max-71779, read in place, no card): 185
scale setters, every one at 1, the first in frame 409; 0 of its 1668
render pipeline records enable the scale, so no state there is refused
for it.
Test: a_tessellation_factor_scale_other_than_1_is_a_skipped_render_command
(1 as a float and a double, 2 and 0.5, and a scale that is no float).
Verified on msi: clippy -D warnings over the workspace with all features,
and the validation suite, the new test among them.
|
||
|
|
1f81d53c30 |
Player: a compute pipeline record's stage input plays as the kernel's
The player refused every compute pipeline record whose stageInput was not
nil ("a stage input"), so a recording that makes a kernel with a
[[stage_in]] parameter stopped at that state's frame. The runtime takes
the stage input (ComputePipelineDescriptor::stage_input); only the player
lacked it.
translator::stage_input reads the record's stageInput, {layouts,
attributes, indexType, indexBufferIndex}, into the translator's
StageInputDescriptor the way vertex_descriptor reads a vertex descriptor:
layouts and attributes at their indices, a stride of 2^64 - 1 as
MTLBufferLayoutStrideDynamic, Metal's raw step functions, attribute
formats and index type through their enums, and Metal's unset layout for
a buffer an attribute reads that no layout names. Nil stays no stage
input. A raw value the enums lack, or a key the form does not hold, is
the player's refusal. A descriptor the runtime refuses is the runtime's
typed error: a gap or a translation refusal counts as a skipped compute
state in the play's report, any other error ends the play with it.
docs/REPLAY-STREAM.md states the form.
Test: a_compute_pipeline_record_s_stage_input_is_read (the record form,
a dynamic stride, a buffer no layout names, nil, and an unknown key).
Verified on msi: clippy -D warnings over the workspace with all features,
and the validation suite, the new test among them.
|
||
|
|
acda405b30 |
Player: a dump holds each colour attachment its command buffer's render passes stored
A play asked to dump command buffers (--dump-command-buffers) wrote only the buffers their encoders named, so a draw's output reached no dump. It now writes, once a listed command buffer completed, each colour attachment its render passes stored, as cbC-objT.bin beside the buffers' dumps, with a cover of "-", so compare-dumps reads them unchanged: a texture an attachment names under MTLStoreActionStore or StoreAndMultisampleResolve, a resolve texture under MultisampleResolve or that one, and an Unknown store action as the encoder's setColorStoreAction:atIndex: decides it. The dump holds the parts the passes stored (level, slice and depth plane, or the resolve's), one after another, each laid out as a check reads a texture's first level and slice; a part the backend cannot read (a multisample texture stored without its resolve) is an .unread file. Colour only: a texture of a combined depth and stencil format reads back one aspect at a time, through a copy with that aspect's blit option, which this read does not make. The stream doc and the command's help say so. The backend gains Backend::read_texture_part; the runtime's backend reads a part as its check reads level 0 (the CPU's read, or a blit's copy of a Private texture), the check's read unchanged. Verified: by the jobs named in the landing report. |
||
|
|
60a6b2746e |
Docs: the memory-class line measures by two whole plays on the RX 7900 XTX
|
||
|
|
d876f56b82 |
Docs: the two killed plays on the RTX 3090 were followed by its driver's GSP timeout
After lane kernmap's two plays of the Intel-made compute recording on um870's RTX 3090 were stopped at their time limits inside frame 368 (m3-max-71535, 09:28-09:41, and 71553, 09:42-09:57), the card's telemetry froze from the first sample after the second (09:57:33) and the driver logged Xid 119 (a GSP RPC timeout, fn 76) at 10:08:36, naming no process; the node was rebooted. The consumer read its journal and job log: no guest run touched the card from 08:34:40 until then, and the driver's out-of-memory group at 09:57 is routine at card open (13 times that day). The planner ruled it a lab artifact of those plays, no row, written beside the memory-class line. Verified: the docs check follows as a job. |
||
|
|
29b659121e |
Docs: a recording is a timing source only on a card of its own memory class
Lane kernmap played the consumer's GPU compute benchmark recording, made on an Intel integrated card, on the RTX 3090 (pin R; m3-max-71535 and 71553, P0, both capped inside frame 368, 0 refused). Frames 366 and 367 alone took about 378 s of GPU-busy time, against 257.2 s for the whole play on the RX 7900 XTX and 74.3 s on the integrated 780M. The consumer's own guest on the 3090 runs the same benchmark's workloads in 37.1 s of GPU time in all (native 33.4 s), and its recording of the same run on the discrete AMD card is 1.3 GB, against this one's 25.3 GB: the Shared storage an integrated guest builds on. The planner ruled the 3090's frames play-only, and that a recording times only on its own memory class. The replay doc now says so beside the timing verdict rule. Verified: the docs check (workspace Rustdoc, -D warnings) follows as a job. |
||
|
|
9a11fbd543 |
Docs: the replay player makes and executes no indirect command buffer
docs/REPLAY-STREAM.md said that only an indirect command buffer, "which the runtime does not build", would read a pipeline state's resource ID. The runtime builds indirect command buffers; the player is what does not: making one is "not played on a device" and executing one "not played on a render encoder" (new_runtime/mod.rs, render.rs), typed refusals that end the play. The doc now says so beside the refusal rule, and names what would read a pipeline state's ID: an argument buffer's pipeline-state member, which the runtime refuses at the making of a state whose function reads it (rt README, known gaps). The player's comment on that ID drops the same stale reason. Verified: the docs check (workspace Rustdoc, -D warnings) follows as a job. |
||
|
|
e8a3feef6b |
docs: CONFORMANCE-COVERAGE.md without the level-sizes-storage gap row
The ledger row went with the storage levels' form; the generated coverage document counted it. Checked by: scripts/conformance-coverage/coverage.py --check (the conformance suite's the_conformance_coverage_document_is_what_the_sources_derive failed on it in m3-max-70944). |
||
|
|
ed4b0ecd76 |
rt: storage textures written or read at a run-time level, through runs of set 1's level elements
What: under the identity domains a storage slot written, read or size-queried at a level other
than the constant 0 indexes a run of set 1's storage-image array instead of being refused as
Unsupported{IdentityDomains} ("an encoder value the function reads as TextureLevels(S)"). The
translator pushes the bound texture's level count (PushField::TextureLevels) and the run's first
element (the new PushField::TextureLevelBase, beside it), states no StorageTextureLevels or
StorageTextureLevelViews fact, and an access at level l takes element
first + min(l, max(n, 1) - 1) of the array, NonUniform, inside l < n. A texture of one level
pushes its own index, nil 0 with count 0.
The runtime's binding 1 grows by 65,536 level elements past its 65,536 textures, 4,096 runs of 16
(floor::LEVEL_ELEMENTS, floor::LEVEL_RUN). The first dispatch or draw that binds a texture of more
than one level to such a slot (the encoder's checks, compute and render stages alike) gives it a
run: a single-level storage view of each level, of its storage element's type (a cube's level as
the 2D array of its faces, a view's from its own first level), written at the run's elements. A
later bind takes the texture's lock and pushes the same two words: no Vulkan call. The run goes
back through the pool and reaper once the texture is released and its work retired: elements null,
views destroyed (Gauges::level_elements). Every run held, or a texture of more than 16 levels, is
the new Limit::LevelElements { max: 4096 }, and the dispatch or draw does not run. The floor's
storage-image limits and both totals rise by 65,536: storage 196,608, per-stage resources 327,688,
pools 351,680; every lab device's profile is far above (llvmpipe 1,015,808 storage, the least).
SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION bump in the branch's last commit (a new PushField).
Why: 17 guest kernels in 6 libraries were refused at state creation by this form.
Docs: REFUSALS.md and the signatures table regenerated, RESOURCE-ID.md (binding 1 past 65,536),
API.md (storage levels under identity), the runtime README (Set 1, the floor table, the known-gap
line replaced by the Limit), the runtime-floor profile's limits, and the conformance ledger's
level-sizes-storage row removed.
Checked by: engine_texture_levels' identity test and the runtime's storage_levels device tests
(red at 6ad1c33124: jobs m3-max-70886 and m3-max-70892 on lavapipe), engine_identity's
a_storage_slot_written_at_a_run_time_level_is_an_element_of_its_run; the lane's jobs report the
runs per card.
|
||
|
|
17473a1a42 |
Player: a render encoder's residency declarations play through the runtime
The render encoder's arm played its eight residency forms (useResource:usage:,
useResources:count:usage:, useHeap:, useHeaps:count:, each with stages: or without) as nothing,
"as the runtime's render encoder has none". The runtime's RenderCommandEncoder has use_resource
and use_heap now, so they play through it as a compute encoder's do: each resource of the call,
or of its list, through use_resource with the call's usage; each heap, or each of its list,
through use_heap. The stream records each C array and its count as one list, so the usage is
argument 1, and the stages come last; the runtime's render encoder takes no stages, so they are
not read.
What each read before, and now:
- Render encoder, all eight forms: before, no argument and no runtime call; a skipped object they
named was not counted. Now: the resource ({Buffer: object} or {Texture: object}) or heap of
argument 0, each of a list; the usage at argument 1; a skipped object is a skipped call, each
of a list as its own, as docs/REPLAY-STREAM.md says of skipped_calls.
- Compute encoder, the four forms: unchanged in what they read; one resolver (NewRuntime::uses)
now serves both encoders, and heap_of, which only the compute arm called, is gone.
- The usage: before, 1, 2 or 3, any other value refused. Now MTLResourceUsage's option set of
read (1), write (2) and sample (4), any other bit or none refused. Without the sample bit, a
render encoder's useResource:usage: of read | sample, which played as nothing before, would
now be refused.
- objects_named, which the unwritten count reads a render or blit encoder's call by, and which
notes the objects a command buffer's encoders name (resource indices owed, placed buffers' and
no-copy Managed buffers' users, tiled textures' takes): before, bare objects and lists only, so
a residency declaration's {Buffer: object} or {Texture: object} named nothing. Now it names the
resource too, on compute and render encoders alike.
docs/REPLAY-STREAM.md: render and compute encoders play their residency declarations through
the runtime's encoder, the stages forms as those without; the unwritten count's reaching calls
include a residency declaration's resource.
Tests: the commit before this one (red: the skipped-object device test and the unwritten test).
|
||
|
|
3e9cd15b0a |
Player: a release of an object its device's release dropped plays as nothing
Metal's objects keep their device, so a program may release its device before what it made: a guest recording's last two calls release the device and then the host's display library made on it. The player drops everything a device made at the device's release, and the library's release that followed found no object and stopped the play as an invalid stream, after every frame had played. The player now keeps the ids a device's release dropped, and the stream's own later release of one removes it from that set and plays as nothing; the backend released it once, with the device. Ids are never reused (docs/REPLAY-STREAM.md, section 4), so the set holds only objects whose release may still come. A second release of such an object, or the release of an object no call made, still stops the play. Verified: an_object_released_after_its_device_plays_as_released_with_it and the replay tests in the job named in the lane's report; no local build. |
||
|
|
15af4d5de0 |
Player: --dump-command-buffers takes a list of ranges and single ids
A play that should dump only the command buffers holding a changed kernel's dispatches had to dump every command buffer between the first and the last of them: on a recording whose workloads interleave, tens of gigabytes the compare then reads for nothing. The option now takes LIST: FIRST..LAST ranges (both ends held) and single ids, joined by commas, in any order (CommandBufferList, in dumps.rs beside the dumps it selects). Ranges that overlap or touch are merged and a lookup is one ordered-map search, so a list of thousands of command buffers costs the play nothing per call. A single FIRST..LAST range reads as before; anything else stops the play before it starts, as a bad range did. Before: the dump test helper passed 20..=29 as a RangeInclusive, the only form there was. Verified: the red tests from the previous commit (a_dump_list_holds_its_ranges_and_ids_and_ nothing_between, a_play_dumps_the_listed_command_buffers_alone) run in the job named in the lane's report; no local build. |
||
|
|
340cbf5591 |
Docs: HalfTexelConversion's recorded bound names the driver that keeps a 32-bit texel past 65504 at 65504
What: the half-texel-conversion note's recorded bound (PrecisionNote::HalfTexelConversion's doc and
docs/API.md's catalogue entry) now states both answers past +-65504 for a 32-bit float texel read into
`half`. Metal saturates a sample and takes a read to the infinity. The device's rounding takes both to the
infinity. AMD's open Linux driver (AMDVLK 2025.Q2.1, Radeon 780M) keeps both at +-65504, against the 16-bit
float controls the entry declares. Documentation only: no module, refusal or note changes.
Why: under AMDVLK, half-texel-nans-r32f/rg32f/rgba32f's read() sites answered 0x7bff for the largest finite
float texel where Metal answers 0x7c00 (42, 85 and 171 elements a site). The note's text named only the
mirror case (RADV's infinity where Metal saturates a sample), so the static note did not cover what that
driver answers.
How verified (gem10's Radeon 780M; probe branch steelbrain/amdvlkconf-probe, never lands):
- m3-max-71424, built on
|
||
|
|
82d1c62eb5 |
Player: the plural residency declarations play and count as their single forms
A compute encoder's useResources:count:usage: and useHeaps:count: were refused ("not played on a
compute encoder"), so a play stopped at the first one; a guest recording on the Iris Xe stopped
at frame 290 of 430 there. They play now as Metal defines them: each resource of the list as
useResource:usage: with the call's usage, through the runtime's use_resource, and each heap of
the list as useHeap:, through use_heap. The stream records each C array and its count as one
list (docs/REPLAY-STREAM.md), so the usage is argument 1.
What each read before:
- The compute encoder read useResource:usage: alone (its resource as {Buffer: object} or
{Texture: object}, the usage at argument 1) and refused both plurals.
- The covers rule and the unwritten count read useResource:usage:'s resource with as_object,
which takes only a bare object, so a recorded {Buffer: object} wrote and uncovered nothing in
them; both plurals fell through as calls that only name objects. They read the resource now as
the stream records it (Value::as_resource), and each resource or heap of a plural as its single
form.
- The render encoder reads none of its residency declarations' arguments (it plays them all as
nothing), so it read no usage wrongly.
The player's resolvers gain held (a resource value) and block_of (a heap id), which resource and
heap_of now call. docs/REPLAY-STREAM.md says compute encoders play the four forms through the
runtime and that the unwritten count, the skipped calls and the covers rule read the plurals as
their single forms.
Tests (the two commits before this): the device test of a compute encoder's four forms, the
unwritten test of the plural and of the singular on the format, and the covers test of the
plurals. Not run here: no local builds; to be checked on development.
|
||
|
|
30d426774d |
Translator: a kernel's floor tail folds into its pushed fields again (revert of the split)
The split ( |
||
|
|
3a4fe0d314 |
Translator: a kernel's floor tail returns at entry again; a render stage's folds into its other pushed fields
Since |
||
|
|
e59c621e48 |
rt: an observing kernel's whole grids, threadgroup dispatches and indirect dispatches run its plain module again; its partial-threadgroups variant runs ragged grids only
This restores 28e1026b3d's routing, in a new commit past four that changed it: - |
||
|
|
c6feccf773 |
Translator: a kernel that reads a stage-input region takes its partial-threadgroups variant
plan_partial_groups refused a kernel's partial-threadgroups variant wherever it had a stage-input descriptor, so rt refused every dispatchThreads grid that is not whole threadgroups of a kernel with a [[stage_in]] attribute (Gap::PartialThreadgroups at the translator's site). The probe over the 11,580 indexed kernels (m3-max-70807) counted 62 such kernels on amd-780m-radv, nvidia-rtx50-linux and intel-irisxe-anv alike; a consumer's first-time setup meets one of them. The refusal goes and nothing is added to any module: the fetch already stays inside the grid. An invocation past its threadgroup's threads returns in dispatch::emit_entry, which the entry runs before stage_io::emit_entry's fetch. Where the body holds a workgroup barrier the variant walks it predicated instead, so such an invocation does fetch, but its position in the threadgroup is lin unflattened over the threads left (local_pos), so along x and y, the only axes a step reads, it is inside the grid, and its element is one a Metal thread there fetches too; it runs none of the body. A kernel that does not observe its partition now takes the grid-tiles variant, whose invocations past the grid return before the fetch as well. SEMANTICS 2290: the variant of a stage-in kernel was a refusal and is now a module, under the same key. No plain module changes. The two tests of 9089b4eea2 turn green: the translator's interpreter run over a source buffer ending at the last thread's element and a region that clamps nothing traps on any fetch past the grid, and rt runs both kernels' partial threadgroup of 25 in 1,024. |