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.
A state of a kernel that observes its partition lowers only its plain module at creation, so the
store held no partial-threadgroups variant to answer the partition question, and every device on a
warm directory asked the translator again: kernel_observes_partition decodes and specializes the
kernel's AIR. On the 780M (probe 3cb938bd4b, job 48062) that was 1546 us (median of 3 warm-store
processes) inside the device's first state of lcg_step, which the translator answers as an
observer: rt's creation call 1780 us against the old runtime's 499. A kernel that does not observe
its partition paid nothing there, as its kept variant answers it.
The answer is now kept like the translator's refusal of the variant: a marker under the variant's
key (m2v-observes), written by the reaper after the translator answers, read before asking. The
observer's variant, lowered at the first ragged grid, replaces it under the same key; that lowering
states the observation itself. Bytes a lowering never encodes to: an earlier build reads the marker
as a miss (its decode fails) and asks again, and a directory without markers reads as before.
The cache-directory device test now asserts the second device decodes no stage entry.
Verified: see the job named in the landing message (clippy plain, m2v_gpu, m2v_cpu_icd; rustdoc;
unit tests; lavapipe device tests; negative control).
With robustImageAccess2 on the floor, the translator leaves an image read's bounds to the device.
On the UHD 630 the nc rows (a pass that loads its target and samples another texture at
1920 x 1080) drop by 27 to 33% and run faster than the old runtime. Harness, release, GPU p50
a pass, median of three rounds, base 4a0d6abc1e and F 3575c4e3c3 (each with the same probe
rows), exclusive job m3-max-47748:
nc_first_hd rt 670.0 -> 449.3 us, old 570.5
nc_after_hd rt 895.1 -> 632.5 us, old 808.2
nc_first_hd_rt rt 647.0 -> 450.5 us, old 583.1
nc_after_hd_rt rt 896.4 -> 656.6 us, old 807.5
texture_read rt 3621.2 -> 3616.7 us, old 3702.5
On the XTX (m3-max-47580) the same rows are unchanged within noise (nc 11.0-13.8 us both arms,
texture_read 79.0 -> 79.2 us). On the 3090 (m3-max-47611) nc_first_hd_rt goes 18.1 -> 16.4 us,
the others are unchanged (texture_read 123.9 us both).
new_compute_pipeline_state asks for one index per numbered sampler, and a
texture read() numbers NumberedSampler::Read. The test gave none, so the state
failed to build (job 47598 on the 2080). It now checks the read is the one
sampler numbered and gives it index 0, as the sampling tests do.
each_missing_feature_is_named holds one case per REQUIRED feature, and the
floor's new member had none (m3-max-47542: 'a required feature has no case').
The conformance suite records no out-of-range texture read and runs on the
old runtime alone, so this device test stands in for it. The engine fixture
oor_texture_reads (companions regenerated in m3-max-47528, metal 32023.922,
SDK 27.2) reads ten texels in one thread, each at the coordinate and level of
a buffer word so the compiler sees no constant: of an RGBA8Unorm texture of
4 x 4 with two levels (inside at levels 0 and 1, past the width, the height,
the texture's levels, level 1's own width, and at x = u32::MAX), of a view of
its first level alone (past the view's levels, where the texture has the
level), and of an R8Unorm texture (inside, past the width, past its levels).
The expected texels are Metal's, not the documentation's alone: the same
source compiled at run time and run on an Apple M3 Max under macOS 27.0.1
(m3-max-47527, carry oor-metal.swift): the texel inside; (0, 0, 0, 0) for
every RGBA8Unorm read out of range, the view's past its levels included; and
(0, 0, 0, 1) for the R8Unorm reads out of range, a format without alpha. That
is the translator's contract (zero, alpha 1 where the format has none), so
there is no rule 1 question. Under robustImageAccess2 the device answers them
with no check in the shader.
The plan's image-robustness ruling, built into rt. Every sampled read() took
ReadCheck::Shader on rt: lower/texture/slot.rs read_check asks
memory/contain.rs device_reads_texels, which is true only where the profile's
images.robust_image_access2 is, and floor.rs had robustImageAccess2 in neither
REQUIRED nor OPTIONAL, so from_queries never saw it (shader_enables passes only
what rt enables). The shader's check is a levels query, a size query, the
in-bounds test, a clamp and a select per read; the device form answers Metal's
out-of-range texel exactly (zero, alpha 1 for a format without alpha, a fetch
past the view's levels included). Measured before on the old runtime: the
device form costs nothing, the shader check 3%, 11% and 17% on the UHD 630,
XTX and 3090.
robustImageAccess2 is now a REQUIRED member of VkPhysicalDeviceRobustness2-
FeaturesEXT (VK_EXT_robustness2, which rt already requires) and enabled;
robustBufferAccess2 stays off, so a texel buffer's read keeps the shader check.
The translator is unchanged: from_queries derives the feature from what rt
enables, so Device::new (the old runtime's path) is byte-equal by construction.
Every leg reports it (vulkaninfo, no GPU timing): 2080 and 3090 (NVIDIA
620.70.06), XTX, both 780Ms and lavapipe (Mesa 26.2.6) in m3-max-47473 and
47475; the UHD 630's Windows driver (API 1.3.215, VK_EXT_robustness2 only) in
47477; KosmicKrisp (Mesa 26.3.1) on the M3 in 47478; the committed local
captures of the Iris Xe RPL-P, the 780M and the RTX 5080 laptop; RX 550 in
47476.
Tests: the floor fixture reports it; the translator sees robustImageAccess2
enabled and robustBufferAccess2 not; on every device of the cfg's kind the
profile enables it and device_reads_texels(false) is true while
device_reads_texels(true) stays false. README floor tables updated;
docs/REFUSALS.md regenerated, unchanged.
The consumer adds a scheduled handler to every command buffer. The submit thread handed each
command buffer's scheduled handlers to the completion thread (Done::scheduled), and where that
thread waited on the GPU the hand-over was a host vkSignalSemaphore of its wake timeline, on
every submission. On NVIDIA a host signal per submission measured 103-117 us of CPU a command
buffer on an RTX 3090 (the waits probe's rt arm, job 47928), against 2.9-3.5 us for every single
wait form, rt's own steady-state WAIT_ANY included.
Now the submit thread, which already marks a command buffer scheduled as it joins a submission,
runs its scheduled handlers itself once it has dropped its lock, in queue order, before that
submission goes to the driver and before any of those command buffers is handed on as ended.
So the status reads Scheduled and the kernel times are set in the handler, a command buffer that
ends before it joins a submission runs none, as before, and the scheduled handlers run before the
completed ones by construction. Done::scheduled, its list and the completion thread's branch for
it are deleted.
A handler on the submit thread may not call what waits for that thread to submit. The four
internal sites that do (Work::room, Work::capture, Work::stage and the readback's flush and
Done::wait) give the public entries that reach them; each is now Refusal::InScheduledHandler in a
scheduled handler, on every device and whatever the runtime holds: commit; wait_until_scheduled,
wait_until_completed and SharedEvent::wait_until_signaled_value; replace_region, upload_region,
get_bytes and zero_block_range; new_managed_buffer, and new_buffer zeroing a buffer in a Private
block. The one consumer's scheduled handler makes none of these calls, and a guest's
addScheduledHandler block runs in the guest. Quiesce in a scheduled handler answers false at once
(neither the submit thread nor the completion thread, which the submit thread stops as it ends,
is waited for), and a device whose last handle drops there tears down on the reaper, as from a
completed handler.
For a consumer: CommandBuffer::wait_until_scheduled and wait_until_completed now return
Result<(), Error>, and SharedEvent::wait_until_signaled_value returns Result<bool, Error>
(api_signatures.tsv blessed); docs/REFUSALS.md regenerated; the README's contract says where each
kind of handler runs, what a scheduled handler may do, and that it holds its queue's later
submissions while it runs.
Tests: every_device_tears_down_from_a_scheduled_handler,
every_device_answers_false_to_a_quiesce_in_a_scheduled_handler, and
every_device_refuses_each_call_that_waits_for_the_submit_thread_in_a_scheduled_handler (each
refused entry by name, the allowed calls, the status and kernel times in the handler, and the same
calls answering once it has returned). Verified by the next jobs.
The consumer adds a scheduled handler and a completed handler to every command buffer, so a
runtime's cost of carrying and running them, and of waking the thread that runs them, is part of
every command buffer it runs. The harness's workload rows committed bare command buffers, and
only frame, frame_5cb and long_4cb had a completed handler (the commit-to-complete timer), so the
burst rows timed a shape the consumer never runs. Now commit_run adds both to every command
buffer of a run, in both runtimes: rt's add_scheduled_handler and the old runtime's submission
handler, the point its consumer takes as a command buffer is scheduled. The handlers do nothing
but run.
To be verified by a table of the rows beside the parent's, both runtimes, on NVIDIA first.