One stream a test, played on the new runtime: vertex buffers bound through a
range draw at their offsets; fragment buffers bound at location 1 fill slots 1
and 2, so an offset of slot 2 plays and one of slot 0 is the runtime's refusal;
a skipped texture bound to the vertex stage at location 1 skips the draws until
a nil at location 1 takes it off; a fragment function reads the texture at the
slot its range names; a kernel reads and writes the textures a compute
encoder's ranges bind. Each fails on the player before the range arms, which
refused the call.
The new runtime's player refused every range form of a buffer or texture bind
("not played on a render encoder"), though rt builds each as a loop of its
single-slot call: setVertexTextures:withRange:, setFragmentTextures:withRange:,
setVertexBuffers:offsets:withRange:, setFragmentBuffers:offsets:withRange: and
the compute encoder's setTextures:withRange:. Each now binds its objects from
the range's location on, through the helper its single-slot form uses, so a
skipped object in a range marks its own slot and skips the draws or dispatches
as a single bind of it does.
The cover tracker (covers.rs, shared by both players) reads the range forms of
texture binds too, so a draw's or dispatch's write through a range-bound slot
still covers what the texture meets in its placement heap.
Clippy's drain_collect refused the drain into a new Vec of the same type
(check m3-max-51969). The ids now come off the list with pop; the order
does not matter, since each buffer is written to its own files.
Verified by the check named when this lands.
The 3090 chain gate compared rt's and the old runtime's plays command buffer by command buffer
through a probe that never lands: whole-object checksums of each buffer a command buffer named,
then a script that asked the probe's dumps of Covers. A whole-object checksum is no compare under
the cover rule: a buffer partly under a texture's write differs under the cover, and a word that
differs outside it shows only as the same mismatch. This lands the compare in the player's own
tooling, on the player's own Covers (94d7c1620c's rule, unchanged).
- Player::dumping(command buffers, dir): once each listed command buffer completed (its wait
seen, before the next call plays), every buffer its encoders named is written into dir as
cbC-objO.bin, with cbC-objO.cover holding the ranges of it the cover rule held covered then, or
cbC-objO.unread where the backend could not read it. A write failure ends the play
(PlayError::Dump). Off unless asked.
- compare_dumps(a, b) (replay/dumps.rs) compares two plays' dumps word by word, leaves out a word
wholly inside a range either play held covered (the old runtime answers no slot access, so its
plays cover less), and reports every other differing word per command buffer and buffer, a dump
one play lacks, and a dump either could not read.
- command-replay: --dump-command-buffers FIRST..LAST --dump-dir DIR on play; compare-dumps --a DIR
--b DIR prints a line per buffer that differs outside every cover and a summary ending agree or
DIFFER, exit 0 / 1 / 2.
- Covers::ranges(object), read-only, for the dump.
- docs/REPLAY-STREAM.md, section 10: the options, the files and the compare's lines.
Tests (no GPU, the player on the test backend, two plays each that differ only in the words at
bytes 0x10 and 0x1800 of a 0x2000-byte heap buffer whose first 0x1000 bytes a texture's write
covers after the command buffer bound it):
- replay::tests::the_dump_compare_reports_a_differing_word_outside_every_cover: the dump's cover
is 0..4096; the word at 0x10 is covered, the one at 0x1800 (word 1536) is reported; DIFFER.
- replay::tests::the_dump_compare_reports_a_word_whose_cover_the_buffer_s_last_write_voided: the
encoder binds the buffer again after the dispatch (a binding counts as a write), the dump holds
no cover, and both words are reported.
- replay::tests::the_dump_compare_agrees_on_alike_plays_and_reports_a_dump_one_play_lacks.
The test backend now keeps a heap buffer's bytes as it keeps a device buffer's, so a write into
one reads back.
Verified: the check job named at hand-over compiles it and runs the replay tests.
The known gap for textures over buffers in imported or exported blocks gets its measured cost for
decoded video: one copy a plane before the first submission that uses a picture, none for a picture
written over before any use; 2 copies and about 8.6 MB a picture used over the replayed decodes
(8-bit 1920x1080 and 16-bit 3840x2160 pictures of two planes), and the copies' GPU time a picture on
four cards. No worst-present figure: a present is a span of records, not a frame.
Verified: replays with the player that fills a picture's shapes at their first use (development
0c36de79d9): vaapi-780m-wd presents 376..1816 on the Radeon 780M (job 52006: 1,440 pictures, 1,415
filled, 19 written over first, 2.00 copies and 0.288 ms of GPU time a picture filled), nvdec-3090-wd
presents 390..1833 on the RTX 3090 (52007: 1,435 pictures, 1,416 filled, 16 written over first,
2.00 copies and 0.653 ms a picture filled); the RX 550 (51913, 0.294 ms a picture) and the Iris Xe
(51922, 0.520 ms) from plays of vaapi-780m-wd with the player at 9f9744827d, whose copies a picture
are the same two.
The planner ruled the Iris Xe's 1.26x on the particle kernel a known gap on Gen12, with the three
remedies already measured and closed. The 2 GiB cap gap's Gen12 sentence now says what the cost
is and how large it measured:
- The cause, read from the GEN assembly ANV compiled for rt's module and the old runtime's (the
pipeline executables' disassembly, job 51999 on the Iris Xe RPL-P, Mesa 26.2.6): Gen12 has no
64-bit integer add, so rt's access through an address takes, beyond the binding-table access
the old runtime makes (add of the offset, one send), a compare for the carry, an add of the
high word and four moves that pack the a64 address into the message, and the bias one 32-bit
add more. The particle kernel's loop, one read an iteration, is 31 instructions against the
old runtime's 24 (one a64_untyped_read against one bti untyped_read).
- The size, measured (job 51999, kalone, the kernel alone back to back, forward and reverse):
best median per dispatch 502.0 us for rt at development a352921d81, 397.0 us for the native
Vulkan program and 429.5 us for the old runtime: 1.26x native and 1.17x the old runtime, the
output bytes' hashes equal across the three.
- Intel's Windows driver on Gen12 is unaudited (no Gen12 Windows host).
Docs only; no ceiling changes.
A gap against the old runtime. Apple's private setLineWidth: has no rt setter, so the rt player
refused the call ("not played on a render encoder") and every rt play of a stream that sets it
stopped at its first call, while the old runtime plays it.
RenderCommandEncoder::set_line_width(f32) keeps the width the encoder's later draws see, Metal's 1
until set, each encoder starting at 1. Every width is accepted, as on Metal. The runtime draws
lines at width 1 alone: its pipelines fix the width at 1, and Vulkan's wider lines are a device
feature (wideLines) that the floor does not require, so no second form is built on it. A draw of
lines or a line strip while the width is not 1 is the new DrawKind::LineWidth, refused at the
draw before anything is recorded; a draw of no vertices records nothing as at any width, and a
draw of triangles runs at any width, as Metal's filled triangles do. A triangle fill mode of lines,
which Metal draws at the width, is already refused where it is set (DrawKind::FillMode).
The player plays setLineWidth: into the setter; a line draw under another width is then the
runtime's gap, skipped and counted like any other.
Also: fill_push's doc comment had landed above `primitives`; it is back on its function.
Docs: the setter's doc names Metal's counterpart (the private setLineWidth: of
MTLRenderCommandEncoder) and what is refused; DrawKind::LineWidth says why; the rt README holds
the width in the encoder's state and the draw in its known gaps. api_signatures gains the method
and the variant. refusal_surface.py regenerates docs/REFUSALS.md with no change: it lists
Gap::Draw by its raise sites, and the new kind is raised in draw, already listed. api_surface pins
the translator's module roots alone, so no row moves.
Tests: tests::draw::on_device::every_device_draws_lines_at_width_1_alone (width 2: a line and a
line strip refused with DrawKind::LineWidth, an empty line draw and a triangle draw; width 1 again
and a later encoder's default: lines draw their rows) and
runtime_lane::rt_replay::a_line_width_plays_and_a_line_drawn_at_another_width_is_skipped (at 1
nothing skipped; at 2 the line is skipped and counted as Draw { kind: LineWidth } at its call).
Verified: the check job named at hand-over compiles it and runs the touched tests.
What: Device::pixel_format_info's doc and the runtime README's line on it now say that the M3's
flags promise nothing about this device, and that this device's answer to a write to a texture of
a format with no storage element here is Gap::StorageElement. The module docs already state that
the description is Apple's GPU's, not the device's.
Why: the flags read as capabilities. Measured against Apple's tables (the old runtime's
families/formats.rs, the Apple9 cells), over the 136 formats both name, these bits of the M3
Max's MTLPixelFormatInfo flags match one documented capability each, 136 of 136: 0x02 Write,
0x04 Filter (0x00030000 also matches Filter), 0x08 Blend, 0x10 Color, 0x80 Resolve, 0x100 MSAA;
no bit matches Atomic or Sparse. No caller of the runtime reads the Write bit and the guest never
receives the per-format word, so the flags stay the M3's on every device and only the docs change.
Verified: cargo fmt. Rustdoc in the check job named at hand-over.
m2v.externalWriteDone (a decoded picture landed in a receiver buffer) no longer refills the
buffer's shapes at once. As the product's per-shape form does after a video command buffer, every
shape of the buffer owes a fill from it, its own write lost; the first command buffer whose
encoders use a texture of the buffer (a binding, a pass's attachment, a blit, a useResource)
fills every owing shape of the buffers it uses before its commit, by blits in a command buffer of
the player's own committed then. A picture another lands over before any use is never copied.
The eager form copied every picture at its landing, so a burst of pictures landing at one present
was copied there whether used or not.
New counters: surface_pictures_filled (pictures a fill took) and surface_pictures_unfilled (those
another landed over before any use, or whose buffer went first); the surfaces line also gives the
pictures not used yet. The copy-from-guest-RAM comment now names the product's fill from the
pages, not a refill. docs/REPLAY-STREAM.md sections 4 and 10 say so.
Verified: the new device test a_surface_picture_fills_its_shapes_at_their_first_use (two pictures
land before a kernel reads the texture: one fill of one shape, the second picture read, the first
never copied) runs in the check that follows this commit; not yet run. The eager form fails it
(two refills).
Ruled by the planner on round 951b93a645:
- 8086:a7a0 alu and long_4cb: the rt README's recorded Gen12 gap under the biased slot word (a
change before an identical loop moves a kernel -18% to +14%, mechanism not shown; neutral arm
m3-max-51663). Medians 1.139 and 1.141 (m3-max-51733).
- 10de:2204 create_64MiB first_take and device_first: the 2080's known gap, the driver's
allocation of host-visible system memory against old's import of its own pages. One line for
both 3090s at the higher card's medians, 2.841 and 1.943 (um870, m3-max-51756); ms01 reads
2.359 and 1.673 (m3-max-51747).
The ruling named 1.14, 2.84 and 1.94. A ceiling under its row's own median fails the row at once,
so each is rounded UP to cover the median, as every earlier ceiling was (1.877 to 1.88): alu
1.14, long_4cb 1.15, first_take 2.85, device_first 1.95. The planner is told.
The Windows rt suite's default room goes from 4 to 8 GiB. In the same round its run on the UHD
630 went over 4 GiB in 34 s (m3-max-51691, exit 137). The retry at twice the room is capped at the
kind's default, so a kill at the default was never retried and the leg reported no suite.
Verified: the matrix unit tests run after landing (matrix-unit.sh).
The old runtime's render descriptor key covers SEMANTICS_VERSION (each stage's
function_compile_key), so 2190 -> 2191 moves it: the_old_render_descriptor_key_keeps_its_value
pins 91981465..., the left side check job 51812 printed at 4c8dac5d9e (development's versions are
still 2190/547, so this branch's 2191/548 are the next numbers). The fixture's bytes are unchanged.
The device test made its RGBA8Unorm parent of shader-read and shader-write usage with no index,
which the runtime refuses (a texture shaders read or write takes an index): legs 51836 (3090) and
51837 (lavapipe) panicked there, before any case ran. It takes the grant's next index.
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.
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.
The planner's rule for these two ceilings (1.20 each): the next round's ratio lowers them, and a
row at or under 1.0 leaves the list. In the round at 951b93a645 (jobs m3-max-51721, m3-max-51731,
gem10's RX 550, RADV POLARIS12, Mesa 26.2.6) the wall ratios are constant_managed 0.956 and
constant_private 0.953, with GPU p50 1972.6 us vs old 2094.4 us and 2013.8 us vs old 2101.8 us.
Both rows are within HARNESS_BUDGET, so the leg judges them without a ceiling.
Verified: the only test that names the RX 550 leg patches HARNESS_CEILINGS to {}; the matrix unit
tests run after landing (matrix-unit.sh).
The surface form's usage word, as ruled final. A shape no texture over it declares shader
write, shader atomic or Metal's unknown usage for (a plain shape) is made with shader read
and render-target usage alone: rt gives such a texture its format and that format's sRGB
sibling as views, and no storage view, so a plain shape's attachment reads are not refused
and its image carries the short view list. A shape shaders may write keeps the usage Metal
gives a texture whose use it does not know (shader atomic where declared), with the long
view list, so a storage plane's textures of other formats of the same bytes a texel stay
views of it with no copy.
A texture or view of a format other than a plain shape's own or that format's sRGB sibling
is refused (surface_format_refusals), and textures over a plain shape that declare
pixel-format-view usage are counted (surface_plain_format_views). docs/REPLAY-STREAM.md
section 10 says so.
Verified: the new test a_plain_surface_shape_views_as_its_format_and_its_srgb_sibling_alone
(a sibling view found, another format refused as a texture and as a view, counted) runs in
the device suite of the check that follows this commit; not yet run.
surface_order_shapes counts the shapes shaders may write made over a plane that holds a shape
of their extent shaders may not write: the order case, which the storage bit makes another
shape. The doc's counter list reflows. Not yet compiled.
surface_declared_writes counts the draws' and dispatches' surface texture slots whose bound
state's interface writes them, beside surface_usage_writes, those taken as writes by usage
with no interface at hand: together they say which binds write a shape. Not yet compiled.
The planner's storage test is shader write, shader atomic or unknown usage (an image atomic is
a storage image's operation); a shape made for a texture that declares shader atomic carries it.
The idle shapes sort by recency with sort_unstable_by_key, and the overlap drop's count filters
by reference. Not yet compiled.
The rt player's surface form now mirrors the product's per-shape form (reims's
surface cache, shapes.rs): a shape is a plane's (receiver, plane, offset, pitch)
texture of one extent and texel size, and every shape is current over its whole
extent by the product's three rules. A new shape is filled from the buffer once
the dirty shapes are written back; a copy back to the guest's RAM first writes
every dirty shape back; at the end of an encoder that may have written a shape,
the write goes through the buffer into each other shape of its plane that a live
texture views or that is dirty, and the plane's other shapes go. Writes are noted
from pass attachments, blit destinations, the slots the bound pipeline state's
interface writes (texture_accesses), and by usage where no interface is at hand.
The newest-entry rule, its download at a new shape and the older-shape use
counter are gone.
The usage word: a shape is made with shader read, render-target and
pixel-format-view usage, and shader write (a storage view) only for a texture
that declares it or Metal's unknown usage; the shape key carries that bit. A
storage shape serves a later texture of its extent that does not declare it; a
declaring texture over a plane whose shape has no storage is another shape.
The report and counters give overlap copies and bytes, straddled texels,
unordered writes, usage writes and write-backs. The device test now checks a
copy from the guest's RAM reaching both shapes of a plane and a blit through one
shape reaching the other at its encoder's end. Not yet compiled.
The threadgroup limit change gave the pipeline interface Metal's own maxTotalThreadsPerThreadgroup
beside the device's, and the device test's hand-made interface did not state it (E0063 under
--cfg m2v_gpu and --cfg m2v_cpu_icd, m3-max-51501). It states 1024, as the device's, and the
encoder refusal test adds a state capped at 256 on the device: a 512-thread threadgroup on it is
Limit::ThreadgroupThreads, while 2048 threads stay Metal's ThreadgroupSize refusal.
A compute state answers the least of Metal's maxTotalThreadsPerThreadgroup for the kernel and
this device's limits for it (maxComputeWorkGroupSize, its subgroups' count, and for emulated SIMD
groups their scratch beside maxComputeSharedMemorySize). A dispatch past that answer was
Refusal::ThreadgroupSize, which states that Metal itself refuses the threadgroup: on lavapipe
compute-threadgroup-simd-scratch's 1024 threads, which Metal runs, were refused as "past the
state's 256" and the suite counted our refusal where the old runtime reports the device's lack
(MaxComputeSharedMemorySize 32768 against 57344).
The interface keeps Metal's own answer beside the state's
(ComputePipelineMetalInfo::metal_max_total_threads_per_threadgroup, or a required size's
threads). A threadgroup past Metal's answer stays Refusal::ThreadgroupSize; one within it and past
the state's is the new Limit::ThreadgroupThreads { size, max }, basis device. The conformance
crate's rt side reads that limit as the venue's lack, as it reads the translator's device gaps.
REFUSALS.md and api_signatures.tsv regenerated.
Verified at this commit: cargo fmt, refusal_surface.py, signatures.py --bless and coverage.py
--check; the build, the suites and the lavapipe replay (where the case should read lacks-feature)
run in the lane's check job.
The new runtime's side refuses two fields of these facts: the device relation of a library and
a function (the consumer's own, device), at 24 cases' case/facts/device, and a function's options
(memory2's libs census 11-19, m3-max-51379..51431: every function descriptor of the 17 streams
has options 0), at 22 cases' case/facts/options. Each row is one m3-max-51389 replay on lavapipe
listed as unlisted, every other field of these cases comparing exactly there; the facts reach no
device, so the rows hold on every venue. The coverage document counts them by field.
Verified at this commit: the rows are those m3-max-51389's rt lavapipe replay lists (46, site and
answer as listed); coverage.py --check.
Moving the descriptor stating into descriptor_reads left the old side naming the tessellation
descriptor only by its full path, so its import was unused (clippy, m3-max-51389).
Verified at this commit: cargo fmt only; the build runs in the lane's check job.
reims keeps binary archives in its guest bundle: the device's MTLBinaryArchive holds only each
added function's lookup key, serializing and loading use the bundle's own file format, and no
message reaches the host, so neither runtime is ever asked. The planner ruled them the consumer's
own (ConsumerObject::BinaryArchive, "MTLBinaryArchive, binaryArchives", named in rt's README).
Rows on every venue: the six pipeline descriptor cases' binaryArchives field, which the new
runtime's side refuses, and the six binary-archive cases' archive programs (case/program), which
it leaves at the trait's default. The dynamic-library cases and library-from-data share the
archive program and are not archives, so they keep no row.
Verified at this commit: cargo fmt and coverage.py --check; the ledger and the replay run in the
lane's check job.
RtSide left function_facts, function_facts_from_descriptor and library_facts at the trait's
default, so 24 cases ended refused on rt (15, 7 and 2 on the earlier whole-set run). The
runtime's library is the translator's and a function is the translator's function of it, so the
side reads each getter as a consumer holding them does: the library's functions a program makes by
name (a Core Image kernel library's extern functions left out, by the translator's own stage), its
type and install name; a function's reflected properties and constants dictionary, through
Function::properties, or Function::specialized_properties for a function made with constant
values, whose dictionary the translator states is empty, as Metal answers it. The old runtime's
side shares the attribute and constant-value helpers, which move into function_facts.
FunctionFacts takes options and the device relation as Fields, and LibraryFacts the device
relation. The runtime keeps no device on a library or a function, so device is the consumer's
own, as the planner ruled (ConsumerObject::Device, named in rt's README); a function keeps no
MTLFunctionOptions, so options is refused, its rows waiting on memory2's every-stream count of
function options. Failure derives Eq, so every facts type keeps its Eq.
Verified at this commit: cargo fmt only and coverage.py --check; the build, the suites and the
lavapipe replays run in the lane's check job, whose replay names the device rows' sites.
RtSide left Side::shared_event_rises at the trait's default, so shared-event-rising-value ended
refused on rt. The probe's host sets, GPU signals and bounded host waits are the runtime's shared
event's, made as the old runtime's side makes them; the runtime keeps no label, so EventRise's
label becomes a Field the side refuses (the consumer's own, label), with its every-venue row, and
the coverage document counts EventRise by field.
Verified at this commit: cargo fmt only and coverage.py --check; the build, the suites and the
lavapipe replays run in the lane's check job.
A facts call running said nothing of which of its fields were compared, so a field the new
runtime's side refuses read as covered beside its call. The coverage document gains a section
that counts each facts type answering field by field (a struct with a crate::case::Field field)
by field: its fields, the ones a side may refuse, the leaf each records at (read from the type's
node), and the new runtime's ledger rows that refuse each at that leaf, of the cases whose module
calls a Side method answering the type. A Field whose node records it at no leaf this can read
stops the generator.
The six pipeline descriptor cases' label rows (pipeline-descriptor-* and compute-descriptor-*,
every venue: the consumer's own, label) go into known-gaps-rt.tsv. Their binaryArchives rows wait
for memory2's every-stream count of binary archives, which their head will cite.
Verified at this commit: coverage.py --check passes on the regenerated document; the build, the
suites and the lavapipe replays run in the lane's check job.
A facts call (a pipeline descriptor's read-back, later a function's or a state's) answered all
of its getters or none, so a side whose runtime has no counterpart of one getter refused the whole
call and compared nothing. A field of such an answer is now a Field<T>: the same Answer a call
gives, its refusal recorded by Failure::recorded at the field's own site. The comparison reads it
as a refusal at that site, and the known-gaps ledger holds it as it holds a call's refusal: an
unlisted field refusal fails the run as an unlisted call refusal does. The fields beside it still
compare.
RenderDescriptorFacts and ComputeDescriptorFacts take label and binaryArchives as fields. Both
runtimes take Metal's pipeline descriptors as the translator's, so the stating and reading move
from the old runtime's side into descriptor_reads, which both sides call: the old side answers
the label and archives from its creation options, the new runtime's side answers
render_descriptor_facts and compute_descriptor_facts from the translator's descriptor, defaults
included, with label and binaryArchives refused (the runtime keeps no label and takes no binary
archive). The label joins the consumer's own (ConsumerObject::Label, named in rt's README), as the
planner ruled.
Verified at this commit: cargo fmt only; the build, the suites and the lavapipe replays run in the
lane's check job.
Every venue run refuses the same 45 places of the 77 sampleRateShading cases on rt, and the
ledger listed none of them. memory2's every-stream census 11-19 (all 17 matrix streams on player
db1d5c1929, every dump complete; m3-max-51200 to 51246) counts the three paths rt does not build,
so their rows take "refused: no stream uses it yet" with that census, each followed by its facts:
- 28 extended-range rows (BGRA10_XR, BGRA10_XR_sRGB, BGR10_XR, BGR10_XR_sRGB, the XR10 two-plane
and its sRGB): no stream makes an extended-range texture, and no drawable or layer has one. The
translator holds each raw in an integer format (FormatEmulation::ExtendedRange) and rt's texture
refuses that emulation before the device's format query is asked;
- 12 rows of a plane of a 3D texture as an attachment: no stream attaches a 3D texture or sets a
depthPlane; rt's render pass refuses the texture type and its descriptor has no depthPlane;
- 2 resolve rows: no stream sets a resolveTexture or a resolving store action; rt builds no
resolve.
One extended-range-family row, xr-unwritten-rgb10a2unorm-srgb-no-fragment, names
MTLPixelFormatRGB10A2Unorm_sRGB, which is no public Metal format and which the census does not
count, so its row keeps its facts as words. The off-alignment bind's row quotes Metal's own API
validation, which refuses the bind (the recording's validated fact), and the dispatchType getter's
row is the consumer's own (dispatchType).
Verified at this commit: cargo fmt only; the ledger check and the rt lavapipe replay run in the
lane's check job.
The rows of a runtime's own run after the creation workloads, and only
with the authored workloads; the command's docs now say so beside the
creation workloads', and that a runtime without the row prints "not
compared". Documentation only.
The suite's two timing records read noise in the parallel nextest run. The
planner ruled that their timing moves to harness rows, which run alone,
and that each test keeps its functional part.
- Harness: a row of one runtime's own (authored::OWN_ROWS, OwnRow).
- It runs calls with no Metal counterpart through a new Device::own_row,
on a device of its own on the session's GPU, and checks what it
measured before it reports.
- A runtime without the row answers None and prints "not compared".
That is the old runtime for every row, so the plumbing is general,
not a case for these rows.
- Rows run after the creation rows, are selected by --only/--skip like
any workload, and print their times as
M2V-MATRIX time harness-<runtime>/<row>/<what>. A failed check prints
M2V-FAILED harness-<runtime>/<row>, which fails the leg
(results.py's HARNESS_FAILED).
- idle_frees and idle_frees_under_commits are judged absolute, per the
planner's ruling: a free that began 25 ms or more past its allocation's
idle age fails the row.
- The count is rt's public Metrics::idle_frees_by_age: its 250-275 ms
bucket is on time, every other bucket fails.
- A small block held to the end keeps every allocation weighed, so none
is kept as the reserve.
- Without commits, four 16 MiB blocks are given back 150 ms apart. With
a commit every 2 ms, two are given back, the second once the first's
free ended. Either way no free waits for another, so each is measured
alone.
- These rows record no time, so no ratio or cross-GPU rule reads them.
- export_submit_cost uses rt's public calls only: new_exported_block
(the first handle the device takes), raw, with_present_queue.
- It times vkQueueSubmit2 of one command buffer recording a global
barrier, waited for by a fence, in 3 rounds of 200 with no export and
with 64 live.
- It records the medians, none and exports_64, in us. The matrix judges
them as a cross-GPU outlier, as any time of one runtime; with no old
row there is no budget.
- rt suite:
- memory.rs's two idle tests keep every check of order and age, and
print no time record; assert_freed_at_the_idle_age returns nothing.
- export.rs's exported_blocks_submit_cost becomes
every_device_submits_beside_64_live_exports: the same submissions,
now under the validation layer and untimed, with the exports gauge
at 64 and back to 0 each round.
- validation.rs's doc drops the export test from the layer-less
instance's users.
- rt README names the harness rows where the idle age and the exports'
submission cost are described.
Unverified in this commit: no build yet.
What: the identity domains (the new runtime's) now lower kernels with no lockstep order, which
changes what a cached translation holds and the artifact facts it encodes (the one-row facts are
gone), so both versions rise: SEMANTICS_VERSION 2189 -> 2190 and ARTIFACT_FORMAT_VERSION 546 -> 547.
These are this change's only version bumps; development's 2189 (the alpha test reference) and 546
stay below them. RUNTIME_VERSION stays at development's 2539.
The old runtime's render descriptor key covers SEMANTICS_VERSION (through each stage's
function_compile_key), so the_old_render_descriptor_key_keeps_its_value pins the key these
versions give: 9a3ee09e..., the left side job 51531 printed at the same versions (792f520713, this
change on 90792a2bfa). The fixture's bytes are unchanged.
Verified: cargo fmt; signatures.py --bless, refusal_surface.py and coverage.py --check give no
diff on 951b93a645. The check job named at hand-over compiles it and runs the suites.
f28e9b3060 took the one-row variant out of Compiled::new, but the device tests' constructor
(ComputePipelineState::for_test, compiled only under m2v_gpu or m2v_cpu_icd) still passed a
(kernel, variant) pair, so clippy and the device test builds under either cfg failed to compile
it (E0308). It now passes the kernel alone.
Verified: job 49928 (msi, f28e9b3060 + a33dcf4fed) showed the E0308 at pipeline.rs:1187 in
clippy-gpu, clippy-cpu and both device-test archive builds, and no other error; this commit's
own build is the next check job.
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.
tests::queue_share_device::a_later_queue_s_command_buffer_takes_its_turn_ahead_of_another_queue_s_burst
holds each of a burst's command buffers to a submission at most 20 ms after the GPU end of the
one before it: a bound other test processes' GPU and CPU work spends. On lavapipe on msi-laptop,
beside two other build and test jobs, the burst's eighth missed it (m3-max-51548, development
951b93a645); the same 64-test set on an idle node passed 3 runs of 3 (m3-max-51697). It joins
the override that already runs the file's other GPU-time-bound tests alone. The frozen crate is
unchanged; the override goes with it at the cutover. No other test in the file carries the bound.
The 2 GiB cap gap's Gen12 sentence named rows and an instruction count. It now says only what the
Iris Xe's probes measured:
- The form's median over the harness's 38 workloads is +0.03%. Three rows are up: alu and long_4cb
14%, image_filter 7.6%. Three are down: zero_products 18%, vote_loop 9%, frame_5cb 7%.
- A change in the code that runs before an otherwise identical loop moves the kernel by -18% to
+14%. The mechanism is not shown, and the probes ruled out four causes:
- Placement: with ANV's instruction compaction off, every loop moves in memory and the gaps hold
within 0.15 points.
- Instruction count: a neutral arm (the sign-extended form plus live instructions before the loop
that touch no address) times at the base's speed in every row.
- The thread payload: the pushed registers and the push ranges are the same in both forms, and
the one pulled load is the same.
- Register numbers: the neutral arm's loop registers are shifted and it times at 0.0%.
- zero_products has the same three bias instructions before its loop as fma_chains, so one change
moves kernels in both directions.
Verified: the A/B rows are from the Iris leg; the ISA comparisons are from INTEL_DEBUG=cs dumps of
both forms and the neutral arm, with the driver's shader cache off; the timings were taken with
compaction on and off. The README is in no crate's rustdoc. The one test that reads it (rt's floor
test) reads its "## Floor" section, which this does not touch.
The planner ruled create_64MiB/first_take 2.30 and create_64MiB/device_first 2.14 on 10de:1e87,
from the medians of the alternated run m3-max-51634 (base 7cda47f536 and head 296e110c0f, the
higher of the two): the driver's own allocation of 64 MiB of host-visible system memory takes
about 12.5 ms where the old runtime imports pages it mapped itself in about 5.8 (m3-max-48212),
and it stays the driver's memory because an import as the allocator costs every submission on
every AMD card. row_limit applies HARNESS_BUDGET on top, as for the 1.40 lines. The 3090 has
no line yet: it takes one from its own rows.
A host can give each process a wall-time level of its own. On the RTX 3090 at homelab-um870-1,
sampling_deep_4x16x252 took about 37 or about 80 us a run, one level a process, at equal GPU
time and CPU instructions, and the old runtime drew the levels as well (rounds b0c08e51b5,
7cda47f536 and 6b535f55c9). The outlier's second pass is already a fresh job, so a fresh
process, but two passes both landed high in 6b535f55c9 and failed the leg on a level the code
does not set: m3-max-51629 timed the row in 39 processes over every commit of the range at 36.8
to 40.0 us.
Now the second pass of a leg with a harness row's cross-GPU outlier also runs each such row
(results.alone_rows, at most RETIME_ROWS, the furthest out first) alone in RETIME_PAIRS pairs,
old then new, then new then old, every process on a fresh driver cache and store, its times kept
as harness-alone/<row>/<pair>/<runtime>. time_outliers judges a row out in both passes by the
lowest of the new runtime's samples (both passes and the alone runs) over the lowest the base
recorded of it: still out, it fails, "high in every process"; brought back, it is parked with
every sample, "levels, no verdict", so a high level grown more frequent stays visible. The alone
keys are never judged on their own. GPU-time rows and counts are unchanged; no ceiling moves.
Verified: python3 test_matrix.py and test_results.py (potluck job named in the landing).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
The rung-1 A/B of the compute harness on the Iris Xe (ms01, Mesa's ANV; job 51485: base 6ddf59304d
against the biased form fad6e01c28, --runtime new --runs 100, two rounds of each arm) measured
image_filter +7.56% (1139.3 -> 1225.4 us, base rounds 0.2% apart), alu +14.02% and long_4cb
+14.35% (both the fma_chains kernel, base rounds 0.0% apart), zero_products -17.95% and
vote_loop -8.90%; the median +0.03%. INTEL_DEBUG=cs of binomial3x3 (image_filter): SIMD16 both,
268 instructions (base) against 261 (biased), the same 12 sends, 10 asr gone and the add count
equal (69): on Gen12 the bias is no extra instruction, so the UHD 630 sentence's cause (one more
add) is stated as inferred for Gen9 only, and Gen12's times stand on their own line, cause not
stated.
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.
The getters a state rt makes can answer (the planner's ruling).
supportIndirectCommandBuffers is false on every state rt makes, compute and
render: a descriptor that asks for indirect command buffers is refused at the
making (Gap::IndirectCommandBuffers). A compute state's
requiredThreadsPerThreadgroup is its descriptor's size, [0, 0, 0] where it set
none, as Metal answers in the M3 recordings pipeline-facts-compute-plain and
pipeline-facts-compute-described (Apple M3 Max, macOS 27.0.1): kept in the
content's Answers, whose key already holds the size. rt makes no tile render
state, so the two tile getters are not added.
state_answers asserts both on block_scan and sample_down without a size and on
block_scan at 256 (its harness size), and the render state's false. README and
the API signature table updated. Verified: build and device legs follow.
79ca4826ba's device test failed at the state's making on every GPU (legs
m3-max-51395, 51397, 51398): "the translator made no pipeline: unsupported:
IdentityDomains; needs NotImplemented". Under the identity domains, rt's,
lower::select's identity_admits admits only the push fields it lists, and
PushField::AlphaTestReference was not among them; so alpha-test states were
refused by the translator before rt's draws() mapping (which also refused
them) was reached. The read before 79ca4826ba named only draws(); both
refused at the making, so nothing drew wrong.
identity_admits now admits the field: a fragment function under the private
alpha test reads the encoder's reference code from the push window, which rt
fills (FieldValue::AlphaTestReference). Only the identity domains read this
list; the old runtime's binder already fills the field. SEMANTICS_VERSION
2186 -> 2187: a refusal becomes a module under an unchanged key.
79ca4826ba also moved the validation crate's runtime sources hash: it made
bind::alpha_test_code public and documented it (bind/graphics.rs, bind/mod.rs),
which changes no run's behaviour, so the hash alone moves, to
b7be4e58fa981d0d49c20688074a720f6aea24df67a5035ae3e3cadefac5b317 (computed by
the build script's rule over the same 612 inputs; the rule reproduces the
committed 476509a9... at 7c982be9e6). Verified by the next build (the runtime
guard test among its steps) and device legs.
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.
Metal's answers (an Apple M3 Max, macOS 27.0.1, job m3-max-51288, record and
times in one job): every word stays as it was in both passes, the pass with no
mode and the pass with Disabled at both words, under Reset (0xaa bytes) and
under Accumulate ([100, 7]), as the lane table in cases/visibility.rs states.
docs/CONFORMANCE-COVERAGE.md regenerated.
The two tessellation streams' render passes set a visibility result buffer and
enable no mode; rt skipped every such encoder (Unheld(visibilityResultBuffer)).
On an Apple M3 Max (macOS 27.0.1, job m3-max-51220) a pass with the buffer and
no mode leaves the buffer's bytes as they were under Reset and under Accumulate,
so the planner's minimal form is exact and carries no note.
- RenderPassDescriptor.visibility_result_buffer: checked for its device
(Refusal::OtherDevice) and kept by the command buffer until it retires, as
Metal's pass holds it. It declares no access and joins no hazard set: no
command of the pass reaches it.
- RenderCommandEncoder::set_visibility_result_mode: Disabled at any offset is a
no-op; Boolean and Counting are Gap::Draw of the new DrawKind::VisibilityResults.
- visibilityResultType is not a field: it decides only what an enabled mode
writes.
- Device test: the pass draws, the buffer's gauge holds after the test's handle
is gone and falls once the command buffer retires, its bytes are unchanged,
and the pass takes the submissions, barriers and passes of one without it.
- Conformance: the rt side passes the buffer and the mode; new cases
visibility-disabled-reset and visibility-disabled-accumulate (no mode in one
pass, Disabled at both words in the next); recordings follow from the M3.
- Player: setPass's visibilityResultBuffer goes into the new field (a skipped
buffer still marks the pass unheld).
- rt README, api_signatures and docs/REFUSALS.md regenerated.
Verified: cargo fmt only so far; builds, clippy and device legs follow as
potluck jobs.
Development's Texture::replace_region takes HostBytes since 50e6b0fcf5; the surface form's CPU
write passed a slice (E0308, identity's build 51328 of the surface form on development). The
slice goes in as the runtime's host bytes, as development's other callers pass it.
Verified: to be built by the check job on development's base.