Commit Graph
3231 Commits
Author SHA1 Message Date
Anees Iqbal abba06ab44 An allocation at the limit waits for the untaken chunks' give-back
The first allocation that brings a device within a quarter of its
maxMemoryAllocationCount starts a thread that gives back the guest RAM
chunks imported ahead that no object took. An allocation that reached
the limit before that thread ran waited only for the free thread's
posted frees, then was refused while those chunks still held the
device's allocations: Metal would have made it.

Allocations now counts each give-back under way (GiveBack, dropped by
its thread once it gave back what it found, or with the closure where
the thread never started). An allocation that finds the limit reached
starts the give-back where one is due, waits for those under way, then
for the posted frees, then asks again before refusing. The give-back's
thread takes the RAMs', chunks' and memory's locks, none of which an
allocation is made under, and allocates nothing, so the wait ends.

Verified: allocations::tests::an_allocation_at_the_limit_waits_for_the_
give_back_under_way (CPU, fails without the fix: refused), and
host_ram_device's an_allocation_at_the_limit_waits_for_the_untaken_
chunks_to_go_back on lavapipe (fails at the test commit before this
one), with the give-back wait counted. RUNTIME behaviour: an allocation
at the limit may now wait for the give-back thread instead of failing
with ERROR_TOO_MANY_OBJECTS.

(cherry picked from commit d93fecb6add984b46cb1363fc6b69b2e2e014639)
2026-11-10 02:59:22 -08:00
Anees Iqbal 7624bf62b5 Test: an allocation at the limit while the untaken chunks' give-back is slow
The device's thread imports guest RAM chunks ahead until a quarter of
maxMemoryAllocationCount is left; the first allocation inside that
margin starts a thread that gives the untaken chunks back. Nothing made
an allocation that reaches the limit wait for that thread, so objects
allocating faster than it runs were refused while chunks no object took
still held the device's allocations (Metal holds no such chunks and
would not refuse).

The new device test holds the give-back's thread 500 ms as it starts (a
test-only hook, Allocations::hold_give_backs, standing in for a loaded
host), makes buffers of blocks of their own at once until one is
refused, and asserts the refusal came with only the objects' chunks
live and the objects had the whole rest of the limit. It fails before
the fix that follows. The existing margin test shares its setup through
at_the_margin; its assertions are unchanged.

(cherry picked from commit 7a5696f4067ebeaa4309e17fc716e911ba33e93d)
2026-11-10 02:59:22 -08:00
Anees Iqbal 314aeefcbc The runtime-sources pin for exit registrations' load count
The pinned exit_guard.rs gains Registrations::loads, the process's load count that the
re-registration rule reads, so the lane's re-registration test can key on it. A new
diagnostic field: no runtime behaviour or announcement changes, so RUNTIME_VERSION stays
2006 and only the pin moves.

Verified: pin-compute over the tree; api-signatures --check clean (the field is not in
the published surface table's names); refusal, conformance and Metal coverage generators
leave the tree unchanged.

(cherry picked from commit d0a83e955e24ed282662d5b6682ed9ff88f77614)
(cherry picked from commit a36bbc9a03b4dbbadce3f26a1844db94f3d76613)
2026-11-10 02:59:20 -08:00
Anees Iqbal 2b4a2e7049 frame_costs: a pass-open bound that fails names each open's allocations
On the Iris Xe host with its default manifests, a_frame_s_pass_opens_allocate_within_their_bound
failed once in seven runs of the whole runtime lane: 6.06 allocations a pass open against a bound
of 4.5, about 406 over the frame's 67 opens, where every other run counted 4 at every open. It
passed 22 runs alone: 5 with the default manifests, 5 with Intel's alone, and 6 beside 20 busy
loops and 6 quiet. The average cannot say whether the excess was a burst in one open or spread
over many, so the failure now lists each open's count, in order, for the next occurrence to
place.

(cherry picked from commit 696e308a5f5512800919d857b607f7bfe3303747)
(cherry picked from commit 2719dea7e05d287293a21c1d7e588515e5cfb1d1)
(cherry picked from commit 20a4f47435d5e2a8a38f521fca8270ba3c42b2c7)
2026-11-10 02:59:20 -08:00
Anees Iqbal 160c8af897 Exit registrations: the process's load count; the lane's re-registration test keys on it
The exit guard registers its hook again at the first device made after the process loaded a
shared object, since a library loaded again makes its statics again. On a host whose loader lists
a driver manifest whose library loads and is dropped at each instance, every device is made after
a load, so every device registers, as the rule says. runtime_lane::exits'
devices_made_again_register_the_exit_hook_no_more assumed nothing loads between devices and
failed there (19 registrations at devices where it expected 3).

ExitRegistrations now carries the count the rule reads (`loads`), and the test expects one
registration at each of its 16 devices made while that count moved, and none at the others:
where nothing loads, none, as before.

Verified on the Iris Xe host with its default manifests: the test passes, 16 of its 16 devices
made after a load and 16 registrations (2160 loads over the 16 devices, 135 each: NVIDIA's
library and what it loads, three times a device). It passes in the 780M and lavapipe lanes too.

(cherry picked from commit 6f500ee5bf333224af4767ac5c08865e19821049)
(cherry picked from commit 646657937c1d1aecf87dc0c911691baf980aeb4b)
(cherry picked from commit 86d843ed2359d8ea4226b77fcdf9e105587294b8)
2026-11-10 02:59:20 -08:00
Anees Iqbal 0d6900275e Validation: the engine executor and the adopted harness pass the loader's reports of ignored drivers
On a host whose loader finds a driver manifest it cannot use (a vendor's library for hardware the
host lacks, beside the GPU's own and lavapipe), the loader reports at each vkCreateInstance that it
loaded the library, got no vkCreateInstance from it and ignored the manifest. The runtime lane's
Messages already passes those reports (IgnoredDrivers, with a LANE-LOADER-DRIVER line), but two
other sinks counted them as validation messages:

- the engine executor's MessageSink (candidate/platform/device.rs), so every compute and render
  run on such a host failed "VK_LAYER_KHRONOS_validation reported N message(s); the run is not
  evidence" (19 lane tests on the Iris Xe host with its default manifests: kernel_textures x16,
  argument_buffers, renders::public_render_cases, sparse_textures::sparse_cases);
- the adopted-device harness's Reported (runtime_lane/presenting.rs), so 6 tests that make their
  own instance failed "the validation layer reported" (gpu_times, heap_textures, presenting x2,
  view_reinterpretation x2).

Both now keep each message's id name and text apart and pass, through the same IgnoredDrivers,
the loader's reports about the libraries it said it ignored, each printed as a line of its own;
any other message, the same text under another id name included, still fails. The sink's unit
test covers both sides.

Verified: on the Iris Xe host with its default manifests (Intel, Intel hasvk, lavapipe, and
NVIDIA's with no NVIDIA hardware), the runtime lane 1943/1943 at f2be42c229, three runs, and at
3257c8886c; 2deffb9e1d failed 26 there, these 25 and the exits test. On the 780M host's (RADV and
lavapipe), the 780M lane 1941/1941 and the lavapipe lane 1953/1953. clippy (no cfg, m2v_gpu,
m2v_cpu_icd), Rustdoc and the plain unit tests clean.

(cherry picked from commit 076e9a55b2246d9b46e3446880566da684aba86e)
(cherry picked from commit dfaaa666847b944635c7af60834255d9210997ac)
(cherry picked from commit 1fe461150fdd7d785553145522d1b5267cf9a666)
2026-11-10 02:59:20 -08:00
Anees Iqbal 95969121f1 Known gaps: the padded-fetch cases on the Iris Xe
From the replay of the 11 padded-fetch cases on the Iris Xe (job m3-max-13463): its linear loads
exact, an sRGB twin's colour a half step from Metal's table where the device's Pow decode rounds
apart (device-pack-conversion), and the clear and draw cases the announced stored-codes
difference; the same replay held every padded-blend row on the Iris Xe. CONFORMANCE-COVERAGE.md
regenerated.

(cherry picked from commit 51f7de510a25e696fbb83be145d73e6ee70be94f)
(cherry picked from commit 92f9642928970b8d8f19731a667f9af3572881df)
(cherry picked from commit 9dd440ac76a1bbb46b6d001e936d4693dbe1cd06)
2026-11-10 02:59:19 -08:00
Anees Iqbal 510c6938c9 Known gaps: the padded-fetch cases on the RX 7900 XTX
From the replay of the 11 padded-fetch cases on the RX 7900 XTX (job m3-max-13462): the same
answers as the Radeon 780M's, and the same replay held every padded-blend row on the XTX.

(cherry picked from commit 85edc61c8fbdac59cdbcd98872b19604ab8b56c8)
(cherry picked from commit 7841e1ce9e868c2889cdee2f8404b55b9275d34a)
(cherry picked from commit 7cc00780f59bf1f099e1a41dbf6751b615da2e5e)
2026-11-10 02:59:19 -08:00
Anees Iqbal 6fa25ee1c8 Known gaps: the padded-fetch cases on the RTX 5080
From the replay of the 11 padded-fetch cases on the RTX 5080 Laptop GPU (b5080 entry
xrblend2-padded-fetch-5080): the device's compiler drops the half narrowing pair of every load
(native-half-conversion), an sRGB twin's colour decoded by the device's Pow
(device-pack-conversion), and the clear and draw cases the announced stored-codes difference. The
same replay held every padded-blend row on the 5080.

(cherry picked from commit c7c5b86a956986352c078e621d25540ed598d837)
(cherry picked from commit b2c8e42d05185bcf3ca2e433ce538b098d73716a)
(cherry picked from commit b685d4a7fc5e8ae3a5b3ffab78d0cef062753df8)
2026-11-10 02:59:19 -08:00
Anees Iqbal a94263847d Known gaps: the padded-fetch cases on the M3 Max, lavapipe and the Radeon 780M
From each venue's replay of the 11 padded-fetch cases (jobs m3-max-13451, 13460, 13461):
- an sRGB twin's load: Metal reads each code's colour through its table, ours decodes by the
  device's Pow (device-pack-conversion);
- on lavapipe, a linear load: the device's compiler drops the half narrowing pair
  (native-half-conversion), and on the M3 Max it does so for the sRGB decode;
- a clear or an earlier draw: Metal's tile holds the half, ours reads the codes stored, the
  difference the runtime announces as extended-range-blends-stored-codes; open: a half shadow of
  a padded attachment.
The linear loads are exact on the M3 Max and the 780M.

(cherry picked from commit 8d96b24266c18d844f83b8b90b1aa54e77194e3f)
(cherry picked from commit 433eec6ce1a9e302450292091cea9a00d8e19e9b)
(cherry picked from commit aec857e24ce9e24a60c80a2093187bcb996e61a2)
2026-11-10 02:59:19 -08:00
Anees Iqbal 510334b8bd SEMANTICS_VERSION 2015: a padded attachment's fetch is built, and the storage form writes a bfloat attachment as its render pass stores it
A fetch of a padded 10-bit attachment reads the tile value of its codes where it was refused
FramebufferFetch NotImplemented, and an unblended bfloat attachment in the storage form stores
the render pass's code (the pipeline's half rounding, then the nearest bfloat code) where it
stored a kernel write's, or failed under a mask of some channels.

(cherry picked from commit 8eb87c9660870faf0b5b60fd588057d359afff21)
(cherry picked from commit 352cff9cfb3f03717607824ca2744b045ca7c5e9)
(cherry picked from commit 8ab0f91e83ac888f38de19dfb38fae6a89d5d05d)
2026-11-10 02:59:19 -08:00
Anees Iqbal 4aefeb8a29 Record the padded-fetch cases on the M3 Max, with their times
conformance record, then times --runs 8 --write, of the 11 padded-fetch cases on the M3 Max
under macOS 27.0.1 (job m3-max-13451): 11 cases carry their timing.

(cherry picked from commit 0290120cd8fb713970a958819c529814c78888a3)
(cherry picked from commit 0d73f5706bde8710e64bfba46004dd82f8e43589)
(cherry picked from commit 8ea4586ba4d8e0b9809fb5f86f586dca562cdc7d)
2026-11-10 02:59:19 -08:00
Anees Iqbal 40ca62ad3e Conformance: the padded-blend rows on the RX 7900 XTX
The 17 padded_blends cases replayed on the RX 7900 XTX (RADV NAVI31) answer exactly as on the
Radeon 780M (RADV PHOENIX): the same counts and largest differences, the dual-source cases at
the count of the as-written model over a half destination (844 and 1607). Rows from that replay
(job m3-max-13429), each the 780M row's text at the XTX's venue.

(cherry picked from commit e4519d95b14c4c5d0f4de9ef6af0324c06b2daf4)
(cherry picked from commit a7d9ec2b9764f9535240a4be82510063107ad1f7)
(cherry picked from commit 911711fb5d1d6a98ec401cd38592648e27106bb9)
2026-11-10 02:59:18 -08:00
Anees Iqbal ba353413d2 The storage form writes a bfloat attachment as its render pass stores it
An unblended write to a bfloat attachment the draw moves into the interlocked storage form
(named in LoweringInputs::framebuffer_fetch) went through the extended-range path: a write of
every channel stored a kernel write's code of the output's half (rounded to nearest even, then
the low 16 bits dropped), not the code Metal's render pass stores (the half by the pipeline's
textureWriteRoundingMode, then the nearest bfloat code), and a write of some channels failed
inside the lowering (encode_keeping has no bfloat codes). It now stores
extended_color::bfloat_output, as the color attachment's write does, and keeps each masked
channel's code from the texel it read, a component of its own; a float output records the
pipeline's rounding mode, which link holds.

Test: an_unblended_bfloat_attachment_is_written_in_the_storage_form.
(cherry picked from commit 4c49fa9dbd897c3a05638e7e83594bb34aa22106)
(cherry picked from commit c3f07bea90e2a5fb1734255dd592df2b49173e8d)
(cherry picked from commit 6961d6a50b4735a50a1fbbc7a90c24518457baec)
2026-11-10 02:59:18 -08:00
Anees Iqbal ee86d63596 Conformance: what a fetch reads of a padded 10-bit attachment
padded_fetch: eleven cases reading color 0 of a padded format through
pfx_fetch into an RGBA32Float color 1: every format after a load of every
code (float4 input), R10Unorm_X6 and RGB10A2Unorm_sRGB also with a half4 input,
after a clear that is no code's value and past [0, 1], and after an earlier
unblended draw of the pass. Their cost records are billed to the next
whole-set run. Recordings follow from the M3.

(cherry picked from commit 4662f28c85c4d0c40151cef168babab8c0291f91)
(cherry picked from commit deeb0d42e1e7b4cb02a49c76296669a3c7d83cfd)
(cherry picked from commit a90b69c2ed6c87ce8d5921cd133152a075e1bfb2)
2026-11-10 02:59:18 -08:00
Anees Iqbal af1dd85b66 Blend-source notes state their bound and the device compiler's regrouping; padded rows on the 5080 and the Iris Xe
ExtendedRangeBlendSource and ExtendedRangeFloatBlendSource (their docs, the API
catalogue entries and the FAST-PATHS device-gap row) now say what the suite
measured: the device's compiler may contract and regroup the in-shader blend
(MoltenVK on the M3 Max and NVIDIA's driver on the RTX 5080 compute
S·F + D·(1 - F) as D + F·(S - D)); a stored channel lands within two codes of
Metal's on a linear format and within six near zero on an sRGB twin; and where
the compiler regroups a padded format's blend, an infinite second source stores
an end code where Metal's sum is NaN, stored as 0. The FAST-PATHS row names the
padded formats, which it lacked, and no longer says 'not measured'.

known-gaps.tsv: the 168 extended-range rows (xr-blend, xr-gamut, xr-gradient,
xr-masked) whose Open item was the blend notes' documentation are closed (Open:
nothing, the recorded bound covering the difference); every one is within the
bound (survey of the rows' largest differences). The padded-blend rows are
regenerated for five venues: the M3 Max, RADV PHOENIX and llvmpipe as before,
and the RTX 5080 (b5080 entry xrblend2-padded-replay-5080) and the Iris Xe
(job m3-max-13386), 17 each. The 5080's second-source cases differ by the whole
code range as the M3's do, and its counts are exactly a model of
D + a·(S - D) over an unnarrowed float destination (971 on R10Unorm_X6, 1850 on
RG10Unorm_X12); the Iris's are exactly the sum as written over the half
destination (844, 1607), as RADV's; llvmpipe's the sum as written over a float
destination (962, 1831). No venue's largest difference exceeds the M3's, the
780M's or llvmpipe's.

engine_padded_blends: a fetch of a padded attachment makes the whole pipeline
on every committed profile that orders fetch (storage form or input
attachment) and names the device gap elsewhere; a bfloat fetch stays
NotImplemented(Format), the negative control. Not yet run.

(cherry picked from commit c923b6d49c36c8354f375f6dababfd5f81f1ffbc)
(cherry picked from commit e3a2b226d7f5938811d1d251172088baf05c15cb)
(cherry picked from commit 85a2473cc6ea6a2c9165e2614d1e87ca77c1627e)
2026-11-10 02:59:18 -08:00
Anees Iqbal 4e409e85f1 Fixture pfx_fetch: its companions from scripts/regen-air-fixtures
Regenerated on the M3 (job m3-max-13401, Metal 32023.922, SDK 27.2, LLVM 21).

(cherry picked from commit 67bc2d50f0df5bbfc7bf6063412a3abce681fcfe)
(cherry picked from commit f991e6031a3591105fc2156b7e76db55e920bbaa)
(cherry picked from commit c9d2958d65853e87a83c887c7d23ac93a10f5fa1)
2026-11-10 02:59:18 -08:00
Anees Iqbal 813989fc31 A fetch of a padded 10-bit attachment reads the tile value of its codes
Metal's fetch of R10Unorm_X6, RG10Unorm_X12, their sRGB twins and
RGB10A2Unorm_sRGB (probes/padded_fetch.m, the M3 Max under macOS 27.0.1)
reads each loaded code's value rounded to half, for a float4 input as for a
half4 one (4088 of 4096 R10Unorm_X6 codes differ from the f32 quotient and
all equal its half; RGBA8Unorm, the control, reads the f32 quotient into a
float4). The missing lanes read (0, 0, 1). After a clear the tile holds the
clear's half unclamped (-0.25 and 1.25 read back), and after an earlier draw
the output's half rounded toward zero, unclamped: the stored codes keep
neither, which the runtime already announces for a read of such a color
(extended-range-blends-stored-codes).

That read is extended_range::tile_value, which both the storage form and the
input attachment form already use; the refusals (NotImplemented
FramebufferFetch) in fetch::select_read and color::select go. tile_value's
f32 product decode rounds to the quotient's half at every one of the 1024
codes (checked offline).

(cherry picked from commit c355ad88cfc746342472c32c1cd7885fbc5ed02e)
(cherry picked from commit 1e5600630d4b02b2590f309e44ea6d4281b56fdc)
(cherry picked from commit eaf7ee8e14f2008ec904fbd97dab763e69214520)
2026-11-10 02:59:18 -08:00
Anees Iqbal 12c71f372d Fixture pfx_fetch: a fill of color 0 and float4 and half4 fetches of it into color 1
Owned MSL for the padded fetch cases: pfx_fetch_fill writes color 0 from a
buffer, pfx_fetch_read and pfx_fetch_read_half read [[color(0)]] and store it
into color 1. Companions follow from scripts/regen-air-fixtures on the M3.

(cherry picked from commit b87065bd664601d52b50b433090e27a643ddf132)
(cherry picked from commit 05c5fc580c141fd642d664126e3b1eebaf8f7871)
(cherry picked from commit a70d23b9ed2f53e5ad083d785753b50fb13a71f1)
2026-11-10 02:59:18 -08:00
Anees Iqbal 1434170fdf Probe: what a fetch reads of a padded 10-bit attachment
padded_fetch.m reads [[color(0)]] of R10Unorm_X6, RG10Unorm_X12, their sRGB
twins and RGB10A2Unorm_sRGB (RGBA8Unorm the control) into an RGBA32Float
attachment, as float4 and half4, after a load of every code, after clears
that are no code's value and past [0, 1], and after an earlier unblended draw
of the same pass. The translator refuses such a fetch until Metal's answer is
known.

(cherry picked from commit b68a67df4858381b7f72321c60042de11d0265e2)
(cherry picked from commit b1f12f936dd22eabc8b707226dadf1e4c5dae6cb)
(cherry picked from commit 3fb6e70492b917951b3531df866a761c27c0b019)
2026-11-10 02:59:18 -08:00
Anees Iqbal 74e1ba00ba Re-bless the authored compile census at afffe89171
Pin 34's final census, at the tip its legs ran.

Its product fingerprint follows development's versions at afffe89171. Blessed on the
M3 (s37-pl.sh censusbless --bless).

(cherry picked from commit 812b54d088528f28780320995e0ea2066c49f8d6)
2026-11-10 02:58:54 -08:00
Anees Iqbal bf71ba68cf Conformance: no case waits for a cost record after the re-bless at 8b2d463e92
The whole-set cost --write behind edabbc0b2c recorded the 17 padded-blend and 13
read-through cases that AFTER_THE_LAST_RUN named as authored after the last run, so
every_case_carries_a_cost_recording failed ("these cases are named as uncovered but now
carry a cost record") in dv-suites at edabbc0b2c (job m3-max-13483: 1263 cases checked, 0
carrying no record, 30 named). The list is empty again.

Verified: the conformance suite at this commit (job below in the landing note).
2026-11-10 02:58:20 -08:00
Anees Iqbal afffe89171 The runtime-sources pin for the making parts' renamed field
memory/making_parts.rs (test-only: cfg(all(test, m2v_gpu, linux))) renames free_on_cpu to
freeing_on_cpu, so the release-door test's source scan no longer reads it as a release. No
runtime behaviour or announcement changes: RUNTIME_VERSION stays 2006, only the pin moves.

Verified: pin-compute over the tree; no free_on_cpu left under crates/.
2026-11-10 02:56:25 -08:00
Anees Iqbal 3e174bf57c Rename the making parts' free_on_cpu field, which the release-door test read as a release
tests::exit_guard::every_release_goes_through_the_release_door scans the runtime's
sources outside src/tests for `.destroy_` and `.free_` and fails on any hit outside
release.rs. 82f046a119 added the field `free_on_cpu` to memory/making_parts.rs (a
test-only module that lives under src/memory, so the scan reads it), and
`fill.free_on_cpu` matched the `.free_` needle: the test fails on every venue (seen
on the Iris Xe, ms01, in the runtime suite at development's 6f7bb169d2).

Chosen: the rename (`freeing_on_cpu`), three words in one file. A structural needle
(a `.free_*(` call alone) would need a filter in the test's `uses` helper, which is
larger than the rename.

Verified on homelab-um790-xtx-1 (plain build, no GPU; the test reads the sources at
run time): the test passes at this commit, and with the old making_parts.rs put back
over this tree (the old needle against the current tree) it fails, naming
`memory/making_parts.rs: .free_on_cpu`.

(cherry picked from commit e935b32902652accf371993d95968d698bc433b8)
2026-11-10 02:56:10 -08:00
Anees Iqbal edabbc0b2c Re-bless the cost records at 8b2d463e92
544 recording(s) whose bounds moved. Pin 34 candidate (84e4244c5d). Counts moved down: blend-sweep-second-source translates 1 function, not 2 (xrblend: a dual-source second output to a padded attachment is the blend second source, 9f4c95f3f5); sampler-r-address-modes begins 9 command buffers, not 10 (readoffset reads through a sampler, 3257c8886c). First records for the 28 cases new since the last run (read_through 11 measured, padded_blends 17). Contrast: the record at b03cb41a98, cost --check at 632064ab46 (job 13407).
Measured on the M3 (s37-pl.sh rebless: cost --runs 8 --write over the whole
set, then cost --runs 8 --alone --write over the changed cases).

(cherry picked from commit 5ff9261e7d93fdcf92a05f6c1e6eec6f12b8deb1)
2026-11-10 02:42:10 -08:00
Anees Iqbal 6f7bb169d2 RUNTIME_VERSION 2006 and the runtime-sources pin for texture CPU copies staged beside the device's queues
What: the four commits before this one (getbytes, steelbrain/getbytes 6695d4f056): where no
memory the host caches may hold a texture's image and the device has no copy engine, the
queue plan reserves the first queue of a free graphics or compute family as the staging
queue, and textures' CPU copies (get_bytes, replace_region) go through a host-cached
staging buffer on it. Chosen from memory types and queue families only. Under
DeviceOptions::queue_limits the staging queue is the plan's (the runtime's own, shared
by no command queue): it counts against neither limit and raises no limits message.
RUNTIME_VERSION 2005 -> 2006. The pin follows.

Why: a 1080p Shared texture's get_bytes on the RX 7900 XTX (RADV NAVI31, ReBAR) read
through vkCopyImageToMemoryEXT from device-local uncached memory: 1.0-1.7 s (4-byte
loads 1.0-1.4 us each).

Verified (getbytes, all on the XTX, MESA_VK_DEVICE_SELECT=1002:744c!, Mesa 26.2.6):
focused tests 38/38 (13435), the device keeping the plan's staging queue at 1+0 with 0
limits messages; lane frame_sized_textures_copy_texel_exact at 1+0: 1080p get_bytes
best 3.26 ms, median 2.88 ms with 2 s of GPU work running, texel-exact; runtime suite
2032/2032 (13436/13438/13439); lane at 1+0 1929/1929 (13440-13442); GPU-time tests 5/5
(13443); negative control (fix off) fails the new assertion; RX 550 runtime suite
2002/2002; um790 clippy (three configurations), rustdoc and 31 unit tests (13425).
Base: 256x256 33-41 ms, 1080p 1.26-1.71 s; tip: 0.10 ms, 2.0-2.2 ms, 4096 17 ms.
replace_region was never slow (1.5 -> 1.1 ms).
2026-11-10 02:31:57 -08:00
Anees Iqbal 182ea8c681 The XTX's measured CPU copy times, on the host and on its staging queue, in the docs
What: device/staging.rs, queue_plan's docs and memory::host_cached now give what was measured on
the RX 7900 XTX (RADV, Mesa 26.2.6) in place of the 1.0 to 1.7 s the sweep reported; the
first_use lane's note on a slow read says it was on the host.

Measured (release builds, tests::cpu_copy_times, BGRA8Unorm Shared texture, best/median ms):

| Device | Path | 256x256 get_bytes | 1080p get_bytes | 1080p under 1.5 s of fills | 4096x4096 get_bytes | 1080p replace_region |
|---|---|---|---|---|---|---|
| XTX base (3 runs) | host, type 3 (device-local, host-visible, uncached) | 32.8-40.2 / 33.2-40.6 | 3.2-1387 / 1260-1714 | no read returned while they ran | 35.6-46.3 / 41.2-49.0 | 1.49-1.54 |
| XTX tip | staging queue (compute family 1, queue 0) | 0.10 / 0.13 | 2.02 / 2.18 | 1.86 / 1.96, worst 2.09 (20 of 20) | 17.27 / 17.30 | 1.09 |
| RX 550 base | submissions on the first VkQueue | 0.16 / 0.17 | 3.90 / 4.14 | no read returned while they ran | 32.87 / 33.20 | 1.15 |
| RX 550 tip | staging queue (compute family) | 0.17 / 0.17 | 4.28 / 4.41 | 307.7 / 312.4 (3 of 4) | 33.58 / 34.32 | 0.92 |
| 780M base / tip | host, host-cached | 0.03 / 0.03 | 2.52 / 2.05 | 3.41 / 3.23 | 22.85 / 23.12 | 0.19 / 0.18 |
| lavapipe base / tip | host | 0.01 / 0.00 | 0.24 / 0.23 | 0.81 / 0.78 | 9.70 / 9.74 | 0.25 / 0.25 |
| M3 Max base / tip | host (MoltenVK 1.4.2) | 0.09 / 0.09 | 3.03 / 3.33 | 0.36 / 0.35 | 28.63 / 28.59 | 0.28 / 0.29 |

The XTX's split at base, 1080p: a blit of the texture into a Shared buffer (type 5, host-cached
system memory) took 1.54 to 1.78 ms and the host's copy out of it 0.27 to 0.74 ms. The memory log
(METAL2VULKAN_LOG_MEMORY=1) placed the texture's image in a pooled block of images of type 3. A
raw probe (scratch, not committed) read that type with 4-byte loads at 1.0 to 1.4 us each (8 MiB
in 2.94 s, 256 KiB in 66.7 ms), the cost the host copy's times match texel for texel.

Negative control: the tip's tests with queue_plan given `cached = true` (no staging beside the
device's queues), on the XTX: tests::cpu_copy_times failed, "256x256: a device with no memory the
host caches for a texture's image and a queue family to stage on copies its textures on the
staging queue" (left "copied on the host from uncached memory"), and printed the base's times.

(cherry picked from commit 6695d4f056fc7aac2a0e628ddf12145fc60bc7dc)
2026-11-10 02:31:08 -08:00
Anees Iqbal 414d555f0c Stage a texture's CPU copies beside the device's queues where its image has no host-cached memory
What: where a device has no copy engine and no memory the host caches may hold a texture's image
(memory::host_cached_placement of Private finds none: a discrete GPU with no device-local type
the host caches, an RX 7900 XTX or an RX 550 under RADV), queue_plan reserves the first queue of
the first family of graphics or compute work none of the device's own queues are of (RADV's
compute family) as the staging queue. A Shared or Managed color texture there copies on that
queue (texture/staging_copy.rs): replace_region queues its copy, and get_bytes copies the texels
into a staging buffer in host-cached memory and reads them from there, waiting for that copy
alone. Where a texture's image has host-cached memory (unified-memory devices, MoltenVK,
lavapipe) or a copy engine exists (NVIDIA), the plan is as before.

Why: on the XTX a Shared texture's host-transfer image lay in device-local host-visible memory,
its one type for it, which the host reads uncached: a 1080p get_bytes took 1.0 to 1.7 s through
the host's mapping. The decision is made from the memory types' properties and the queue
families, never from the driver.

Tests: queue_plan's unit tests cover both settings of the new input (the XTX's shape stages on its
compute family; the 780M's, whose textures have host-cached memory, stages on none; a compute
family whose copies take whole blocks, a video family that transfers, and equivalent families
stage on none). tests::cpu_copy_times now asserts that a device with no memory the host caches
for a texture's image and a family to stage on copies its textures on the staging queue; the
first_use lane's frame-sized check asserts the same (has_a_family_to_stage_on).

Queue limits (DeviceOptions::queue_limits): queue_plan_within and planned_queues take the same
input, so the plan within limits and the plan it is compared with reserve the same staging queue.
The staging queue is the runtime's own, no program queue: the limits never change it, it counts
against neither limit, and it never sends metal2vulkan-queue-limits-reached; a device made with
the lane's limits of one and none keeps it where the plan reserves it (the XTX's compute
family's first queue). QueueLimits' docs state the rule. tests::queue_limits checks every shape,
reservation and limit (the XTX's shape added) keeps the plan's staging queue, and that the XTX's
shape under the lane's limits with a reserved queue and extra graphics and compute queues
compares equal to the plan; tests::queue_limits_device asserts the device keeps the plan's
staging queue under the limits and prints it.

Docs: the staging queue's, the host copies', the sharing's, DeviceHandles' and the README's
accounts of where the staging queue lies; the RX 550 examples of copies through the first
VkQueue are reworded, as it stages on its compute family now.

Verified: in the commits that follow (base against tip timings, the negative control, the touched
tests on the devices).

(cherry picked from commit 8b07b4531e0f52ee5080336087bb5d3fdf428e53)
2026-11-10 02:31:08 -08:00
Anees Iqbal 02d8f5b2e4 Time a 1080p Shared texture's get_bytes while GPU fills run, in the CPU copy times
At 1920 x 1080 the timing test now reads the texture again while about 1.5 s of fills of a
Private buffer run on the program's command queue (sized from four fills timed alone), up to 20
reads, and prints the best, median and worst of those that returned while the fills ran: a read
that goes through a submission behind the program's work, or through the host's mapping of
memory the GPU is busy beside, shows there.

Verified: compiled in the next commits' runs.
(cherry picked from commit 326794e347bb9d53c2f1877495bf5f333b22776e)
2026-11-10 02:31:07 -08:00
Anees Iqbal 107673ccc8 Time a Shared texture's CPU copies at three sizes beside a read through the GPU
A device test that prints, for a 256 x 256, a 1920 x 1080 and a 4096 x 4096 BGRA8Unorm Shared
texture a render pass may draw into: the path its CPU copies take (on the host, from memory the
host caches or not; on the staging queue; through submissions), the best and median time of
get_bytes and replace_region, and what a read through the GPU costs beside them: a blit of the
texture into a Shared buffer, waited for, and the host's copy out of that buffer. Each read is
checked texel for texel.

Why: a 1080p get_bytes on an RX 7900 XTX (RADV) took 1.0 to 1.7 s; this measures it and its
alternatives on every device at once, in a release build.

Verified: the base timings it prints are in the next commits' messages.
(cherry picked from commit 57d5f61debd2f9532c7b6aebca803e578fea4854)
2026-11-10 02:31:07 -08:00
Anees Iqbal 84e4244c5d RUNTIME_VERSION 2005 and the runtime-sources pin for sampler-table kinds held by live variants
What: the two commits before this one (xrblend, steelbrain/samplerkind b4569abb0c): a
pipeline variant takes a share in its sampler-table kind (heap_sets::TableBinder) at its
first command and holds it while its objects live (a kept instance holds none); a
sampler state's creation notes only the kinds a live variant binds, and a variant's
first command notes the first live state its kind leaves out (cubic, or past its
capacity). Before, a state's creation was announced against every table kind the
device had ever bound and kept until teardown: a false unlisted-argument-sampler
notice, no wrong read. RUNTIME_VERSION 2004 -> 2005 (an announcement). The pin follows.

Why: development's whole-set replays at 632064ab46 failed on the M3 (job 13422) and
lavapipe: sampler-cubic-filter announced unlisted-argument-sampler after the
read_through family had bound a kind that leaves cubic states out.

Verified (xrblend): the notice's site printed by a diagnostic sink (put_sampler ->
Notes::sampler_cubic, not sampler.rs's array-full notice; kept instances not involved);
new device test tests/sampler_table_binders.rs, which fails under the old rule (exit
100); lavapipe whole-set replay exit 0, 1340 cases, the 1272 rows exactly the expected
gaps (um870, job 13448); the M3: read_through then sampler-cubic-filter exit 0 (13450);
msi: 122 runtime tests under m2v_cpu_icd, clippy plain/m2v_cpu_icd/m2v_gpu and rustdoc
green (13449, 13454). Generators and api-signatures --check unchanged at landing.
2026-11-10 02:23:30 -08:00
Anees Iqbal 1d65dfb274 The sampler-table binder's test hook is compiled only with the device tests that use it
Clippy without a device cfg found bind_kind_for_tests unused: tests/sampler_table_binders.rs
compiles only under m2v_gpu or m2v_cpu_icd.

(cherry picked from commit b4569abb0c0526d300f0a8cedc442b7f104dcf0c)
2026-11-10 02:22:43 -08:00
Anees Iqbal 3af015c5ec A sampler state a table kind leaves out is announced while a variant binds that kind
The device makes a sampler table of each kind (its capacity, and whether it maps cubic states)
at the first command that binds one and keeps it until teardown. A sampler state's creation
noted every table the device kept: a cubic state made after a variant whose stage does not test
for a cubic filter had bound its kind and gone was announced unlisted-argument-sampler although
nothing could bind that table any more. The whole-set conformance replay at 632064ab46 met it on
llvmpipe and on the M3 Max: the read-through family's kernels made such a kind, and
sampler-cubic-filter's cubic state was announced against it.

A variant now takes a share in its kind (heap_sets::TableBinder) at its first command, held by
its objects until they go (a kept instance holds none): a state's creation notes only the kinds
a live variant binds, and a variant's first command notes the first live state its kind leaves
out (a cubic one, or one past its capacity), as its commands may read it from then on. The
compute, render and tile dispatch paths take it where they fetch the sampler table.

Test: tests/sampler_table_binders.rs (a cubic state made after the kind's binder went is not
announced; the kind bound again announces it, and a cubic state made meanwhile is announced).

(cherry picked from commit 2b7f35303e5e980de97464d917857b73a3171e7d)
2026-11-10 02:22:43 -08:00
Anees Iqbal af3478f9ec RUNTIME_VERSION 2004 and the runtime-sources pin for plain block fills that decide from their misses
What: the eleven commits before this one (fillmiss, steelbrain/fillmiss 58bff1328f): on a
device whose plain allocations hold submissions (the Radeon 780M), every plain making
is filled through an exportable allocation first until 3 of the device's last 4 fills
missed (the block's own allocation took 1 ms or more); then the next 2 makings are
plain and one fill is a probe, each missed probe doubling the plain makings between
probes up to 32, and a probe that saves brings filling back. New WorkCounts field
plain_block_fills_skipped. RUNTIME_VERSION 2003 -> 2004. The FAST-PATHS row states the
rule and the numbers. The pin follows.

Why: the consumer holds pin 33 on the fill: on um870's 780M under host memory pressure
every making made two block-sized BOs and ~60% of fills missed, rAF gaps >= 100 ms
11 vs 4 against pin 30, every one in a host compaction burst.

Verified (fillmiss): tests::reclaim_submit_bench images arm, release, base (always
fill) / tip / no fill interleaved, two runs each, TTM pools emptied before each arm and
its pressed phase. um870 (kernel 7.3.1-1-cachyos, Mesa 26.2.6), pressed phase, 12
makings: turnarounds >= 8 ms base 19, 4 / tip 5, 11 / no fill 11, 17; >= 17 ms 1, 1 /
1, 2 / 8, 9; ready-thread making time 419, 461 / 379, 343 / 494, 292 ms; block-sized
BOs per making 2.0 / 2.0, 1.5 / 1.0. Quiet phase: tip fills every block (1 lone miss
in 26), no turnaround >= 8 ms; no fill 12 per run. gem10 (not pressed): base 3 of 100
missed, tip 2 of 100, never stopped; turnarounds >= 8 ms base 0-3, tip 0, no fill
7-12. CPU test of the rule, tests::block_fills on both 780Ms, fmt, clippy (three
configurations) and rustdoc on gem10. Caveat: the bench's pressure made the base miss
3-4 of 12, less than the consumer's ~50%; the consumer's round decides.
2026-11-10 02:12:00 -08:00
Anees Iqbal 15c596f09a Memory: a device stops its fills once 3 of its last 4 missed
On gem10's 780M, quiet (12 GiB of free memory left beside the bench), a
tip of 2 of the last 4 stopped once: two fills in a row whose frees
returned in 0.14 and 0.17 ms, the pages left to the kernel's deferred
delete, each block then filling its own (8.0 and 10.9 ms); the 2 plain
makings that followed held the submissions 10.0 ms. Of the misses the
benches' quiet phases saw on um870 and gem10, 14 of 15 had such a fast
free; of those under um870's pressed phase, 30 of 33 freed in 2.7 ms or
more, in runs of up to 6.

Replayed over the always-filling base's phases, stopping at 3 of the last 4
fills 6 to 8 of 12 under um870's pressure (2 of 4: 5 to 7) and none on a
quiet host.

Verified so far: the CPU test is rewritten for the threshold; its run and
the device evidence follow.

(cherry picked from commit cf5561bb5d95b659debfeeedc3454188cda701b3)
2026-11-10 02:11:07 -08:00
Anees Iqbal 09e4afdba6 Memory: a device stops its fills once 2 of its last 4 missed, not after a lone miss
On um870's 780M (pools emptied before each arm and again before its
pressed phase), a quiet phase's fills missed alone: 1 of 13 and 1 of 5 in
the always-filling base, each the fill's free returning in 0.06 to 0.15 ms
where a free that hands its pages to the kernel's pool takes 2.7 to 3.5 ms,
so that the block's allocation ran before the pages were back. Backing off
after each such miss (837c461b2b) made the next 2 makings plain on the
quiet host, each holding the submissions 9.0 to 9.6 ms: 3 turnarounds of
8 ms or more in a quiet phase where the base had none.

Now a device keeps the outcomes of its last 4 fills (FILL_RECENT) and
stops filling once 2 of them missed (FILL_STOP_MISSES); the backoff after
that is as before (2, doubling with each missed probe up to 32), and a
probe that saves clears the record. Misses under pressure come together
(the same base, pressed: 8 of 12 and 3 of 12, runs of up to 5).

Verified so far: the rule's CPU test is rewritten for it
(tests::memory::fills_stop_once_two_of_the_last_four_miss_and_a_saved_probe_brings_them_back);
its run and the device evidence follow.

(cherry picked from commit bc3338dee50f9627b799cf68c747bef1b36a4672)
2026-11-10 02:11:07 -08:00
Anees Iqbal 09db11528a Memory tests: unfilled arms under the fragmented phase in place of the pinned ones
The pinned phase (the device's 64 KiB pieces among single free pages, the
anonymous memory let go) pressed nothing on um870's 780M: no compaction and
no direct reclaim in the kernel trace across four arms, the free memory
high again once the anonymous memory went. The fragmented phase does
(3,129 to 6,187 compactions and 3,436 to 13,463 direct reclaims an arm).

Images, unfilled and Images scrolled, unfilled now make the images and
images scrolled arms' textures with no block filled first, under the
fragmented phase, for what a plain making holds and compacts there.

(cherry picked from commit 25dc69055516e8cc07729bbc52280c989d75a443)
2026-11-10 02:11:07 -08:00
Anees Iqbal 261af18a27 Memory: after a fill misses, a device makes its next plain blocks plain, probing with backoff
The fill rule of 6da2c8c1dc kept a device filling while each fill spared
its block's allocation half its time, so on a host short of free memory it
kept making a second block-sized allocation for each block, the kernel
compacting and reclaiming for both: the consumer's scroll on um870's 780M
(pin 33) waited longer on host compaction than pin 30 did, with no fill.

Now a fill that missed (its block's own allocation took 1 ms or more,
FILL_SAVED_BELOW, as WorkCounts::plain_block_fills_missed counts) leaves the
next 2 makings plain, then fills one, a probe; each further miss in a row
doubles the plain makings between probes, up to 32; a probe that saves
brings filling back for every making (Fills, FILL_BACKOFF_FIRST,
FILL_BACKOFF_MOST). The module docs, the skipped count's docs and the
ledger row say the rule.

Verified so far: tests::memory::fills_back_off_after_a_miss_and_a_saved_probe_brings_them_back
is the rule's CPU test (not yet run: the build is next). Device evidence
follows in a later commit.

(cherry picked from commit 837c461b2b1aa716622237afc48870307282dbf8)
2026-11-10 02:11:07 -08:00
Anees Iqbal 3cea1fe65d Memory: the fill's decision in the module docs and the skipped count's docs
The module docs' fill section says when a device fills its plain blocks
first (while its fills spare their blocks' own allocations, a probe every
eighth making once two in a row did not), and the skipped count and the
skipped outcome say it in the same terms.

(cherry picked from commit a1a0238985d1f6c3904692a4e812067db5775179)
2026-11-10 02:11:07 -08:00
Anees Iqbal 59df469cff Memory tests: the pinned phase keeps the device's functions as ash's device
The pinning's free took the runtime's Vk wrapper where its field is ash's
Device; it takes ash's device through the wrapper's deref now. Found by the
release build of the tests under --cfg m2v_gpu on Linux.

(cherry picked from commit 31f819fa6940f515d0f256978fdb242deac4aa1a)
2026-11-10 02:11:06 -08:00
Anees Iqbal 692e0535f2 Memory: a device fills its plain blocks first only while its fills spare their blocks' makings
Each pooled block of plain memory on a device with DriverFact::PlainAllocationsHoldSubmissions was
filled through an exportable allocation first, whatever that fill did. On a host whose free memory
lies between pages compaction cannot move, a fill's pages often do not reach the block: the
block's own allocation reclaims and compacts for high orders again, so the fill only doubles the
work (the consumer's scroll on um870's 780M: 41 of 59 blocks took 1 ms or more after their fill).

A device now keeps what its fills measured (memory.rs's Fills, shared by every making of the
device): a fill spares its block where the block's own allocation took under 1 ms or at most half
as long as the fill's allocation, of the same size and type, did in its place. After two fills in
a row spared less, the device fills only every eighth such making, a probe, until a probe spares
again. WorkCounts::plain_block_fills_skipped counts the blocks left unfilled so; the saved and
missed counts keep their 1 ms meaning.

tests::memory::fills_stop_after_two_misses_in_a_row_and_a_saved_probe_brings_them_back holds the
rule; the reclaim bench gains a pinned second phase (the host's free memory left between the
device's own pages) with an arm that fills as the device decides and one that never fills.

Verified: not yet built; the device runs follow on the branch.
(cherry picked from commit 6da2c8c1dc7ea86277672d3073ce0ed09c76d5dd)
2026-11-10 02:11:06 -08:00
Anees Iqbal b321768644 Tests: a scroll's memory and commands beside a kernel trace of the buffer objects made
tests::scroll_bos (ignored, Linux, --cfg m2v_gpu) runs a scroll's shape for 15 s: a copy
committed about every millisecond, a 7.1 MiB Private buffer every 30 ms in a window of 64, and
bursts of 16 Private 1024x1024 textures every 500 ms, each cleared by a render pass on a second
queue, in a window of 48. It prints the span's CLOCK_MONOTONIC ends and the runtime's counts of
blocks and vkAllocateMemory calls, so that a kernel trace of amdgpu_bo_create taken beside it
counts the buffer objects by thread and size. Only the public API, so that the file runs at
earlier trees too. The reclaim bench and the fills' test print each making in CLOCK_MONOTONIC
seconds to line up with such a trace.

(cherry picked from commit 70d34e440784ce3d946b5d4a933c9332200c525b)
2026-11-10 02:11:06 -08:00
Anees Iqbal 2915859743 Memory tests: every making's line, its fill's start among them
tests::block_fills prints every making of its process from the device's creation on, and the
reclaim bench every making of a phase: when its vkAllocateMemory began, how long it took (on a
CPU, waiting for one), and where it was filled first, when the fill began, its allocation's and
free's times and the CPUs, so that makings that overlap (one pool's fill beside another's
allocation) show.

(cherry picked from commit b8653bd3423a24f0f680f6eb35f87ecb4207a151)
2026-11-10 02:11:06 -08:00
Anees Iqbal 82f046a119 Memory tests: each fill's allocation, free and CPUs beside its block's own allocation
The reclaim bench and tests::block_fills print, for each pooled block filled through an
exportable allocation first, how long that allocation and its free took (and on a CPU), how
long the block's own vkAllocateMemory took (on a CPU, waiting for one), and the CPUs each part
ended on, so that a missed fill shows where its time went (memory/making_parts.rs, test-only).

Verified: built and run under --cfg m2v_gpu on the 780M (see the branch's later commits).
(cherry picked from commit a290c0c7bc7b10f92db3f7ca8cac3e3317a570e5)
2026-11-10 02:11:06 -08:00
Anees Iqbal fcf1219b03 Runtime lane: the heap decode's stage-note test takes the plan through its adjust
a_heap_decode_s_stage_note_is_announced_where_its_command_can_name_a_raw_texture landed after
the queue limits' discovery run. Its two dispatches each make a command queue (dispatch_with), so
at the lane's limits its second command queue shares the round robin's one VkQueue where the plan
gives it its own, and the device says so (metal2vulkan-queue-limits-reached), which fails the
test. Its adjust closure now ends in at_plan, as the module's other dispatching tests' do. The
other lane tests landed since the discovery run (color_groups' dead-read scene,
framebuffer_fetch's dead_reads) draw on their lane's one command queue.

Verified on the RTX 5080 Laptop GPU (NVIDIA's manifest alone, --cfg m2v_gpu): heap_extended_reads,
color_groups and framebuffer_fetch::dead_reads, 12/12, no limits' message. Without the at_plan
line, the test fails on the message ("the program's command queue 2 on a round robin of 1
VkQueue(s)"). The Radeon 780M passes it either way: its plan gives a second command queue no
VkQueue of its own, so only the 5080 shows the difference.

(cherry picked from commit a5c7e5184ba2cdbc157f019f32142351fbdff4e9)
2026-11-10 02:05:55 -08:00
Anees Iqbal f2be42c229 RUNTIME_VERSION 2003 and the runtime-sources pin for DeviceOptions::queue_limits
What: the seven commits before this one (nvreds, steelbrain/nvreds-queue-limits
589b66d57d): DeviceOptions::queue_limits (None, the default, is the product's queue
plan, unchanged) lets a device take fewer VkQueues than the plan, and says each
placement that changes (an informational message, metal2vulkan-queue-limits-reached).
The runtime lane's devices take one round-robin VkQueue and none for presenting, and
fail a test on the limits' message; the 547 tests whose placement changes take the
plan through their own adjust (at_plan). RUNTIME_VERSION 2002 -> 2003 (the runtime's
new option and message). The pin follows.

Why: the 5080 pin legs' long pole was the lane's 17-queue devices (~450 ms a make).

Verified (nvreds): the pin's 5080 lane command in its 12 parts at tree 32e0adc2:
1927/1927, no limits message, wall 27.7 min (span 28.4) against 51.4 (52.1) at
63ccc9da0d for the same 1927 tests (summed part time 3119 s vs 5977 s); 780M (RADV
PHOENIX) 1941/1941 in 433 s; Iris Xe (Intel manifest alone) 1941/1941 in 365 s;
gem10 clippy (plain, m2v_gpu, m2v_cpu_icd) and rustdoc clean. Rebased tip on um790:
clippy (three configurations), rustdoc, 68 unit tests and the m2v_gpu lane build
clean. Expected on development's 5080 lane: lane tests landed since the discovery run
that place a second command queue fail on the limits' message until flagged (nvreds
fixes forward). Generators and api-signatures --check unchanged at landing.
2026-11-10 01:49:26 -08:00
Anees Iqbal ad5648eaa9 Runtime lane: the queue limits' doc gives the lane's measured wall
The RTX 5080's lane at the pin's command, in 12 parts: 27.7 minutes (the parts' union) at the
lane's limits with the 547 tests whose work needs the plan making their devices at it, against
51.4 with every device at its plan (63ccc9da0d). The doc said 18, a projection from before those
tests took the plan.

(cherry picked from commit 589b66d57dbc8540e61d547f2c96cff2b3e8e562)
2026-11-10 01:48:31 -08:00
Anees Iqbal 9c88d5c219 Runtime lane: the tests the queue limits change take the plan through their own adjust
At the lane's limits (one round-robin VkQueue, none for presenting) the RTX 5080's lane flagged
547 tests with metal2vulkan-queue-limits-reached: each placed a command queue (3606 of 3616
messages: a program's second or later), a presenting or unshared queue off the plan, or read the
device's queue sharing. Each of them now makes its devices with at_plan through its own adjust,
by the test's structure alone:
- validated_device(..) becomes validated_device_with(.., at_plan); an adjust closure ends in
  at_plan(options); validated_options becomes validated_plan_options;
- a helper that makes the device gets a form taking `adjust: fn(&mut DeviceOptions)`
  (on_device_with and the like) beside it where unflagged tests still call it, takes that form
  alone where none does, and takes at_plan in place where only flagged tests call it;
- a test split into shards (census_shards!) is its function's, every shard flagged.
No test names a test; the flagged set is what the 5080 run reported, applied once.

Verified on this tree:
- RTX 5080 Laptop GPU, the pin's lane command in its 12 parts (-j 6): 1927 tests passed, none
  failed, and no device sent the limits' message. The parts' union took 27.7 minutes (span
  28.4); 63ccc9da0d's, every device at its plan, 51.4 (span 52.1). Summed part time 3119 s
  against 5977 s, the same 1927 tests.
- Radeon 780M (RADV PHOENIX): the lane 1941/1941 in 433 s.
- Iris Xe, Intel's manifest alone: the lane 1941/1941 in 365 s.
- clippy (no cfg, m2v_gpu, m2v_cpu_icd; all targets and features) and the Rustdoc: clean.

(cherry picked from commit 74fcfe6082d7510250aba5091378237eead36935)
2026-11-10 01:48:31 -08:00
Anees Iqbal 153317f517 Runtime lane: at_plan, the adjust that gives a lane device its queue plan
A lane device takes the lane's queue limits (one round-robin VkQueue, none for presenting).
at_plan clears them, for the tests whose work the limits change; validated_plan_options is
validated_options with it.

(cherry picked from commit ab7f57dcc43758c11b3057e39748e72e888e6bc7)
2026-11-10 01:48:31 -08:00
Anees Iqbal 5592616360 Queue limits: the program's command queues alone are noted, counted among themselves
A command queue the runtime makes for itself (the in-place check's, in_place_check.rs) is no
placement the program asked for, so the limits' message leaves it out: Device::next_queue takes
the queue's name only for a queue the program made (place_queue passes MadeFor), and decides on
the program's own count of round-robin queues (DeviceShared::program_queues_made, counted only
where the limits changed the plan): its k-th queue past the limits' VkQueues, where the plan's
give it one of its own, is noted. DeviceOptions::queue_limits' doc says so; the device test
matches the message's new words.

Verified on the RTX 5080 (a scratch of this tree with a lane switch to the plan, NVIDIA's
manifest alone): the runtime's queue_limits tests 7/7, every case sending (reserved 1, extra 1,
command 2, unshared 1, presenting 1, reads 2). The lane at the limits, in four parts, flagged 547
tests, every one failing on the message but a test that checks no layer claim and the exits
tests' child; 3606 of its 3616 messages were the program's own second or later command queues.
The first part failed 153 tests before this change and 147 after it: the runtime's queue
accounted for 6, the rest are tests that make more than one command queue.

(cherry picked from commit 735be65ec4ddfd0856d3ff50f70d32c71eb7d412)
2026-11-10 01:48:31 -08:00