03b5cff006c19bbf3740041b72136821f44950fb
10453
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
03b5cff006 |
Runtime README: KosmicKrisp's answer for a texture over host memory with render-target usage
A texture over a buffer in host memory's import, on an integrated or CPU device, lies in place where the device's external image query for host memory's handle answers a linear image of the texture's format, usage and flags; otherwise it is the counted copy at each use. On the Apple M3 Max (KosmicKrisp, Mesa 26.3.1), the textures with render-target usage in a consumer's walk were the copy. The known gap of memory blocks said why in one clause (the Mac driver makes no linear colour attachment with or without a handle); it now names the query's answer and the shapes it was asked for, and says the copy is chosen by that query alone. The ruling: the copy is the device's form under rule 2 (a missing feature of the driver, not a bug), with no code change. The answer, asked of KosmicKrisp with the runtime's own parameters for each of the four kinds of texture with render-target usage the walk made over host memory (R8Unorm 1920 by 1080 and RG8Unorm 960 by 540, ShaderRead and RenderTarget; RGBA8Unorm at 18, 24, 36 and 48 pixels, ShaderRead, ShaderWrite and RenderTarget; RGBA16Float at 16 to 1024 pixels, ShaderRead and RenderTarget): vkGetPhysicalDeviceImageFormatProperties2 for linear tiling, usage transfer source and destination, sampled and colour attachment (and storage for the written one), mutable format with the sRGB sibling's format list where the format has one, and VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT answers VK_ERROR_FORMAT_NOT_SUPPORTED for each, and so it does without the handle and without the format list. Without colour-attachment usage (transfer source and destination and sampled), it answers each format importable, compatible (0x180), not dedicated-only, up to 16384 by 16384 and one layer; dropping sampled instead leaves it refused. The README's prose carries no lab job id (scripts/api-docs refuses one), so the job is cited here alone. runtime-sources.sha256 does not move: the README is not among its inputs. Verified: - m3-max-85644, the Apple M3 Max (KosmicKrisp, Mesa 26.3.1, Vulkan 1.4.363, an integrated device with VK_EXT_external_memory_host): a query program (no test) asked the answers above. - On the CPU with no device, at this commit: scripts/api-docs's prose check (its job-id grep over the runtime README, API.md, REPLAY-STREAM.md and VALIDATION.md) finds nothing; the runtime-sources hash computed from the validation build's input list equals the pinned one; the README's readers in the tests (its Floor section, its Enabled, not stated table, and its section of what the consumer implements) read sections this change does not touch. |
||
|
|
9d841ca7d4 |
Runtime: OPTIONAL_EXTENSIONS' doc links no private item
The public doc of OPTIONAL_EXTENSIONS linked the private EXTENDED_DYNAMIC_STATE, which rustdoc refuses under -D warnings (job m3-max-85463: STEP doc and privdoc_metal2vulkan-runtime EXIT=101; signatures and clippy in three configurations EXIT=0). The sentence now says what the extension adds in words. |
||
|
|
e9c39b1507 |
Runtime: VK_EXT_extended_dynamic_state enabled where listed, its feature where reported
Device creation enables VK_EXT_extended_dynamic_state where the device lists it, and extendedDynamicState where the device also reports it, and the translator's description states each that is enabled. This is a form that is right on every device, taken unconditionally: no vendor, driver or version is read, and nothing else changes. The runtime takes no state through it, because every render pipeline's dynamic state is Vulkan 1.3's. At Vulkan 1.3 the translator already counts extendedDynamicState as present, so no translation answer moves. The profile fingerprint does move on a device that lists the extension, since the description's enabled set is part of the profile: one cold compile per such device. The cause is in the driver. RADV in Mesa 26.3.1 (released 2026-11-18; 26.3.2 is not out, so no 26.3.x release has a fix) creates device->ps_epilogs only when graphicsPipelineLibrary, shaderObject, extendedDynamicState or one of five extendedDynamicState3 features is enabled (radv_device.c:1706-1715). A pipeline whose depth or stencil test enable is dynamic, and whose pass may have a depth or stencil attachment, marks a fragment shader's depth or stencil output as needing an epilog (radv_pipeline_graphics.c:1604-1611 and 1784-1789; radv_shader_info.c:882-888). At the draw, radv_before_draw goes through radv_emit_all_graphics_states and radv_bind_ps_epilog (radv_cmd_buffer.c:14148-14149) to lookup_ps_epilog and radv_shader_part_cache_get (radv_cmd_buffer.c:6832). That calls cache->ops->hash with ops still null (radv_shader.c:3312). Every render VkPipeline of the runtime takes DEPTH_TEST_ENABLE and STENCIL_TEST_ENABLE as dynamic state, so on that driver a fragment function writing [[depth]] or [[stencil]] into a pass with such an attachment faults at its first draw. Every RADV epilog goes through that one cache: colour outputs, depth, stencil, the sample mask and an unknown alpha-to-coverage (radv_shader_info.c:882-888). So enabling the feature covers all of them. The other shader-part cache, vs_prologs, is created only with vertexInputDynamicState, graphics pipeline libraries or shader objects (radv_device.c:1700-1705). It is reached only by a dynamic vertex input or a vertex stage without vertex input state (radv_pipeline_graphics.c:1637-1646), and the runtime makes neither. Mesa 26.2.6's RADV, the lab's, creates its epilog cache without the feature terms, and its epilogs serve colour outputs alone (radv_device.c:1679-1684, radv_shader_info.c:850), so it never takes this path. This was read in the release's source, not reproduced in the lab: no lab node carries RADV from Mesa 26.3.1. The README has the extension row and an "Extended dynamic state" section with its feature table, which the README test holds to EXTENDED_DYNAMIC_STATE. Under a device cfg, the every-device floor test prints whether each card was created with the extension and its feature. The signatures table takes OPTIONAL_EXTENSIONS' new entry. |
||
|
|
0a2519180f |
Runtime tests: a device that lists VK_EXT_extended_dynamic_state is given it, red
The floor reads VkPhysicalDeviceExtendedDynamicStateFeaturesEXT where the device lists VK_EXT_extended_dynamic_state, and device creation chains it where the extension is enabled; nothing enables either yet. The new floor test asks for the four combinations of listed and reported: the extension where listed, extendedDynamicState where also reported, and the translator told of each that is enabled. It fails here at "listed and reported", which the next commit makes pass. RADV in Mesa 26.3.1 creates its fragment-epilog cache only on a device that enables extendedDynamicState, graphics pipeline libraries, shader objects or one of five extended dynamic state 3 features (radv_device.c:1706-1715 in the release). Every render VkPipeline of the runtime takes Vulkan 1.3's dynamic depth and stencil test enables, under which RADV 26.3.1 draws a fragment function's depth or stencil output through such an epilog. With the cache missing, the draw's epilog lookup calls through a null pointer (radv_shader.c:3312). This was read in the release's source, not reproduced in the lab: the lab's RADV is Mesa 26.2.6, whose epilogs cover colour outputs alone. The signatures table takes the new public field of floor::Features. |
||
|
|
7c65d9875e |
Translator tests: the per-thread count's doc sits on its static
The doc comment above the thread_local! macro was an unused doc comment, which clippy refuses under -D warnings in every configuration (lint job m3-max-85529). It moves inside the macro, onto the static it describes. The runtime-sources pin moves with the file. |
||
|
|
c20024991d |
Translator tests: the profile fingerprint count is per thread
a_run_of_compiles_derives_no_profile_fingerprint reads a count of profile fingerprint derivations. The count was process-wide, so when cargo test ran another test as a thread of the same process and that test made a device between the two readings, this test failed. The count is now thread-local. The device's making and the compiles the test counts run on the test's own thread: compile_stage spawns no thread, and the translator's one scoped thread only hashes a large metallib's bytes. So the count still sees every derivation the test asks about. The change is in a cfg(test) item of device/profile.rs, so no run behaves differently. runtime-sources.sha256 takes the file's new hash. It was computed with the build's hashing over the working tree, which reproduced development's pin before the edit. |
||
|
|
0801320a59 |
Translator tests: a device made on another thread moves this thread's fingerprint count by nothing (red)
a_run_of_compiles_derives_no_profile_fingerprint reads a count of profile fingerprint derivations before and after a device's making and its compiles. The count is process-wide, so under a harness that runs tests as threads of one process (cargo test), a device another test makes between the two readings fails it. The new test makes a device on a spawned thread and asks that this thread's count not move, then makes one here and asks it to move by one. It fails here, where the count is the process's; the next commit makes it the thread's. |
||
|
|
2ec06b93e1 |
Translator: the sparse path goes
The translator kept a second form for a function that observes a texture's residency: a slot's
sparse arm (OpImageSparse* and OpImageSparseTexelsResident under shaderResourceResidency) or its
tile map (a storage buffer of tile bits the consumer would mirror from each mapping), selected by
SpecKey::SparseTexture from the bound texture's MTLTexture.isSparse, with Metal's measured
footprint rule for a sample or gather, writes dropped under the same constant, and
PrecisionNote::SparseResidency where the device answered. With the observed residency now the
constant resident word, nothing builds either form, and nothing can need one: the runtime has no
sparse heap or sparse texture API, and the consumer tells no guest it has sparse textures (every
Apple family's supportsFamily NO, sparseTileSizeInBytes 0, isSparse NO; a sparse heap refused at
newHeapWithDescriptor:). So the path is deleted (rule 4).
Public items deleted, each searched for in the consumer's checkout at 76e6c90369 (0 hits for every
name):
- RuntimeFact::SparseTexture { slot, sparse_arm, tile_map } and its mechanism; the 12-03 cleanup
ruling that kept it in the produced-then-refused group is reversed for it alone;
- SpecKey::SparseTexture;
- ResourceKind::TileMap and BindingSource::TileMap, with pipeline::tile_map, the map's format;
- PrecisionNote::SparseResidency (metal2vulkan-degrade-sparse-residency), with its API.md
catalogue entry, the conformance Degradation and validation's C3 deferred near-equivalent;
- error::Feature::SparseTexture, which nothing constructed;
- bind::TextureFacts::sparse and TextureShape::Texture's sparse, which no binder set.
Crate-internal, gone with them: the texture family's residency use flags, sparse_arm, tile_map and
sparse_writes on a slot plan, their spec constants and tile-map views, resident_access, the tile
decoding (TileLevel), the read's sparse and tile-map arms, the census's ".resident" suffix and
RESIDENCY_WORDS; the sampler's residency and footprint fields and lower::sampler::footprint (Metal's
measured footprint rule, read only to answer from a tile map), the sparse arm in sample, gather and
pixel fetch emission, and lower::texture::residency (every caller sits behind the texture family's
own refusal of a word with another bit observed). The SPIR-V layer loses what only those built:
the builder's sparse_sample, sparse_fetch, sparse_gather, sparse_dref_gather, sparse_read and
texels_resident, the sparse flag of SampleForm and of the fetch, gather and read instructions,
Inst::ImageSparseTexelsResident, its serialization, requirement (SparseResidency, and with it
shaderResourceResidency) and the interpreter's unmapped texels. VkFeature::ShaderResourceResidency
stays: profiles and the device queries name it.
Nothing compiled changes: no module held a sparse instruction or the constant since the previous
commit, so SEMANTICS_VERSION stays. ARTIFACT_FORMAT_VERSION 608 -> 609 (renumbered at landing):
the codec's ResourceKind, SpecKey, RuntimeFact, PrecisionNote and BindingSource lose variants,
which moves later tags. runtime-sources.sha256 moves for bind/state.rs, bind/heap.rs and the
deleted pipeline/tile_map.rs; no run of an unchanged artifact changes. docs/REFUSALS.md, the
runtime's error/basis.rs and tests/api_signatures.tsv are regenerated.
Tests deleted with what they tested: the serializer's sparse sweep, the builder's sparse read
under texel operands, the mechanism table's three SparseTexture rows (the variant indices close
up), C3's SparseResidency deferral (the deferred-row tests now use CubeGradientFootprint).
Verified, on the CPU with no device:
- m3-max-85203, at this change on
|
||
|
|
619e977d63 |
Translator: a texture's observed residency is the constant resident word
A sparse_sample, sparse_gather or sparse_read (and a sparse block read) whose function observes
bit 0 of its status word (sparse_color::resident()) was refused under the identity domains:
the observed residency made the slot's RuntimeFact::SparseTexture, a texture state the identity
domains do not source (Unsupported{IdentityDomains; NotImplemented}, IdentityCause::TextureState).
The golden table and the engine inventory held the refusal for engine/a2_sparse_status, and the
runtime's README listed it as a known gap.
Metal's answer over a texture that is not sparse, measured with this kernel plain and under
Metal's validation layer (which reported nothing): every residency resident on the Apple M3 Max
(macOS 27.0.1) and on the AMD Radeon Pro 5300M (macOS 26.7.1), not resident on the Intel UHD
Graphics 630 of the same MacBook (macOS 26.7.1), with the same colours on all three. Both answers
are Metal's. The runtime makes no sparse texture: it has no sparse heap or sparse texture API, and
the consumer tells no guest it has sparse textures (every Apple family's supportsFamily NO,
sparseTileSizeInBytes 0, isSparse NO, and a sparse heap refused at newHeapWithDescriptor:).
So the word is the M3 Max's and the 5300M's answer, a constant: an observed residency is 0,
resident, of a slot and a heap element alike, with no query, no precision note and no second
form. lower::texture::residency answers false wherever the word's other bits are not observed (a
word with another bit observed stays refused), so no access marks its slot's residency and no
slot states a SparseTexture fact. The extended-range sample, which refused an observed residency,
takes the constant word too.
Tests:
- engine_identity's a_sparse_access_of_a_texture_slot_is_resident compiles a2_sparse_status on
every identity profile and moltenvk-m3 without robustImageAccess2: L3 passes, the interface
states no specialization constant but the dispatch's, the plan no SparseTexture fact, and the
module holds no OpImageSparse* instruction.
- engine_texture_oob's block_reads_read_their_texels_as_reads_do runs br_sparse (a sparse block
read storing 2.0 where resident) on every profile and class, where it asserted the refusal:
its alpha lane reads 2.0 at every point, inside the texture and outside.
- The conformance case sparse-status-plain (cases/sparse_status.rs, the a2_sparse_status kernel
over two 4x4 RGBA32Float textures, 16 threads) records the M3 Max's colours and residencies,
and Metal's times; its module docs state all three Macs' answers.
Docs: the runtime README's known gap for this residency goes, with the sparse residency in the
list of texture state the identity domains do not source; API.md's texture paragraph says an
observed residency reads resident, with the Macs' answers, and PixelSamplerScaling's entry (here
and on PrecisionNote) loses its observed-residency case.
Engine inventory (public_fixture_expectations_engine.tsv): 147 .ll cells move from
Unsupported{IdentityDomains; NotImplemented} to ok, every profile's of a2_sparse_status,
kernel_block_read's br_sparse, sps2_residency_probes, spse_address_probes, spse_array_probes,
spse_level_probes and spse_volume_probes (15 each), and every profile's but runtime-floor's of
spse_write_probes, spse_write_barrier and a27_spse_write_barrier (14 each; runtime-floor's stays
Unsupported{IdentityDomains; NotImplemented}). Their .air.ll twins, which only macOS assembles,
move at the M3 bless.
SEMANTICS_VERSION 2367 -> 2368 (renumbered at landing): the residency-observing fixtures' golden
cells change from the refusal to modules. The golden table is blessed at the next pin.
Verified:
- m3-max-85059, on the CPU with no device, at this change on an earlier development
(004f68b48f; rebased since onto
|
||
|
|
5b68f2d05b |
Translator: an argument buffer's sampler's estimate and docs drop the cubic test it no longer emits
Since the resident core's deletion ( |
||
|
|
5e3d867358 |
Runtime tests: a partial-threadgroups cause without a cache marker fails the test
The runtime keeps each refusal of a kernel's partial-threadgroups variant under a marker of its cause in the cache directory (cache::REFUSALS), and refusal_marker answers the plain refused marker for a structure the table does not hold, which reads back as VariantRefusal::Translator: the cause is lost. The translator's PartialThreadgroupsCause is non_exhaustive, so no match in the runtime can name every cause, and a_variant_refusal_keeps_the_translator_s_cause listed the four structures by hand: a cause the translator adds without a marker passed it. The test now reads the enum's variants from the translator's source (error/mod.rs), as translator_fields reads the linked state's fields, and requires each to be kept under exactly one marker, the vote word's or its structure's, and the table's structures to be those causes but the vote word. Its other checks are unchanged, over the table's structures. Verified (m3-max-85468, on the CPU with no device): - green: the test passes at this commit (1 run, 1 passed); - red: with a sixth cause added to the translator's PartialThreadgroupsCause and no marker, it fails at that cause (kept under no marker: left 0, right 1); - the hole: development's hand-listed test with the same sixth cause passes; - fmt and clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) pass. |
||
|
|
3758e468a7 |
Runtime: TextureCopyMismatch rests on Apple's documented rule, with the Macs' measured answers
Refusal::TextureCopyMismatch (BlitCommandEncoder::copy_from_texture between textures of two pixel
formats or two sample counts) stated a metal-measured basis: the probe blit_copy_format_pairs.m on
the M3 Max under Metal's validation layer alone, which stops every pair of two formats. A
consumer's probe on a MacBook's Radeon Pro 5300M (macOS 26.7.1) had Metal take ten pairs of one
texel size and copy their bytes, plainly and under the validation layer, so the basis was re-read
and measured on all three Macs.
Apple's page for the region copy says of the destination texture: "The pixel format is the same as
`sourceTexture`. The sample count is the same as `sourceTexture`." Outside that rule the Macs
answer apart (the probe, rewritten to run each pair plainly and under the validation layer, with
the bytes checked):
- Apple M3 Max, macOS 27.0.1, Shared and Private: plain Metal copies the bytes as they are; the
validation layer stops every pair of two formats ("[sourceTexture pixelFormat](...) must equal
[destinationTexture pixelFormat](...)") and two sample counts.
- AMD Radeon Pro 5300M, macOS 26.7.1, Private: Metal copies the bytes as they are, plainly and
under the validation layer, which takes the pairs of one texel or block size (depth and BC1
among them) and stops two texel sizes ("must be compatible with") and two sample counts.
- Intel UHD Graphics 630 of the same MacBook, macOS 26.7.1, Private: the copy completes, plainly
and under the validation layer, and leaves the destination unwritten; the layer answers as on
the 5300M.
So the refusal stays, and its basis is metal-documented, quoting the page; its doc carries the
rows above. Nothing it refuses changes.
The probe now holds every leg that ran: the ten pairs of one texel size and R32Uint into R32Float,
each with Shared and Private textures, plainly and under the layer, with the bytes compared; the
earlier depth, BC1 and sample-count cases and a pair of two texel sizes (the negative control)
under the layer alone, where plain Metal has no defined answer; a device index for a Mac of two
GPUs. Its header states what each Mac answered.
docs/REFUSALS.md and the runtime's error/basis.rs are regenerated (one Refusal moves from
metal-measured to metal-documented). The runtime README's blit paragraph names the documented
rule. The conformance rows whose refusals Justification::MetalValidation documents are unchanged.
Verified:
- m3-max-85147, the Apple M3 Max (macOS 27.0.1), and m3-max-85148, the MacBook Pro's Radeon Pro
5300M and UHD Graphics 630 (macOS 26.7.1): the probe as committed, every leg (the rows above).
- m3-max-85410, on the CPU with no device, at this commit: fmt, the workspace's Rustdoc, the
runtime's private Rustdoc, the refusal surface's check and scripts/api-docs pass; the runtime's
suite ran 230 tests, all passed, 2 skipped.
|
||
|
|
133c992dad | Merge pull request #25 from charlysound/contrib/native-mesh-runtime | ||
|
|
d2f8f386c0 |
Pin V bless: the golden cells and the census differences by the commit that moved them
The bless commit |
||
|
|
292331c613 |
Pin V bless: golden hashes, engine inventory and the authored compile census at 8f04734a97
Re-blessed on the Apple M3 Max at |
||
|
|
8f04734a97 |
Translator docs: slice_cells' link names the function slice(), not the primitive
The SSW doc comment on slice_cells linked [`slice`], which rustdoc resolves both to the function lower::texture::emit::slice and to the primitive type, so the private-items Rustdoc of metal2vulkan failed (merged check m3-max-85364, STEP privdoc: "`slice` is both a function and a primitive type"). The link now names the function. Docs only; runtime-sources.sha256 unchanged (pin-compute equal). |
||
|
|
5dc5ea3315 |
Translator: a seq_cst atomic operation takes the sequentially consistent fence
A seq_cst atomic operation on memory another thread reaches (an AIR 2.9 air.atomic.* buffer atomic of order 5, its success order for a compare-exchange; an LLVM atomic load, store, atomicrmw or cmpxchg of seq_cst) now takes the fence the landed seq_cst fence lowers to: an acquire-release memory barrier at the operation's scope over the memories its order applies to, then lower::sync::barrier's add of 1 on the device's fence word at Device scope with the barrier's semantics. A store, a read-modify-write and a compare-exchange take it after the operation; a load takes it before. Thread memory's atomics take none (no other invocation observes their order); texture atomics of any order but relaxed stay refused; relaxed, acquire, release and acq_rel operations are unchanged. The fence before a load, derived: the stores' fences alone order every pair of fenced stores and forbid store buffering and the R and 2+2W shapes, but two readers may still see two independent seq_cst stores in opposite orders (IRIW), since a reader's two acquire loads synchronize with nothing between them. MSL's single total order forbids that outcome. With an add on the one fence word before each load, the two readers' second adds are ordered on that word; the earlier reader's first load acquired its store, which then happens before the later reader's add and so its second load, which must see it. A fence after a load would order nothing more. Each such operation now costs one contended add on the device word: the runtime README's fence known-gap line says so (every non-explicit atomic of MSL 4.1 is one), read from the fence's measured rows. msl_4_1_orders_reach_spirv expects the fence's add after a27_wide_and_float's float add and after each of a27_fragment_atomics' three atomics. reach.tsv drops the SeqCstFence row, whose refusal no longer exists. The identity harness maps the device's fence word (with_fence_word: its 4 bytes past the zero range, the rest still unmapped), and engine_atomics' run_orders binds every kernel with it: the interpreter trapped on the fence's add in the two contention tests whose kernels hold LLVM seq_cst atomics. SEMANTICS_VERSION 2367 (renumbered at landing; 2363-2366 went to arm 9, the blob move, the 1D bicubic and the shared slice): a module holding a seq_cst atomic operation changes. Verified: - red 389e7cf44e, job m3-max-85066: a_seq_cst_atomic_operation_takes_the_fence fails at "a fence's barrier" (no add follows the store); the fence tests and msl_4_1_orders_reach_spirv pass. Green there: 4 passed. - the product suite at the fix without the harness's fence word (85066): 3495 passed, 3 failed, 24 skipped. The failures were golden_hashes_match_the_table (re-blessed on development) and engine_atomics' llvm_ and narrow_atomics_are_exact_under_contention, whose interpreter trapped on the unmapped fence word. With it (85271): engine_atomics, engine_seq_cst and engine_air_2_9 28 passed. - validation 1344 passed, 2 skipped; conformance 1053 passed, 0 skipped; doctests EXIT=0 (85066). - clippy plain 85270, m2v_gpu 85269 and m2v_cpu_icd 85268 EXIT=0 at this tree. Rustdoc and api-docs 85093 EXIT=0 at the fix without the harness change, which adds test code only. |
||
|
|
7463025bc2 |
Translator tests: a seq_cst atomic operation takes the sequentially consistent fence (red)
The planner ruled a seq_cst atomic operation a bug to build on the landed fence (owner order 3406). MSL 4.1, section 6.16 read whole: Table 6.26 gives memory_order_seq_cst as "Same as memory_order_acq_rel, plus a single total order exists in which all threads observe all modifications in the same order." (All OS: Metal 4 and later); 6.16.1 says "In Metal 4.1 and later, you can specify memory_order values for atomic operations, atomic_thread_fence, threadgroup_barrier, and simdgroup_barrier." (before it, "For atomic operations other than atomic_thread_fence, memory_order_relaxed is the only enumeration value."); and 6.16.1.3 says "Atomic operations that use memory_order_seq_cst order memory the same way as release-acquire ordering — everything that happened before a store operation in one thread becomes visible to the thread that performed the load. They also establish a single total modification order of all atomic operations." Apple's compiler gives MSL 4.1's non-explicit atomics (atomic_store, atomic_load, atomic_fetch_add) order 5, seq_cst, over every memory (mem_flags 31): our fixture a27_memory_order, compiled at metal4.1. Today such an operation lowers to its acquire-release half alone, which Vulkan does not order totally. Count (structural: the order immediate of each air.atomic.* buffer atomic, load, store, read-modify-write and compare-exchange success and failure, each texture atomic, and each LLVM atomic load, store, atomicrmw and cmpxchg, in the functions each entry reaches by direct calls): - the kept streams (the replay streams' blobs and two recordings; 659 distinct libraries, their 17831 functions through llvm-dis): 0 functions with a seq_cst operation (job m3-max-84869); - the other kept streams (369 distinct libraries, 14758 functions): 0 (job m3-max-84888); - the census's corpus (its local/sources and local/library-modules shards: 15378 and 14068 entries): 0 entries with a seq_cst operation, the positive control finding them in a27_memory_order's three kernels (job m3-max-85277). a_seq_cst_atomic_operation_takes_the_fence: on every committed profile, the store-buffering litmus kernel with its store (or exchange) and its load in AIR 2.9's ordered form on device memory. A seq_cst store or exchange is followed by the fence (a Device-scope memory barrier of acquire-release semantics over the operation's memory, then a Device-scope add of 1 with those semantics on the device's fence word, the function reading PushField::ZeroAddress); a seq_cst load is preceded by it. Store-side fences alone forbid store buffering, but not two readers that see two independent stores in opposite orders (IRIW), which the single total order forbids; the fence before each load puts an add on the one fence word between a reader's two loads, so the two readers' adds are ordered and the first reader's acquired stores happen before the second reader's later load. A relaxed, release, acquire or acq_rel operation takes no fence and reads no zero range. Every module passes L3. Red at this commit: each case with a seq_cst operation has no fence. Verified: the red/green job of the fix commit. |
||
|
|
c57492c129 |
Translator docs: the cooperative slice's zero past the grid names its conformance case
A comment only: cooperative.rs's paragraph on a partial threadgroup's shared slice now names the case that carries the M3's recording (compute-imageblock-slice-past-the-grid) beside the probe. The runtime sources hash is unchanged (cooperative.rs is not one of its inputs). |
||
|
|
0ae54b7ec4 |
Conformance: the M3's recording of the imageblock slice past the grid
Recorded on the Apple M3 Max (macOS 27.0.1) by job m3-max-85134 (record, three runs, one outcome, the validated leg ran without a stop; times --runs 8 --write). Every grid thread's texel holds its own value, (1 + x + 8y) / 64 and three zeros, and every one of the 22 cells past the grid holds zero, neither the -1 sentinel nor any thread's value: the answer the case's test pins, read from these bytes. docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py) for the case and its dispatchThreads step. |
||
|
|
6cd358bafb |
Conformance: a partial threadgroup's imageblock slice, past the grid
A compute pass can now state dispatchThreads:threadsPerThreadgroup: as a step (ComputeStep::DispatchThreads), on both sides: the runtime's dispatch_threads and Metal's own call. The fixed Side::dispatch_threads sets no imageblock size, so a kernel with an explicit imageblock could not run a non-uniform grid through it. The case compute-imageblock-slice-past-the-grid runs the owned fixture tib_imageblock_slices's tib_slot_half_slice over a 6 by 7 grid in 4 by 4 threadgroups with a 4 by 4 imageblock, so three of its four threadgroups are partial (x, y and the corner), and compares the whole 8 by 8 RGBA16Float texture, made holding -1 in every channel, with Metal's. Metal's documentation says nothing of a slice's cells past the grid; the case carries what the M3 records and claims no more. Its test pins that recording to the grid threads' own values and zero past the grid. The ledger row for the encoder's dispatchType is the one every compute pass case holds (the runtime keeps no getter). The recording follows in the next commit, from one record job on the M3. Verified: - the recording (next commit): M3 job m3-max-85134. - replay, job m3-max-85149: on llvmpipe (Mesa 26.2.6, LLVM 23.1.4) and on the RX 7900 XTX (RADV), the case's texels equal the M3's. Its one ledger row (dispatchType) holds on both, as compute-imageblock-sizes' does. - conformance suite 1055 passed, 0 skipped (m3-max-85298); clippy x3 and rustdoc as the change before it. - macOS: the M3 job's release build of the Metal side compiled without a warning. Clippy was not run on macOS, since pd sends no build to the Macs. |
||
|
|
ddfc3a6da4 |
Translator and runtime: a kernel's partial threadgroup writes its shared slice among Metal's threads
The partial-threadgroups variant refused a kernel with an imageblock slice write every
invocation shares (texture::cooperative), as SharedSliceWrite. The walk guarded the shared
write like any other instruction, so its trailing workgroup barrier stood under `if live`,
and the walked invocations past Metal's threads skipped their shares. It now takes the shared
slice as one of the walk's synchronizations, on every tier (texture::shared_slice, in
SyncSet::WorkgroupBarriers and divergent::is_sync):
- every invocation reaches the slice's barrier;
- the invocations live at the slice write the slice's cells among them. In a partial
threadgroup those are Metal's threads: the first EmitCx::entry_threads invocations by lin.
The step of the shared loop is now that count rather than the workgroup's size, so Metal's
threads write every cell;
- a cell no thread of Metal's stored holds zero, the threadgroup arena's null initializer;
- the walked invocations store nothing in their cells before the barrier (the predicated walk).
The M3 Max recorded the same for Metal's own partial threadgroup, so this matches the
measurement rather than any documented rule. Probe imageblock_slice_past_the_grid, job
m3-max-85078: each cell of a thread past the grid lands zero, in two runs of two dispatches.
No MSL or Metal text says what such a cell holds, and the docs claim nothing beyond the
recording.
The shared slice is never by itself a reason to walk. Its guard's branch, at a
workgroup-uniform point, is taken by every invocation, so a kernel whose only non-uniform
synchronization is a shared slice keeps its unwalked module. Outside a walk the shared loop is
unchanged.
- error: PartialThreadgroupsCause::SharedSliceWrite goes, since nothing else raises it.
mesh::plan_partial_groups no longer refuses the variant for it. Feature::PartialThreadgroups'
and LoweringInputs::partial_threadgroups' docs drop it and say what the slice writes.
- runtime: its cache's refusal markers drop m2v-refused-slice (cache::REFUSALS has 5 entries).
PartialThreadgroupsSite::Structure's doc and the README's gap paragraph drop the slice.
Caches::refused now reads a variant's translation file in one lookup (the planner's
read-back of the cause table). It asked the store once per marker, and each Store::holds
opened the file in young and then old, and read it whole where its length was the marker's.
Three markers are 16 bytes, so one 16-byte file was read up to three times. Store::holds_one
takes the markers with their tags, opens the file once a generation, reads it only where its
length is a marker's, and matches the bytes against each. Store::holds is holds_one of one
marker. A hit in old still moves into young. Lookups count their opens under the tests
(Store::file_opens).
- tests:
- the red test turns green;
- each_structure_the_variant_does_not_take_names_its_cause keeps compute derivatives and
the tile function;
- the runtime's marker test drops the cause;
- api_signatures.tsv loses the two variant rows. REFUSALS.md and basis.rs regenerate
unchanged.
- a_variant_refusal_is_read_back_in_one_lookup_of_its_file writes each marker of REFUSALS
under a key of its own and reads each back with exactly one open. A missing key opens at
most twice, and a lowering of a marker's length is no refusal.
- SEMANTICS_VERSION 2366 (renumbered at landing: 2363-2365 went to arm 9, the blob move and the 1D bicubic): a partial-threadgroups
variant with a shared slice now compiles. RUNTIME_VERSION stays: no run of an unchanged
artifact differs, and the runtime-source fingerprint's inputs are untouched.
Verified:
- red d1d4b5cc9c, job m3-max-85298: a_partial_threadgroup_s_shared_slice_holds_zero_past_its_threads
fails at its compile ("unsupported: PartialThreadgroups: SharedSliceWrite"), and the filter's
other 20 tests pass. With Caches::refused asking once per marker, as before, the same job's
a_variant_refusal_is_read_back_in_one_lookup_of_its_file fails at 2 opens for
Structure(ComputeDerivatives). Green: 23 passed.
- suites (85298): product 3498 passed, 1 failed (golden_hashes_match_the_table, re-blessed on
development), 24 skipped; validation 1344 passed, 2 skipped; conformance 1055 passed,
0 skipped; doctests EXIT=0.
- clippy plain 85194, m2v_gpu 85193 and m2v_cpu_icd 85197 EXIT=0; rustdoc and api-docs 85195
EXIT=0, all at the tree of this change and the case that follows it.
- the guest's kernels, job m3-max-85164 (release, a Ryzen 7 7840HS): the two kernels this
refusal held in a recording's libraries lower and pass spirv-val on all 15 committed profiles,
under the plain module and both partial-threadgroups variants. The slowest row is moltenvk-m3's
emulated variant at 0.017 s, and the peak resident set is 32.6 MiB a process. Before this
change both variants were refused as SharedSliceWrite (job m3-max-85052).
- Metal's own answer, in the conformance case that follows (compute-imageblock-slice-past-the-
grid): recorded on the M3 (m3-max-85134), and equal on llvmpipe and on the RX 7900 XTX
(m3-max-85149).
|
||
|
|
7e1ca1af89 |
Translator tests: a partial threadgroup's shared slice holds zero past its threads (red)
The planner ruled the shared slice write in a partial threadgroup built (owner order 3406): the walk's guest library 5ba5f694ad0576ff refuses the partial-threadgroups variant of kernels #81 and #83 as SharedSliceWrite. The M3 Max recorded what Metal does (the probe imageblock_slice_past_the_grid, job m3-max-85078, two runs of two dispatches each): the slice write in a partial threadgroup writes every cell of the imageblock, and the cells of threads past the grid land zero in every run. a_partial_threadgroup_s_shared_slice_holds_zero_past_its_threads runs engine_imageblock's shared_slice (4x4 threadgroups, a 4x4 imageblock, each thread storing (x, y, 7, 9) in its cell before the barrier, the slice written by local id 0 at its threadgroup's origin) as the partial-threadgroups variant over a 6x7 grid. Of its 2x2 threadgroups, one is partial in x, one in y and one in the corner. The test uses the interpreter with the region flagged NONUNIFORM, on every committed profile that lowers the plain kernel, in both scheduling orders. Each cell of a Metal thread must land its (x, y, 7, 9), and every other cell of the slice must land zero. That pins the reason as well as the result: an invocation past Metal's threads would store a nonzero cell if the walk let it. engine_imageblock's texel helpers become visible to the test. Red at this commit: the variant is refused Unsupported{PartialThreadgroups} SharedSliceWrite. Verified: job m3-max-85298 fails it at its compile with that refusal, on the first committed profile (amd-780m-hawkpoint-radv). |
||
|
|
15d6344523 |
Conformance probe: what a slice write holds for the cells past a partial threadgroup's grid
A kernel with an explicit imageblock stores each thread's grid position in its cell, takes a threadgroup barrier on imageblock memory, and writes the slice from the thread at local (0, 0), the shape the translator's cooperative slice write takes. It is dispatched with dispatchThreads on a 21 by 13 grid of 8 by 8 threadgroups, so threadgroups at the x edge, the y edge and the corner are partial. The probe prints, for each kind of edge, what the texels of the cells past the grid hold after the write (the sentinel set before, a stored pattern, zero or other) and a hash of them, over two dispatches a run. It is the reading the partial-threadgroups variant's SharedSliceWrite form is checked against. What it measured, job m3-max-85078 (the Apple M3 Max, macOS 27.0.1; two runs of two dispatches, sentinels -1 and -2): every cell past the grid holds zero, 24 at the x edge, 48 at the y edge and 39 in the corner, with no sentinel, no as-if-ran value and no other thread's value; every grid thread's texel holds its own value; each command buffer completed, and the hashes are equal across the runs and sentinels. |
||
|
|
7d1dba5df0 |
RUNTIME_VERSION 2569: a sampler of Metal's undeclared filter 2 is made and filters as nearest
A Cubic sampler state is now made where the runtime refused it, so RUNTIME_VERSION moves 2568 -> 2569 at landing. SEMANTICS_VERSION stays at 2365: no module's words change. runtime-sources.sha256 is unchanged (cache/mod.rs is not one of its inputs; pin-compute equal). |
||
|
|
6706d5b97f |
rt and translator: a sampler of Metal's undeclared filter 2 is made and filters as nearest
MTLSamplerMinMagFilter's raw value 2 (SamplerMinMagFilter::Cubic) is declared by no SDK header, Apple page or Metal Shading Language text, and nothing a program asks tells it about the value, so it is undocumented Metal and is not emulated. Metal makes the state on every Mac measured. An Apple M3 Max filters it over a footprint wider than one texel, and a Radeon Pro 5300M and an Intel UHD Graphics 630 read the nearest texel (the conformance case's own inputs: jobs m3-max-85003 and m3-max-85004). The runtime now makes such a state and filters it as nearest on every device: no shader arm, no second pipeline, no query, no note. - rt Device::new_sampler_state no longer refuses a Cubic min or mag filter. Nothing raises Gap::CubicSampler now; the variant stays, documented so, because the consumer names it. - translator: SamplerWord::of sets no bit for a Cubic filter, so its word is the nearest filter's. SamplerWord::CUBIC (bit 30) is deleted (its one reader, the anisotropic word path, is gone on development). SamplerWord::FIELDS is now (1 << 30) - 1. unnormalized_reads compares the two filters as the device's (a Cubic filter's is NEAREST) rather than refusing Cubic. vk_sampler already made NEAREST of Cubic. - SamplerMinMagFilter::Cubic stays, because the consumer converts a guest's raw 2 to it. It is documented through regen_metal_enums.py's PRIVATE_DOCS as Metal's undeclared raw value 2, which the M3 Max filters and the x86 Macs read as nearest, and whose device sampler and word here are the nearest filter's. generated.rs is regenerated against the macOS 27.2 SDK. - docs: the runtime README's sampler line, RESOURCE-ID.md (the word's bit 30 is now 0, and the consumer makes a Cubic state as nearest), resource_words.tsv's three Cubic lines (bit 30 cleared: 0x40000000 -> 0x00000000 twice, 0x58f6ab53 -> 0x18f6ab53), and the comments in select.rs and extended.rs that said the runtime makes no cubic sampler. - reach.tsv's SamplerBicubicFilter row no longer names a runtime cubic sampler as its reach. REFUSALS.md and error/basis.rs regenerated (refusal_surface.py: Gap::CubicSampler has no raise site); api_signatures.tsv blessed (SamplerWord::CUBIC removed, FIELDS changed). - RUNTIME_VERSION: a Cubic state is made where it was refused, so it takes a bump, set at staging (left at development's 2568 here). SEMANTICS_VERSION stays, since no module's words change. runtime-sources.sha256 re-pinned. Consumer search (reims-vgpu development 1913fcbc15 and the steelbrain/* refs from the last day): Gap::CubicSampler, 2 hits (development crates/reims-vgpu-vulkan/src/rt_platform/diag.rs:3071 and :3109, a test that counts the gap's name), kept. SamplerWord::CUBIC, SamplerWord::FIELDS and SamplerMinMagFilter::Cubic by name: 0 hits. The consumer's rt_platform::state::tests::states_on_vulkan, which expects None for min_filter 2, now gets a sampler. |
||
|
|
c43c130d1a |
Tests: a sampler of Metal's undeclared filter 2 is made and filters as nearest (red)
MTLSamplerMinMagFilter's raw value 2 (MTLSamplerMinMagFilterCubic) is declared by no SDK header, by Apple's page, or by the Metal Shading Language, and nothing a program can ask tells it about the value. Metal makes a sampler state of it on every Mac measured. The case's own inputs read a footprint wider than one texel on an Apple M3 Max (macOS 27.0.1, job m3-max-85004) and the nearest texel on a Radeon Pro 5300M and an Intel UHD Graphics 630 (macOS 26.7.1, job m3-max-85003). Undocumented Metal is not emulated, so the runtime is to make the state and filter it as nearest, the x86 Macs' answer, on every device. The tests that hold that: - rt every_device_shares_sampler_states_device_samplers: a state with a Cubic min and mag filter is made (no Gap::CubicSampler), its word is the nearest state's, and it takes no device sampler of its own. - translator a_cubic_filter_is_the_nearest_filters: a Cubic min filter, mag filter or both is the nearest filter's word, device sampler of each use, and unnormalized reading, at normalized and pixel coordinates; and a_sampler_word_holds_each_field_at_its_bits: a Cubic filter's word is 0. - conformance sampler-cubic-filter: its ledger row (refused on every venue) goes. The case drops its bicubic-filter-arithmetic declaration and lets each lane's runtime red hold its own texel where the M3 Max's recording differs (every lane but lane 0), under the new accepted difference in docs/API.md. the_cubic_allowances_are_the_lanes_nearest_moves pins those lanes to the recording. docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py): one ledger row fewer, one tolerance more. |
||
|
|
48a22a206f |
Runtime tests: the early member's fed run is checked exactly, not by a wall-clock ratio
every_device_feeds_an_early_members_run_to_its_queue_as_the_last_retires asserted l_run * 3 < a_run: that after A's handler the expected run fell by more than a third. The run falls by the GPU runs it takes (QueueInner::ran halves it toward each shorter one, queue::next_run), so the bound held only while A's and L's timestamped fill runs stayed short beside the run A's handler saw. Alone on lavapipe at 256 bits the ratio is about 4 (125M ns at A's handler, 31M at L's). It failed once in a full-suite run of the merged-tree check (m3-max-85067, llvmpipe LLVM 23.1.1 at 256 bits, the test 0.94 s there against 0.11 s alone), where the CPU ICD's fills ran long. The check is now exact: from the run A's handler saw, the run L's handler sees is next_run of A's GPU run, then of L's, each its command buffer's gpu_end_time minus gpu_start_time. Those are the spans the runtime fed (complete.rs feeds an early member's deferred span, and command.rs L's own, from the same placed times it stores). Nothing in it depends on how long the runs took. With the retirement count's +2 between the handlers, it says the queue took exactly A's run and then L's after A's handler. The bound is not widened; the ratio is gone. |
||
|
|
6af0aa8c9b |
Conformance: depth-colour-reads carries Metal's times; coverage regenerated
The suite's every_case_carries_its_timing failed on the new case (job m3-max-84879). `conformance times --runs 8 --write depth-colour-reads` on the Apple M3 Max (macOS 27.0.1, 26A434; job m3-max-85057) kept its figures in the recording; its answers are unchanged. docs/CONFORMANCE-COVERAGE.md regenerated (coverage.py): one module more declaring a notice, from the depth notices the case now declares. |
||
|
|
556ed46e41 |
Conformance: the depth colour reads declare the depth notices; API.md's border cell is the runtime's
The case's replay on lavapipe (job m3-max-84879) announced restricted-depth-range and restricted-depth-upload: the comparing stage's note and the 32-bit float depth upload's. Every texel is 0.25 or 0.75, inside [0, 1], and the notices site was the whole of their difference, so the case declares both, as sampler_filtering's compare rows do. The same job's replay with the colour allowances dropped printed the runtime's own answers: a sample past the edge under an opaque white border reads (1, 0, 0, 1), which fills the accepted difference's table. |
||
|
|
a894a90293 |
Conformance: the depth colour reads' module docs name their accepted difference without a private link
Rustdoc refuses a public module's docs that link to a private item (job m3-max-84879's doc step, EXIT=101): DEPTH_AS_COLOUR is the case's own constant, so the docs name it in code and do not link it. |
||
|
|
8e2ae4e702 | CONFORMANCE-COVERAGE.md: regenerated for depth-colour-reads | ||
|
|
2da77dd27a |
depth-colour-reads: the Apple M3 Max's recording (macOS 27.0.1, job m3-max-84868)
Recorded by conformance record on the M3 Max at bac637972d, three runs alike, the validated leg taken. Every read answers as the probe did (m3-max-84755): (d, d, d, 1), the white border (1, 1, 1, 1), the gather of green the depth taps and of alpha 1, the swizzled view (d, d, 1, 0), and the depth2d reads (d, 0, 0, 0) and the comparison at quarter weights exactly. |
||
|
|
91da6ebe3d | depth-colour-reads: an 8-wide texture, so every lane's weights are quarters | ||
|
|
e30d2409e2 | depth-colour-reads: the view's swizzle made at run time (its constructor is not const) | ||
|
|
8cff38ab42 |
Conformance: depth-colour-reads, a depth texture read through a colour slot (unrecorded)
The planner ruled that the runtime keeps Vulkan's (d, 0, 0, 1) for a depth texture read through a texture2d<float> slot: the three Mac families answer three ways (M3 Max (d, d, d, 1), m3-max-84755; Radeon Pro 5300M (d, d, d, d) and UHD Graphics 630 (d, 0, 0, 1), m3-max-84762), and the 630's is Vulkan's. The case pins that answer: the owned fixture dvw_depth_views's five kernels over a 6x5 Depth32Float texture, thirteen reads (samples nearest and linear, at the edge and past it under an opaque white border, gathers of green and alpha, a view swizzled (G, R, One, Zero), and the depth2d sample and comparison). It is recorded on the M3 Max; each element where the 630's answer differs from the M3 Max's may hold the 630's value as well (0), under docs/API.md's new accepted difference, and everything else compares exactly. Lanes sit at exact coordinates, so a linear weight is the same on every device. docs/API.md section 10 gains the entry (its runtime border cell follows the replay). The recording and the coverage regeneration follow in their own commits. Verified: cargo fmt. Build, record and replay follow in their jobs. |
||
|
|
aedc38190f |
Fixture dvw_depth_views: a depth texture through a texture2d slot beside its depth2d read and comparison
An owned MSL fixture: texture2d<float> sample and gathers of green and alpha, and depth2d sample and comparison, each through the runtime sampler at slot 0, one float4 per lane. |
||
|
|
cc28d38674 | Runtime tests: bicubic_line's zero texels and output fill are arrays | ||
|
|
7941badd0b |
docs/API.md: a 1D texture's bicubic sample is the M3's measured answer, as the 2D one is
API.md now says the bicubic filter is not documented Metal, in 1D or 2D, and that what the sample does is Metal's measured answer on an Apple M3 Max. For 1D that is the bilinear filter of taps i and i + 1 in every format, at the fraction of q = floor(256 (x - 1/2) + 1/2) rounded half up, with the taps clamped at both ends under clamp_to_edge. The 2D sample has the same status. The basis, from Metal's own texts: - The Metal Shading Language Specification 4.1 (2026-06-04), section 6.13.1 "1D Texture": "This member function samples from a 1D texture. Tv sample(sampler s, float coord) const", and "Because mipmaps are not supported for 1D textures, lod needs to be 0". Its Table 2.7 (sampler state enumeration values) lists filter, mag_filter and min_filter as "nearest (default), linear" only. "bicubic" appears nowhere in the specification or the feature-set tables. - The Metal toolchain's header metal/__bits/metal_texture_common declares the enumerator `bicubic` in `mag_filter`, `min_filter` and `filter` only under `#if defined(__HAVE_BICUBIC_FILTERING__)`. Metal's answer comes from an Apple M3 Max on macOS 27.0.1, job m3-max-85106: bcu_forms.metal's 1D lane over an 8-texel texture at 16 points, in RGBA32Float, RGBA16Float and RGBA8Unorm. At x = 3.0, between texels 4 and 9, it reads 6.5, where a Catmull-Rom sum reads 6.25. |
||
|
|
47a4455db1 |
Runtime tests: a 1D texture's bicubic sample against Metal's answer
tests::bicubic_line (device cfg) runs the owned fixture bcu_forms through the runtime on every device of the cfg's kind and compares its 1D lane (l.sample(bicubic_edge, uv.x), clamp to edge, normalized coordinates) with Metal's answer for the same textures and points: an 8-texel 1D texture of RGBA32Float, RGBA16Float and RGBA8Unorm, sampled at 16 points (fractions k / 256 between two texels, the half-up rounding of the fraction at 1/512 and 1/1024 past a centre, and points before and past both ends). The pipeline pushes the 1D slot's BicubicTexels word and carries PrecisionNote::BicubicFilterArithmetic; the float formats' samples equal Metal's, and RGBA8Unorm's lie within 1/4080 of Metal's, the note's bound at 8 bits. Metal's answer: an Apple M3 Max, macOS 27.0.1, running bcu_forms.metal's metallib (job m3-max-85106). It is the bilinear filter of taps i and i + 1 at the fraction k / 256 in every format: at x = 3.0, 6.5 between texels 4 and 9, where a Catmull-Rom sum reads 6.25. |
||
|
|
0a3a4fe911 |
Cache: SEMANTICS_VERSION 2365, a 1D texture's bicubic sample lowers under the identity domains
Functions that sample a 1D texture through a bicubic constexpr sampler moved from a refusal to a module under the identity domains (the previous commit). Renumbered at landing: 2362-2364 went to the partial-threadgroups cause, arm 9 and the blob move. |
||
|
|
94adea1c61 |
Identity domains: a bicubic sample of a 1D texture
The identity domains refused every function that samples a 1D texture through a bicubic
constexpr sampler ("a bicubic filter of a 1D texture", IdentityCause::SamplerState), though its
lowering reads nothing the identity domains do not source. It is the 2D sample's on one axis: the
same footprint (lower::sampler::bicubic::footprint_on, q = floor(256 (x - 1/2) + 1/2)), the
level-0 size by OpImageQuerySizeLod of the bound image (the slot's set-1 element), the taps by
OpImageFetch of that image, and the bound format's treatment from the slot's
PushField::BicubicTexels word (bicubic::format_bits, which takes no dimension), summed by the
module's Routine::Line, which the default domains already emit: the device's FMix of taps i and
i + 1 at the fraction k / 256, then the normalized formats' clamps. Metal filters a 1D texture
bilinearly over those two taps whatever its format (the module docs; the committed M3 observations
of the bcu_forms and bcx_rules cases). The runtime writes the field per slot from the bound
texture whatever its type, so it needs no change. The refusal and BICUBIC_LINE_FORM go.
The sample keeps PrecisionNote::BicubicFilterArithmetic. No new form, query or copy.
The fixture inventory's bcu_forms.ll and bcx_rules.ll rows move to ok on all 15 profiles (30
cells); their .air.ll twins move at the next M3 bless. docs/API.md, the runtime README (its bicubic
paragraph and the identity domains' known gaps) and IdentityCause::SamplerState's doc no longer
list the form. docs/REFUSALS.md regenerated: unchanged. No public item changes.
Test: tests::engine_identity::a_bicubic_kernel_reads_each_slots_format_treatment_from_its_pushed_field
(red at 74dd91398f).
|
||
|
|
34d3c8d0c0 |
Identity domains test: a bicubic kernel that samples 1D textures pushes each slot's field (red)
The identity bicubic test asserted that bcu_forms, which samples a 1D texture through a bicubic
constexpr sampler, is refused under the identity domains ("a bicubic filter of a 1D texture").
It now asserts what the 1D form should give: bcu_forms (a 2D texture, a 2D array and a 1D texture
at normalized coordinates) and bcx_rules (twelve 2D and four 1D texture slots at pixel coordinates)
compile, pass L3, push PushField::BicubicTexels for every texture slot, the 1D slots included, and
keep PrecisionNote::BicubicFilterArithmetic, on every profile. It fails until the refusal goes.
|
||
|
|
6459eaa946 |
Translator: a constant blob past the module's bound is refused at its first read through memory
What: the refusal of a constant blob past memory::blob::MODULE_BYTES moves from the identity
domains' check after planning (select::identity_refusal) to lower::access::blob::use_blob, where
selection first meets a read of the blob. The refusal keeps its cause (IdentityCause::ConstantBlob),
its class (Unsupported{IdentityDomains}, not implemented) and its words ("constant data of N bytes
read through memory").
Why: the plan only holds a blob that use_blob recorded, so the check after planning tested what
selection already knew at the read; refusing there names the cause where the translator meets it,
with no second pass over the plan.
SEMANTICS_VERSION 2364 (renumbered at landing: 2363 went to arm 9): a kernel that reads such a blob
and meets another refusal later in selection now gets the blob's refusal, where it got the other
one before.
Public items: none change (IdentityCause::ConstantBlob stays, and api_signatures.tsv and
docs/REFUSALS.md do not move; refusal_surface.py --check passes). The refusal-pin test is
engine_identity's a_constant_blob_past_the_modules_bound_is_refused_naming_its_size (cause, class
and words on every committed profile); engine_arena's struct DAG case of 128 KiB of blob keeps its
refusal check. runtime-sources.sha256 is re-pinned.
Verified: see the jobs named below.
|
||
|
|
6ba3572cbe |
Translator: the lockstep pass only finds pairs; its barrier insertion, rows mode and RowLockstep deleted
What: the lockstep pass (lower::simd::lockstep) keeps one job: find whether an entry holds a pair of accesses only a SIMD-group's lockstep orders, which sets Lockstep::unordered and the static note PrecisionNote::SimdgroupAccessOrder. Everything that ordered such a pair is deleted: the order key (OrderKey, Order::Rows, Decision), the barrier placement (stab, points, insert, rewritten, the barrier declarations), the rows mode (Basis::Position, Lockstep::rows, across_rows, orders_across_rows, dispatch's rows_may_split, RuntimeFact::RowLockstep and the barrier plan's rows_only), the inserted barriers' own forms (barrier::Origin, the barrier's rows guard, lockstep_class, BarrierPlan::uniform_placed and lockstep_simdgroup, the reconverges helper), Lockstep's barriers, emulated and inserted, and the select arm that emulated SIMD groups for a lockstep pair. The census names barrier.lockstep.* go; a program barrier keeps barrier.simdgroup or barrier.threadgroup. Why: the identity domains, which every state is translated under, take the key that orders nothing, so no barrier was ever inserted and every arm deleted here was unreachable. Public items removed (api_signatures.tsv): metal2vulkan-air Lockstep's across_rows, barriers, emulated and rows fields and its inserted and orders_across_rows methods, and RuntimeFact::RowLockstep. Consumer search: reims-vgpu development 76e6c90369 plus its 203 refs younger than a day: 0 hits each for lockstep, Lockstep, RowLockstep, orders_across_rows, across_rows and .inserted(. Tests: the census checks that asserted no barrier.lockstep name are gone with the names (the value checks of engine_simd_lockstep's kernels stay; its two tests that held only census checks, the branch arms and the texture calls, go with their kernels); engine_quad_ops drops its always-false lockstep_emulated; engine_store_quad, engine_ray_tracing and engine_simd_matrix drop their reads of the deleted fields; the mechanism table loses RowLockstep (62 variants). The test helper pipeline::testing::specialized_entry takes no profile, since the entry no longer depends on one: engine_store_quad checks sst_lanes' entry once, and engine_texture_unit_bit_test, engine_generic_pointers and engine_linking drop the profile they no longer pass. No module word moves: the deleted arms never ran. SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION do not move (the codec tags a fact by its name, and no artifact held RowLockstep). docs/API.md, the runtime's error and test docs, the simd module docs, lockstep.rs's title and the engine fixtures README's row_lockstep_tree row lose the clauses about inserted barriers; runtime-sources.sha256 is re-pinned. Verified: see the jobs named below. |
||
|
|
fa5d051b64 |
Translator: the two-word 64-bit integer forms deleted; every profile holds 64-bit integers in u64s
What: the arithmetic family's word form of 64-bit integers is deleted: Held::Wide and every arm on it, lower/arith/wide.rs (its word arithmetic, division, casts and lane moves) with its tests, ArithStrategy::Wide and ArithPlan's wide and divides, the profile's wide forms (wide_form_on, wide_demote, widen, widen_const, holds_wide), the two-word switch selector (SelectorForm::Words), the chunked vector's two-word lanes, the ulong texel's word form (TexelConv::U64Words loses its flag), the matrix descriptor's word form, and in the access family the two-word address (pointer.rs's Address enum and its helpers, the handle table's word entries and HandleIds, psb.rs's word base). The helpers the u64 paths still use move to arith/ops.rs (low_word, zext_word) and access/psb.rs (Pair, split). Every !int64 refusal goes with them: Feature::Int64Arithmetic, and Feature::PointerCompare, whose one producer was the static guest plan's !int64 arm. LeafCaps::int64 is deleted, and the mesh fold no longer asks for shaderInt64. BinOp::ISubBorrow, which only the word subtraction built, goes with its interpreter and builder arms (the grammar's Op::ISubBorrow stays in spv.rs). Why: Device::from_queries refuses a device without bufferDeviceAddress and shaderInt64 (IdentityDomains), and it is the only way to make a profile, so every profile has shaderInt64 and every arm deleted here was unreachable. This commit's parent is the last that holds the word form. Consumer search: reims-vgpu development cadac770c2 plus its steelbrain refs younger than a day (190 refs): 0 hits each for Int64Arithmetic, PointerCompare, LeafCaps and leaf.int64. The profile's fingerprint changes on every device (the field leaves the profile's Debug text), so the golden cells read "profile changed" until the table is re-blessed; no key stays unchanged, so SEMANTICS_VERSION does not move. The module words do not move: the u64 paths emit the same instructions in the same order (the uvec2 the slot offset builds is the same type the word form's type helper made). Tests: chunk.rs keeps the chunked lane-move and fragment-shuffle bound tests, on 64-bit and 32-bit lanes held whole; the selector test drops the word cases; the tests that asserted or filtered on the int64 field or Int64Arithmetic drop those lines; the dynamic move between slots runs L3 on every profile. docs/API.md (the object grid's needs), docs/REFUSALS.md, scripts/refusal-surface/reach.tsv and tests/api_signatures.tsv are updated; runtime-sources.sha256 is re-pinned. Verified: job m3-max-84770 at this commit (CPU only; the device steps on lavapipe): clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd EXIT=0; rustdoc EXIT=0 and private-item docs of five crates with 0 diagnostics; the translator's suite 2,594 of 2,595 passed, 20 skipped, the one failure golden_hashes_match_the_table (28,950 cells under a changed profile fingerprint, 0 changed under an unchanged key); air, runtime, devtools and harness 872 passed, 4 skipped; validation 1,348 passed, 2 skipped; conformance 1,053 passed; doctests passed; the conformance replay on lavapipe EXIT=0 with 0 ledger drift lines; the refusal-surface and signatures checks EXIT=0. The golden and engine inventory lists at the parent and at this commit show 0 computed cells moved and no inventory line. |
||
|
|
31d8a874f1 |
Translator: the Floor buffer access deleted; every profile reaches buffers by address
What: BufferAccess and ProfileFields::buffer_access are deleted with every Floor arm:
the refusals that named addressed_needs (the Floor arms of DereferenceLoadedPointer,
Int64Atomics, GpuEncodedIndirectCommands in the indirect-command, replay and execution-range
paths, the de-indexed and private list forms, and the addressed function tables), the
memory planner's addressed flag and its loaded-pointer refusal, the plan's needs (MemNeeds:
that refusal read its dynamic_roots, and the handle classes beside it had no reader since the
handle table went), provenance's dynamic_deref field, the Floor mechanism of
RuntimeFact::FunctionTableRange, the Floor values of MetalDeviceProperties (argument buffers
tier, max buffer length), and the null pointer's static escape that only a profile without
device addresses took. Public items gone:
DeviceProfile::addressed_needs and Feature::{ArgumentBufferPointers, PointerToInteger,
BufferRange}, whose only producers were those arms.
Why: Device::from_queries refuses a device without bufferDeviceAddress and shaderInt64
(IdentityDomains), and it is the only way to make a profile, so no profile is Floor: every
arm deleted here was unreachable. This commit's parent is the last that holds the Floor form.
Consumer search: reims-vgpu development f054ad57c1 plus its steelbrain refs younger than a
day (188 refs): 0 hits each for addressed_needs, ArgumentBufferPointers, PointerToInteger
and BufferRange.
The profile's fingerprint changes on every device (the field leaves the profile's Debug
text), so every golden cell reads "profile changed" until the table is re-blessed; no key
stays unchanged, so SEMANTICS_VERSION does not move.
Devtools: the fuzz Target loses its addressed flag; the pointer-select generator draws the
loaded form on every target, the same draw a target with device addresses made.
Tests: the memory plan tests ask whether a buffer pointer is wide in place of the needs, and
drop the handle-table asserts; the profile tests drop the field's asserts (the max buffer
length test keeps its allocation-limit arm); the pointer-cell tests no longer accept
PointerToInteger; the atomic, kernel stage-in and tessellation tests no longer filter on the
field.
docs/REFUSALS.md, scripts/refusal-surface/reach.tsv and tests/api_signatures.tsv are
regenerated; runtime-sources.sha256 is re-pinned.
Verified: job m3-max-84770 (CPU only, no card): the golden and engine
inventory lists at the parent and at this commit show 0 computed cells
moved of 28,950 (every cell re-keyed by the profile fingerprint, which
this commit moves) and no inventory line. The stack's tip ran the whole
gate (see its message).
|
||
|
|
09b6d0fb89 |
Translator: the anisotropic emulation deleted; a device without samplerAnisotropy refuses an anisotropic sampler
What: lower/sampler/anisotropic.rs and its tests, the emulated filter's
routine arm, SpecKey::SamplerAnisotropy, LoweringInputs and VariantKey's
anisotropic samplers, and PrecisionNote::AnisotropicFilter and
DeviceAnisotropicFilter (no producer is left) are deleted.
metal::sampler::check_sampler refuses a sampler of maxAnisotropy above 1
for a use that filters on a device without samplerAnisotropy
(Feature::SamplerAnisotropy, needing the feature): a constexpr sampler
where the function that samples through it compiles, a runtime or
argument buffer's sampler where it is made. A runtime slot's sample
compiles as the plain sample.
docs/API.md's precision-note catalogue loses the two notes,
docs/REFUSALS.md and scripts/refusal-surface/reach.tsv are regenerated
(SamplerAnisotropy is now a device refusal), api_signatures.tsv loses
the deleted items, and the runtime README line on the emulation goes.
SEMANTICS_VERSION 2363 (renumbered at landing: 2360, 2361 and 2362 went to
the seq_cst fence, the argument buffer border texels and the
partial-threadgroups cause). runtime-sources.sha256
is pinned at this tree.
Consumer search (read only), reims-vgpu development 4bb5db49fc and every
steelbrain/* branch younger than a day, 184 refs, git grep over *.rs,
*.toml and *.md: AnisotropicFilter, DeviceAnisotropicFilter,
anisotropic_samplers, SpecKey::SamplerAnisotropy and both degrade ids:
0 hits each.
Why: the planner ruled the emulation deleted directly after G1: under the
one form it is reached only on a device without samplerAnisotropy, where
Metal's anisotropic filter is not the device's, and the refusal names
the feature that device lacks.
Verified: job m3-max-84770 (CPU only, no card): the previous commit's red
test passes at this commit (1 run, 1 passed); the golden and engine
inventory lists at
|
||
|
|
c347ac4287 |
Tests: a device without samplerAnisotropy refuses an anisotropic sampler by name (red)
What: engine_sampler_anisotropy.rs, on committed profiles with
samplerAnisotropy removed. A fragment function sampling at its implicit
level through a constexpr sampler of maxAnisotropy 2, 8 or 16 is refused
at compile as Unsupported{SamplerAnisotropy} needing the feature; one
through an isotropic constexpr sampler or a runtime sampler slot
compiles and links; and a runtime sampler of maxAnisotropy above 1 is
refused where it is made (metal::sampler::vk_sampler) for a float and a
depth-comparison use, while an integer texture's use, which filters
nothing, is made.
Why: under the one form the anisotropic emulation is reached only on a
device without samplerAnisotropy, and there a constexpr anisotropic
sampler ends in an internal error instead of a typed refusal.
Verified: red at this commit in job m3-max-84770 (CPU only, no card): the
test panics at engine_sampler_anisotropy.rs:132 (1 run, 1 failed).
|
||
|
|
74bdc655a3 |
RUNTIME_VERSION 2568: uploads the host waits for that use shared memory go as a part of their own
A run in which a restoring make, a read of a texture's bytes, a ready wait or a wait for room flushes uploads that use memory another API shares while a group goes now submits those uploads as a part of their own ahead of the group's first part, in the same vkQueueSubmit2, with the hand-over of what they alone use, and the host's wait ends before the group's command buffers. RUNTIME_VERSION 2566 -> 2568 (renumbered at landing: 2567 went to the partial-threadgroups cause, which landed first). SEMANTICS_VERSION is unchanged. |