The planner allows two reasons for the rt ledger's refusal rows, provided they are the ledger's own
vocabulary and not text typed per row:
- `refused: not built yet (<lane>)`: a feature the streams use that a lane is building (multisample,
depth attachments, tessellation, ICB pipeline states, points, the identity refusals). The lane is
named on the row, and the landing that builds the feature deletes it.
- `refused: no stream uses it yet (<census run>)`: a call that replay's census found no stream
using. The row names the census run. The day a census finds a use, the reason becomes "not
built yet" with a lane.
known_gaps::Reason holds them. A row states one at the head of its waiting-on field.
KnownGap::reason reads it, and parse refuses a head that names the vocabulary without its lane or
census run. Every other row's reason stays its own words. known_gaps::open_work counts the rows by
lane and by census run, and `conformance replay` prints that line on every run, green or red:
the not-built-yet count is the cutover's remaining work, and it must be zero at the cutover.
Test: the_ledger_s_typed_reasons_parse_and_count. Both reasons parse with their names, a row in
words stays words, the count line sums by name, and a head without its name, or with an empty one,
is refused.
Two changes toward a ledger-clean whole-set replay of the rt side.
- compute_pass, ported (rt_side/compute.rs). It runs one encoder of the case's steps on rt's
ComputeCommandEncoder, then commits and waits as the render work does. The range setters set
their slots one by one, which is what Metal's range calls do. Both barrier forms are rt's one
memory_barrier, and useResources is a loop of useResource. The steps rt has no call for answer
Unavailable with their Metal call and the pass goes on: the attribute-stride setters,
setStageInRegion, the LOD-clamped samplers, and useHeap(s). The encoder's dispatchType answers
TheConsumers, as the command-buffer facts do: rt takes it as the encoder's argument and keeps no
getter. Before this, vector-word-phases-{0,4,8,12} and buffer-bind-off-alignment, among 13
cases, were refused at compute_pass.
- A translator refusal that names capabilities read as the venue's lack (lacks-feature) even where
the device offers them. On lavapipe, "the venue lacks SampleRateShading" was printed with
sampleRateShading = true. The rt side now reads what the physical device offers
(DeviceDescription::query at the floor's version, once, when the device opens). A refusal is the
venue's lack only where the device offers none of its alternatives. Otherwise the capability is
one rt's floor leaves off, a typed refusal of the runtime's, and the case reads as refused. That
is 130 cases on lavapipe, which the ledger then has to name: SampleRateShading 72,
FramebufferFetch 45, StageStoresAndAtomics 6, StencilExport 2, AlphaToOne 2, one each of the
rest.
Test: a_refusal_of_what_the_device_offers_is_the_runtime_s (rt_side::offers_one): an alternative
offered whole makes the refusal the runtime's; one offered in part, one not offered, and a refusal
naming no alternative do not. The whole-set run is the check job named in the report to main.
The new runtime's backend skipped m2v.copyToGuestRam and counted it, so
every play's verdict ended at the first one (u2 frame 97, u3 frame 99),
though nothing in a play reads that RAM. The planner ruled it does not
end the played range, and that work the recording host did live plays
as the runtime's, cost included.
It now plays as the old backend's does: each run copied by the blit
encoder, in its order, into a Shared place of the play's own that
nothing reads, each run widened to the whole words it touches within
the buffer (a buffer copy takes whole 4-byte words). The place is given
back at the command buffer's commit, as a copy from the guest's RAM
gives back its staging. The report counts the bytes
(copied_back_guest_ram_bytes); skipped_guest_ram_reads is gone.
Verified: see the check job (a new rt_replay device test: nothing
skipped, the widened bytes counted, the buffer's bytes kept).
tests::cache::a_torn_or_missing_state_is_rebuilt_from_the_generations failed in the matrix round
at 795c834ded (lavapipe leg, m3-max-48283: "rebuilt from one listing", left 0, right 1) and
passed alone there 3 of 3 (m3-max-48401). The cause is the test helper, not the store and not
the range 140714ceae..795c834ded: Store::settle waited only for `removing` to clear, which the
removal thread does before its last look for a dead generation. That look reads the state
(Store::dead calls Store::current) and rebuilds one that does not check. Under the leg's load
the thread of the test's first store made that look after the test had torn the state for its
reopen, so it rebuilt the state itself and the reopened store found it whole and listed nothing.
settle now joins the removal thread (Store::join_removal), as its doc says it waits for the
thread to end. A test-only pause before the last look (LAST_LOOK_PAUSE) makes the race
deterministic: a_settled_stores_removal_reads_the_state_no_more tears the state after settle and
checks that nothing listed or wrote it 400 ms later, with the last look 200 ms behind.
Verified (m3-max-48462, msi, at the fix's tree): rt clippy --all-targets --all-features clean;
the 18 tests::cache tests pass; under 48 busy loops on 24 CPUs both state tests pass 10 of 10
rounds. Control, the old settle with the new test: it fails 7 of 7 runs (listings 2, wanted 1),
6 of them under load.
465d885136 linked the module doc of gpu::wait to its pub(crate) module
new_runtime, which rustdoc refuses under -D warnings
(private_intra_doc_links). The layout3 check (m3-max-48378, at 4d20e9ad51)
showed DOC=101 at crates/metal2vulkan-validation/src/gpu/wait.rs:22. The name
stays as code text. The paragraph is rewrapped to 100 columns.
Docs only; Rustdoc runs on development's next check.
The planner ruled the cost of NVIDIA's host-visible allocation for a Shared take a known gap: a
Shared allocation stays the driver's own memory on every device. The known gap of memory blocks
now carries the figures it ruled on.
- 64 MiB, job 48212, on um870's RTX 3090 with NVIDIA 620.70.06 and rt at 140714ceae plus a probe
(12 rounds in each of two passes, medians): vkAllocateMemory of the Shared type (4: host-visible,
coherent, cached) takes about 12.5 ms, 12.2 to 12.7 ms without a device address and 12.4 to
12.6 ms with one. rt's zeroing through the mapping takes 2.75 ms. The old runtime's form takes
about 5.8 ms: an mmap, an import of 5.4 ms and a first touch of 0.39 ms. Types 0 and 3 take 12 to
17 ms. Types 1 and 2 (device-local) take 1.6 to 2.2 ms, and type 5 (device-local, host-visible)
1.4 to 1.7 ms. Type 5's heap is 246 MiB.
- The import against the allocation, jobs 48317 (3090) and 48319 (2080), the same driver, a
stand-alone program, medians of 12 trials in two runs: at 16, 64 and 256 MiB the allocation takes
1.86 to 2.86 times as long as importing the same number of fresh pages by host pointer, so the
import takes 0.35 to 0.54 times as long.
- The stream, jobs 48340 and 48408, on um790's RTX 2080 with the same driver and the replay
player at c810d2a3df plus a probe of each Shared block take: a recorded stream to frame 1137 (its
valid range), 1138 frames. 304 Shared takes of 9525.9 MiB cost 926.64 and 903.12 ms of
consumer allocation in the two plays, which took 115 and 111 s. The takes are 6.0 to 8.3% of
three loading frames: 1137 (269 to 301 ms of 3.60 to 3.64 s), 1117 (103 to 111 ms of 1.32 to
1.38 s) and 1130 (180 ms of 2.96 to 2.99 s). The second play printed every frame with a take:
every other one is at most 1.7%, frame 303's 6.6 ms of 397 ms.
The line replaces no text. The rates per MiB above it are from earlier measurements and stay.
0dfdaabde5 declared pixel-sampler-scaling on the three render-then-sample rows and on
kernel-writes-then-fragment-samples. The two families' own tests state each row's declarations
exactly, and they failed in R1 (job 48234): render_chains'
every_allowance_is_a_notice_declaration_chosen_from_the_rows_shape and compute_render_chains'
no_row_loosens_a_value. They now want the declaration: render_chains on every row, and
compute_render_chains on the KernelToFragment row alone.
Verified: the two failures and their messages, from R1's conformance tests (1051 of 1053 passed).
The rerun is the next check job.
The rt side's whole-set run on lavapipe with its render pipeline states' notes announced (job
48153, msi) asked for four changes:
- Six render cases declare pixel-sampler-scaling (`replay::pixel_sampler_scaling_notice`):
render-then-sample-exact, -magnified-nearest and -magnified-linear, multi-draw-state-changes,
frame-length-chain, and kernel-writes-then-fragment-samples (the compute-render row whose
fragment function samples; the other two rows of that family announce no such note). Each
diverged at the notices site alone for that undeclared note. magnified-linear also diverged at
the texels the old ledger lists. That is the same note the eight compute cases declare: rt's
pipelines record it for every sample through a runtime sampler slot.
- Two device-answer rows (rule 1), now that their notes are announced:
- a2c-on-1-alpha-50's texel: lavapipe's alpha-to-coverage at one sample, `device-alpha-coverage`;
- render-then-sample-magnified-linear's texels: one code from a linear magnified sample,
`device-sampling` and `device-color-conversion`.
- Not-documented rows, each quoting the sentences of Metal's documentation it rests on:
- pass-bound-clear-reach's four Clear cells. `MTLLoadActionClear` writes "every pixel in the
attachment", and `renderTargetWidth` and `renderTargetHeight` "constrain the render target
to" the area. Metal's tile-rounded clear past the area is documented nowhere; ours is Vulkan's
render-area clear.
- pass-sequence-color-actions' four DontCare cells. `MTLStoreActionDontCare`: "replacing them
with arbitrary data", and "you can't rely on that behavior".
- half-texel-nans' `read` rows now answer as each format's nearest-sample does, where the earlier
run answered as read-through-sample. rg11b10f's `read` site diverges now too. This is lavapipe's
NaN answered per descriptor, with the texture at another element of set 1's array. The rows hold
this run's answers and say that the site has given both. The five formats other than R16Float
say "the same pattern, not dumped": only R16Float's modules were read from Mesa's SPIR-V dump.
Verified: the answers, sites and counts are copied from that run's suggested rows. The change's
own whole-set run is the check job named in the report to main.
command-buffer-facts' queue label and its command buffer's device and commandQueue are the
consumer's: rt holds none of them and leaves them to its consumer. Their three rows say so, as
not a gap. The resource-state encoder is a typed refusal like the sparse family's. Its row waits
on a replay stream that uses one. indirect-private-type-getters' refusal waits on the side's
indirect command buffers. All five rows hold on every venue.
Verified: the five rows are the ones the slice run at the parent's change printed as unlisted,
copied field for field.
The side announced the precision notes of the compute pipelines a case dispatched alone, so a
render case's notes (rt's RenderPipelineState::precision_notes) never reached its notices site
and a draw's device answer read as unjustified. A pass that encodes adds the states its steps set;
announced() answers both sets' codes, once.
Verified by the next whole-set run.
The rt side now makes render targets and render pipeline states. A pipeline state takes the
descriptor the old runtime's side states, except the label, which the runtime takes nowhere. The
side also makes depth and stencil states, writes a texture's level 0, and runs one command buffer
of passes, texture read-backs, buffer copies and dispatches.
A pass field with no counterpart in the runtime's descriptor answers Unavailable with the Metal
name and ends that piece: a depth plane, a resolve, store action options, a visibility buffer,
sample positions, a render target array length. So does a step the encoder has no call for. A
range setter sets its slots one at a time.
Verified (msi, lavapipe, at the change before the rebase onto development): clippy, Rustdoc and
the suite's 1053 tests pass. On the whole set, the run answered 23 exact, 12 announced, 79
divergent, 130 lacks-feature, 4 never-returned and 1036 refused. Before the port it answered 5
exact, 3 announced, 55 divergent and 1217 refused. topology-class-plain-function is exact.
Two legs of eleven passed and every red was known, so the reds were no longer read. The report
(`matrix run` and `matrix show`) now ends with one table: every harness row over its limit on every
leg (results.over_rows, the rows harness_budget fails or names as its card's variance), with its
kind (GPU time, host time, or count for the instructions gate), its ratio and limit, the frozen
arm's verdict (VOID, stands, rebased, no base) and its status. The status comes from
scripts/matrix/status.tsv, one typed entry per card and row (a `*` in the row matches any run):
an open record with its owner and first round, whose age the table counts in rounds; a known gap
with the place it was ruled; or a note alone. A row with neither reads NEW in the first round it
is over (not over in its leg's base) and UNOWNED after; a CARD_VARIANCE row reads as its card's
known gap. The table changes no verdict: the red rule waits for the planner's ruling.
Seeded from the rulings so far: NVIDIA create_64MiB/first_take, a known gap (the 2080 and the
3090); create_64MiB on AMD, a note that it is no known gap and is unjudged until the first
interleaved round; the Iris Xe's GPU-time rows, a note of one time-boxed investigation after that
round; the Iris row_cells, identity's open record (first over at 795c834ded); the 2080 and Iris
frame_5cb, core's open records (from 140714ceae), and both cards' frame and frame_5cb, the
planner's state of throughput and latency from idle.
Verified: test_results (three new tests: the stored table reads and a malformed entry is refused;
every row past its limit is listed with its kind and judged ratio, re-timed and shown rows
included; statuses NEW, UNOWNED, open with its age, gap, notes, an extra leg and the card's
variance). Against the stored notes of 795c834ded and 140714ceae, over_rows lists exactly the rows
the budget named past their limits on every leg (15 and 14 on the Iris Xe).
The noise meter read the old runtime's move between two rounds as noise even where the harness or
the old runtime changed between them (ff4ce943c2 gave every workload command buffer a scheduled
and a completed handler, on both arms). Now the matrix compares the trees of
crates/metal2vulkan-harness and crates/metal2vulkan-runtime at the leg's commit and its base's,
a mechanical check: where either differs, every row but the creation rows reads `rebased` and
voids nothing, the creation rows timing creation calls and no command buffer of the harness's.
Each leg's note now keeps its timing shape (HARNESS_SHAPE, "one process, new then old"): against a
base timed in another shape, no row is compared, so the first round of the interleaved shape is
the base the meter starts from.
Verified: test_results (the void rule's test covers both rebases, the column and the void list);
`matrix show 140714ceae` against 99ec109264, whose harness and old runtime trees differ, reads
every command-buffer row rebased and voids only creation rows (Iris: create_private_16MiB's three
and create_render_state/device_first).
The creation rows ran in five processes per runtime, all of the old runtime's before the new
runtime's, so a node or clock that moved between them moved one runtime's samples alone, an order
effect. Each of the five processes now times both runtimes, `--runtime new,old --only
'create_*'`, on its own fresh driver cache and store: a creation's first sample on the new runtime
is cold, and the old runtime's follows it on the same cache. FIRST_KEEP takes each sample's
runtime from its line. The median of five per runtime and every row, ceiling and floor stay.
Verified: test_matrix's harness-run test (five `new,old` creation processes, both runtimes'
samples kept once each) and test_results' creation test (FIRST_KEEP keeps the old runtime's
sample beside the new's and drops a GPU line); the Linux and Windows job scripts pass `bash -n`.
Two cards showed the noise the old runtime's frozen arm measures: the Iris Xe's frame moved 2.8x
between rounds, the UHD 630's about 2x between passes of one process. The leg timed each
runtime in a process of its own, one after the other, so a clock or a co-runner that moved
between them moved one runtime's times and not the other's. Now one process times both,
`harness --runtime new,old`: each workload runs on the new runtime, then on the old, so their
passes alternate on the GPU and the node as they are at that moment. The new runtime runs first
in each workload, so its first uses, the judged cold ones, compile before the old runtime's of the
same workload, as cold as in a process of its own. The process is the leg's one suite, `harness`;
a failure still names its runtime (`M2V-FAILED harness-<runtime>/<row>`). The creation rows keep
their five fresh processes per runtime, now alternating old and new; rows over their limits are
re-timed alone as before. No row, ceiling or floor changes, and the deterministic records are
untouched. The frozen arm's column (FROZEN_DRIFT) stays the check on it.
Verified: test_matrix's new test runs the leg's timing script against a stand-in harness: one
`new,old` process, the new runtime's warm run, the creation processes alternating, one suite whose
records hold both runtimes' rows once each. The Linux and Windows job scripts render and pass
`bash -n`.
The test of a texture over a buffer in place made its plain texture, the other side of its texture
to texture copies, with shader-read usage and no index. rt refuses that ("a texture shaders read or
write takes an index, and none was given"), so on every device the test panicked before it
recorded any command: lavapipe under the layer (job 48345), and the iris, 3090 (both), RX 550,
780M, 2080, XTX and KosmicKrisp legs (48347 to 48359, 48346). The test of the same in-place
texture's sentinels passed on each of them.
It now grants two texture indices and gives the plain texture the second.
The old runtime takes regression fixes only, so its time of a harness row moves between rounds
with the node, the driver and the harness, not with the change under test. Each leg now compares,
per row, the old runtime's time the row is judged on (its GPU p50 where gpu_judged, the median of
the five processes for a creation row's first sample, else its time) with the same time in the
leg's base, the previous round. Past FROZEN_DRIFT (10%) either way, harness_budget names the row
VOID and judges nothing from it: its comparison comes from a re-time in one process with both
runtimes interleaved. The report (run and show) shows the move on every row the base has, and a
line per leg naming the void rows; show computes it from the notes, so a round already noted is
read with it.
Verified: test_results (47 tests, a new one for the void rule, the GPU and median-of-five forms,
no base, and the column). `matrix show 140714ceae` against its base 99ec109264 voids Iris frame
(-64.7%) and frame_5cb (-28.9%), and keeps UHD frame_5cb (+8.8%) and 2080 frame_5cb (+1.2%).
The planner's ruling on the bound of a texture over a buffer in place is the texels. The ruling
rests on Vulkan 12.11 (Memory Aliasing). Two host-accessible aliases interpret their bytes alike,
and data written to one can be read by the other; the paragraph on bytes made undefined applies
only otherwise. rt keeps the image in the general layout through every use (the parent commit),
and the block's buffer is always host-accessible. So a write through the image touches its texels'
locations (its VkSubresourceLayout) and nothing else, even where the advertised range runs past
them. lavapipe's height is rounded up to 4 rows; on other drivers the bound range runs past the
rows. This test holds the claim itself on every device.
tests::over_aliases, under a device cfg, uses a BGRA8Unorm 1,000 by 3 texture, read and rendered
to where the linear tiling takes that in place (else read only, printed). Every byte of a span
holds a sentinel except the texels: the row remainders, the rows past the height, the tail and a
next buffer. The span covers the image's advertised and bound ranges, whose ends each run prints.
Each of the following leaves every sentinel and gives the texels the write says:
- a clear by the load action;
- a draw covering the target;
- a blit copy into it;
- a fill of the buffer over exactly the texels, read back through the image;
- a fill of a row remainder, after which the image's texels are unchanged;
- a kernel's writes through an RGBA8Unorm texture with storage over the same bytes.
The textures stay in place, and over_copies does not move. The places are:
- (a) rows of a taller surface at the device's pitch, from a row whose place meets the memory
alignment;
- (b) a texture ending at its buffer's last texel, with a Shared buffer at the next 4 KiB after
it.
Over (a)'s surface, a window at twice the pitch (a stream's window shape, wider than its row) is
copied, its copies are counted, and its blit leaves the same sentinels. Where llvm-as is missing,
the draw and the kernel are skipped, visibly.
On lavapipe the claim is the sentinels unchanged. A read and write back of unchanged bytes by the
rasterizer's 4-row blocks is not excluded by this test.
Checked by the device test legs under the validation layer (lavapipe, then the UHD 630 on Windows,
then every GPU and the M3).
A blit copy moved every texture's image from its home layout to TRANSFER_SRC_OPTIMAL or
TRANSFER_DST_OPTIMAL and back. That covers copy_from_texture and the copies between buffers and
textures in blit.rs, and the staging copies in texture.rs, through away and back. A texture over a
buffer in place was moved too, although its home is GENERAL. While the image sits in a transfer
layout it is not host-accessible (Vulkan 12.11, Memory Aliasing). By the same section, a write
through the buffer alias to any byte of its advertised range then makes the image's subresource
undefined, and a copy into it puts its whole advertised range at stake. Naming GENERAL keeps both
aliases host-accessible at every moment, and that is what makes them consistent: data written to
one can be read by the other, and no other byte becomes undefined.
How:
- Image::copy_layout answers home (general) for an image made preinitialized, which is a texture
over a buffer in place and nothing else, and the role's transfer layout for every other image.
- away and back name that layout and keep their scopes, so for the image in place the old layout
equals the new one.
- The copy commands (vkCmdCopyImage, vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer, in
blit.rs and in texture.rs's staging copies) name it as their image layout.
- Every other image keeps its transfer layouts.
The test, tests::layouts (device cfgs only), records the layouts a device's commands name, for a
device made while the test has set it:
- rt's own copies of the core commands it calls that name a layout (barriers, copies between
images and buffers, colour clears, dynamic rendering's attachments, descriptor writes) note them
and call the driver's;
- the core commands that name a layout and that rt does not call are left unloaded, so a call of
one panics.
In one command buffer, the test runs over a texture in place every blit entry that takes a
texture: to and from another texture, to and from a buffer, and a fill of its buffer. Where the
device takes a render target in place, a pass that clears the texture as an attachment follows.
Then it reads the image back. It asserts that every layout named for the image is GENERAL, except
the move home's old layout (PREINITIALIZED, once), and that every kind of command named the image.
Without the fix the copies name TRANSFER_*_OPTIMAL, and the test fails.
README: the in-place paragraph states the basis. The image is kept in the general layout through
every use, copies included, so both aliases stay host-accessible and a write through the image
touches only its texels' bytes.
Checked by the rt check (clippy in every configuration, the suites, rustdoc), by the device test
legs under the validation layer (lavapipe, then the UHD 630 on Windows, then every GPU and the M3),
and by a negative control: the test built with the product change reverted.
The rounding commit was written before the aside and the two-copy Managed GPU copies took places;
they passed no granule and did not compile. The aside is the play's own (no recorded slack), a GPU
copy takes its buffer's recorded granule. Check follows.
The backend packed buffers first fit at Metal's 256-byte alignment, so a program's write past
a buffer's end landed in the next buffer. A recorded stream's program did that: an append
list of 4000 records took about 870 more on one play, and the overrun went 17340 bytes into
twelve 4-byte counters and the start of a 48000-byte buffer that the player had packed behind
it. The recording had given each of those buffers its own 32 KiB-granular range, so the same
overrun landed in the list's own slack there. The clobbered counters then feed the next
rounds; a 780M page fault past a 64 MB buffer and a hang on a 3090 follow them (expected, the proof plays pending).
Each buffer's place now spans its length rounded up to its recorded granule: the largest
power of two that divides its recorded gpuAddress, from 256 bytes to 64 KiB, and 256 bytes
where the stream records no address (the player's own staging included). Both copies of a
two-copy Managed buffer take it. A buffer past the class's block length takes a block of its
own of the rounded span. The backend's new "places by recorded granule" line counts the
places by granule and gives the most bytes of slack held at once.
Test: rt_replay's buffers_keep_the_slack_of_their_recorded_granule plays two 4-byte buffers
recorded at addresses of 32 KiB and 64 KiB granules and reads back their relocated addresses
from a third: they lie apart by at least the lower one's granule (256 bytes apart before).
docs/REPLAY-STREAM.md says how the backend places buffers.
On the RTX 2080's broad device suite (job 48082) two tests failed only beside the parallel suite:
- a_compositor_beside_a_queue_waiting_on_the_gpu_for_long_work_keeps_its_latency: p99 9.92 ms
with 91 stalls. The device took its least plan of 3 VkQueues after the driver refused 18 under
the parallel load;
- an_unshared_head_behind_an_earlier_commit_of_the_held_queue_holds_nothing: "held for
isolation 0".
Both are timing tests like the two isolation tests that already run alone. Each holds a bound of
the GPU's time, which other test processes' work spends too.
Run alone, each test passed 3 times in every job:
- 2080: job 48237;
- 3090 on ms01: job 48236;
- 3090 on um870 (the gpu-wait test): job 48259.
In those runs the gpu-wait test's p99 was 1.84 to 2.70 ms with 0 stalls, and the held-head test
printed "held for isolation 2, behind an earlier commit 2". Both now join the override that runs
queue_share_device's isolation tests alone.
The doc of every_case_of_buffers_alone_runs_from_a_command_as_its_dispatch now states it in so
many words: a run whose command buffer fails as Metal's timeout (GpuHang) is hung, whatever the
other run gave, never agreement and never a refusal, and that fails the shard.
Doc comment only.
A case whose command buffer runs past Metal's bound fails as Metal's timeout: the old runtime's
watchdog (20.2 s of wall time with the queue not advancing) fails it with
CommandBufferError::GpuHang. The census counted any two failures as "refused alike", so a case
whose two forms both hung passed without ever running: on lavapipe the longest case, a division
of every pair of half values, hung in both forms in the lavapipe legs of 8a39262627 (job 45876)
and e632e01478 (47186), and the shard passed. In 140714ceae's leg (48145) its dispatch completed
in 18.6 s and its command hung at 20.35 s, 8.6 s of it waiting for a CPU, and the shard failed.
1. Classification. unfinished() decides how two runs stand where one did not complete, a hang on
either form first: Unfinished::Hung, its own list, which fails the shard with both forms'
clocks. A hang is never agreement and never a refusal. The test
a_hang_on_either_form_is_hung_and_never_refused_alike holds it without a device.
2. Fewer neighbours. The 64 shards run alone (.config/nextest.toml, threads-required =
num-test-threads), so the case's work has the host's CPUs against the watchdog. Alone, at
051236c0c2 (job 48258, msi-laptop, 24 CPUs, LP_NUM_THREADS=1), the case took 7.4 to 8.9 s in
each form, with and without the validation layer (4 runs), 0.4 s at most of it waiting for a
CPU: 11.3 s inside the 20.2 s bound. The census serialized costs about 325 s of the leg.
The old runtime is untouched.
a_copy_back_splices_by_the_device_s_check makes its buffer over dma-bufs (over_dma_bufs, which
asserts the buffer lies over them), so where the device's types refuse a Shared dma-buf import it
fails the same way the other two shadow write-back tests did before their guard. It was hidden in
47947 and 47957 behind the 30 failures shown. The guard returns before the device's check runs,
on the check's own device.
Verified: cargo fmt; the 2080's full log (48082) shows this failure at shadow_write_lines.rs:339
with "the buffer lies over dma-bufs". Compiled and run by the next check and the NVIDIA legs.
The Shared-refusal guard sat in dma_buf_shared_files::on_device, so every test of that device
skipped on NVIDIA, including four that import nothing a Shared refusal stops and passed on both
NVIDIA cards with the refusal in place (47947, 47957): private_storage_is_refused,
one_piece_off_the_granule_binds_a_plain_buffer_at_its_offset, two_pieces_off_the_granule_are_refused
and a_piece_off_the_request_s_alignment_is_refused. The guard moves to a new `importing` helper,
which the ten tests that import a Shared dma-buf call; the four keep `on_device` and run on every
device again.
Verified: cargo fmt. Compiled and run by the next check and the NVIDIA legs.
The rt player waited on command buffers with the runtime's own
wait_until_completed, which has no bound, and its wait record named the
waitUntilCompleted selector as a literal: the bounded-wait test
(gpu::tests::device_waits_exist_only_in_the_bounded_wait_module) failed
on it.
gpu::wait gains new_runtime: a command buffer's Retired flag, set by its
completed handler, and wait_until_retired, which sends the command
buffer (the queue's send_now, as the runtime's own host wait does) and
waits on the flag for at most the process's bound. Past it the hang is
recorded and the process ends with the hang exit code, as every bounded
wait does. How the command buffer ended stays the caller's to read, so
the player reads its error into the verdict as before, and a device
fault writes no tripwire (the old player's path writes one).
The player keeps each in-flight commit's queue with its flag; both of
its waits (an index's owed commits, and a command buffer the player
drains) go through it. NewRuntime::new takes the device's kind, which
names the waits' backend.
Verified: see the check job (clippy in both configurations, the replay
and gpu unit tests, the rt_replay device tests on lavapipe).
identity's group 4 (SEMANTICS_VERSION 2182, ARTIFACT_FORMAT_VERSION 537)
changed the product fingerprint. The census re-blessed at development
795c834ded (job m3-max-48278, census-exit=0) changes only the artifacts_at
line's product fingerprint. No row's outcome changed.
They are generated from the whole case set, and the set grew on `development`
while this branch was in flight, so the copy committed here counted a smaller
one.
Verified: regenerating at this tip leaves no change beyond the `Generated at`
stamp.
Take a kernel whose only partition observations are lockstep pairs that are apart wherever each
SIMD group lies within one row. It ran every dispatch at its own threadgroup size with the
order's barriers, one VkPipeline per size, though in a threadgroup whose SIMD groups each lie
within one row those barriers order nothing.
Where an observing kernel holds no threadgroup memory (which every variant of it would observe
the partition through) and its plain module runs a lockstep barrier where each SIMD group lies
within one row (CompiledFunction::runs_lockstep_barriers_in_rows), the state now asks the
translator whether its one-row variant of partial threadgroups (LoweringInputs::one_row)
observes the partition. A kernel whose lockstep barriers all order pairs that meet only across
rows is not asked: its own module runs them only where its size lets a SIMD group span two rows,
a test the driver folds, so the variant would leave out nothing more, and its modules and
pipelines are what they were. The translator answers that the variant observes the partition
for any observation besides the order's own barriers: a barrier of the kernel's own (where a
thread may read what another row's thread stored before it), a fence or atomic of threadgroup or
SIMD-group scope, a SIMD-group or quad function, or a builtin of the partition. Such a kernel
keeps its own size.
Where the variant does not observe it, the variant is lowered with the state (or read from the
cache directory, its refusal kept like a lowering), and its tile VkPipeline is made with it. A
direct dispatch whose threadgroups keep each SIMD group within one row runs that module in
tiles, as a kernel that does not observe its partition runs. That means no threadgroup of more
than one row, or every threadgroup's rows a multiple of 32 threads wide, the grid's edge
included (encoder::keeps_rows). Any other dispatch, and every indirect one, runs the plain module
at its own size, its order kept. The interface accepts RuntimeFact::OneRow, which the variant
states. The README states the form, the rule and the pipelines it makes.
Tests:
- choice tests of keeps_rows over one-row, whole-row, ragged and breaking shapes, and of the
choice with and without the module;
- every_device_makes_a_one_row_module_only_for_a_kernel_whose_lockstep_barriers_run_in_rows: the
harness fixture's lcg_step, whose one barrier orders only pairs across rows, has no one-row
module and makes no pipeline with its state, and runs 256 threads in 64 at its own size, a
pipeline by a first-use wait, every word the program's; the fixture's row_cells keeps its
module, its tiles' pipeline made with the state;
- every_device_runs_grids_in_rows_of_an_observing_kernel_on_its_one_row_tiles checks every
answer of the fixture's row_cells: in 32 x 2, 64 x 8, 512 x 1, 64 x 4 and 48 x 1 (the last
three ragged) on the one pipeline made with the state, no other made and no first-use wait;
and in 16 x 4 at its own size, one more pipeline by a first-use wait;
- every_device_keeps_a_kernel_that_reads_across_rows_after_a_barrier_at_its_own_size runs the
fixture's row_barrier. Its state makes no one-row module and no pipeline. It runs 512 x 4 in
32 x 2 on the plain module, and 512 x 3 in 32 x 2 and 96 x 5 in 32 x 4 on the partial variant,
each a pipeline by a first-use wait; the first of those two waits once more, for the variant's
lowering. Every word is Metal's: the probe row_barrier_reads.m ran
the same source over the same grids on the M3 Max under macOS 27.0.1, and none of the 1,536,
2,048 and 480 words differed from the formula the test checks (jobs 47871, 47948).
Verified:
- Check 48214 (msi) at this series' tip on development 50719da96b: the runtime's clippy (default,
--cfg m2v_gpu, --cfg m2v_cpu_icd) and Rustdoc are clean; the runtime's host suite
passes, and its device suite on lavapipe passes 275 tests (3 skipped), the three device tests
of this change among them.
- The harness's rows, arm A (development 4da77d8518 with a dispatch-time probe) against arm B
(A with this series), GPU p50 over six rounds of each:
- row_cells: 25,179 us -> 23,484 us on the UHD 630 (48181, B/A 0.933), 5,112 -> 5,094 on the
RX 550 (48021, 0.996), 1,096 -> 1,083 on the RTX 2080 (48022, 0.989); 3 pipelines made and 3
first-use waits in A, 1 pipeline (made with the state) and none in B, on each;
- every other of the 38 rows within 3% of A on the RX 550 and the 2080 (the largest frame,
6.3 -> 6.4 us, and draw_full 1.019), and the lcg_step rows and bind_2000 within 1% on the
UHD 630; lcg_step's rows make the same pipelines in both arms.
- Plays of a recorded stream to frame 1137, cold, A B then B A: pipelines made per play 645 -> 585
and first-use waits 277 -> 214, on the 780M (48223) and the 2080 (48217). Per-dispatch medians
of the row-indexed kernels, A -> B: 0001b9f3 12.14 -> 6.37 us and 99.85 -> 75.60 us on the 780M,
6.48 -> 6.30 and 18.80 -> 19.28 on the 2080; 08d86a3b 439.7 -> 435.4 (780M) and 86.13 -> 85.78
(2080); 65f87e88 4.11 -> 3.93 (780M) and 4.56 -> 5.01 (2080).
The harness fixture gains three kernels.
- row_cells, a measured workload: over a 2048 by 1024 grid, its width and height given and its
rows 2048 cells apart, each thread inside the width and height reads its word at
y * stride + x and writes three words at (y * width + x) * 3; the rest return first. It runs
in threadgroups of 32 by 2, 64 by 8 and 512 by 1, four dispatches of each, with a CPU
reference. The cells are int arithmetic past the bounds test, as the streams' row-indexed
kernels are written: Apple compiles that to steps that carry nsw, from which the lockstep order
proves two threads of one row apart, and the order's barriers stand in the block past the test,
so they are SIMD-group barriers (barrier.lockstep.simdgroup, emulated on lavapipe), the kind the
four such kernels of the streams hold, which run in one-row threadgroups.
- row_cells_uint, its control: the same in uint. Its steps carry no flags and may wrap, so the
order does not prove them apart in rows. The test
the_int_cells_kernel_is_apart_in_rows_and_its_uint_control_is_not holds both answers on
lavapipe's from_queries profile under the identity domains: each kernel observes its partition
through SIMD-group barriers alone, which run in rows, and with partial threadgroups; in its
one-row variant row_cells does not observe it while row_cells_uint still does.
- row_barrier: each thread stores its word, waits at threadgroup_barrier(mem_flags::mem_device),
and reads the word its column's thread in the other row of its pair (y ^ 1) stored. It holds
no threadgroup memory and observes its partition through the barrier. The new runtime's
device test runs it against Metal's reading, which the probe
metal2vulkan-conformance/probes/row_barrier_reads.m takes from the same source.
The companions are regenerated with scripts/regen-air-fixtures --dir harness (TOOLCHAIN records
the compiler, unchanged).
Verified:
- The companions were regenerated on the M3 Max under macOS 27.0.1 (job 47948), which also ran
the probe row_barrier_reads.m over the runtime test's grids.
- Check 48214 (msi) at this series' tip on development 50719da96b: the harness crate's clippy
(default and --cfg m2v_gpu) and Rustdoc are clean; the host suites pass but for 4
tests that all name engine/oor_texture_reads, development's fixture without its golden-table
and inventory rows (603634f9f9), which development's re-bless owns.
- The harness's rows ran on the RX 550 (48021), the RTX 2080 (48022) and the UHD 630 (48181), six
rounds of each arm, before and after the runtime's change.
LoweringInputs::one_row's lockstep order cleared the pairs that meet only where a SIMD group
spans two rows only where Lockstep::rows held, which needs maximal reconvergence on 32-lane
subgroups without the device's own lockstep: the old binder's condition for asking the variant.
On a device without that tier (lavapipe's 8-lane subgroups, the UHD 630 without the extension,
GCN's 64-lane waves) a one-row compile kept every barrier, though the clearing is exact there
too: in a threadgroup whose SIMD groups each lie within one row, those pairs never meet,
whatever runs the SIMD groups. The order now searches the pairs under the rows facts for every
one-row compile and clears them wherever every pair left wants a threadgroup barrier at most.
Lockstep::rows and RowLockstep keep their meaning, so Device::new's plans, and the old binder's
one-row compiles, which it asks only where rows holds, are unchanged.
CompiledFunction::runs_lockstep_barriers_in_rows (KernelFacts::lockstep_in_rows) says whether a
kernel's lockstep order inserted a barrier that runs where each SIMD group lies within one row:
any but the threadgroup barriers that order only pairs meeting across rows
(Lockstep::across_rows), which the module runs only where its local size lets a SIMD group span
two rows, a test the driver folds. Only where it holds can the one-row variant run fewer
barriers than the kernel's own module at a one-row size, so a runtime asks the variant only
there. It is decided from the plain compile's order and changes no module. docs/API.md states it;
the api_signatures table gains its row.
SEMANTICS_VERSION 2181 -> 2182: a one-row compile on a device without that tier changes. The old
runtime's render descriptor key is re-pinned under it (b3d05d42). ARTIFACT_FORMAT_VERSION 536 ->
537: KernelFacts gains lockstep_in_rows.
Test: a_one_row_variant_clears_the_pairs_apart_in_rows_without_a_32_lane_tier, on lavapipe's
from_queries profile under the identity domains. Three kernels, each with its stores in its entry
block and past a bounds test (six in all), keep lockstep barriers in their plain module and state
no RowLockstep:
- one storing the three words 3 cell + k of its cell y * stride + x in int arithmetic, as Apple
compiles it (nsw on every step, the index sign-extended);
- the same in uint arithmetic, whose steps carry no flags;
- one whose threads store at x and x + 1.
In the one-row variant the first has none. It states OneRow, takes no simd class, does not
observe its partition with partial threadgroups (the variant without one_row does), and runs its
grid in tiles. The other two keep their barriers: the wrapping index is not proved apart in
rows, and the neighbours meet within one row. Every plain module runs its lockstep barriers in
rows but the unguarded int cells kernel's, whose barriers all order pairs across rows.
Verified:
- Check 48214 (msi) at this series' tip on development 50719da96b: clippy with -D warnings of
metal2vulkan, metal2vulkan-rt and metal2vulkan-harness (default, --cfg m2v_gpu and, for the
runtime, --cfg m2v_cpu_icd) and their Rustdoc are clean; their host suites pass 3,863 of
3,867, and the 4 that fail all name engine/oor_texture_reads, a fixture development added
(603634f9f9) without its golden-table and inventory rows, whose re-bless development owns; the
runtime's device suite passes on lavapipe (275 run, 3 skipped).
- The translate probe (jobs 47932, 47952; lavapipe's from_queries profile and three device
profiles): lcg_step's plain and partial-threadgroups modules are byte-identical before and after
this change (SPIR-V 3226775232d06722, 649 words, and 991ee4501d037271, 1202 words), and
runs_lockstep_barriers_in_rows is false for it. The harness fixture's row_cells holds two
barrier.lockstep.simdgroup (barrier.lockstep.emulated.simdgroup on lavapipe), the kind the
streams' four row-indexed kernels hold; it runs them in rows, and its one-row variant holds none.
The oor_texture_reads fixture landed (8646e2d9c9, "companions follow";
603634f9f9) without its rows in the golden hash table, the engine inventory
and the air_input printouts. So the matrix round at 140714ceae (lavapipe leg,
job m3-max-48145) failed four tests:
- engine_fixtures_match_their_golden_printout (no oor_texture_reads.txt);
- inventory_lists_every_fixture_in_order (1268 listed against 1270 fixtures);
- golden_hashes_match_the_table (19 new cells);
- llvm_as::part_7_of_8 (one new row).
This commit only adds: two golden rows, one inventory row (ok on every
profile), and the fixture's printout. No existing row changes.
Verified: blessed on the M3 at development 051236c0c2 by bless-job.sh
(job m3-max-48256, inventory=0 golden=0 printouts=0); the patch removes no
line.
Beside the Shared/Private table: the host link's rate does not touch the
programs the replay streams come from. identity's census of the two
discrete-GPU recordings (r3 frames 1-1138, r4 whole): 0% of bound buffers
Shared, the rest Managed apart from 1.8-3% Private, and the top kernels'
buffers all Managed. The planner closed the Shared-on-discrete item with that
number and asked for this sentence.
Docs only.
u3 stopped at player frame 259: the placement of a sampler state at index 16 waited for commit
1614 (#20713), which rt held at Committed because it waits for event #35 to reach 309, which only
command buffer #20439 signals, encoded 20 records later. The program had released #10401 (index 16,
bound directly by #20713) and made #20822 with the same descriptor the next call; Metal gave it ID
16 again. Nothing changed for the work in flight, and the original run did not wait (it could not:
#20713's signal was not yet encoded).
- A sampler state whose recorded descriptor is the one placed last at its index takes the index
without waiting, counted on the indices line; the index stays owed for another sampler state.
- The player tells the backend, at each look for command buffers to wait for, the committed ones
no record played so far lets complete (Backend::held: their unmet event waits, or a held one
ahead on their queue). A placement owing its index to one of those stops with PlayError::Held
naming the chain, instead of waiting for ever.
- docs/REPLAY-STREAM.md says what record order does not promise (a committed buffer may wait on a
later record's signal) and what the indices line and the stop say.
Tests: a unit test of the equal rule in Indices; rt_replay device tests of our own sequence: an
equal sampler state at an index a held commit owes plays through without a wait; another
descriptor there stops with Held naming #6 and its unmet wait. Check follows.
The owner's order (relayed by the planner, Telegram message 1924): "Remove
unused lines from the rules." The eighth second form of rule 2, a small zero
image or the default sampler where a device lacks the null descriptor, is
unused: nullDescriptor is a floor feature (crates/metal2vulkan-rt/src/
floor.rs requires robustness2.null_descriptor), so no device above the floor
takes the zero-image form and no code holds it.
Verified: a grep of the tree's Markdown and Rust for another statement of
eight forms or of the zero-image form finds none outside AGENTS.md. The rules'
other named items (the attachment feedback loop's counted copy in
crate::over and the attachments' copies, the optional features in
floor::OPTIONAL, DevicePolicy, tests::fast_paths, docs/FAST-PATHS.md) exist.
A program may release a sampler state that a pending command buffer still binds and make an
equal one at its index: no Metal rule forbids it. The new state takes the same VkSamplers from
the device's table, and its placement displaced the old state and wrote every element of the
index again with the same handles. vkUpdateDescriptorSets on a pending set is allowed only for
descriptors no pending shader invocation uses, with no exception for an equal write, so the
placement updated descriptors the pending work reads.
Set 1 now keeps the sampler each sampler array's element holds at each index, as last written
(SAMPLERS x 3 handles, fixed), and write_samplers writes only the elements that change. A
handle kept there is a default or one the index's owner holds, so it is never a destroyed one.
The owner word still moves to the new state, so the displaced state's going touches nothing, as
before. A different sampler at an index that work in flight reads stays the program's duty; the
README says why an equal one is safe.
Metrics::sampler_element_writes counts the elements written. Test
every_device_writes_no_element_for_an_equal_sampler_at_an_index_work_reads: a command buffer
held at an event wait ahead of a dispatch that samples through SA; SA released and SB of the same
descriptor made at its index: no element written, the device-sampler gauge unchanged, and the
held work's result is the linear filter's once released; a nearest state at the index writes.
Without the comparison, SB's placement writes three elements and the first assertion fails.
Signatures table blessed (Metrics gains a field of a non-exhaustive struct).
rt's CommandBuffer::wait_until_completed returns a Result since its scheduled-handler and
own-thread refusals (ea8e7843b7, b70c5fb618), and waited_for dropped it, which is
unused_must_use: workspace clippy -D warnings failed on development at
crates/metal2vulkan-conformance/src/rt_side.rs:355 (job 48163, its only error). The waiting
thread now sends the status word after a wait that returned, as before, and the refusal's text
where the runtime refused the wait, so a refusal reads as what it is rather than as a status.
Verified: see the landing message's job (workspace clippy, the conformance suite, its rt replay
on lavapipe).
The render encoder has no use_heap: useHeap:stages: joins the README's list of what is not built
and so is not a method. Where a replay stream calls it (command-replay shapes counts a stream's
calls of each selector), it is built in the compute encoder's form: the command buffer keeps the
block, and no access is declared.
Docs only.
The floor now requires maxColorAttachments of at least 8, Metal's eight colour attachments
(MAX_COLOR_ATTACHMENTS, the render pass descriptor's slots). Vulkan 1.3 requires only 4: the
spec's Required Limits table (Table 76, vkspec 1.4.366) lists maxColorAttachments as "4 (Vulkan
Core) 7 (Vulkan Roadmap 2022) 8 (Vulkan Roadmap 2024, Vulkan 1.4)", min. A device below 8 is now
named below the floor at creation ("maxColorAttachments 7, below 8"), so a pass's colour
attachments, at most the descriptor's eight slots, never reach past the device's. The check in
pass.rs and its refusal, Limit::ColorAttachments, could no longer fire and are deleted.
Breaking, intended: the public variant metal2vulkan-rt::Limit::ColorAttachments { count, max } is
removed (api_signatures.tsv loses that one line, blessed). docs/REFUSALS.md is regenerated (the
new runtime's Limit goes from 10 to 9 variants). The README's limits table gains the row and the
Limits paragraph the spec's minimums; the render pass passage says a pass may use all eight.
The floor test's low-limit cases go from 16 to 17 with the maxColorAttachments case.
The own-thread test formatted `made.as_ref().map(drop)` (a Result<(), &Error>) through a
closure taking Result<(), Error>, which failed to compile under --cfg m2v_gpu (check 48115). It
formats the borrowed result directly now. The test gains one answer: in a completed handler,
wait_until_signaled_value(1, Duration::ZERO) for a value not reached is WaitOnOwnThread, not
false at its timeout: the thread that would observe the value is the one waiting, so a false
there would be the runtime's artefact. The refusal already applied to every timeout; the README
and the event's doc now say so.
The completion thread runs a device's completed handlers and listeners, and it is the thread
that marks a command buffer completed, an event's GPU value observed, and a queue's place free.
A wait there for any of those not yet done could only end by that thread's next step, so it hung
by construction. Each is now Refusal::WaitOnOwnThread, and a wait already met answers at once:
- wait_until_completed: Ok for a command buffer completed or ended, the handler's own among
them, else the refusal; nothing is sent.
- wait_until_scheduled: the refusal for one not yet scheduled.
- SharedEvent::wait_until_signaled_value: Ok(true) for a value reached, else the refusal.
- CommandQueue::command_buffer on a queue whose maximum count are made and not yet completed:
the refusal on the completion thread and on the submit thread (a scheduled handler), whose
next steps free the place.
The condition is the program's own state (what it committed, what has completed), never a
ring's fill. Outside a handler every wait answers as before.
Test: every_device_refuses_in_a_handler_each_wait_its_own_thread_would_have_to_end checks 15
answers in a scheduled handler, a completed handler and a listener. REFUSALS.md regenerated and
the signatures table blessed: Refusal gains WaitOnOwnThread (a new variant of a non-exhaustive
enum; no consumer breaks).
number_samplers released a state's constexpr samplers' elements only when hold_constexpr failed.
It returned early without releasing when a later constexpr sampler's device sampler was refused
(the translator's Err, or the caller's gap for a use with none). So the elements and device
samplers of the constexpr samplers numbered before it stayed held, with their indices, and no
state owned them.
Each sampler's uses now resolve in one function. Every refusal from them, or from the hold, takes
the single release path.
The new device test numbers two constexpr samplers, a linear one and the same state with a NaN
level bias. The second fails. The test asserts that the arrays' descriptor slots are back at
their count before the call, that the reaper frees the linear device sampler (the device
sampler gauge returns to its count before the call), and that the grant's indices release.
A pipeline cannot reach this through the public API today: constexpr_sampler refuses only what
translation for the same profile refused first. The test calls number_samplers directly.
Three changes the rt side's first whole-set run on lavapipe asked for, so its divergent rows are
each a named answer:
- known-gaps-rt.tsv gets the 54 rows where lavapipe's own answer differs from Metal's (rule 1),
over 31 cases: the half NaN families (half-texel-nans, half-read-nans, half-write-nans,
half-storage-writes, math-frexp-ilogb-half), the half tanh, the sRGB pass bytes, 16-bit depth
reads and nearest sample positions. Each row says what Metal and the device answer at the
first differing element and names the static note that records it, every one of which the
run announced for its case. Venue: llvmpipe (LLVM 23.1.1, 256 bits).
- The `read` rows of half-texel-nans' six float formats answer what read-through-sample answers,
where the old runtime on this venue answers them otherwise (R16Float: 0x7e00 against the old
runtime's 0x7e01). Mesa's SPIR-V dump of both runtimes' modules shows the same ops for each
read (OpImageFetch of a sampled float image, then OpFConvert to half). The old runtime reads
each slot through its own set-0 binding, and rt reads it through set 1's sampled-texture array
at the slot's resource ID. In one dispatch, the old runtime's two bindings of the one texture
answer 0x7e00 and 0x7e01, so lavapipe's fetch answers a NaN by descriptor. The rows say so.
- depth16-texel-reads, nearest-sample-positions and the six half-read-nans cases declare
pixel-sampler-scaling (`replay::pixel_sampler_scaling_notice`). rt's pipelines record that
note for every sample through a runtime sampler slot, because under the identity domains no
binder specializes the slot by its bound state. A declaration loosens the notices site alone.
- indirect-private-type-getters pushes a refused read-back's error leaf under the type's own
node. At the root, a refusal read as a site only ours observed.
Verified: the device-answer rows are read from the whole-set runs of the rt side on msi's
lavapipe (the same 54 rows in both). The two read paths are from Mesa's SPIR-V dump of
half-texel-nans-r16f through both runtimes.
The status, the four times and the work's completion are the runtime's and are
compared. A queue's label and a command buffer's device and commandQueue never
reach the GPU: the runtime leaves them to its consumer, so the rt side answers
TheConsumers at those three sites (CommandBufferFacts::the_consumers), a class
of its own rather than a gap. The resource state encoder is the sparse
family's, which the runtime does not make: a typed refusal at its site
(CommandBufferFacts::without_resource_state_encoder). The other sides build the
facts as before.
Verified by the next job.
compute_pipeline_with_stage_input states the stage input on the descriptor as
the old runtime's side does (its helper is now crate-visible, unchanged) and
records the runtime's own answer, a typed refusal where the runtime does not
supply the fetch. texture_2d_in_role makes one Shared level in the role's
usage, at a texture index where a shader reaches it; sampler makes the state
at the next sampler index, and a dispatch binds the case's samplers.
Verified for the parent commit (job 47946, msi, lavapipe): clippy, Rustdoc and
the suite's 1053 tests green; replay --rt of the slice: math-frexp-ilogb-float
exact, math-frexp-ilogb-half divergent at the half NaN mantissa as the old
runtime's llvmpipe rows hold, empty-command-buffers divergent at two time
orders, command-buffer-facts refused (no call); the whole set under the
validation layer with 0 errors and 0 warnings. This commit's run is next.
RtSide answers the case vocabulary through metal2vulkan-rt alone: libraries,
compute pipelines (constexpr samplers numbered as Metal gives an equal one the
same ID), Shared buffers each in a block of its own length, 2D textures at
granted indices, dispatches, bounded waits, buffer and texture reads, and the
empty command buffers' handlers, statuses and times. A call it does not answer
yet answers Unavailable with its name, so its case ends refused at that call.
It announces the codes of the precision notes of each state its case
dispatched.
`conformance replay --rt [--cpu]` replays through it, held to its own
ledger, known-gaps-rt.tsv (empty: the first run's rows go in next), since
known-gaps.tsv's rows are the old runtime's. Failure::of_rt and
Failure::of_translation record the runtime's and the translator's typed errors.
The old runtime's side is unchanged.
Not yet verified: compiled and run by the next job.
Refusal::InScheduledHandler's doc linked crate::Event::wait_until_signaled_value, which is a
method of SharedEvent (event.rs, impl SharedEvent), so rustdoc -D warnings failed on development
since ea8e7843b7: 'unresolved link to crate::Event::wait_until_signaled_value' (job 48098, the
only rustdoc error there). The link now names SharedEvent. The refusal table quotes only the
doc's first clause, so docs/REFUSALS.md is unchanged.
Doc comment only.
What a kernel pays for Shared storage on a discrete card, beside the read-only table already
there: a kernel reading 64 MiB and writing 64 MiB in order (the harness's scale_offset), and a 3x3
filter over a 1920x1080 float4 image (binomial3x3), each with both buffers Shared or both Private.
A Shared buffer on a discrete card is system memory by Metal's contract, so its rate is the host
link's: 2.7 to 11.6 GB/s here, 20 to 316 times the Private time.
Measured with the harness's Shared twins of bandwidth and image_filter on probe 3cb938bd4b (on
6fbc7ab91a, build 48059, never landed), two processes per runtime, the old runtime level with
the new on Shared: RX 7900 XTX and RTX 2080 in job 48061, RTX 3090 in jobs 48063 and 48064 (two
hosts), RX 550 in job 48062. The figures are the new runtime's.
Docs only.
The marker cfe2dc8994 keeps (m2v-observes) is named, like every lowering, by the
partial-threadgroups variant's FunctionCompileKey: the kernel's AIR, entry, constants and linked
functions, its lowering inputs, the device profile's fingerprint and the translator's semantics
version. So everything that can change the translator's partition answer moves the key. The
semantics version's contract now names that answer among the facts whose change bumps it.
The marker is 12 bytes, queued under the reaper's pending bound and written and counted in young
like a lowering, so it stays within the store's existing cap. The old runtime's path is
byte-equal: nothing under crates/metal2vulkan-runtime changes, and the translator's change is
this doc comment.
Comments only; no behaviour changes.