ffc32081513674d587bce74fa732fe9fe345e79e
820
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
23d6572c18 |
Push placement: a post-tessellation vertex function's window starts past the control stage's range
A tessellation render pipeline whose vertex and fragment functions' push fields filled the
floor's 256 bytes was refused at link ("unsupported: Tessellation; needs AnyOf: Limit
MaxPushConstantsSize, required 260, available 256"): link places the synthesized control stage's
push range (8 to 24 bytes) at the first free offset beside the two functions' ranges, and since
the tail placement (
|
||
|
|
a7320ad3f9 |
Conformance: no case declares a notice the runtime never announces
The runtime's side announces only the codes of the precision notes its states, textures and sampler states carry (Degradation::from_precision_note). 66 Degradation kinds had no precision note behind them: they were the deleted runtime's notices. A case that named one declared a notice nothing can announce, and a value it loosened by one stayed loosened on no run. What goes: - every declaration of those 66 kinds, in 70 case files and the native-note set (six of its members were among them: float-tininess-after-rounding, unorm-depth-rounding, signed-depth-test, ycbcr-filter-not-exact, device-line-ties, device-subpixel-snap); - the value tolerances justified by one: astc's and etc's compact-twin bounds (decoded-texel-precision), visibility's Boolean words (device-boolean-visibility), rotated-planes' unreached rotation-4 bands (rotated-load-tiles), sample-fills' wide depth digest (drawn-depth-copy), texture-fills' 32-bit float depth digests and fresh-contents' Depth32Float fresh site (restricted-depth-upload, fresh-pattern-zeroed); - the replay helpers staged_records_notice, interlocked_split_notice and set_past_layout_notice, and every call of them; - the 66 variants, their ALL entries and their codes; - what only they used: the mesh pass notice list, the sparse notice lists, the GPU-time list, the buffer-blits and sparse-mappings rows' notices fields, buffer-target-clears' kept_image, buffer-texture-blits' copies_shared_bytes and its two tests, render-draw-forms' bounds-pass helpers, rotated-planes' band_is_reached and surface::stored_at, rotated-targets' reads_destination_alpha_in_color, visibility's boolean_words, and the module prose that described those notices. The one backed kind whose name was not its note's, ImplementationDefinedReconvergence, is now DeviceReconvergence with the code metal2vulkan-degrade-device-reconvergence, the note's kebab name, and docs/API.md section 9 gains its entry. shared-in-system-memory stays for the next commit. The tests that used a deleted kind as a stand-in use a backed one. Every case keeps its shared-in-system-memory declaration; tests that count a case's declarations count what is left. pass_start_reads no longer cites the deleted cost::the_creation_prediction. docs/CONFORMANCE-COVERAGE.md is regenerated. A case whose values the deleted tolerances held is now compared exactly; whether the runtime differs there shows on the venues' replays. Verified: cargo fmt --all. The gate runs once over this and the following commits. |
||
|
|
9a1c8fe6dc |
metal2vulkan-rt takes the runtime's name: metal2vulkan-runtime, published
The cutover's last mechanical step. The old runtime is deleted, so its name is free: the crate moves to crates/metal2vulkan-runtime, its package is metal2vulkan-runtime and its library metal2vulkan_runtime, and every reference in the tree follows (sources, tests, scripts, CI, generated tables and docs). It is now a published crate, as AGENTS.md said it would be once it took the name: version 0.2.0 with the other two, the translator pinned exactly (=0.2.0, as the translator pins the AIR front end), documentation, keywords and categories, and copies of the repository's four license files, which the published-crates test now holds equal to the root's for three crates. CI packages it with the others. Prose that said it was unpublished, or counted two published crates, says three. AGENTS.md: facts only. The crate table row, the published-crates and version sentences, and the paragraph on the old runtime, whose name the runtime now carries (listed for the owner). Made by one script run on this tip. Verified by the job named in the landing note. |
||
|
|
51be813915 |
Translator cutover: the device checks' modules go (bind::view_check, bind::check_draw)
Only the old runtime's device checks ran them: its view check, which measured the two view cost facts into the description's measured set, and its check of render targets in place over host pages. The signature table and api_surface drop them; API.md drops the measured set. |
||
|
|
77a66a19bf | Translator cutover: API.md and the workaround docs name the one profile; unused test items go | ||
|
|
aaa3213887 | Translator cutover: first trial-compile fixes (imports, the half pair, push tests, removed routes) | ||
|
|
4730af16e7 |
rt: a command buffer waiting for a shared event's value is Scheduled as it is submitted
What: the status hold for shared-event waits is deleted: - hold(), Pending::held and QueueInner::held; - the completion thread's held list and due(); - EventState::holds and its host-set wake, EventInner::shared; - the hold_completions test seam, which only the deleted test used. A command buffer whose wait's signal is submitted is now scheduled as its last segment joins a submission, its scheduled handlers run then, as for a plain event's wait. A presenting one is scheduled after vkQueueSubmit2, as for any other. Its queue's later command buffers are no longer held behind it. Waits on a value that neither the host has set nor a submitted signal promises stay host-held by the submit thread, as before: every queue submits to one VkQueue, and a wait submitted ahead of its signal would hold the signal too (vkspec 8432; 6.6, 8985). Metrics::event_holds counts those. Why: the hold rested on an M3 recording (event-wait-behind-a-running-signal), not on documented Metal. MTLCommandBuffer.h:47-48 describes Scheduled as "All dependencies have been resolved and the command buffer has been scheduled for execution", and :405-406 describes encodeWaitForEvent:value: as a command that "pauses execution of this command buffer until the specified event reaches a given value". So execution pauses after scheduling. On the RTX 2080 walk, after the walk's clock correction, the hold lasted p50 5 ms and p90 9 ms per interval, in command-buffer counts; the 33.6 ms read earlier as the hold was the submit stage, before that correction. What the deletion removes, in the walk's terms: a command buffer's kernel start is its commit, raised to its queue's previous command buffer's scheduling where that is later, and its kernel end is its scheduling. So a held command buffer's late scheduling also delayed the scheduling of every later one on its queue. The deletion removes the held command buffers, and that chain behind each one, from the span before staging. What is left there is the submit thread's own pace: its passes over other groups, their calls and queue locks. Scope of the claim: - It changes nothing about GPU order or when a waiter completes: the wait still goes to the driver with its submission, as before. - It changes when the guest's threads and handlers see Scheduled: a frame loop waiting on Scheduled no longer makes one GPU-to-host round trip per link. - Its effect on presents per second is not known until the walk at the pin. Docs: CommandBufferStatus::Scheduled, add_scheduled_handler, Device::new_shared_event, the runtime README's submission and handler paragraphs (quoting both header lines so the hold is not brought back from a recording), and docs/API.md's accepted differences. The conformance case event-wait-behind-a-running-signal declares the shared-event row's status and handlers loosened on the runtime by that entry, and its test checks that a status other than Committed or Scheduled is still a row. How verified: the lane's lavapipe gate on this series' tip tree, and the negative job for the two tests of the commit before (FAIL there, PASS at the tip). |
||
|
|
3cdca62567 |
identity domains: a loaded or converted pointer is the device address it holds, no root table
rt answers MTLArgumentBuffersTier2 and refused the tier's basic buffer member: a kernel reading
two buffers through an argument buffer's pointer members, and one reading a buffer through a
gpuAddress the CPU wrote into a constant buffer, were both "Unsupported{IdentityDomains} (an
encoder value the function reads as RootTableAddress)". A pointer loaded from memory or made
from an integer is a wide pointer, which the resident-table domain resolves by searching the
root table's resident set; the identity domains push no root table, so the gate refused it.
Under the identity domains a pointer is the device address of the byte it names, so a wide
pointer there is (0, a, 0, 0) for address a, the form of a miss of an empty table: a loaded word
or an inttoptr operand is the pointer itself, with no search, a wide buffer parameter is its
slot's address (SlotGuestBase with the bias added back), its Metal address is `at`, and its
accesses are at host + at = a, unchecked and uncounted (a stored address is used as it is; there
is no resident set to miss). Nothing pushes RootTableAddress or ExecutionStatusAddress for it.
An escaping slot root stays static there, as on Profile F, which has no root entries either: a
slot pointer converted to an integer or stored through a static destination is SlotGuestBase
plus its displacement, and the slot's run-time accesses keep their SlotBounds check.
The same gate lifts the texture behind an argument buffer's pointer member (ab_tier2's
ab_indexed) and a kernel that converts a slot pointer to an integer. A slot pointer stored
through a loaded pointer or into an open pointer cell stays refused, as on Profile F
(Unsupported{Lowering(Access)}). Every branch is under the identity domains: the default
domains' modules are unchanged. SEMANTICS_VERSION 2202: these refusals become modules.
Tests: engine_identity_pointers (ab_sum, ab_address, ab_slot_address and ab_indexed on every
committed profile Device::from_queries derives under the identity domains: no RootTableAddress,
no ExecutionStatusAddress and no descriptor, L3, and on the CPU interpreter with buffers above
4 GiB and offset addresses, the words the addresses name, the slot's Metal address and the
increment, and the slot checked against its bounds); rt's argument_tier device tests sum through
two pointer members, read through a CPU-written gpuAddress, answer a converted slot pointer as
its gpuAddress plus its offsets, and read the textures behind a pointer member, each exactly. The
two translator tests and the device test that asserted these refusals go. Run by the lane's
compile gate (fmt, clippy plain, m2v_gpu and m2v_cpu_icd, workspace Rustdoc, the translator's
and rt's suites on lavapipe); job ids in the landing note.
Docs: rt's README says the condition in one sentence (the stored word must be a buffer's
gpu_address plus an offset inside it, and a buffer not placed at the address its guest asked
for has another gpu_address) and drops the three refusal bullets; docs/API.md sections 1 and 5
and PointerDomain::Identity say what the identity domains lower now. docs/REFUSALS.md
regenerates unchanged.
|
||
|
|
53f3e522e9 |
API.md: section 9 is the catalogue of the precision notes rt carries
Section 9 was the deleted runtime's notice catalogue: its message sink, announce_each, lowering_refuses, DegradeNotice, exactness(), degraded_objects and the METAL2VULKAN_LOG_*, DUMP, QUEUE_TIMES, PENDING_AUDIT and ENCODER_* diagnostics, none of which rt has. - The intro now states rt's model as its code has it. Each note is fixed per operation (module, pixel format, descriptor or state) and given through six accessors: ComputePipelineState and RenderPipelineState::precision_notes, Texture, SamplerState, DepthStencilState and RenderPassDescriptor::precision_note. Two constants carry notes too: BlitCommandEncoder::GENERATE_MIPMAPS_NOTE and RenderCommandEncoder::DEPTH_BIAS_NOTE. A note is never fatal, and rt prints and sends none (its non-test sources hold no eprintln, log or sink); the consumer reads them. - The 87 entries whose code a PrecisionNote variant backs stay. Their text no longer names the deleted runtime (compressed-texel-decode, bicubic-filter-arithmetic, swizzled-opaque-black-border). Their trigger is rt's where the deleted runtime's stood beside it (device-filtered-mipmaps, shared-exponent-kept, compressed-texel-decode). They no longer say when a deleted runtime announced the note, and they drop the blit, fill and clear parts that only that runtime noted (shared-exponent-kept, device-nan-encoding, device-color-conversion, device-pack-conversion). Their driver-fact text is left for the translator-switch commit. - The 165 entries no note backs go: 59 performance, 104 precision and 2 validity kinds of the deleted runtime. - Section 8's last paragraph names metal2vulkan_rt::Error, REFUSALS.md and rt's README. The guide's opening line and README's row say precision notes. tests::fast_paths reads the catalogue only for the codes of its ledger notes, all PrecisionNote codes, which stay. Section 10 still names some deleted codes; that is a follow-up. |
||
|
|
430fd25c60 |
Conformance: carried origins, probes, slugs and the rt ledger name no deleted crate
The old runtime is deleted, so the suite's text stops pointing at it: - The carried cases' origins (compute_threadgroups, sample_fills, sample_positions, texture_buffer_fills, texture_fills, two_plane_copies, handler_waits) state the measurement itself, and the 81 recordings that store an origin carry the new strings. - docs/API.md section 10's four entries that said "the new runtime" say "the runtime"; their slugs follow in the cases that name them (buffer_target_clears, pass_sequence_actions, event_orders, texture_query) and in the quotes of the lead-ins. - The probes drop their runtime_lane and metal2vulkan-runtime citations; a probe whose results lived only in a deleted lane module names that module and the last commit that held it. - known-gaps-rt.tsv's reasons drop the comparisons with the old runtime (226 rows) and say "a known gap of the runtime". The stage-in rows are as they were. Prose that describes the suite's own run-kind branch (Unjustified::OldRuntime, the recording's new_runtime flag) is left with that code. |
||
|
|
ca5aa90e09 |
env_vars: the ten variables only the deleted runtime read go
With metal2vulkan-runtime deleted, ten accessors in crates/metal2vulkan/src/env_vars.rs have no reader: lane_validation, log_pipelines, log_memory, log_shadows, dump_pipelines, log_passes, pending_audit, queue_times, encoder_trail and encoder_times. A grep of the tree finds no call of any of them and no other read of their METAL2VULKAN_* names, in metal2vulkan-rt or anywhere else. They go with their registry rows, so `metal2vulkan --help` lists only the variables something reads: METAL2VULKAN_REPRO_DIR and the METAL2VULKAN_<TOOL> family. METAL2VULKAN_REPRO_DIR's row and accessor doc lose the deleted runtime's half (its bundles of refused creations, and "unset is off (the runtime's)"); the binary's bundles are unchanged, and the binary is the variable's one reader. docs/API.md's paragraph describing the ten variables (section 9, under "How a notice reaches you") goes; the heap-texture refusal line after it no longer begins "Whatever the variables". The rest of section 9 still describes the deleted runtime and is the docs step's. The env_vars module is hidden (not in tests/api_surface.rs or api_signatures.tsv); scripts/api-signatures/signatures.py --check is 0 on this tree. Verified: the gate of this commit (fmt, clippy x3, workspace doc, the metal2vulkan crate's tests). |
||
|
|
e639f89d25 |
rt README, API.md: the known gaps a user reads before the old runtime goes
What each line states, in the section that owns it: - Known gaps of pipeline states: on RADV a stage's pushed values that the driver reads from its own upload can be read past that upload's end (a 12-word load widened to 16), which faults where the upload ends the driver's upload buffer and loses a Radeon 780M or RX 7900 XTX. Recorded as open: rt places pushed values with no regard to that widening. - Known gaps of pipeline states: the pipeline cache's cold price per card (RTX 3090 5.8% and 6.8% slower, Iris Xe 9.8% faster, Radeon 780M level) and its warm effect. - Known gaps of pipeline states, the identity domains' list: in plain words, a buffer reached through a pointer member of an argument buffer or a stored gpuAddress, and a kernel that turns a buffer argument's pointer into an integer, each named; the texture behind a pointer member named as such. - Known gaps of render pipeline states: each render content is one whole VkPipeline with no shared parts; the heaviest recorded content's cold driver time on two RTX 3090s (1,408 and 1,335 ms), the dynamic states' share (under 1%), the warm figure, and the render records' warm saving on lavapipe. - Known gaps of render pipeline states: mesh render pipelines have no call in rt and no mesh draw; a mesh or object function in a render descriptor's vertex place is the translator's refusal. - Known gaps of queues: a texture or block not shared outside rt, released while an unsent upload holds it, keeps its memory until that upload is submitted, and with no later call until the device drops. - Floor: Mesa's driver for Apple GPUs (KosmicKrisp, Mesa 26.3.1) meets the floor on macOS; MoltenVK is below it (no nullDescriptor, set 1 refused by its set-layout support query). - docs/API.md section 5, at PushField::SlotBounds: the bounds check's measured cost (harness GPU rows on a 780M, an RTX 3090 and an Iris Xe; replay streams' GPU time a frame; cold pipeline makes on two RTX 3090s), and the rt README's check entry points to it. Why: the old runtime is being deleted; these are the gaps of rt a user meets that the README did not state, stated as what is true now with the jobs that measured each. Verified: docs only; the numbers are read from the jobs each line names (the bounds check rows recomputed from m3-max-56485, -56486, -56546 and -56641). Compile job named in the hand-off. |
||
|
|
0cd2ad765d |
Push placement: on the floor each stage's push ends with its tail, 24 bytes above its other fields
A driver that uploads a stage's push bytes up to the highest one the stage reads, and widens a push load past its last byte by up to 28 bytes, read past the upload where a stage's last field ended its push (RADV: 49 compute stages at tip). A read pinned past the fields (R7) cost the stages a driver holds whole in registers those registers: the pin raised the used-word count past the driver's limit (RADV keeps all 16 words of the harness's lcg_step in user SGPRs at tip, none under R7). The tail adds no read where the stage has a field of a tail kind, and moves one. - lower/push.rs: on PushWindow::Floor, place() lays the longest prefix of the kind order that fits with its tail: the highest field of a tail kind (SlotBounds or ZeroAddress, the two kinds whose value the consumer never pushes with every bit set) moves HOLE_BYTES (24) above the other pushed fields' end; where the pushed fields hold no tail kind, the zero tail word (PushField::TailWord at PushPlacement::tail_word) takes that place, with which push_range ends. One pushed field of one or two words has no tail. The guaranteed window is packed as before. - tail(), check_floor(): the structural tail and the floor's bound, which select checks on every placement as an invariant error. - emit: the stage reads its tail in its first block and returns where it holds the value the consumer never pushes there (emit_tail_guard): the word non-zero, bounds with both words all ones, the zero range's address all ones. - PushPlacement::tail_word (public, serde default, codec), PushField::TailWord (codec, API table); SEMANTICS_VERSION 2201, ARTIFACT_FORMAT_VERSION 556; the old render descriptor key re-pinned at 2201. - Tests: push.rs's floor placements at their tails, the bound's refusals; engine_identity's 31-slot kernel spills 4 addresses to its block; engine_identity_render's vertex range ends at 64. Docs: API.md section 5 (the tail and what the consumer pushes), rt README (24 addresses below the tail), the profile's window doc. Verified at 855d973a38 (this change before development's |
||
|
|
bafdd29f9c |
conformance: bicubic-texel-classes's rows on an RTX 3090; the note's figures with it
The 3090 answers as lavapipe does (its half results unnarrowed, RGBA16Unorm's largest difference 2.16e-4), and the old runtime's sRGB row reaches 1.58e-3 there, so the note's per-format figures in docs/API.md take it. Verified: the rows are the replay's own ready-to-paste rows at 40bc6a759e on the 3090 (m3-max-57815). |
||
|
|
a1c3a472bb |
conformance: bicubic-texel-classes's known-gap rows; the bicubic note states what Metal measured
The case's samples differ from Metal's on every venue by the precision note BicubicFilterArithmetic: Metal's bicubic results lie on the format's grid (a sixteenth of a code for the 8-bit classes, a whole code for RGBA16Unorm, an exact half for RGBA16Float), and at the six RGBA16Float samples whose sum lies exactly halfway between two halves Metal rounds away from zero; ours is the unrounded f32 sum. Under rule 1 a filtering answer within Metal's precision is the device's, under its static note, so no form rounds the sum onto Metal's grid. docs/API.md's catalogue entry for the note and the note's own definition state those measurements and the largest difference per format over the venues run. Both ledgers carry the case's divergent rows per venue (lavapipe, the M3 on KosmicKrisp for the new runtime and on MoltenVK for the old, a Radeon 780M, an Iris Xe), and the new runtime's ledger the sRGB texture's refusal (Gap::BicubicTexels) at every venue. Verified: the rows are the replays' own ready-to-paste rows at 40bc6a759e (lavapipe on msi, m3-max-57732, m3-max-57813 on a 780M, m3-max-57816 on an Iris Xe); the tie scan compared rt's lavapipe samples with the recording in exact arithmetic. |
||
|
|
6833eba8e2 |
identity domains: a 2D bicubic sample reads its slot's format treatment from a pushed word
Under the identity domains (Device::from_queries, the new runtime's translator device) every
kernel that sampled a texture through a bicubic constexpr sampler was refused as
Unsupported{IdentityDomains} ("a bicubic filter"), because the filter's treatment of the bound
format (its inner taps, its clamp and its border texels) was a SpecKey::BicubicTexels
specialization the old binder sets from the bound texture. One compute pipeline of every macOS
guest boot met that refusal; the old runtime builds it.
The treatment is now one u32 field per bicubic slot, PushField::BicubicTexels(SlotRef), placed
and filled as TextureIntegerChannels is. The 2D routine already took the bits as a run-time value
(Bits::Value), so a sample reads the field instead of the constant; no per-format pipeline, no
new descriptor. metal::format::bicubic_texels_word(pf, swizzle) gives the word the binder
specializes the constant to (BICUBIC_TEXELS_UNBOUND for a slot bound to nothing), and None for a
format of no measured family or of 8-bit sRGB codes. rt fills the field from the bound texture
when the slot's texture changes, and refuses a dispatch whose bicubic slot holds a texture with no
word as Gap::BicubicTexels, naming the slot and the pixel format. The static precision note
BicubicFilterArithmetic stays.
Still refused under the identity domains, each the refusal it was: a bicubic sample of a 1D
texture or at pixel coordinates (and the in-place two-plane routine), an argument buffer's
texture, an array of samplers. The default domains (Device::new, the frozen old runtime's path)
are unchanged: they still specialize SpecKey::BicubicTexels and state RuntimeFact::BicubicTexels,
and the binders refuse the new field.
SEMANTICS_VERSION 2199 -> 2200, ARTIFACT_FORMAT_VERSION 554 -> 555 (a new push field tag).
docs/REFUSALS.md regenerated; api_signatures table blessed; docs/API.md and the rt README's known
gaps say what is lowered and what is refused.
Tests:
- engine_identity::a_bicubic_kernel_reads_each_slots_format_treatment_from_its_pushed_field
(replaces the refusal test; fails without the change): bcu_formats on lavapipe and moltenvk-m3
profiles under the default domains keeps its 10 facts and 10 spec keys and no push field; under
the identity domains it compiles, passes L3, pushes the 10 slots' fields, declares no spec key
and no fact, and keeps the precision note; bcu_forms (1D) and bcu_address (pixel) still compile
on the default domains and are refused under the identity domains.
- rt tests::bicubic (device cfg): each format bound at every slot of bcu_formats pushes its word,
its arm asserted per format (R32Float linear; RGBA8Unorm, RGBA16Unorm, R8Unorm the [0, 1] clamp;
RGBA8Snorm the [-1, 1] clamp; RGBA16Float no clamp), an unbound slot the unbound word, and an
RGBA8Unorm_sRGB texture at slot 3 is Gap::BicubicTexels naming slot 3 and the format.
|
||
|
|
a89e4c0838 |
identity domains: the constant blob is the module's own words; rt's two constant-data gates go
Under the identity domains a function binds no descriptor, so a function reading the constant
blob was refused ("a resource bound through a descriptor"): the 16-byte blob of two ushort3
function constants read as half3 (as_type, folded by LLVM into a <3 x half> load of the
<3 x i16> constant, which fails the typed-access test) refused a consumer's kernel on both
records.
There the blob is now a Private u32 array whose initializer is the blob's little-endian words,
zero-padded to 16 bytes as a bound blob's range is (memory::blob, BlobHome::Module). The blob's
existing word-composed leaf loads read it, every load checked against the array's length (no
robustness covers Private memory); use_blob counts no descriptor and the artifact carries no
blob, so no stage has a constant_blob. Off the identity domains nothing changes (BlobHome::Bound).
The module's blob counts in the plan's private bytes where an access reaches it at an offset only
the run knows, as a run-time-indexed Private constant does, and its declaration's words count in
the size estimate.
The bound is memory::blob::MODULE_BYTES = alloca::MAX_UNSHARED (64 KiB), the most the typed
objects of one function may declare: a typed constant up to that size is already a Private
variable with its initializer, so the module's blob gives the make no larger initializer than
one of those. Past it the identity refusal names the kind, "constant data of N bytes read through
memory", in place of the descriptor catch-all.
rt: nothing reaches its two gates on constant_blob now (rt always compiles under the identity
domains, and the linked stages' constant_blob is None), so interface()'s Gap::KernelInput for
it and RenderPipelineKind::ConstantData are deleted, with the README's two mentions and the
variant's row of the API signature table. docs/REFUSALS.md regenerates unchanged (the variant was
in no section); no crate-root item changed. SEMANTICS_VERSION 2199: identity modules and refusals
change; the encoding does not. The old runtime's render descriptor key, which hashes the version,
is pinned at its 2199 value.
Tests: engine_identity's blob_words kernel reads the records' half3-of-ushort3 load and 2-byte
units at run-time offsets, one past the words: under the identity domains no descriptor, no
artifact blob, private bytes +32, L3, and the CPU interpreter's answers (zero past the words);
the default domains bind the same 24-byte blob. blob_past (a 65,600-byte blob) is refused naming
its size where the default domains bind it.
Verified: see the check job named in the landing.
|
||
|
|
f1c3a2557e |
translator: spilled fields read 16 bytes at a time, through a NonWritable block
Under the identity domains a function's fields past its push window live in a parameter block at the pushed ArgumentTableAddress, and each was read by a load of its own size (a slot's bounds: 8 bytes, aligned 8) through a writable device place. The block is now read in 16-byte lines: each line a spilled field touches is one uvec4 load, aligned 16, made once where it dominates (EmitCx::block_line, so load_push_fields' reads at entry share them), and each field is taken from its line (a word, a two-word shuffle, a bitcast for an address, whole lines for a region). The place's member is NonWritable: nothing writes the block while a command reads it, so a device may read it as read-only memory; device_place_read_only notes that RADV reads a uniform address of such memory with a scalar load. The block's address is a multiple of 16 (rt's ring aligns every write to 16) and its size is (argument_table_size), so every line lies in it. docs/API.md states that contract for a consumer. Why: wide_bindings spills 23 of its 24 slots' bounds; it read them as 23 loads of 8 bytes, now 12 of 16. In one stream's kept lowerings (gb-3090-r2) 2 of 424 modules spill: 14 spilled bounds become 7 lines, 2 become 1. SEMANTICS_VERSION 2197 -> 2198: module words change. Test: engine_identity_spill's vertex function loads each 16-byte line of its spilled fields once, in its first block, as a uvec4 aligned 16 through a NonWritable block; its interpreter tests read the spilled bounds as before. |
||
|
|
4c39fc5bcb |
docs: the compressed-texel-decode entry's ASTC bound follows the cost the old runtime announces
What: in docs/API.md's compressed-texel-decode catalogue entry, the sentence on the ASTC LDR bound (up to 1/2048 off Metal's on ANV, Mesa 26.2.6, the Iris Xe of Raptor Lake-P, over the fourteen footprints) moves from inside the Cost: words to its own sentence after them. Why: |
||
|
|
ff507ed9b5 |
rt: the border swizzle from the image where reported, and an opaque-black border's static note
Where a device lists VK_EXT_border_color_swizzle and reports borderColorSwizzleFromImage, device creation enables the extension with both its features: borderColorSwizzle, which Vulkan requires of every device that lists the extension, and borderColorSwizzleFromImage. Elsewhere neither is enabled. Sampler creation is the same form on every device. No sampler chains VkSamplerBorderColorComponentMappingCreateInfoEXT on any device: a sampler in the arrays meets every view, and that structure names one mapping. So the struct is left off everywhere, and VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-borderColorSwizzle-06437 cannot fire. With the feature, an opaque-black border sampled through a view whose component mapping is not the identity reads through that mapping, as Metal's border reads through the swizzle. Without it, Vulkan leaves that texel undefined; the NVIDIA driver reads (0, 0, 0, 1). A new static note, PrecisionNote::SwizzledOpaqueBlackBorder, records that difference, decided on every device by the sampler alone: - SamplerState::precision_note is Some for a descriptor whose address mode reads the border (ClampToZero or ClampToBorderColor) with an opaque-black colour (SamplerDescriptor::shape's opaque_black_border). - A compute or render pipeline carries it among its precision_notes where a function samples through a constexpr sampler of such a border. That is decided by the constexpr sampler's own constants, through the device sampler the translator states for it (CombinedSampler::constexpr_sampler). - The conformance rt side collects the sampler state's note with the others. The rt README records the known gap and the feature table. docs/API.md has the catalogue entry. The translator's cache appends the variant (ARTIFACT_FORMAT_VERSION 553 -> 554). Validation derives no tolerance from the note (Allowance::Unbounded). The old runtime's degradation.rs gains a notes entry, because Degradation::from_precision_note matches every PrecisionNote. DeviceDepthBias did the same. The old runtime announces nothing new. Census, GPU-free, over the 31 kept replay streams: - 0 sampler states read an opaque-black border. - 0 of 4609 constexpr samplers do, over the 12213 functions of their 322 distinct libraries. 12 functions did not decode under the standard budget and are not counted. |
||
|
|
1f4cb5b986 |
conformance: the new runtime's heap texture sizes are held by their property, not by Metal's numbers
metal2vulkan-rt answers heapTextureSizeAndAlignWithDescriptor: with the device's own image requirements, raised to bufferImageGranularity (its README's heaps), so on the Iris Xe 588 sites of the heap families read divergent against Metal's numbers. They are not a bug and not ranked against the old runtime: a consumer places by this device's answers. So on the new runtime's run the cases stop comparing the two numbers with Metal's and the side holds each answer to what a consumer places by, before answering it (rt_side/heap_sizes.rs): 1. the alignment is a power of two, for every query; 2. for a Private query, a heap of align + size bytes takes the texture at offset align; 3. there, level 0's first slice written from a buffer at Metal's layout of the level reads back unchanged. A Shared, Managed or Memoryless query is held to step 1 alone: rt places heap textures in Private blocks only, and placing the descriptor in a Private heap would answer another query. A descriptor whose bytes rt does not move, which its copy answers Gap::TextureBytes (depth and stencil both, multisample) or Gap::FloatDepthUpload (Depth32Float) for, is held to steps 1 and 2. A failed step answers its failure, so the site still diverges (Err where Metal answered). The cases (texture-pairs, heap-sizes, format-footprints, ycbcr-two-plane-format-descriptors) name an rt-only allowance per query at case/<query>/size-and-align/Ok/*, Unchecked, justified by a new docs/API.md section 10 entry, "The new runtime's heap texture size and alignment are the device's own", worded as rt's README words it and naming the three steps. The old runtime's run compares exactly, as before. A refusal still diverges: the allowance is under Ok. Tests: every recorded heap answer (18 recordings, 2425 answers) has both numbers under that allowance and its refusal site under none; every NewRuntimeAccepted slug a case names is a section 10 entry (the existing check now covers rt-only slugs too). |
||
|
|
c77d059c68 |
conformance: the ASTC cases hold the device's decode under compressed-texel-decode
On the new runtime a linear (_LDR) ASTC texture whose block the device holds is read through the device's decode, the static note compressed-texel-decode (Texture::precision_note). The case named only decoded-texel-precision for its linear forms' texels, the old runtime's emulated decode, so on the Iris Xe its fourteen linear footprints' texels were unlisted rows, up to 0.00049 off Metal's value. The case now loosens each round's texels on the new runtime's run by the catalogue's bound for that note, 1/2048 plus the float rounding of both values, justified by the note alone (rt-only; the old runtime's run is unchanged). The catalogue entry states the ASTC bound and where it was measured (ANV, Mesa 26.2.6, Iris Xe of Raptor Lake-P, fourteen footprints): 0.00049 is under 1/2048 (0.000488...) only with the rounding allowance, so the figure is stated with it. sRGB and HDR forms still compare exactly. |
||
|
|
4f5289012a |
identity domains: a checked slot's limit once per access size, in the function's first block
A checked access (an access of a slot the identity domains check, at an offset the module does not hold as a constant) emitted the normative check whole: m + before, len >= n, len - n, a compare and an and, five instructions (25 words) per access. Two of them depend only on the slot and the access size. The check is now at = m + before; at < limit, two instructions (10 words), under the slot's limit for n-byte accesses, psb::limit: len - min(len, n - 1), an OpExtInst UMin and an OpISub (12 words; the length itself for 1-byte accesses), made once per slot and size. EmitCx::slot_limit makes it in the function's first block where the bounds are split there (load_push_fields), through FunctionBuilder::in_entry_block, which appends to the entry block before its terminator, so every checked access of that size in the function recalls it; elsewhere it is made in the open block. Both check sites (emit::prepare and the pulled fetch's address_read) take it. Exact: where len >= n the limit is len - n + 1, and at < len - n + 1 is at <= len - n; below that the limit is 0, which no offset is under. len is at most 2^31, so nothing wraps. Tests: psb::tests::an_offset_under_the_limit_is_one_the_normative_check_admits runs the form on the interpreter harness (offsets around the buffer's ends and near 2^32, n 1, 2, 4, 16, both widths, buffers of 0 to 64 bytes) against contain::in_bounds; engine_identity_contain::a_checked_slots_limit_is_made_once_per_size_in_the_first_block reads the contain kernel's module on every identity profile: two limits in the first block, three compares under them. Docs: docs/API.md section 5 and PushField::SlotBounds say how the check is computed. SEMANTICS_VERSION 2197 (every checked module changes); ARTIFACT_FORMAT_VERSION 553 with it. |
||
|
|
9203b13fe1 |
conformance: a long of an infinity holds Metal's 0 or the bound, under API.md's row
The planner's ruling: MSL 8.6 promises round toward zero and NaN to 0 and nothing past the range, so the translator keeps saturating, the case keeps every past-range row compared, and declares the long-of-infinity pair under docs/API.md's row. The row (the plain-fptosi line this lane added) now says what it covers: a float past an integer's range converts to the nearest bound, Metal on the M3 Max answering the same at every width but long, whose two infinities it converts to 0 (job m3-max-55436), and the plain LLVM cast is the device's own. Its lead-in moved, so its slug is new; nothing else names it. The case loosens exactly those elements: at each of the four long-of-float and four long-of-half sites, the bytes of input 14 (+inf) and 15 (-inf), each to any of 0 and its bound (AnyOf), justified by that entry. A test holds the two inputs to be the infinities and the entry to be in the document. |
||
|
|
eb16ce79c9 |
docs: a plain fptosi or fptoui of a NaN answers the device's conversion
The translator lowers LLVM's plain fptosi/fptoui to a bare OpConvertFToS or OpConvertFToU, whose answer for a NaN or an out-of-range value SPIR-V leaves undefined, while MSL 8.6 sends a NaN to 0. No accepted difference said so. Metal's compiler never emits the plain cast: probe job m3-max-55309 compiled int(), uint(), static_cast and two-lane vector casts of float and half in a kernel and in fragment functions, with fast math on and off, and every one is an air.convert call (which the translator saturates). Over the indexed corpus (29446 modules, job m3-max-55344) and the replay streams on every node that holds them (jobs m3-max-55344, 55346, 55348, 55349, 55350, 55351) no function holds a plain fptosi or fptoui; the same walk counting air.convert float-to-integer calls finds 35606 in the corpus and 19840 in the M3's streams (job m3-max-55356), so the scan reads real IR. So the plain cast stays the device's conversion, stated in docs/API.md's accepted differences under Conversions. |
||
|
|
90a02e250d |
identity domains: a checked access's domain is its buffer, not its bind window
Metal's domain for a buffer argument is the buffer: an access before the bind offset reads the buffer's bytes there. The containment check measured the offset from the bind offset against the bytes from there to the buffer's end, so a checked access before the bind offset read zero and a store there did nothing, where Metal reads and writes the buffer. - PushField::SlotRemaining (u32) becomes PushField::SlotBounds (uvec2): the buffer's bytes before the bind offset (the bind offset), then its length; a set*Bytes copy 0 and its length; nil 0 and 0. The check is psb::in_buffer: (len >= n) && (m + before <= len - n) in u32, m the offset from the bind offset read as signed. Before the buffer's start the sum wraps to at least 2^31, past every length (no buffer is longer than 2 GiB). One add more per checked access and one more pushed u32 per checked slot. - Offsets are signed on every identity form: the word-below form (psb::prepare_at, also the pulled fetch's) now sign-extends the offset instead of reading it from the slot's window start, as the direct form already did through its 2^31 bias. - The new runtime's encoders push the bounds (encoder::bounds, Tables::bounds); the old runtime's binder writes them from the bound buffer and still refuses ZeroAddress. - The old runtime's lowering is unchanged; SEMANTICS_VERSION 2195. Tests: engine_identity_domain (new, interpreter): on both identity forms a run-time -4 at bind offset 16 reads the word at 12 and at bind offset 0 reads zero, a constant -4 at bind offset 16 reads the word at 12, and the default domains read the word at 12 as docs/API.md says. engine_identity_contain adds an access before the bind offset (inside the buffer: read and written) and one before the buffer's start (outside). The identity tests push the bounds. Docs: API.md sections 1 and 5 and the new runtime's README state the domain and the cost. |
||
|
|
a010d17c6b |
translator: a fetch's element index first among the floor's fragment fields, from the vertex function's end
On the floor a fragment function's push fields started at the vertex function's push end rounded up to 8. Where that end is a multiple of 4 and not of 8, the four bytes below the base went unused, and a fetching fragment function placed its four-byte element index (PushField::FetchedColor) after its eight-byte fields: a pair that fits the floor's 256 bytes with those four bytes used was pushed past them. The fragment base is now the vertex function's push end, and FetchedColor sorts after SlotBindOffset and before the slot addresses (SlotGuestBase): a fragment function that pushes no parameter block's address places it in those four bytes. Each field is still placed at the next offset aligned to it, so a fragment function whose first field is eight bytes, the spilled block's address included, starts where it did, and the vertex function's window still ends at 248. The fixed windows read no base: the old runtime's modules are unchanged. The docs that stated the rounding say the base is the vertex function's end: the push module, VERTEX_FLOOR_END, LoweringInputs::push_base, docs/API.md section 5, rt's README, and the render identity test's notes; the spill test reads the base unrounded (its vertex function ends at 248). |
||
|
|
7934b405d8 |
fetch (draft): surfaces read through the loop where their query offers it; loop reads counted; tests and docs
A surface plane whose texture is a shader-read render target takes the feedback usage where the handle's image format query offers it with the export features alike (Query::plane; a D3D11 import's query the same), and the in-place make retries without it where the images with it do not hold the layout; a plane without it reads through its shadow, the counted copy. The fetch and the texture read choose the loop or the shadow by the image, not the device. Metrics::attachment_loop_reads counts every draw that reads an attachment of its own pass through the loop. Device tests (tests/fetch.rs): N fetching draws exact, N-1 barriers or copies more than one; a surface plane of each fetched format. RenderPipelineKind::FramebufferFetch removed. SEMANTICS_VERSION 2193, ARTIFACT_FORMAT_VERSION 550 (PushField::FetchedColor). REFUSALS.md and api_signatures regenerated; README and API.md. Draft: the old render key re-pin follows the compile check. |
||
|
|
adf59be4a7 |
rt: multisample resolves in the pass, by Vulkan's own resolve
A store action that resolves (MultisampleResolve, StoreAndMultisampleResolve, and Unknown where the attachment names a resolve texture) resolves in the same rendering: the attachment's VkRenderingAttachmentInfo names a view of the resolve texture's resolveLevel and resolveSlice and a resolve mode, so the pass adds no pass, copy or barrier of its own. Color resolves by AVERAGE, the mode Vulkan requires of a float, normalized or sRGB format, under the new static note PrecisionNote::DeviceRoundedResolve (RenderPassDescriptor::precision_note) on every device. Depth resolves by its MultisampleDepthResolveFilter: Sample0 always, Min and Max where the device's supportedDepthResolveModes has them; stencil by Sample0. Refused as Metal refuses them: a resolving action with no resolve texture (Refusal::ResolveTexture) and an integer format's resolve (Refusal::ResolveFormat). Gaps: RenderPassKind::Resolve (another format, one sample, an emulated encoding, two depth-stencil views), ResolveFilter (a mode the device lacks, DepthResolvedSample, an unpaired aspect) and LateStore (a later store that does not resolve an attachment that began resolving). The old runtime maps the new note to its device-rounded-resolve degradation; the validation allowance, the conformance suite's rt side and the replay player carry the resolve fields and filters. Evidence, draw_full_4x: 64 full-screen draws in one pass into a 4-sample RGBA16Float target, resolved as the pass ends (MultisampleResolve) into the 1-sample texture the row checks texel by texel against the draw colour before its timed runs. Each arm records, a run, 64 draws, 1 pass, 1 barrier and no copy: new's Metrics::resolves 1; old's 1 render pass instance, 1 vkCmdBeginRenderPass, 64 draws, 1 barrier, no image copy or blit (m3-max-55061). GPU p50 in us, old,new then new,old, one harness build each: 780M new 259.0/258.7 against old 1933.6/1827.4, new is 86% faster; RX 550 new 1643.5/1643.8 against old 7207.8/7209.3, new is 77% faster (harness at 1ff6574894, m3-max-55050, 55061); RTX 3090 new 170.0/171.0 against old 188.7/190.0, new is 10% faster; Iris Xe new 1006.4/1007.7 against old 1022.1/1019.8, new is 1.4% faster (harness at 5af66e2c4e, m3-max-54928, 54938, 54939). Why old is slower on AMD is not traced. Verified: see the check job named in the landing. |
||
|
|
3fc316d576 |
identity domains: a render pipeline's functions spill past their shares of the floor's push range
Under the identity domains a vertex or fragment function whose push fields passed its share of
the floor's one 256-byte range was refused (Unsupported{IdentityDomains} needing
maxPushConstantsSize). Once containment added each checked slot's length (SlotRemaining) and the
zero range's address (ZeroAddress), pairs reached 272 bytes and were refused: 3 render states of
windrag-780m-b2 (223 draws) and 4 of syncview (259 draws), and the guest's GL-layer pipelines on
reims's walks. A render function now spills as a kernel does: it pushes its parameter block's
address first (PushField::ArgumentTableAddress) and reads every field past its window from the
block, each loaded once, in the function's first block (EmitCx::load_push_fields). The refusal and
its REFUSALS.md row are gone.
- Order: the check's fields are last in the derived Ord of PushField, after
TessellationFactorAddress (ZeroAddress, then each SlotRemaining), so what every access reads is
placed ahead of what only a checked access reads, and the check's fields are the first to move
to the block. The codec's list is unchanged.
- The vertex function's floor window is [0, 248) (push::VERTEX_FLOOR_END). A vertex function is
lowered without knowing its fragment function, and a fragment function that spills pushes its
block's address (8 bytes, 8-aligned) from the vertex function's end, so the vertex function
leaves that room. Cost: only a vertex function whose own fields pass 248 bytes spills where it
used to fill the last 8.
- metal2vulkan-rt: Draws holds each field's place (the push range or its function's block) and
each function's block (length, the push offset of its address). A draw that fills its pushed
values anew writes each block into the parameter ring and its address into the range;
ring_writes counts it. A block longer than a ring chunk stays Gap::RenderPipeline(DrawInput).
- SEMANTICS_VERSION 2194 (placement changed).
Tests: push.rs's edges (a vertex function ending at 248 with a spilling fragment function, whose
address goes at 248; a fragment base of 244, whose address is still at 248; a vertex function
whose fields would reach 252, which spills); engine_identity_spill: a vertex function of 25 slots
pushes its block's address first and every slot's address, spills only the check's fields, passes
L3, and loads each spilled field once in its first block; the pair with a fragment function from
248 compiles and validates on every identity profile; on the interpreter its sums are Metal's, and
lengths pushed one word short, in the window and in the block alike, read zero.
Docs: push.rs's module text, docs/API.md (section 1) and the rt README state the shares, the 248
and its reason, and the spill.
|
||
|
|
5573e16f00 |
docs: the identity domains check run-time-offset slot accesses against the pushed length
docs/API.md: the policy's identity-domain text and section 5 state SlotRemaining and ZeroAddress, the normative check in u32, what an outside load, store and atomic do, that an offset before the bind offset is outside, and what stays unchecked (constant offsets, pointers loaded from memory or made from integers). The rt README's known gaps say the same for buffer arguments, the nil buffer's length 0, and the pulled fetches. |
||
|
|
2b8b894101 |
docs/API.md: the translator's own Workgroup words, the binder's index-rewrite kernels among them
The list named the binder's scan and merge kernels; its index-rewrite kernels hold Workgroup words too, each written before it is read. |
||
|
|
d4241114cc |
conformance: compute-threadgroup-memory-reads-zero recorded on the M3
Metal on the M3 Max (macOS 27.0.1, job m3-max-53825, three runs, one outcome) answers metal2vulkan_devtools::threadgroup_start::answer in each of the six dispatches: no word of the declared array or of the [[threadgroup(0)]] region read nonzero before the program wrote it, in the later threadgroups of 2048 of 16 KiB and in the second dispatch; every pattern read back (0xffa00000); its SIMD groups of 32 in thread order. docs/API.md states that answer, the engine fixtures' README lists tgz_reads, and CONFORMANCE-COVERAGE.md is regenerated. |
||
|
|
a69cb43486 |
translator: threadgroup memory reads zero until the program writes it, on Device::from_queries
On the new runtime's profile every Workgroup variable that holds a
function's threadgroup memory has a null initializer: the threadgroup
arena (declared threadgroup variables, [[threadgroup(n)]] regions and the
imageblock, memory::arena) and the typed threadgroup objects
(lower::access::local). One form on every device: the Vulkan 1.3 floor
requires shaderZeroInitializeWorkgroupMemory; a profile without it
refuses such a function, Unsupported{ZeroedThreadgroupMemory}.
Device::new's profile is unchanged (ProfileFacts::ROWS keeps
ThreadgroupStart::Unwritten), so the old runtime's SPIR-V is too.
The translator's own Workgroup words get none, as it writes each before
any read: the emulated SIMD-group scratch and vote word, the object
stage's mesh grid, the mesh wrapper's count and staged indices, the
emulated payload and the binder's scan and merge kernels.
The builder refused a null of an array whose length is a specialization
operation (spirv/ir/constant.rs, ConstRule::NullType); an arena with
regions, and the emulated scratch, have such lengths. spirv-val's
IsTypeNullable reads an array's element type alone, so the builder now
takes it. That refusal is what made rt report a probe's emulated variant
as missing (Gap::PartialSimdgroups after Later::lower's Refused).
The profile verifier also refuses a Workgroup initializer other than a
null (VUID-StandaloneSpirv-OpVariable-04734).
docs/API.md states the form with Metal's words on threadgroup memory;
SEMANTICS_VERSION 2192; REFUSALS.md and api_signatures regenerated.
Tests: engine_zeroed_threadgroup (null initializers through from_queries
on four profiles, zeros on the interpreter in both orders and two
threadgroups, the emulated variant's arena zeroed and scratch not,
Device::new uninitialized, the vk12 floor refused),
a_specialization_sized_array_has_a_null, a_workgroup_initializer_is_only_a_null,
the profile facts' fingerprint.
|
||
|
|
567b959429 |
conformance: a DontCare row's texels are unchecked on metal2vulkan-rt, which Apple's page leaves arbitrary
The three buffer-target-clears-*-dont-care cases were divergent on every rt venue at case/buffer-after-the-pass: 64 elements, the target's 16 texels. Metal (Apple M3 Max, macOS 27.0.1) left the buffer's pattern there. rt stores the clear: its README says a DontCare store stores, "one of the outcomes Metal allows". Metal's documents. MTLRenderPass.h says only that DontCare is the default store action. Apple's page for MTLStoreAction.dontCare: "The GPU has permission to discard the rendered contents of the attachment at the end of the render pass, replacing them with arbitrary data." and "Some GPUs may still store the contents back to the texture, but you can't rely on that behavior. You need to assume that GPU discarded the texture's contents." So Metal documents those texels as arbitrary, and the fix is the case's, not a ledger row. The fix: - A DontCare row declares each of its 64 texel bytes Unchecked, at case/buffer-after-the-pass/ <offset>, under the new accepted difference "The new runtime's DontCare store writes what the pass rendered" (docs/API.md, render passes; it quotes the page and the M3's answer). - The justification is NewRuntimeAccepted, so the old runtime's run, whose answer is the M3's, still compares every texel exactly. The padding and the bytes before and after the target compare on both runtimes. Test: a_dont_care_row_leaves_its_texels_unchecked_on_the_new_runtime_alone. Against the M3's kept bytes and ours with the clear in every texel, it expects: - no divergence on rt's run, and no bad allowance (the slug is in docs/API.md); - one 64-element divergence on the old runtime's; - a divergence on rt for a moved byte at 0, just before the target, just after a row, or the last byte; - no declaration for a Store row. |
||
|
|
4c21a8d38a |
translator: a render pipeline into an RGB9E5Float attachment records SharedExponentKept on Device::from_queries
metal2vulkan-rt's conformance side read shared-exponent-store divergent on the Radeon 780M at case/drawn/texels (16 words, Metal 0x6e020080 where the device kept 0xa00c0401; whole-set m3-max-52928, then 53116): Metal's tile store writes an RGB9E5Float word whose largest mantissa is below 256 back normalized, and the device's pass keeps the word. The case loosens that site on the `shared-exponent-kept` notice, but only the old runtime announces it, at the draw, from its encoder (render.rs); rt has no such encoder step and the translator recorded no note, so the device's answer went unannounced. A missing static note is a bug (rule 1). Its twin, SnormMinimumKept, already has the static form; this gives the shared exponent the same one. - `PrecisionNote::SharedExponentKept` (appended): the note of a render pipeline that draws single-sampled into an RGB9E5Float color attachment. - `pipeline::private_state::note_tile_store` (was `note_snorm_minimum`) records it as it records SnormMinimumKept: on the fragment stage (the vertex stage where there is none), whatever the pass loads, and only where the profile's existing `SnormMinimumNote::Noted` says so, which is `Device::from_queries`. No new fact, switch or device check: `Device::new`'s modules, keys and the old runtime's announcement are unchanged. - The old runtime's `Degradation::from_precision_note` maps the note to its existing `shared-exponent-kept` kind: one arm, which its exhaustive match requires to compile, as DepthDenormals and CompressedTexelDecode did. It adds no switch, fact row or device check to the frozen runtime, and nothing it does changes. - The codec takes the variant; ARTIFACT_FORMAT_VERSION 548 -> 549. fast_paths lists the note under Elsewhere. Validation's comparison allowance is Unbounded, as for the other device-answer notes. api_signatures gets the two variant rows and the macro row. docs/API.md's `shared-exponent-kept` entry says where the static note is recorded. Test: engine_private_render_state's a_shared_exponent_attachment_notes_the_words_metal_s_pass_normalizes. On lavapipe and moltenvk-m3 the note is on the fragment stage alone through Device::from_queries, on no stage through Device::new, and on none at four samples or into RG11B10Float, RGBA16Float or RGBA8Snorm. The conformance case shared-exponent-store on the 780M through the rt side is the end-to-end test. |
||
|
|
5d3d55ef90 |
rt: a texture the runtime places reads zero until written; the fresh-texture declaration deleted
The guest's own code reads textures it never wrote (two 1x1 ShaderRead
textures, read before any write). The M3 and the old runtime answer zero;
rt answered whatever the range held before, which followed process
history. Metal does not say what a new texture holds, so zero is rt's
choice, stated as such in the README, not as Metal's rule.
What changes:
- A new texture of new_texture, new_texture_for_views and
new_managed_texture (Source::Plain and Source::Managed) carries a Zero:
a colour clear, a depth-stencil clear (every aspect), or copies from the
zero source for a format of texel blocks wider than a texel, which no
clear writes (VUID-vkCmdClearColorImage-image-00007, -01545).
- The upload records it with the move home: one barrier from undefined
to the transfer destination layout (with the moves home of every image
not zeroed), the clears and copies, then one barrier to the home
layouts. No tracking, and no check on any bind or draw. Textures in a
heap, over a buffer, of a surface plane, drawables and shadows are not
cleared.
- The zero source grows from 16 bytes to 64 KiB, a row of 16-byte blocks
16,384 texels wide; fill::zero_regions copies in bands of whole rows of
at most that, and in runs along a row where one row is larger.
- Metrics::texture_clears and texture_clear_bytes count the clears; the
replay player reports them per frame.
- The declaration of
|
||
|
|
6eb83eabff |
rt README: a command buffer is scheduled once the one submit thread's earlier calls return, whatever their queue; the Iris Xe's figures
The known gaps of queues gain the rule behind the running-signal case's declaration. Every queue's command buffers go to the device's one VkQueue, which takes one vkQueueSubmit2 call at a time, since Vulkan requires a queue's host access to be externally synchronized. The device's one submit thread makes every call (submit.rs has one call site, reached only from the thread's pass), and it schedules a command buffer once its earlier calls have returned, whichever queue they were for. So one long driver call delays every queue's scheduling by its length. The API.md accepted difference the declaration cites now states the same ground. Measured on an Iris Xe (RPL-P, ANV): - m3-max-52564: the device's first submission, 192 fills of a new 256 MiB block, spent 27-30 ms in vkQueueSubmit2. The other queue's waiter was scheduled 0.02 ms after that call returned, in 3 of 3 runs. - m3-max-52745, the separating run with the probe's block size as a scratch switch, never committed: the first call took 2.1 and 2.5 ms with 1 MiB, 9.1 ms with 64 MiB and 28.4 ms with 256 MiB. Its time grows with the new block the submission first uses. The probe's later submissions took at most 0.18 ms. - In the same job, the 256 MiB run (the case's own shape) read Committed and the case's declaration fired at both MTLEvent sites, verdict 'announced'. |
||
|
|
1e583d5e0c |
conformance: the running-signal case's MTLEvent reading may be Committed on rt alone, where its submit thread is still busy
On the Iris Xe, event-wait-behind-a-running-signal's MTLEvent row read the waiting command buffer Committed with no handler run, where the M3 Max had scheduled it while the signaller ran. This held in 3 of 3 runs (m3-max-52564). The trace showed why. The waiter's wait was met at once by the signal's staging. rt's one submit thread was still inside the signaller's vkQueueSubmit2, the device's first submission, which took 27-30 ms on ANV. The waiter was scheduled 0.02 ms after that call returned. Apple defines Scheduled as all dependencies resolved and the command buffer scheduled for execution, and promises no time between the two. The planner ruled this a timing difference and not a conformance bug. The case now declares, on rt's run alone (Justification::NewRuntimeAccepted), that the MTLEvent row's waiting status while the signaller runs may be Committed or Scheduled, and its handlers none or the scheduled one. The declaration cites a new accepted difference in docs/API.md, 'The new runtime schedules a command buffer once its submit thread is free'. The shared event's row is not loosened: both runtimes hold its waiter until the value is reached. The old runtime's run compares both sites exactly. New test: a_wait_met_by_a_running_signal_may_read_committed_on_the_new_runtime_alone. It checks that the Iris answers are no divergence on rt and are rows on the old runtime, that the shared event's sites still diverge, and that a status other than the two still diverges. |
||
|
|
0fa1b8f14c |
conformance: case 6's declaration says why rt reads 1024 and that Metal's 0 was measured
A reader of "0 or 1024" could take it for a race in rt. The docs/API.md entry and the case's comment now say why 1024 is rt's answer (a writer whose queue has fewer than three submissions in flight is submitted at once, so the later reader reads it on every device and run), and that Metal's 0 there was measured on the M3 Max (jobs m3-max-52432 and, behind three, m3-max-52415), not documented. The entry's lead-in, and so its slug, is unchanged. Verified: in the jobs named in the landing's report. |
||
|
|
57a33a11e9 |
conformance: fence-none-tracked-behind-one declares the new runtime's word count, an accepted difference
On metal2vulkan-rt the case read divergent at case/order/y/words-written: Metal 0, ours 1024 (job m3-max-52528, lavapipe). The writer's queue has one busy command buffer, below the three at which rt holds a group, so rt submits the fill at once and the later copy on another queue reads all of it. Metal's tracking orders only against work it has already submitted, and on the M3 Max it ran the copy first (5 of 5, job m3-max-52432). rt's answer is the order Apple describes for a tracked write (later commands wait for it); Metal's there is timing. docs/API.md section 10 lists it under a new "Command queues" heading, citing the rt README's measured line, and the case declares the count on the new runtime's run alone (AnyOf 0 or 1024, NewRuntimeAccepted): the old runtime's answers still compare exactly, and every status still compares on both. Verified: in the jobs named in the landing's report. |
||
|
|
2f4c9fc9dc |
conformance: a new texture's fresh read is unchecked on metal2vulkan-rt, where Metal is silent
rt answers a new texture with whatever its memory last held. Metal's two texture-making sentences
say nothing of a new texture's contents: MTLDevice.h gives newTextureWithDescriptor: only
"Allocate a new texture with privately owned storage.", and Apple's page only "Creates a new
texture instance.". The page for newBufferWithLength:options: promises zeros ("Creates a buffer
the method clears with zero values."). An Apple M3 Max on macOS 27.0.1 read zero from new Shared
and Managed textures.
What changes:
- A new justification, Justification::NewRuntimeAccepted(slug): an accepted difference of
docs/API.md that holds on the rt run alone. On the old runtime's run it is
Unjustified::OldRuntime, which faults nothing, so the old runtime's answers still compare.
- The declaration replay::new_texture_contents(site) leaves the site unchecked under the new
docs/API.md entry "The new runtime's new textures read what their memory last held". It carries
the four facts above and the words "silent", never "undefined".
- It is named at the fresh site of every texture row:
- fresh-texture-* and fresh-chain-*, every storage mode;
- fresh-pattern-*;
- texture-round-trip-*;
- each format-footprints round trip.
- It is not named by any buffer row or texture-over-buffer row: Metal promises those zeros, and
they stay exact on rt. The written sites and the statuses stay exact on both runtimes. rt writes
nothing to pass a row.
Why: these rows' fresh sites follow process history on rt. m3-max-52251 (lavapipe, rt) ran plain
development at
|
||
|
|
a36ac51121 |
translator: the identity domains' refusal names the first form the function holds that they do not lower
The identity gate (lower::select's identity_admits) answered Unsupported{IdentityDomains, NotImplemented}
for every plan it does not admit, with nothing saying which of its conditions failed. It now
names the first form the plan holds, in the refusal's symbol (diagnostics only), by what a
program does that takes it: a stage off the floor's push window, an encoder value it reads as a
push field outside the identity set, a buffer argument not reached by its device address, an
argument buffer's texture of a type, depth comparison, raw or cross-type read the identity arrays
do not take, a handle that reads its table entry beyond its element, a texture argument with
state beyond its resource ID, a sampler form (a texture argument sampled through a sampler the
identity sampling does not take, a sample of an argument buffer's texture, an argument buffer's
sampler, an array of samplers, a bicubic filter, a specialized sampler argument), a runtime fact
of bound state, or a descriptor. The checks and their conjunction are unchanged
(identity_refusal is None exactly where every condition held), so an admitted plan is lowered as
before; only the refusal's symbol is new, and only under the identity domains, which the new
runtime alone takes.
A test confirms which form argument buffers tier 2's pointer indexing takes (engine/ab_tier2's
ab_indexed: thread g reads the texture of element g of the argument buffers a pointer member of
the bound one reaches): on lavapipe and the M3 profile its plan reads the root table
(PushField::RootTableAddress), whose address the identity domains do not push, so it is refused
naming that, while the default domains compile it and the identity domains lower ab_copy and
ab_read. docs/API.md's identity paragraph names the form and says the symbol names the first one.
Verified: probe job m3-max-52000 (gem10, the gate change with the form unpinned) read
"an encoder value the function reads as RootTableAddress" for ab_indexed on lavapipe, and
a_bicubic_kernel_is_refused_under_the_identity_domains passed beside it; refusal_surface --check
is clean. The pinned test's run is the next check job.
|
||
|
|
71d767c904 |
translator: the storage-texture fact names the texture access type the air crate now exports
What: metal2vulkan-air exported intrinsics::Access only under cfg(test), so the unbound analysis of 0a810a7ab5 did not compile (E0432). The air crate now exports Access (Form stays test-only), the type of Texture's public access field. The analysis counts a read or block read through a loaded texture as a storage access unless the operation declares access::sample or access::read, so a read that declares no access (an emitter before AIR 2.0) counts, as the fact's 'false is proven' needs. The interface and API.md docs say so. Verified: cargo fmt; signatures.py --check gives no diff. The check job compiles it. |
||
|
|
4231c5ba25 |
rt, translator: a declared write of a texture with no storage element refuses the argument-buffer dispatch
What: bug 4's held path. A compute encoder's use_resource with a usage that writes a texture (or a view of one) made for shader writes with no storage element (Texture::unstored) now makes every later dispatch of that encoder whose kernel may reach a texture through its storage image beyond its bound slots Gap::StorageElement, with no slot and the texture's format. A kernel without such an access dispatches whatever is resident, and use_heap declares nothing (Apple's header: useHeap declares the heap's resources read only through an argument buffer), so a write through a resource ID with no write-usage use_resource stays dropped, outside documented Metal. How: the translator had no fact for that access (writes_unbound_resources with texture_writing_stages would also refuse a kernel that writes a bound texture and a buffer through an argument buffer), so StageInterface and PipelineInterface gain unbound_storage_textures, decided in compile/unbound.rs beside the read and write facts: a texture write or atomic, or a read of a texture the operation declares access::write or access::read_write, on a handle that may come from memory, an integer or a call; an intersection or a call the entry cannot see into counts; indirect-command and acceleration-structure operations touch no texture. Gap::StorageElement's slot becomes Option<u32>. The render encoder builds no useResource:, so the draw half has no trigger; the README says it waits for it. SEMANTICS_VERSION 2190 -> 2191 and ARTIFACT_FORMAT_VERSION 547 -> 548 (one field in StageInterface and PipelineInterface). docs/REFUSALS.md regenerated; api_signatures gains the field and the variant's new shape; docs/API.md states the fact; the rt README's known gap says what is refused and what stays dropped. Tests: the translator's unbound-facts test states the new fact (an argument buffer's texture write and a read_write read count, a sample and a read do not); storage_element gains every_device_refuses_a_declared_write_of_a_texture_with_no_storage_element over RGBA8Unorm_sRGB, BGRA8Unorm_sRGB, A8Unorm and an sRGB view of an RGBA8Unorm texture, and the same formats in a heap under use_heap alone. Verified so far: cargo fmt; refusal_surface.py, signatures.py --check and metal-coverage --check give no further diff. The build, the suites and the device legs follow in potluck jobs. |
||
|
|
b683148a41 |
rt, translator: the identity domains give a SIMD-group's threads no lockstep order
What: under the identity domains (the new runtime's profile) the translator no longer inserts the barriers that make Apple's SIMD-group lockstep explicit (`lockstep::order`): `OrderKey::of` is `None` there and `ordered_entry` takes the specialized entry as it is. The resident-table domains (the old runtime's) keep the order until the cutover. With no lockstep barrier on the new runtime's path, its one-row machinery is dead and deleted: `Compiled::rows`, `pipeline::one_row`, `encoder::Module::Rows`, `keeps_rows` and `choose`'s `rows`, the `OneRow` and `RowLockstep` arms, and the translator's `CompiledFunction::runs_lockstep_barriers_in_rows` with `KernelFacts::lockstep_in_rows` (the API signature table; the version numbers rise in the branch's last commit). Why: documented Metal orders the threads of a SIMD-group only through barriers and atomics; the Metal Shading Language calls two of them that conflict between barriers a data race. The order was an emulation of undocumented Apple-GPU behaviour (owner's rule 1). Its barriers made 1,443 of 5,368 distinct kernels of the recorded streams observe their threadgroup partition, every pair of them unproven, and they stopped partial-threadgroup dispatches the variant cannot run (rt's frame-320 and frame-335 refusals of the 30-wide kernels). docs/API.md's accepted differences gain one entry, the conformance case `simdgroup_lockstep` leaves its output words unchecked against it, and CONFORMANCE-COVERAGE.md and REFUSALS.md are regenerated. Tests: the identity-profile one-row test becomes `the_identity_domains_order_no_lockstep_pair` (barriers under the default domains, none under the identity domains, the partial variant in tiles); the harness's cells test keeps the old domains' one-row facts and adds the identity domains' none; rt's one-row tests and the row-lockstep tree test go, and `row_cells` runs every grid on its tiles' pipeline made with the state. Verified: cargo fmt; coverage.py and refusal_surface.py regenerated. Clippy and the suites run on the check job named when the branch is handed over. |
||
|
|
ac72291f01 |
translator: the binder writes a slot's biased word under the identity domains; the slot-pointer test drops ptrtoint; the old render key re-pinned
Three failures of the landed biased slot word (development's suite, job 51276):
- engine_identity::the_binders_edge_regions_set_multi_region_on_from_queries_and_store_metals_grid
trapped out of bounds at 0x6_8000_0000: the translator's own binder
(BindingPlan::instantiate_*) still wrote SlotGuestBase as gpu_address + offset, while a
pipeline compiled under the identity domains adds 2^31 back to that word. This was a code bug in
the landed change. rt was not affected: it writes its own push (pipeline::address_word) and does
not use the binder. The binder now writes the word less 2^31 (bind::instantiate::guest_word)
wherever the plan's device compiles under the identity domains. The flag is
ResourceTemplate::biased_slot_words, set by the compute and render planners. All three writers
read it: slot_field, the render rebind's bases and its loose words. RUNTIME_VERSION
2538 -> 2539: a run of an unchanged plan pushes another word under the identity domains. The
runtime sources' pin moves with the binder's files.
- engine_identity::a_slot_pointer_used_as_a_value_is_its_metal_address was refused at compile
(Unsupported{IdentityDomains}, not implemented). Its ptrtoint makes the slot pointer a wide
pointer, which reads the root table, a push field identity_admits does not admit. The refusal
is the test's premise, not the bias: select and the plan are unchanged by the bias. The test
now covers two address compares and two loads, one 4 bytes below a bind address, with the two
slots on either side of 2^31: their words lie on either side of 0, so a compare of the words
would answer the other way. A new test,
a_slot_pointer_converted_to_an_integer_is_refused_under_the_identity_domains, pins the ptrtoint
refusal on both profiles, where the default domains compile the kernel. docs/API.md section 5
says so; it no longer claims that a converted pointer reads the bias back.
- pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value: the key moved only
because SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION moved (2186/544 -> 2188/546); the
fixture's bytes are unchanged. Re-pinned to the value job 51276 computed.
|
||
|
|
f6032c796c |
rt: a render encoder sets the alpha test reference, and alpha-test states are made
A gap against the old runtime. rt refused every render state whose fragment
runs the private alpha test (PrivateRenderState::alpha_test_enabled with a
compare function other than Never or Always): the translator pushes
PushField::AlphaTestReference there, and render.rs draws() mapped no value for
it, so new_render_pipeline_state answered Gap::RenderPipeline { DrawInput }.
Nothing drew against an unfilled push word; Never and Always states, which read
no reference, were made and drew right.
Now RenderCommandEncoder::set_alpha_test_reference_value(f32) (Apple's
setAlphaTestReferenceValue: SPI) keeps the reference's 8-bit unorm code in the
encoder's state, Metal's 1 until set, not kept across encoders (the old
runtime's rule, from probes on an Apple M3 Max, macOS 27.0.1); draws() maps the
field to FieldValue::AlphaTestReference, and a draw pushes the code. A change of
code refills the push bytes; an equal one records nothing new. The code is the
translator's: bind::alpha_test_code, now public (api_surface row, docs/API.md
line), so rt and the binder compare as Metal does through one function.
Test: tests::alpha_test draws green at alpha 0.6 (code 153) under Greater, one
quadrant a draw through scissor rectangles: the default reference and 0.75
keep the clear, 0.25 (held across draws) draws, and a second encoder starts at
1 again (its whole-target draw changes nothing) until 0 draws. README and the
API signature table updated.
Verified: build and device legs follow.
|
||
|
|
c4b38afdb8 |
rt and translator: a buffer slot's pushed word is its address less 2^31, and an access adds its offset plus 2^31, zero-extended
Under the identity domains a buffer slot aligned to its argument was reached as its pushed address
plus the access's 32-bit byte offset sign-extended to 64 bits. The sign extension is what keeps an
offset below the bind address exact, but a device cannot split a sign-extended offset into a
scalar base and a vector offset as it does a zero-extended one. Now rt pushes the slot's address
less 2^31, and an access adds its offset plus 2^31 (modulo 2^32) to that word, zero-extended. That
is the same address for every offset in [-2^31, 2^31), which the 2 GiB buffer cap guarantees, in
one 32-bit add that a device fuses with the index's shift. A unit index x + c with a constant c
folds c into the bias: (x + c) * s + 2^31 = x * s + (c * s + 2^31) mod 2^32. The builder notes
each u32 sum of a value and a constant for that; the note changes no emitted word.
One place on each side:
- rt: pipeline::address_word, used by the compute and render push writers for every
BufferAddress field: a bound buffer, a setBytes copy, or the nil buffer.
- translator: lower::access::pointer.
- biased_slot_address feeds the direct reach.
- slot_address (the word plus 2^31) feeds every other reader: an access from the word below
it, a pointer compare, ptrtoint, the memmove overlap's Metal addresses, and pulled vertex
fetch.
- The bias applies only under the identity domains and only where the word is pushed: a
replay variant reads the true address from its root entry.
Unchanged:
- A texture's or sampler's resource ID and the parameter block's address are not biased.
- A pointer loaded from an argument buffer keeps today's form: the address the buffer holds.
- The default domains, which the old runtime and the golden tables use, take no new instruction:
the readers there load and bitcast the field in the same order as before.
Argument-buffer pointers left in their form (planner's condition):
- They are 19.6% of the corpus's device and constant accesses.
- Time-weighted, they are 0.8% of accesses on the 780M stream gb-780m-u4 and 2.4% on the RTX 3090
stream gb-3090-r5.
- Kernels with any such access take 1.9% and 8.4% of those streams' GPU time.
Slot pointers used as values, in the entry functions of the corpus's 11,580 kernels (census over
the local sources shards):
- 781 (6.7%) use one as a value: 14 convert one to an integer, 46 compare one, and 731 store one.
Every such store but one writes private memory (a pointer cell); the one other writes device
memory.
- 3,511 (30.3%) pass one to a non-inlined function.
- 33 pass one to an air.* call (command encoding, intersect).
A ptrtoint and a compare read slot_address. A pointer parked in a private cell or passed to a
function stays a fat pointer, whose accesses take the forms above. The one store to device memory
makes a wide pointer, which reads the root table, a field identity_admits does not admit. A new
engine test, a_slot_pointer_used_as_a_value_is_its_metal_address,
runs a kernel under the identity domains with biased pushes on the interpreter. It does a ptrtoint
to i64 and to i32, an address compare, and loads 4 bytes below a bind address and 20 above
another, and checks each against the true addresses.
Probe numbers (measured: one particle kernel run alone on RADV 26.2.6, us per dispatch, best of
forward and reverse; the module's two positions accesses changed by hand). Biased form against the
plain zero-extended offset (inexact below the bind address), at subgroup size 32 and at the
driver's 64:
- RX 7900 XTX: 33.6 vs 33.6, 30.8 vs 30.6; at 4x the grid 374.6 vs 374.0, 273.1 vs 272.9.
- PHOENIX 780M: 168.1 vs 168.3, 121.1 vs 120.5; at 4x 2521.9 vs 2522.8, 1744.6 vs 1752.8.
- HawkPoint 780M: 173.3 vs 173.2, 122.5 vs 122.7.
The sign-extended form it replaces measured, at 32:
- HawkPoint: 189.8 (same job), 9.5% slower.
- PHOENIX at 4x: 2735.3 (same job), 8.5% slower.
- XTX: 35.9 (another job), 6.8% slower.
The XOR form with a host-biased word (V7) measured 178.8 on HawkPoint: the add is the one that
fuses.
The tests:
- The identity engine tests push the biased word through engine_word_phases::slot_word.
- rt's three hand-made test kernels (ADD, STEP, WIDE) add 2^31 to each slot word. Their arrays
are regenerated from the doc GLSL with glslangValidator --target-env vulkan1.2 and checked with
spirv-val. Today's GLSL reproduced today's arrays exactly before the edit.
docs/API.md (sections 1 and 5), PushField::SlotGuestBase's doc and rt's README known gap on the
2 GiB cap state the word and the form.
SEMANTICS_VERSION 2186 -> 2188 and ARTIFACT_FORMAT_VERSION 544 -> 546. The identity nolockstep
lane holds 2187 and 545, unlanded; these take the next numbers so the two land separately.
|
||
|
|
e9c324a8f4 |
conformance: the decode cases' bound loosens metal2vulkan-rt's run alone; the old runtime's rows are as they were
The planner's ruling on the twelve old-side RADV rows |