A 16385-byte buffer's VkBuffer requires 32768 bytes where 16400 did, on
RADV PHOENIX and lavapipe (m3-max-32595, m3-max-32558). On the Radeon
780M, release, exclusive, the base (d2ee5bca5b) and this tree run twice
each in one job (m3-max-32595): 1000 buffers of 16 KiB + 1 to 4 MiB
required 763.3 MB against 754.8 MB and took one more 64 MiB block in
their second round; making them took the same time within the runs'
spread, Shared ones cleared on the host and Private ones' first fills
alike.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A texture over a buffer whose texels run past the length was always a
copy: a shadow image or a staged texture buffer whose bytes past the
length lay in a tail of its own. Metal's texels there are the
allocation's: a buffer of 16 KiB or more holds its length rounded up to
16 KiB (allocatedSize), zero when made, and a heap's buffer reaches its
heap's end, whose bytes are the heap's.
Now a buffer the device makes in the Metal address space with a length
of 16 KiB or more takes that allocation (buffer.rs's metal_allocation):
its VkBuffer and placement are its length rounded up to 16 KiB, which
its first fill clears with the rest (Buffer::clear_first: the host's
clear of a Shared or Managed buffer, the device's fill of a Private
one), with no command of its own. A texture keeps in place the bytes the
buffer's memory holds for it (Buffer::texel_reach: the allocation, a
heap's buffer's heap to its end, a no-copy buffer's length), so such a
texture is made as one inside the length is: an image over the buffer's
memory where the device makes one, a texture buffer viewed in place. The
shader-visible ranges, robustness, copy reach (a blit past the length is
still refused) and exported sizes stay at the length. Heap, no-copy,
wrapped and exportable buffers, and every buffer under 16 KiB, take
their length; past what the memory holds a texture keeps its tail, as
before. The runtime has no buffer allocatedSize; a heap's size and a heap
texture's allocated_size are unchanged.
The tails conformance cases now lie in place: their comments say so,
and the texture buffer case drops its staged-texture-buffer allowance,
which no device can fire there any more (its view starts at 16384).
Tests: buffer_tail_device's last-texel case lies as over a buffer that
holds it inside its length, with no tail; a new case over a 20000-byte
buffer (64x128 packed, ending at 32768) reads zero in the padding as
made, lies as inside the length, lands a kernel's writes past the length
in the buffer's memory, takes no copy where it is an image over the
buffer, and refuses a blit past the length; the heap case lies in the
heap, its kernel writes landing in the heap's other buffer; a new case
over a heap's second buffer keeps its texels past the heap's end in a
tail; the no-copy and 4096-byte cases keep their tails.
Docs: buffer_texture.rs's Tails, linear_plan.rs's Length, docs/API.md's
accepted difference and StagedTextureBuffer entry, and a FAST-PATHS
cost-of-matching-Metal entry for the padding.
Checks: the jobs that compiled and ran this commit are named in the
lane's report.
Evidence (lane jobs): m3-max-32551 (msi): clippy runtime+conformance -D warnings 0; 2632/2632 runtime+conformance; fast_paths +
api_surface 34/34. m3-max-32578 (lavapipe) at the tip: touched 56/56 (buffer_tail_device incl. the allocation, heap and
heap-end cases, texture_placement_device, linear_plan, buffer_texture, degradation_catalogue); runtime+validation partition
1/4 1572/1572. VkMemoryRequirements on lavapipe for a 16385-byte buffer: 32768 (alignment 64). The padding is cleared by the
buffer's existing first fill (no new command). allocatedSize: no buffer API; heap sizes unchanged. The PHOENIX run, the
release creation bench and lavapipe partitions 2-4 follow in the lane. Conformance: buffer-tails cases now in place; the M3
venue's cost records for buffer-tails-* re-bless on development.
Lane commits: d2ee5bca5b (bench), a8f3796f59, ee54952340 (heap cases in a placement heap).
The untracked lane (a kernel's write of an untracked heap's buffer, bound
or through the address its argument buffer holds with the buffer resident,
then a read of a texture over the same bytes in one encoder) asserted only
that the run as a whole split some command buffer at aliases where the
driver fact holds and a texture lay in place. On the RTX 3090 at
25119268da both forms split 1 command buffer over the Shared and the
Private heap, each texture in place, so the counts did not say which heap's
read split, nor that the resident write splits where the bound one does.
Each HEAPTEX untracked line now prints the command buffers split at aliases
while its heap ran (from before its texture was made to after its compute
command buffer completed). Test-only; nothing asserted changes.
Verified: cargo fmt. The lavapipe build and run follow.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A copy's encode cost grew with the chunks its runs touch: a binary search over the
chunks for each run that left the last run's chunk, a bitmap allocated for each chunk
touched, its runs read into a vector and copied into another, and each chunk's ranges
cloned, sorted and merged again before joining, though touched_ranges already gives
them sorted and apart.
- ChunkSpans (host_ram.rs): the chunks' spans and each RAM range's first chunk; of()
finds an address's chunk as the range's first plus the chunks before it, the span
span_of finds. pieces() takes it and still tries the last piece's chunk first.
- touched_ranges keeps every touched chunk's bitmap in one vector, reads the pages
back with MarkedRuns (lazily, runs across words as one) and builds each chunk's
ranges once, with as much room as its pieces.
- joined takes a chunk's ranges as touched_ranges gives them and borrows them where
there are no more than the bound; chunk_ranges sorts and merges before it.
Same ranges, same overlap answer, same uses as before (the touched_ranges
equivalence test is unchanged). New unit tests: a chunk found by arithmetic is the
span that holds the address; MarkedRuns reads the runs the bits one by one give.
Evidence (lane jobs, msi lavapipe): m3-max-32538 at the lane tip: clippy plain / m2v_gpu / m2v_cpu_icd -D warnings 0;
host_ram 98/98; rustdoc 0. m3-max-32486: a_chunk_found_by_arithmetic_is_the_span_that_holds_the_address and
marked_runs_are_the_runs_of_the_bits_one_by_one; the touched_ranges equivalence test unchanged. Release medians, one job
m3-max-32485, 8100 single-page runs: 1 chunk 309.6 -> 298.9 us, 128 chunks 811.7 -> 733.4 us.
Lane commit: b13c097e6d.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
Plain clippy of the runtime's lib test failed on development (a4ea017d9e): the
accessor was cfg(test), but its only caller, tests/host_ram_copy_device.rs,
compiles only under m2v_gpu or m2v_cpu_icd, so it was dead code there. It now
takes the caller's cfg, as step_aside.rs's device-test hooks do.
RamOnDevice::wakes stays cfg(test): the host_ram unit tests call it.
clippy -D warnings under --cfg m2v_cpu_icd (m3-max-32505, msi) refused 02a27ea50f's
(answer == 0).then(|| ...) as unnecessary_lazy_evaluations: the value is two field reads.
Verified: the clippy job follows.
The printout's time on a CPU came from /proc/thread-self/schedstat's first field, which stands
as of the thread's last scheduler event and leaves out the slice it is running: at the 5 runs
alone on the Radeon 780M (m3-max-32473) it printed 1.99 ms on a CPU for a 1.19 ms call. It now
comes from clock_gettime(CLOCK_THREAD_CPUTIME_ID) on unix, which counts the running slice too;
the run-queue wait stays schedstat's second field (Linux), which accrues only while the thread
waits and is whole by the time it runs.
The COMMIT doc and the nextest override's comment said the suite stretched the commit's work 8
to 60 times its CPU time, a ratio of tick-granular rusage numbers. They now give the measured
times themselves: a release build's later calls 5.8 and 7.0 ms under the suite's load (4.7 and
7.3 ms on a CPU, by rusage) against 0.10 to 0.26 ms alone; the test build's 10.7 and 16.3 ms
(8.2 and 10.4 ms on a CPU) against 1.1 to 1.2 ms alone.
Test printout and comments only; every assertion is unchanged.
tests::held_step_order::command_buffers_behind_a_waiting_step_read_scheduled failed on the Radeon
780M (PHOENIX) in the development rounds a88823f8f4 and cc68beb2af, inside the device suite's
runtime partition: the long command buffer's commit call, bounded by a frame's 16 ms in one of
its 3 runs at least (COMMIT), took 394.2 / 21.7 / 30.7 ms and 166.9 / 38.3 / 16.9 ms.
The split of that call (WorkCounts' commit phases, and the thread's /proc schedstat and rusage
over the call; gem10's 780M, RADV PHOENIX, Ryzen 7 7840HS) puts all of it in Recording, the
host-step pass's Deferred::prepare on the program's thread: no pipeline wait, no wait for the
scheduler's lock, no pass or submission time (each 0.00 ms), 0 to 1 voluntary switches in the
later calls. First call / later calls, in ms:
- test build, the GPU to itself (m3-max-32424, 2 x 3 runs): 27.1-29.8 / 1.12-1.23, nearly all
of it on a CPU, at most 0.05 on a run queue;
- test build inside the runtime partition 2/2 (m3-max-32429, 1355 tests, load average 14 on 16
threads): 367.6 (274 on a CPU, 85 on a run queue) / 10.7 and 16.3 (on a CPU 10.4 and 8.2, on a
run queue 1.5 and 10.3);
- release build alone (m3-max-32453): 3.58-4.21 / 0.10-0.26;
- release build inside the partition (m3-max-32457): 39.1 (28.6 on a CPU, 6.6 on a run queue) /
5.8 and 7.0 (on a CPU 4.7 and 7.3).
So the call is the same work, which the suite's 15 other GPU test processes stretch to 8 to 60
times its CPU time (the APU's CPU shares its power, caches and memory with the GPU they keep busy)
plus waits for a CPU. There is no wait for the product to remove. The bound is the fastest run's,
a later call: 1.2 ms in the test build alone, 13 times under it; 5.8 ms in a release build under
the suite's load; 10.7 to 38 ms in the test build under it.
The test now runs alone (.config/nextest.toml, threads-required = num-test-threads), as the
teardown test's 16 ms wait and the queue-sharing latency tests do. COMMIT stays 16 ms, by the
call's own clock, on the fastest of the runs; its doc and the override's comment carry the
split. Test and nextest configuration only; no product change.
Verified: the numbers above are those jobs' printouts. The 5 runs alone at this tip and the
negative control (20 ms slept in the commit's recording phase) follow in the lane's report.
The long command buffer's commit call is asserted within a frame (COMMIT) in one of the runs at
least. Its failure printed the call's whole time alone, which cannot tell the call's own work
from a host whose other processes held the CPU. The printout now splits the call by its phases
(WorkCounts' commit times: lowering, recording, pipeline waits, the scheduler's lock, its pass,
submissions) and, where the host reports them (Linux's /proc/thread-self/schedstat), the
calling thread's time on a CPU and on a run queue over the call.
Test printout only; every assertion is unchanged.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
copy_imports' for_copy moved the import thread's window for each chunk a copy touches and woke
the parked thread each time it moved, which, the chunks coming in order each next to the last,
was every chunk: 127 futex wakes for a copy over 128 chunks, a few microseconds each on the
encoding thread (kernel time a user-space profile misses; the per-chunk part of a consumer's
download encode, ~7 us a chunk). The staged first-touch paths did the same with a take and an
ask a chunk, up to two wakes a chunk.
RamOnDevice::take_for_copies(slots, ask) applies a take of each chunk in turn to the window
under one lock, so the thread finds the window a take of each would leave, asks for those not
imported where ask (a staged copy), and wakes the thread once after them all, or not at all
where the window moved nowhere and nothing was asked. copy_imports calls it once before
for_copy, which takes nothing itself now; the staged gather and scatter call it with ask. An
object's take is unchanged.
Tests: host_ram::tests::a_copy_s_takes_move_the_window_as_each_take_would_and_wake_the_thread_once
(the same window as a take of each, one wake, none where nothing changes, asks in the same
wake), and host_ram_copy_device::a_copy_over_several_chunks_wakes_the_device_s_thread_once (a
staged scatter over three new chunks and the scatter through their imports after it each wake
the thread once; a test-only count of wakes). Timings: see the lane's report.
Evidence (lane jobs, msi lavapipe): m3-max-32403/32436: a_copy_over_several_chunks_wakes_the_device_s_thread_once (staged
copy 1 wake, copy through the imports 1 wake); negative control (one take a chunk) fails with 3 wakes; the window unit test
(the same final window as a take of each chunk; no wake when nothing moved); clippy cpuicd clean; host_ram 95/95.
Timing (m3-max-32404, one job): no measurable change (1 chunk 354 -> 359 us, 128 chunks 938 -> 972 us, within the jobs'
~15% spread): the per-chunk cost is not the wakes (a phase probe names the per-run passes). Kept as a correct, built,
neutral change.
Lane commits: 754e50319e, c3dbc7c309.
recordings_dir() (recording.rs) and the coverage census's read_source and runtime_src
(coverage.rs) joined env!("CARGO_MANIFEST_DIR"), the directory the binary was built in, so a
conformance binary carried to another machine read the build machine's paths: no recording, no
source. The replay lane had to symlink the build path on the GPU node to run a carried binary
(11-15). All three now go through metal2vulkan_devtools::workspace_dir(), which takes the
checkout the runner names (a remapped archive's or cargo's CARGO_MANIFEST_DIR at run time) where
it holds the validation fixtures, else the build checkout, as the validation and runtime test
trees have since 39bff0de2a. No other env!("CARGO_MANIFEST_DIR") is left in the conformance
crate's src/.
Verification: the next development round's conformance suite (1043 tests), the lavapipe replay
and the XTX/PHOENIX replays, which read every recording through recordings_dir.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
RamOnDevice::chunk moved the device's thread's window to an object's chunk
(take + notify) before the object marked the chunk's import in flight. The
window's first slot is the chunk just taken, so the woken thread could find it
not imported and import it By::Ahead in the object's place: counted as imported
ahead and marked untaken, with the object waiting for that import at the
thread's pace (SCHED_BATCH on Linux, utility QoS on Apple). Off Linux the thread
does no fault-in before an import, so it reaches the claims lock at once; that
is the failure seen once on the Windows mini under nextest -j 4:
a_chunk_bound_buffer_and_a_copy_of_its_pages_order_by_their_host_bytes saw ahead
imports 3 where 2 were expected (chunks 0 and 2 by the thread, then 3 within
settled()'s 300 ms).
Now the window moves (RamOnDevice::took) once the object holds the chunk: found
made, marked in flight by it, or held back. The thread, woken by the move,
finds the chunk in flight or made and imports the ones past it.
Test: an_object_holds_its_chunk_before_the_window_moves_to_it holds the
object's call 300 ms before it holds the chunk (RamSource::taking_pause, a new
cfg(test) pause beside making_pause) and checks the object imported its chunk
and the thread one past it alone.
Evidence (lane jobs, msi): m3-max-32427: clippy -p metal2vulkan-runtime --all-targets --all-features -D warnings 0;
lavapipe 78/78 (host_ram_device, host_ram_copy_device, host_ram:: units) incl. the new
an_object_holds_its_chunk_before_the_window_moves_to_it and the original a_chunk_bound_buffer_and_a_copy_of_its_pages_...
Negative control m3-max-32428 (the take back at the top of chunk()): the focused test fails, "the object imported its
chunk, the thread not in its place: left 0, right 1". The Windows mini runs follow in the lane.
Lane commit: 10dfe36dce.
The PHOENIX replay of 9c438c6b72 (the Radeon 780M, RADV PHOENIX; job
m3-max-32387) failed on 27 rows the ledger lists for "RADV NAVI31" alone, as
nothing replayed PHOENIX regularly:
- device-linear-texture-alignments, 16 formats: Metal 16 (0x10), ours 256
(0x100) at case/<format>/Ok, the same 16 formats and the same answer as the
NAVI31 rows. The cause is RADV's: the smallest power of two from 16 at which
the driver lays a linear image at the asked pitch
(texture/linear_alignment.rs asks it per image), 256 on both chips.
- blit-generated-mipmaps-bgr10xr levels 1-5 (803, 232, 58, 13, 3 words; largest
differences 1048577, 1049601, 1049601, 1049601, 1025) and
blit-generated-mipmaps-bgra10xr levels 1-6 (58, 78, 46, 18, 5 fields of
largest difference 64; level 6 Metal 0x7d00, ours 0x7d40): the NAVI31 rows'
counts and differences exactly, and llvmpipe's. The cause is the runtime's
bilinear compute filter in the device's float at ties
(device-filtered-mipmaps), whose IEEE f32 rule gives these counts on any
venue that computes it so.
So the 27 rows' venue widens from "RADV NAVI31" to "RADV", and the alignment
rows' words name both chips' measurement. No row's words change cause; the
llvmpipe and Apple M3 Max rows are untouched.
Verification: the PHOENIX and XTX replays at this commit, in the job reports
that follow.
On a device that places indirect command buffer records by their first use (no
unified memory, a staging queue), the copy case announces
staged-indirect-records, and the XTX replay read it as an undeclared notice
(development a88823f8f4, and still at 45e6784e91, which removed the staging of
records the GPU never wrote).
The remaining staged accesses are the host steps' reads of records the GPU
wrote. Each copy of at least one command is the first use of its destination,
which the case makes and touches nowhere before, so the blit's write places the
destination's records in device-local memory. The execution after it takes the
host step (the case already declares host-replayed-indirect-commands for it),
and that step reads the records the copy wrote while their command buffer holds
them, through the staging queue: the documented, announced degradation, which
cannot be avoided where the GPU wrote the bytes in device memory and the host
never maps it. On the Apple chips the recordings were taken on there is one
memory and the notice cannot fire, so it is the venue's memory model, as
shared-in-system-memory is.
Measured on the RX 7900 XTX (RADV NAVI31), the case replayed alone and
`conformance cost --show --runs 1` at 45e6784e91's runtime (cfcdb2978, job
m3-max-32363):
- copy: host_steps_recorded 3, icb_records_staged_accesses 3 (the legs
range-one-at-0, range-one-at-2 and range-whole; indirect_record_bytes_gpu_copied
13488 = 6 commands of 2248 bytes), indirect_record_runs_read 1 (the
range-none leg's commit read, in place);
- reset: host_steps_recorded 3, no staged access (its buffer is the CPU's
first, so its records lie in host memory).
So every staged access is a host step's read of GPU-written records, and none
reads records the GPU never wrote.
The declaration: replay::staged_records_notice, beside shared_memory_notice,
with the venue's-memory-model reasoning, and the copy case names it alone
(Call::places_its_records_on_the_gpu), with a comment citing the run. It
loosens the notices site alone; every value still compares exactly. On unified
memory (the M3 Max, PHOENIX, lavapipe) it cannot fire and counts as a
declaration nothing on that run justifies, as shared-in-system-memory does
there.
Verification: in the job reports that follow (the XTX and PHOENIX replays).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A texture over a buffer whose texels run past the length was answered nil
where its rows' padding ended past the length rounded up to 16 KiB. The
M3 Max (macOS 27.0.1, the consumer's limits runs, every buffer kind and
length bisected) makes more:
- A 2D texture and a texture buffer count to their last texel, not the
last row's padding: a 2D R32Uint 64x64 from 256, rows 512 apart, over
20000 bytes is made with its last texel at 32768 (rows' end 33024); a
texture buffer of 32768 R8Uint texels at a bytesPerRow of 36864 over
20000 bytes is made. Arrays keep their rounded slices' end.
- A heap's buffer is bounded by the heap's size, counted from the
buffer's start, whatever its length or place in the heap (4 MiB heap:
made to 4194304, nil at 4194305).
- A no-copy buffer is bounded by its pages: its pointer's offset in its
16 KiB page plus its length, rounded up to 16 KiB, from its start
(16384 bytes starting 4096 short of a page's end: made to 32768).
BufferFacts now carries the buffer's allocation (own, a heap's size, a
no-copy buffer's page offset), filled from Buffer::heap, host_backing and
contents; BufferFacts::allocation_end gives the bound. Buffers under
16 KiB keep no bound (the M3 Max answers nil past 128 KiB there, the x86
Macs make every end measured), and an array whose last texel lies inside
the length is still made: no new refusal.
Such a texture stays a copy, as before at the old bounds: a 2D texture or
array is a shadow image whose copies in and back go through its tail
(texture/route.rs Route::Past -> TextureShadowReason::PastLength,
announced shadowed-texture), a texture buffer's functions view its tail
(into_texture_buffer, staged-texture-buffer). The texels past the length
live in the tail, zero when made; the caller's bytes past a no-copy buffer
and a heap's other bytes are never read or written.
Tests: tests::linear_plan::a_texture_ends_where_metal_s_allocation_of_its_buffer_does
(each kind's and form's M3 boundary, made at it and nil one past; the
made rows past the old bound fail before this change); device tests in
buffer_tail_device (a heap's buffer to its 64 KiB heap's size, a no-copy
buffer at page offset 12288 to 32768, a padded 2D texture to its last
texel): made, every path reads and writes right, the buffer's CPU write
inside the length is read through the texture, shadow copies counted,
no other memory touched, one row more Metal's nil. docs/API.md's
accepted difference, REFUSALS.md regenerated.
Evidence (lane jobs, msi): m3-max-32369: clippy -p metal2vulkan-runtime --all-targets --all-features -D warnings 0;
linear_plan|buffer_texture 34/34 incl. tests::linear_plan::a_texture_ends_where_metal_s_allocation_of_its_buffer_does (the
M3's boundaries per kind and form, made at E, nil at E+1). m3-max-32370 (lavapipe): 13/13 buffer_tail_device + allocation
tests incl. a heap's buffer to its heap's size, a no-copy buffer to its pages, a 2D texture whose last texel ends at the
allocation: every path (get_bytes, blit, kernel) reads as made, writes coherent with the buffer's bytes inside the length
(shadow copies counted: such textures are shadows / staged texture buffers through their tail), neighbours untouched, one
row more Nil(PastAllocation). Negative control and the PHOENIX run follow in the lane.
Lane commit: 263219d515.
Since 43bb61c60e (RUNTIME 2344) consecutive copy_from_buffer_to_buffer calls between the same
two buffers with their destinations rising record one vkCmdCopyBuffer of a region each
(copy_run.rs), counted WorkCounts::buffer_copies_merged. runtime_lane::commands_recorded::
each_command_recorded_counts_once_by_kind still expected one call a copy, so it failed on the
XTX and PHOENIX in development round cc68beb2af-1115-0626 (xtx:lane 1/2, phoenix:lane 3/4):
"the fills' and copies' calls recorded: left [5, 0, 1], right [5, 0, 2]". Its two copies are
such a run (filled -> copied, word 0 then word 1), so it now expects one vkCmdCopyBuffer and
buffer_copies_merged + 1, and prints the merged count. The bytes checks are unchanged.
Test-only. Verification: the next development round's lane partitions (XTX, PHOENIX, 5080).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
record_host_ram_copy spent most of its encode on per-run bookkeeping (a profile of 8100
single-page runs on lavapipe, release, frame pointers): chunk_ranges' BTreeMap entry a piece, a
Vec and a sort a chunk (46%), in_imports' BTreeMap lookup a piece (14%), the scatter's overlap
check sorting every host range (14%), plan's BTreeMap entry a table entry (10%), and pieces'
binary search over the chunks a run (9%).
- touched_ranges: pieces of whole pages from a page mark their pages in a bitmap of their chunk,
read back in order; only the other pieces (rows inside pages) are sorted. It gives the ranges
chunk_ranges gives, byte for byte (so every use and barrier is as before), and whether two
pieces share a host byte, exactly: a page marked twice, another piece's bytes in a marked page,
or two other pieces that overlap.
- in_imports looks a piece's imports up in a vector by chunk.
- plan buckets its entries by array of imports and window in a vector, in the same order.
- pieces looks for a run's chunk first where the piece before it lies.
Test: copy::tests::touched_ranges_are_the_chunks_ranges_and_their_overlap_in_one_pass (whole
pages, rows sharing a page, overlaps of each kind, and 2000 random mixes over four chunks, against
chunk_ranges and share_a_byte). Timings: see the lane's report.
Evidence (lane jobs, msi lavapipe): m3-max-32324: clippy cpuicd -D warnings 0; host_ram tests 93/93 incl.
copy::tests::touched_ranges_are_the_chunks_ranges_and_their_overlap_in_one_pass (byte-exact ranges and overlap flag vs
chunk_ranges + share_a_byte: whole pages, rows sharing a page, each overlap kind, 2000 random mixes over 4 chunks).
Release medians, one job m3-max-32339, parent's copy.rs vs this, 200 CBs of copy_runs_to_host_ram with 8100 single-page
runs, call CPU: 1 chunk 750.6 -> 351.1 us (92.7 -> 43.3 ns a run); 128 chunks 1523.7 -> 1097.6 us (188 -> 135 ns a run).
Uses and barriers unchanged by construction. 3090 run: m3-max-32374.
Lane commit: 6c02be1492.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
Metal makes texture buffers of up to 2^28 texels on every Mac; one texel
buffer view holds at most the device's maxTexelBufferElements (2^27 on ANV
and lavapipe, 2^26 on MoltenVK), and the binding of a wider one was refused
(BindError::TexelBufferTooLarge).
The consumer now states with a texture buffer's binding the views its texels
take (BoundTexture::Buffer::parts, bind::texel_buffer_parts: 1 within the
limit), which its shape carries. A slot whose function only reads, writes,
updates by an atomic or asks the width of the texture buffer, on a device that
indexes texel buffer arrays NonUniform, states RuntimeFact::TexelBufferParts;
where the shape binds more than one part there, the plan asks for the parts
variant (VariantKey::texel_buffer_parts). Under it the slot is an array of
the parts' texel buffers: texel i is texel i - k*P of part
k = min(i / P, parts - 1), P the device's limit rounded down to its texel
buffer offset alignment (bind::part_texels), and the width (parts - 1) * P
plus the last part's. texel_ranges writes one range per part at its array
element (DescriptorRange::element), and the runtime views each.
Each part is the device's own view in the format one view takes, so a read
converts its texel as the one view does: no precision note. A texture buffer
one view holds keeps one view, no variant and its key. The families row
TextureBufferWidth is exact where the parts reach 2^28.
Still refused (TexelBufferTooLarge): a slot read through a sampler or used beyond read/write/atomic/width; a device
without NonUniform indexing of that kind of texel buffer array; formats with several texels a block. Argument-buffer
texture buffers past the limit stay the heap neutral (unnamed-texture-unviewable). New: WorkCounts::texel_buffer_parts_bound,
RuntimeFact::TexelBufferParts (appended), bind::part_texels / texel_buffer_parts, BoundTexture::Buffer.parts,
TextureShape::Buffer.parts (serde default 1), VariantKey/LoweringInputs.texel_buffer_parts (hashed only when non-empty),
DescriptorRange.element. SEMANTICS_VERSION bumped: input once refused now translates.
Evidence (lane jobs, msi): m3-max-32343 at 628264de17: clippy --workspace --all-features --all-targets -D warnings 0;
41 metal2vulkan tests incl. golden_hashes_match_the_table (every fixture's SPIR-V unchanged on every profile: one part is
byte-identical), the binder test (an under-limit slot: no parts entry, empty variant, layout counts 1), the interpreter
parts test (robust and unrobust), api_surface / api_signatures / refusal_surface; families::states_follow_their_sources;
lavapipe texture_buffer_width_device (R32Uint limit+64 texels: both sides of the limit and the last texel read and written,
past the end reads 0 and writes dropped, texel_buffer_parts_bound +3) and buffer_tail_device. Without the fix the device
test fails at bind: TexelBufferTooLarge{elements 134217792, limit 134217728} (m3-max-32140). ANV (2^27) is down; the XTX
(2^29) never parts.
Lane commits: 9fbf7d3c14, 7f7f3ad95e, 9a745ffb3c, 740e9e43dd, 628264de17.
Since 43bb61c60e (RUNTIME 2344) a device with a copy engine (a transfer-only family of at
least 2 queues: NVIDIA) lists the copy queue's slot last in DeviceShared::queues. Two tests
counted every entry after the round robin as presenting queues, so on the RTX 5080 (development
round cc68beb2af-1115-0626, job 5080:runtime) they read the copy slot as one more:
- least_queue_plan::a_device_refused_once_takes_its_least_plan_where_it_takes_fewer_queues:
(1, 1) where the least plan is (1, 0);
- queue_limits_device::a_default_test_device_fails_where_its_work_needs_the_plan: 3 VkQueues
for command queues where the test limits allow 2.
On NVIDIA's 2-queue copy engine the copy slot shares the fill queue's VkQueue, so the device
asked for no more queues; only the count was wrong. Both now count round_robin() +
presenting() (DeviceShared::presenting already leaves the copy slot out). lavapipe, the XTX and
PHOENIX have no copy engine by default, which is why only the 5080 leg showed it.
Test-only. Verification: the next development round's 5080 runtime partition.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
On a device that places indirect command buffer records by first use (no
unified memory, a staging queue), a host access of records in device-local
memory was staged whenever a command buffer held them or the buffer was
Private: the records it read were copied down through the staging queue and
waited for, counted, and staged-indirect-records announced. That held even
where the GPU never wrote the records, though then the host's buffer holds
exactly what device-local memory does.
The XTX conformance replay of development a88823f8f4 failed on it:
blit-copy-indirect-command-buffer announced staged-indirect-records. Its
range-none leg copies no commands into a fresh destination (an empty copy
holds nothing and marks nothing written), then executes destination command 0.
The execution's hold placed the untouched records in device-local memory, and
the commit, which records the execution from the CPU's records because no GPU
route met the buffer, read them through host_access while its own command
buffer held them: staged. The cause dates from 5dd3668a4f (RUNTIME 2294,
placement by first use); the last green XTX replay (06fd49b221, 11-11)
predates it, and the case's recording did not change.
Now host_access serves an access that only reads (Reach::Reads) records the GPU
never wrote (State::written false) in place: not staged, not counted, nothing
announced. A write of such records is still staged, for its copy back alone:
it no longer copies the runs down first.
Why the two sides cannot differ while written is false:
- placement (place_on_device) fills the device-local storage with zeros and
writes encode_header's header, which is what the host's storage holds as the
buffer is made (write_header: CommandBuffer::initialize's header and reset
records, flags cleared; the reset record is all zero,
metal2vulkan's indirect_commands/tests/records.rs
reset_clears_action_and_bindings_to_zero). A Shared buffer the CPU touches
before any GPU use is placed on the host for good; a Private one is placed on
the device at its first host access, before that access writes.
- every CPU write of the records goes through records_access with
Reach::Writes or Reach::Overwrites (reset_command, batch, the CPU reset), and
while the records lie in device-local memory that access is staged with
back = true, whose drop copies the written runs (records and written flags)
back into device-local memory: home.rs line 222,
`copy_runs(self.icb.generation(), records, host, &self.runs, false)`.
- every GPU route that writes the records holds them with writes = true, which
sets written (home.rs line 320, `state.written |= writes`): a blit's copy and
reset, and a compute or render encoder's use_resource with WRITE.
The move path already relied on the same fact (a move of a buffer the GPU never
wrote copies no bytes).
The conformance case needs no declaration: the notice was the runtime staging
where it need not.
Also: the runtime-lane test private_indirect_records_follow_the_memory_model
expects two staged accesses (its two setters), its getter now reading in place;
the docs of home.rs, Degradation::StagedIndirectRecords (and its cost),
WorkCounts::icb_records_staged_accesses and docs/API.md's catalogue entry say
which accesses stage. No new Degradation kind, no new counter.
Verification: in the job reports that follow.
Evidence so far (lane jobs): msi m3-max-32246 at cfcdb29780: the conformance binary and the m2v_gpu archives built; the
lavapipe replay (conformance replay --cpu) matches known-gaps.tsv (LVP_REPLAY=0). gem10 m3-max-32248: clippy -D warnings
plain, m2v_gpu and m2v_cpu_icd on runtime + validation = 0. The XTX replay and the new device tests (with the control at
76a78ec60a) follow in the lane's um790 job.
Lane commits: 76a78ec60a (tests), cfcdb29780 (fix).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
CommandQueue::command_buffer allocated and filled a fresh 5.8 KB State for
every command buffer (86% of CommandBufferShared's 6.7 KB), on the thread
that makes it, and took a record storage from the device's pool apart. The
thread that frees a command buffer is never the thread that made it, so
the allocator could not recycle the block locally and every line of the
copy was a cold write. A profile of 200,000 command buffers made on
lavapipe (make_bench) put CommandBuffer::new at 62% of the make,
building and moving the state about 30% and record_storage.take 9%; the
consumer's Iris profile put the allocation, the copy and the record
storage take at about half of 5.1 us a command buffer.
Now CommandBufferShared::state is an Arc<Mutex<State>>. Its Drop resets
the state in place, reached through Arc::get_mut and Mutex::get_mut (only
the command buffer holds it, so no lock): State::reset destructures an
owned State::new() exhaustively, by value, and assigns each part, while
the four lists of records are cleared where they are, keeping their room.
The compiler holds the reset to every field. The Drop then hands an
Arc::clone of the state to the device's SpareStates (in DeviceShared,
freed with the generation), which keeps at most 64, none whose lists hold
past 8 MiB and 16 MiB over all. A command buffer being made pops one
whole, with the footprints revision it moves; it builds one only where
none is kept (WorkCounts::command_buffer_states_made, new). This replaces
SpareRecordStorage, and with it State::record_storage's three
mem::takes. Nothing is moved out of a borrowed owner.
The state's parts now drop at the release, inside the Drop, before the
command buffer's device, queue and root handles go (before, after them);
its slot still goes after.
Tests (tests/spare_states.rs, device tests): a command buffer made after
another's release takes that very state and builds none; a kept state of
a failed, labelled command buffer with a kept refusal carries none of it
to the next one, whose own fill runs; 80 released at once keep 64, and a
command buffer past 8 MiB of list room keeps none. make_bench prints the
states built.
Evidence (lane jobs, msi): m3-max-32266 at 6e4c8a8723: clippy -p metal2vulkan-runtime --all-targets --all-features
-D warnings 0; lavapipe 134/134 touched tests (spare_states, dropped_uncommitted, freed_memory, encoder_fold, render_fold,
command_buffer, completion, sync_file, teardown_threads, ...); negative control (SpareStates::give refuses every state):
all 4 spare_states tests fail. Release medians, one job m3-max-32278, base 5266f9fa59 vs tip, base/tip/base/tip:
command_buffer() p50 one encoder 955/927 -> 319/291 ns, empty 902/986 -> 405/359 ns; means 1027/993 -> 408/409,
1126/1215 -> 579/522; made-to-committed p50 one encoder 5448/5469 -> 5022/4965 ns; states built 0-2 of 20,000.
Not measured yet: the release side (the reset on the releasing thread), a GPU device A/B (XTX/PHOENIX next; Iris when
its node is back).
Lane commits: 5266f9fa59 (make_bench), e91d54e0fc, 6e4c8a8723 (cfg-gated assignments in blocks).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
A GBGR422 or BGRG422 texture made over a buffer's bytes (Buffer::new_texture_with_iosurface_plane,
a CoreVideo 2vuy or yuvs plane, over a Shared buffer or a no-copy buffer's host pages) had no
decoded twin: twins are attached only to textures whose image is their own for good, so every
dispatch or draw that read or sampled it was refused, with a "needs R8G8B8A8_UNORM SampledImage"
line naming a format every device samples.
Such a texture is now an R8G8B8A8_UNORM image of its texels, the converted shadow a two-plane
YCbCr texture over planes already is (ShadowSource::Converted, its conversion now an enum of the
planes' and the pairs'): its copy in, before the first command of a command buffer that reads it
and after a command wrote the bytes, is one dispatch of the new bind::chroma_convert_module that
reads the pairs where they lie, at any byte of their VkBuffer, through one storage-buffer binding,
and writes Metal's texels (ChromaDecode, exact) through the image's R32_UINT view. Copies, blits
and CPU calls keep moving the plane's bytes. Where the device converts the pairs' format with
Metal's reconstruction (MoltenVK), the copy in is that conversion instead: the plane's rows copied
into the pairs' image, sampled through the conversion (chroma_sample_module) into a scratch,
copied into the image; announced decoded-texel-precision at the copy in's planning. The set binds
the buffer's VkBuffer, so the planning makes it again after a rebind gave the buffer another one,
and each command buffer holds the set it took. The placement query answers OtherShape. A plane
the window cannot take (past maxStorageBufferRange, a last word past the buffer, rows that share
bytes, texels past the buffer; with the device's conversion, a first byte or rows off 4 bytes)
keeps the carrier, its reads refused; FAST-PATHS records it as a known gap.
Per frame, per texture (w x h texels): before, no read ran at all; the texture was an R8G8_UNORM
carrier of the plane, 2 bytes a texel. Now no byte is copied: one dispatch reads the w*h*2 bytes
of pairs in place and writes w*h*4 bytes of texels (1920x1080: 4147200 read, 8294400 written).
Memory: one R8G8B8A8_UNORM image, w*h*4 bytes (1920x1080: 8294400), in the carrier's place; with
the device's conversion also the pairs' image (w*h*2) and the scratch (w*h*4), and per copy in a
w*h*2 copy in and a w*h*4 copy out. Announced carried-decoded-twin (an existing kind) with that
cost. No new Degradation kind, no new WorkCounts field.
A carrier's binding without a twin is now refused NotImplemented(Format) naming the texture's
format (pvrtc::holds_for_copies), not a need of the twin's view format.
Public surface: metal2vulkan::bind::{chroma_convert_module, ChromaConvertModule} added
(api_signatures.tsv blessed, api_surface table); docs/REFUSALS.md regenerated (one more
binding_view site of Format).
Tests: the in-place kernel against ChromaDecode's decode under the interpreter (both orders, first
bytes off a word, odd sizes, rows apart); a carrier's binding refusal (binding_view unit test);
a device test of both formats over a Shared buffer and over host pages reading Metal's measured
bar values (an Apple M3 Max, macOS 27.0.1) and Metal's decode of a random frame written on the
CPU before the next command buffer, OtherShape from the placement query, and the device's
conversion counted and announced where it converts. Verification jobs follow in the lane report.
Evidence (lane jobs): msi m3-max-32240 at 94f603bf35, --cfg m2v_cpu_icd on llvmpipe: 130/130 touched tests, clippy -D warnings 0;
the device test fails without the fix (placement not OtherShape, the read's dispatch refused). PHOENIX gem10 m3-max-32260
(archive m3-max-32241): all 4 cases (GBGR422/BGRG422 over a Shared buffer and over host pages) "Metal's texels, exact"
for the M3's measured bars and a random CPU-written frame; ycbcr_device, ycbcr_refresh, twin_reads 7/7. MoltenVK (device form)
run on the M3 follows.
Lane commits: 735234d5f4, d59f44baa6, 94f603bf35.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
stages() staged a gather over chunks the device's thread imports only where no use but a
copy's read may write its host bytes (RamOnDevice::written_over). That holds for the whole copy
as soon as one chunk it touches had a scatter recorded (copy_wrote, never cleared) or a buffer
over host pages lies over its bytes, so a first fill over a fresh RAM after any download into one
of its chunks took the imports' path: for_copy imported each chunk not imported yet on the
encoding thread (the ahead plan imports no range alone). A consumer's decoder waited 1.73 s
for 124 such imports on an RTX 3090 (each pins 64 MiB of fresh pages).
Such a gather is now staged as one over a chunk that takes no import is when written: in a part
of its own (Staging::after_the_gpu), its host step after the work before it in its command buffer
completed, on the steps' thread. Its encoder keeps no log (an encoding again through the imports
would start no part, so its parts would not be the first's). Docs: copy.rs, deferred.rs,
docs/HOWTO.md.
Tests: host_ram_copy_device::a_first_gather_over_chunks_a_scatter_wrote_waits_for_no_import (a
scatter then a gather in one encoder over two chunks not imported, the thread's imports held in
flight): the gather is staged, waits for no import, imports no range, reads the scatter's bytes;
two later fills of its pages (a later encoder, a later command buffer) land after its read.
Benches (ignored, release): host_ram_first_fill_spread_bench, host_ram_layer_encode_bench.
Evidence (lavapipe, msi): negative control m3-max-32190 (the test against the parent's copy.rs
fails: not staged, 600 ms waiting on two paused imports); with the fix all 92 host_ram tests pass
(32190); clippy cpuicd -D warnings clean and the extended test pass at the tip (32210). First-fill
bench after a 1-page download: before staged 0, 121 chunks imported on the encoding thread, call
1369 us (32174); after staged 1, 0 import waits, 0 chunks imported by the copy, call 328 us (32210).
The 3090 run follows.
Lane commits: e70fea0886, f50ee551c3, 9e74f43df1, ab6d8af756.
A Windows run (UHD 630) failed it with no more than the two ahead counts; the
message now carries what the device's thread did between them.
Verified: cargo fmt; the run follows on the Windows node.
The measured split behind the previous commit's bound (the teardown's wait for the stopped
check, less the release of its Vulkan objects), on the RTX 2080 (NVIDIA 620.70.06):
- Pin 99, run alone, its host making driver calls three to four times slower than usual
(um790 job m3-max-31777): wait 33.1 / 23.3 / 19.8 ms, release 19.6 / 22.0 / 18.4 ms,
difference 13.6 / 1.3 / 1.4 ms. The old bound failed all three.
- After the Thunderbolt replug and the reboot, the old test passed in the exclusive GPU-time leg
(m3-max-32075, 18/18; it printed no split, as it passed).
- This branch's test, 5 runs on the same card (m3-max-32110): wait 6.5 / 1.7 / 4.7 / 5.1 /
1.9 ms, release 4.5 / 1.6 / 2.7 / 3.5 / 1.7 ms, difference 2.0 / 0.13 / 2.0 / 1.7 / 0.13 ms.
So the release scales with the host's driver speed. Those destroy calls must precede
vkDestroyDevice (VUID-vkDestroyDevice-device-05137) on whichever thread makes them; they are not
the check's stop, which the 16 ms bound is for.
Controls in the same job, a diagnostic build of this branch (not for landing) that sleeps 20 ms
in the check: inside its timed release, the test passed with a wait of 26.8 ms (release 24.4 ms,
difference 2.4 ms), a wait the old bound would have failed; in its stop path (after its hold,
before it reads that the teardown began), the test failed: wait 24.5 ms, release 2.8 ms,
difference 21.7 ms. So the bound still catches a check that is slow to stop.
What changes: the test's doc adds the usual-speed numbers beside the slow host's.
Verified: cargo fmt; the numbers are from the jobs above.
a_running_queue_switch_check_leaves_the_device_to_the_program_s_thread failed on the RTX 2080
(NVIDIA 620.70.06) at pin 99, run alone (um790 job m3-max-31777): the teardown waited 33.1, 23.3
and 19.8 ms for the stopped check against RELEASE (16 ms), of which the release of the check's
Vulkan objects took 19.6, 22.0 and 18.4 ms and the drop of its shares 3-5 us. The wait less the
release was 13.6, 1.3 and 1.4 ms. At that time that host made driver calls three to four times
slower than usual. The same test passes on the RTX 3090 (same driver), the RX 7900 XTX and the
Radeon 780M.
Why the bound changes (the measured split above): the wait (QueueSwitch::stop) covers the test
hook's release (a 1 ms poll), the check's wake and the end of its step (none here: it is held
between rounds), then Objects::release: eleven destroy calls (three timelines, three fences, the
timestamp pool, the scratch buffer and its memory, the command pool of 97 command buffers),
through the validation layer this test's device enables. Those calls must precede
vkDestroyDevice (VUID-vkDestroyDevice-device-05137) on whichever thread makes them: moving them
to the teardown's own releases after its wait for idle would leave the last drop just as long
(5.1 s, 632 ms and 589 ms in those runs). They are driver time, not the check's stop, which is
what the 16 ms bound is for: that the teardown waits for at most one step of the check, never
for its run. The bound now applies to the wait less the objects' release (timed by the check,
QueueSwitch::last_steps), and the test prints the wait, the release, the shares' drop and the
difference, as queue_order's bounds take the driver's vkQueueSubmit time out. No product change.
Verified: see the lane report (the RTX 2080 job).
Verified: Windows clippy under --cfg m2v_gpu at eb6fb128a8 (job m3-max-32067) listed
these errors only; Linux clippy under m2v_gpu and m2v_cpu_icd passed there.
tests/host_os.rs gives the device tests fresh private and shared pages (a memfd on
Linux, anonymous shared memory on the other unix hosts, a section view on Windows),
their release and protection, the page size and CPU times, so the host-memory and
host-RAM device tests build and run on Windows under --cfg m2v_gpu. copied_device's
read-only host is a section with a writable and a read-only view on Windows, and its
read-only-copy tests run there; a new test checks that no-copy buffers over private
and shared pages are imported in place where the device takes them. shared_pointers
runs on every host and expects Intel's Windows driver to import a section view. Tests
of unix-only items (exportable buffers, dma-buf hooks, memfd guest RAM) stay unix-only.
Verified: cargo fmt; Windows and Linux clippy follow as jobs.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
Device::new_command_queue_for_copies() answers a CommandQueue whose command
buffers submit to the device's copy engine (the staging queue's family of
transfers alone), or None where the device has none to give (MoltenVK,
lavapipe, RADV by default, a copy engine of one queue, an adopted device).
Its VkQueue is the copy engine's third queue where it has one, else the fill
queue's, whose submissions then take that QueueSlot's lock: NVIDIA's copy
engine has two queues, staging's and fill's, and staging must wait for no work
in flight. The slot is the last of the device's VkQueues, after presenting's;
its family stays out of image sharing (buffers already share it as the staging
queue's family, so no ownership transfer is recorded).
Its command buffers take blit encoders alone, and of their commands buffer
copies, fills and fences: other encoders and blit commands are refused
(Invalid, Problem::CopyQueue(CopyQueueProblem::Encoder | Command)), as is a
caller's VkBuffer not concurrent with the copy family (Buffer). A copy batch
takes buffers' fills alone from first work. Barriers on its VkQueue name the
copy family's reads (Barrier::record_reading), not the primary family's, which
a family of transfers alone may not name beside ALL_COMMANDS
(VUID-vkCmdPipelineBarrier-dstAccessMask-02816).
A blit encoder's consecutive copy_from_buffer_to_buffer calls between the same
two VkBuffers that its order needs no barrier between are recorded as one
vkCmdCopyBuffer of many regions (copy_run.rs), on every queue; counted as
WorkCounts::buffer_copies_merged. Batches on the copy slot are counted as
WorkCounts::copy_queue_batches.
Verified: not yet built (first build job follows).
Also in this landing:
- Copy queue: docs, and the device test's None answer checked against the device
- Copy queue: keep the copy queue's place alive while the families are counted
Evidence: lavapipe 425/425 (m3-max-32049), clippy m2v_cpu_icd and m2v_gpu -D warnings (32049, 32053); XTX m3-max-32073: default RADV answers None; RADV_PERFTEST=transfer_queue: 1 batch on the copy engine, 63 of 64 row copies merged, sync file signalled, bytes right, refusals typed, validation layer silent.
The derived API table and docs/REFUSALS.md were re-derived on the merged tree (winport's #[cfg(unix)] gates landed beside copyq).
a_checked_command_buffer_committed_during_a_submission_is_taken_up_promptly still noted the
VkQueue's release before it sent the release to its holder thread, so the holder's own wake (it
must get a core to unlock: measured up to 40.7 ms after the release under 16 busy loops on the
RX 7900 XTX, m3-max-31893) was charged to the scheduler's thread against the 40 ms bound, and
its measure ran to the left command buffer's kernel start, past the instant where the driver's
time was read, so a wait for a core after its check counted too.
What: the test now takes the timing d25f77ecb1 gave its sibling
checked_commits_during_submissions_are_taken_up_promptly, through the same helpers, which move
into one place: the holder (`Held`, which both rounds and the commit-order test now use) notes
the instant it lets go of the VkQueue as its closure's last step, with the scheduler's thread's
schedstat (`Freed`); the left command buffer's take-up is noted by its submission handler on the
thread that took it (`carried`, `Noted`), and the bound applies to the take-up less the longer of
the driver's vkQueueSubmit time and the thread's run-queue wait over that same span (`own_time`,
`Noted::since`). Its kernel start and submission are printed, not bounded, as the sibling prints
them. The test also begins once the device's submission checks answered
(Device::settle_submit_checks), as the sibling has since 88ed42fc2a, for its reason: a lane
device's checks run on its first VkQueue as it is made, holding that VkQueue's lock for calls
batch_submit_nanos does not count, and this test's one round is the earliest there is. Each run
prints a TAKEN-UP-ONE line with the split. `in_driver` and `noting` had no other user and go.
Verified: see the lane report (the RX 7900 XTX job: 5 runs alone, and the old and new binaries
under busy loops pinned with the test to the same cores).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
What the runtime asks Win32 for on Windows (VirtualQuery and GetSystemInfo for host
pages, the performance counter and its calibration domain, GetThreadTimes, the C
runtime's atexit, the default shader cache directory), how section views are imported,
and the fd items absent there. docs/REFUSALS.md is unchanged (refusal_surface.py --check
passes): no refusal or RuntimeGap was added.
Verified against the code at this commit; no Degradation kind added.
The counters of dma-bufs, sync files and fd budgets that only unix code calls, and
in_place's Refusal::Source (made only from a caller's dma-buf source), compile on unix
alone; leaves_rows names the two refusals that keep the rows instead of listing the rest.
Again::pointer returns early so that its Windows form has no closure for clippy to flag.
Verified: Windows clippy at cd6973f432 (job m3-max-31977) listed these errors only.
x86_64-pc-windows-gnullvm (the primary Windows target) and x86_64-pc-windows-msvc, with
--all-targets --all-features and warnings denied. Clippy links nothing, so the Linux job
needs only the two targets' standard libraries. AGENTS.md's CI paragraph names the step.
Verified: the same clippy lines ran in potluck jobs on Linux (msi) for both targets.
dma_buf.rs's exit-guard and release imports, EventShared::carry's check of an exported
semaphore and the memory tests of dma-buf and fd placement compile on unix alone.
The docs of refuse_unwritable's callers now say Windows asks the system as Linux does.
Verified: Windows clippy (gnullvm, msvc) at a571e90d9d reported these errors only.