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 imports no host pointer, an object over a guest RAM the device uses
(HostMemory::with_runs) with no dma-buf source of its own was refused by host_window before its
runs were routed to the RAM's chunk, so tests::host_ram_dma_buf::
without_pointer_imports_a_ram_s_chunks_are_its_dma_bufs failed on the Radeon 780M (RADV) and on
lavapipe (jobs m3-max-14705 and m3-max-14707): "HostMemory needs ExtExternalMemoryHost" at the
object, after the RAM was taken.
host_window no longer refuses; HostWindow::no_route is the refusal of pages with no route of their
own (not their pointer, no usable source, no copy), the same as before: naming
VK_EXT_external_memory_host on a device without it, not_importable elsewhere. A no-copy buffer,
heap or rebind with no runs is refused with it at once, as before; one with runs is refused with it
only where its pages lie in no chunk and an import of its own is needed. On a device that imports
pointers, by_pointer holds wherever the import alignment covers the range, so nothing changes
there; only where it does not (an alignment past the host page) may such an object now bind in a
chunk instead of being refused.
Docs: the no-copy buffer and heap refusals and HOWTO section 6 say a chunk-bound object needs no
source of its own.
tests::no_pointer_import makes the cfg's device with VK_EXT_external_memory_host withheld
(DeviceOptions::withheld_extensions), as a driver that lists none is, and checks, where the
physical device lists the dma-buf route (asked of the driver, not of the importer):
- a no-copy buffer over a sealed memfd mapped shared, 256 bytes into a page, whose memory has a
udmabuf source, is made over imports of its dma-bufs (HostBacking::ImportedAsDmaBuf,
WorkCounts::dma_buf_imports) with no pointer imported (host_pointer_imports_made) and the source
called once; the GPU reads the file's bytes, its fill lands in the file's pages (the bytes around
as they were), and it reads the CPU's later writes;
- a no-copy buffer and heap over memory with no source are refused, naming the extension, with no
copy made and no pointer imported (where no route is listed, so is the sourced buffer).
tests::host_ram_dma_buf::without_pointer_imports_a_ram_s_chunks_are_its_dma_bufs: on that device a
RAM with no source is refused, naming the extension; one with a source is taken, its chunk the
source's dma-buf (host_ram_dma_buf_imports), no pointer import tried
(host_ram_pointer_imports_failed), the object over it in the RAM (HostBacking::InHostRam), read and
filled by the GPU in the file's pages.
host_residency's udmabuf_openable and Ram::source become pub(super) for them.
At the base (the previous commit's parent) the sourced buffer and the sourced RAM are refused with
"HostMemory needs ExtExternalMemoryHost", so the first and third tests fail there; job ids in the
branch's report.
On a driver that lists no VK_EXT_external_memory_host but imports dma-bufs (Honeykrisp on Asahi, as
the consumer reported: a macOS guest's newBufferWithDescriptor answered nil, "HostMemory needs
ExtExternalMemoryHost", 704 times in one boot), every no-copy buffer, heap and guest RAM was
refused: Importer::new refused before the dma-buf route was looked at, and the importer held the
host-pointer extension's functions unconditionally.
The importer now holds the pointer import as an option (host_memory.rs's PointerImport: its
functions, page and minImportedHostPointerAlignment, and memory_types). Importer::new refuses only
where the device imports neither pointers nor dma-bufs (the pointer's refusal, naming the
extension, as before); a device with dma-bufs alone gets an importer whose pointer refusal stands
for every pointer (Importer::pointer_import). Every pointer-import site takes a PointerImport, so a
device without one never makes a host-allocation object: buffer_descriptor.rs (import_by_pointer,
import_pointer, import_pointer_again, import_backing), host_shared_pointers.rs (false there),
fresh_pages.rs and the page-buffer blocks (none there), the submission checks (unchecked there),
host_ram.rs's chunk import by pointer. The unit an import's pages round out to is
Importer::unit: the host page and the import alignment where the device imports pointers, the host
page alone where it imports dma-bufs. Every device that imports pointers keeps the same calls.
On a device that imports no pointer:
- a no-copy buffer, heap or rebind over memory with a source is bound in imports of its dma-bufs;
memory with none is refused, naming VK_EXT_external_memory_host (host_window), as it was;
- memory of Metal's private option bit 24 that the runtime copies anyway (no read-only view on
Linux) is no longer refused for lack of an import route, on any device;
- a guest RAM with a source is taken and listed (its chunks its dma-bufs, imported on demand), the
pointer never tried; one with no source is refused, naming the extension, as it was;
- supportsResourceDetachBacking answers whether the device makes no-copy buffers (it has an
importer), not whether it lists the extension.
Docs: the runtime README, HOWTO section 6 and the RAM copies' refusal, RUNTIME-PORTING, the
module docs of host_memory.rs, dma_buf.rs and host_ram.rs, HostBacking::ImportedAsDmaBuf, and the
refusal lists of the no-copy buffer, heap, RAM and RAM copy calls. docs/REFUSALS.md regenerated
(the HostMemory refusal's sites: PointerImport's and no_pointer_refusal).
Verified: the next commit's device tests (RADV on the Radeon 780M, lavapipe), which fail at the
base with the refusal; job ids in the branch's report.
Apple's compiler declares a by-value kernel argument it passes as a constant pointer as an
`air.buffer` with `air.read` and `air.address_space 1` (a one-byte `char`): a Core Image kernel of
macOS 13.7's frameworks (AIR 2.5) declares its parameter block so, and the ABI check refused the
library with RoleTypeMismatch (the buffer's declared space against its pointer's). Metal takes the
shape: on the M3 Max (macOS 27.0.1, job m3-max-14624) our own kernel over `constant Params *p`,
its node rewritten to `device` read (with and without the `char` description) and reassembled with
metal-as, made a compute pipeline and wrote the same 32 floats as the kernel as Metal's compiler
wrote it.
abi::check's role_type now also accepts an `air.buffer` declared read-only in `device` space on a
`constant` pointer (read_through_constant). The buffer keeps its declared space and access, so the
planner binds it as a read-only device buffer; the entry's loads are through its pointer. A
writable buffer, or a `constant` buffer on a `device` pointer, is still a mismatch.
Tests: the ABI unit test of both the accepted and the still-refused forms; an engine test that
compiles our kernel with either node on lavapipe, moltenvk-m3, the 780M's RADV and the Vulkan 1.2
floor and passes L3; and a runtime device test that runs both forms and compares them with the
M3 Max's 32 floats. SEMANTICS_VERSION 2025: a refused input now translates.
PR #15's a_flat_dispatch_switches_to_its_64_bit_count_at_the_workgroup_that_passes_2_32
timed out on lavapipe in round 6898863f3f (lvp 2/4, ms01, i9-13900H 20 threads,
job m3-max-14477): its command buffer passed the lane's 60 s WAIT beside the rest
of a parallel runtime lane. Each of the two such dispatches runs all 4.3 billion
threads, so a CPU device spends every thread on it: alone on lavapipe (llvmpipe,
LLVM 23.1.4) on a 16-thread Ryzen 7 7840HS they completed in 24.9 s and 23.7 s
(job m3-max-14623). A runner with fewer threads takes proportionally longer.
complete_within() takes the wait; edges_counted_once waits PAST_2_32_WAIT (600 s,
inside nextest's 20-minute terminate-after), and .config/nextest.toml runs both
tests alone (threads-required = num-test-threads), as the object-grid lane does.
A GPU completes them well inside a second; their assertions are unchanged.
Test only; the runtime-sources pin is unchanged. cargo fmt.
b39d22516f says heap-texture-refused, twin-decode-failed, late-reservation and
queue-limits-reached once per device and kind and counts each later one in
WorkCounts (the owner's rule, 11-11: a degradation, fallback or refusal is
logged once per kind, then counted). A run of an unchanged artifact now records
fewer messages, so cached runtime results are stale.
Version only; cargo fmt.
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
The pixel format is PixelFormat::ETC2RGB8; and an assertion whose message
locked the sink's list again while its condition held the lock would wait
on itself where it failed: each reads the list once.
What: metal2vulkan-heap-texture-refused (Info, a placement heap's texture not
made at an offset inside it), metal2vulkan-twin-decode-failed (Error, a decoded
twin's failed CPU decode), metal2vulkan-late-reservation (Warning, an ignored
late reserve_resource_ids call) and metal2vulkan-queue-limits-reached (Info,
each placement or queue-sharing read the queue limits changed, at device
creation, per queue made and per report) were said at every occurrence. They
now go through the degradations' once-per-device record: Announced keeps a
bit per kind of a closed vocabulary of messages that are no degradation
(degradation::Told), and Device::tell says a kind's first message on the device
(through its sink, else stderr) and counts each later one, without making its
text, in the kind's new WorkCounts field: heap_texture_refused_withheld,
twin_decode_failed_withheld, late_reservation_withheld,
queue_limits_reached_withheld. Device::inform_once is the informational form.
Every refusal and answer is as before; only the messages' rate changes.
Why: the owner's rule (11-11): a degradation, fallback or refusal message is
logged once per kind and device, later occurrences counted, never logged per
call. reims's sweep at ef7af82fe4 found these four firing per occurrence.
Tests: tests::told_once (each kind said once and its later one counted on
one device, said again on another; a second late reservation counted, not
said); tests::heap_refused_notice (the second refusal on a device counted, not
named; another device names its own first); tests::queue_limits_device (the
first case met is sent, every later one counted; a second read of the sharing
counts one more). api_signatures.tsv takes the four fields; the docs of the
four messages (texture.rs, resource_ids.rs, DeviceOptions::queue_limits, the
runtime README, docs/API.md) say the rate.
Verified: see the branch's report.
runtime_lane::grouped_submissions expected grouped vkQueueSubmit calls wherever the
device's merge check held. The runtime holds batches in a group only where the check
held and the queue's failures are not relayed (command_buffer/group.rs `groups`: a
relayed batch takes a fence of its own, device/relay.rs). MoltenVK's queues are
relayed (DriverFact::QueueFailuresReportedByMessenger), so it never groups. On the
M3 Max lane, beside the lane's other tests, the merge check answered Holds (42.5 us
in one call of 4 against 87.9 us apart), and the checked run asserted a group that
the device cannot make: "0 grouped calls", 8 calls in all, "the driver merges: true".
Where the check answered Fails the same test took its plain branch and passed, so
the verdict alone decided pass or fail.
The tests now read the expectation from both facts (`groups`: `merges` and not
`commit_work::relays`); the printed line says whether the device groups. The tests
that assume the merge check (DeviceOptions::assume_submissions_merge) still assert
that the check held as assumed.
Verify: runtime_lane::grouped_submissions:: on lavapipe and PHOENIX (merges, no
relay: groups asserted) and on the M3 Max (relayed: the plain branch asserted).
What: checked_commits_during_submissions_are_taken_up_promptly settles the
device's submission checks (Device::settle_submit_checks) before its rounds,
records each round's submission-check calls (WorkCounts::submit_check_calls,
none expected), and prints the round of the most own time with its numbers.
Why: on the RTX 5080 beside the validation lane (b5080 entry
bugs-a-item4-queue-order-012550 at 60efb70925), 40 of 40 runs passed and the
old bound's quantity (the later kernel after the earlier one's end) passed
40 ms in 20 of them, the driver's vkQueueSubmit time reaching 292 ms; but one
run's own time reached 36.7 ms, near PROMPTLY's 40. A lane device has a fresh
shader cache, so its submission checks run as it is made, on its first VkQueue,
which the rounds' command queue shares under the lane's queue limits: they hold
that VkQueue's lock for their own calls (not counted in batch_submit_nanos), and
on NVIDIA their imports and releases hold back every other thread's submission
(submit_check.rs). The failing round of the round at 7d7085f9d0 was round 2,
early, as such an overlap would be. Waiting for the checks' answer leaves the
rounds the scheduler's thread alone.
Verified: see the branch's report (5080 through b5080, gem10).
What: checked_commits_during_submissions_are_taken_up_promptly times when the
scheduler's thread took each of the two command buffers committed while it
waited for the VkQueue by their submission handlers (which run on that thread
once it took the batch: after its vkQueueSubmit returned, or as it held it for
one call with later ones), noting the host time and WorkCounts::batch_submit_nanos
there. The thread's own time is that time after the VkQueue's release less the
driver's time in between, for both; the sleeps are read once the later one is
taken. The kernel starts, the later one's start after the earlier one's end,
and the submissions are printed, not bounded.
Why: the round at 7d7085f9d0 failed it on the RTX 5080 Laptop GPU beside the
validation lane (msi, m3-max-13901, partition 1/2): round 2's later command
buffer started its kernel 63.4 ms after the earlier one's kernel ended, over
PROMPTLY's 40 ms, while the batches' vkQueueSubmit calls spent 71.5 ms in the
driver from the earlier one's check until the round completed, and no sleep
ended at its limit. The later one's bound began at the earlier one's kernel
end and assumed the earlier one's vkQueueSubmit had returned by then; NVIDIA's
call can return long after the GPU ran the work (or the later call block before
it starts), so the driver's time was counted as the thread's. The handler's
time and the counter read there leave neither the GPU's nor the driver's time
in the bound, and a wait of the thread's own (a sleep to its limit after the
check) still counts.
Verified: see the branch's report (5080 through b5080, gem10).
tests::air_input::engine_fixtures_match_their_golden_printout compares every engine fixture with
its golden; the rounding fixture had none. Recorded by bless_engine_goldens on um790 (job
m3-max-14555) from the bitcode LLVM 21.1.8's llvm-as (Homebrew llvm@21) assembles from the
committed kernel_convert_rounding_modes.ll (sha256 bf1592327ce7...), fed to the test through
METAL2VULKAN_LLVM_AS by a scratch wrapper that answered only that file (one hit) and sent every
other fixture to the node's LLVM 23; only this fixture's file is kept.
corpus-metal qualified the case on the M3 Max (apple-m3-max-macos27.0.1, output 30dbaaab) and
corpus-moltenvk's candidate matched it (apple-m3-max-moltenvk), job m3-max-14441.
64 threads, an integer and a float word each, through the 13 suffixed forms the M3 Max compiles
and answers as the conversion their types name (the guest's two refused forms among them),
compared exactly. Installed by corpus-case-check (job m3-max-14432): case id 48fb69561824.
scripts/regen-air-fixtures/regen-air-fixtures.sh kernel_convert_rounding_modes on the M3 Max
(Apple metal 32023.922, macOS SDK 27.2, LLVM 21) in job m3-max-14415; TOOLCHAIN unchanged.
The exact emulation of the directed roundings, the integer .sat clamp, float-to-int pre-rounding,
the RoundingModeRTE plan and PrecisionNote::NativeConversionRounding are removed; they stay in
history at 540011dd49. The parser accepts the suffix and the lowering is the plain conversion:
Metal's compilers disagree on the suffixes, and the owner's 11-07 rule takes the cheapest answer
inside the envelope where real Macs disagree.
Measured per form, 64 threads of the fixture's edge values, one kernel per intrinsic (probes
m3-max-14380 Radeon Pro 5300M and m3-max-14381 UHD Graphics 630, macOS 26.7.1; m3-max-14382 M3
Max, macOS 27.0.1):
form M3 Max 5300M 630 now
float->int .rte nearest even truncates no pipeline truncates
float->half .rtz/.rtp/.rtn .rtz as named, nearest even as named nearest even
no pipeline rtp/rtn
float->int .sat unsigned keeps a 8-bit not no pipeline clamps
negative's wrap, long clamped, long
of inf is 0 clamped to int
int->float/half any mode .rte nearest even, nearest even nearest even nearest even
no pipeline directed
int->int .sat no pipeline wraps wraps wraps
float->int .rtp/.rtn no pipeline truncates no pipeline truncates
The last three rows are no difference: every Mac that creates the pipeline answers the plain
conversion. OpenCL on all three GPUs (not Metal) answers the exact IEEE roundings. The M3's
compiler service exits (XPC_ERROR_CONNECTION_INTERRUPTED) on the forms it does not compile.
- metal2vulkan-air: Convert::parse takes `.<rte|rtz|rtp|rtn>` and then `.sat` (to an integer
only), between numbers; the module doc carries the measurement. Test: every suffix parses to
its plain form.
- Engine test: 24 forms with every rounding (and .sat to an integer) compile on lavapipe and on
moltenvk-m3 without shaderInt64 to the plain conversion's module words and notes, and pass L3.
- Fixture: kernel_convert_rounding_apple_gpu now calls only the forms the M3 compiles and
answers plainly, for a case qualified there.
- docs/API.md accepted differences: the table above.
- SEMANTICS_VERSION 2024 (development is at 2023); ARTIFACT_FORMAT_VERSION back to 500, with no
codec change.
Verified: not yet run (dispatched next).
Apple's M3 Max (macOS 27.0.1) creates no pipeline for any of the fixture's four kernels: its
compiler service exits (XPC_ERROR_CONNECTION_INTERRUPTED) on every directed int-to-float and
int-to-half form, float to half by rtp and rtn, float to int by rtp and rtn, and every integer
.sat form, one kernel per intrinsic (probe m3-max-14296). A Radeon Pro 5300M under macOS 26.7.1
creates every one (m3-max-14293). So the four cases could never be qualified on the reference
Metal and are withdrawn; the kernels stay for the engine tests and translation.
kernel_convert_rounding_apple_gpu calls only the 22 forms the M3 compiles (the guest's two refused
forms among them), over integer and float inputs, for a case the M3 can qualify. The source
compiles without fast math (metal-fast-math: off), so NaN, infinity and signed-zero operands and
infinite half results are defined questions. Companions regenerated next.
clippy's approx_constant denies 3.14159 as an approximate PI.
Verified: job m3-max-14128 (homelab-um790-xtx-1) at 37e8650472: clippy failed on exactly these two
literals in all three configurations; the engine tests passed (6756 results of 106 conversions on
lavapipe and moltenvk-m3 without shaderInt64; RTE declared on 14 committed profiles, noted on 5),
and with Directed::of sabotaged to map rtz/rtp/rtn to nearest even the exactness test failed
(f.f32.s.i32.rtz of 0x1000003 gave 0x4b800002 for 0x4b800001).
Evidence that the path ran (llvm-as present, every conversion compiled and compared): the number
of results checked and of profiles that declared RoundingModeRTE or recorded the note.
Verified: the touched suites passed at e4bbaf5a37 (job m3-max-14108, homelab-um790-xtx-1):
metal2vulkan-air convert 3/3, metal2vulkan arith/rounding/engine 279/279, validation comparison
10/10.
convert-rounding-int-to-float-every-mode, convert-rounding-float-to-int-every-mode,
convert-rounding-int-to-int-saturating and convert-rounding-float-to-half-every-mode: 32 threads
each over kernel_convert_rounding_modes.ll's four kernels, inputs chosen where the roundings answer
apart (ties, values past each range, NaN, infinities, zeros, half and float denormals), compared
exactly.
Verified: corpus-case-check --install accepted all four (job m3-max-14100, m3-max, no GPU):
case ids ff0be7db96e9, 116f107ca214, 070bb9c6a5ea, 1bc464c0bf10. Metal qualification follows.
air.convert names no double (the AIR element types stop at f32), so the directed double
narrowings, the double results and the 64-bit RTE width were unreachable: removed. The nearest-even
plan is now a flag for a float result, and narrow::rte_modes decides 32 bits and the widths the
device's independence ties to it. The engine test reads the interpreter's buffers directly, pins
the RTE widths of the venue profiles (lavapipe and RADV 32, ANV 16/32/64, MoltenVK and the floor
none) and the parse test names a float narrowing instead of a double one.
Verified: the first test job (m3-max-14044, homelab-ms01-1) failed on the double case in the parse
test and a compile error in the engine test; both fixed here, rerun next.
Each conversion form Apple's OpenCL compiler emits with a rounding (int to float and half, float
to int with and without .sat, int to int .sat, float to half and half to float) compiles alone on
lavapipe (64-bit integers) and on moltenvk-m3 without shaderInt64 (the wide path), passes L3, and
on the CPU interpreter answers the exact IEEE result of its rounding for each edge input,
computed in integer arithmetic. A control test shows the inputs tell each directed rounding from
nearest even where the form can round, so a lowering that left one to the device's conversion
would fail. On every committed profile an int to float .rte declares RoundingModeRTE where
narrow::rte_modes allows it and records NativeConversionRounding where not; a form that cannot
round and a directed one declare and record neither.
Verified: not yet run (dispatched next).
Apple's OpenCL compiler spells every convert_* it emits as an air.convert with a
rounding after the types (.rte, .rtz, .rtp, .rtn) and, to an integer, .sat after it
(convert_float4_rte(uchar4) is air.convert.f.v4f32.u.v4i8.rte, convert_int_sat(float)
is air.convert.s.i32.f.f32.rtz.sat; the forms are read from the OpenCL runtime library
the macOS 27.2 Metal toolchain ships). Convert::parse took exactly four tokens, so each
such name was an unknown intrinsic and the pipeline was refused.
- metal2vulkan-air: Convert gains `rounding: Option<ConvertRounding>` and `saturate`;
a rounding is accepted between numbers only (no bool, no 8-bit float) and .sat only
after one, to an integer. Static folding leaves the saturating and the directed forms
alone.
- Lowering (lower/arith/rounding.rs):
- float to integer: RoundEven / Ceil / Floor first (rte / rtp / rtn; rtz is the
conversion's own truncation), then the saturating conversion every air.convert to an
integer takes; the NaN test reads the operand itself. Denormal notes as rint / ceil /
floor take them.
- integer to integer: plain; .sat clamps to the range both types share (SClamp/SMax/SMin
of the sign extension, masked, or UMin; pairs on the wide path).
- integer to float and float to narrower float, nearest even: the plain conversion. Where
it can round to f32/f64 the entry declares RoundingModeRTE for the width and the widths
the device's independence ties to it (narrow::rte_modes); a device that cannot declare
them records the new PrecisionNote::NativeConversionRounding.
- toward zero or an infinity: no Vulkan conversion rounds so per instruction, so the
result is computed exactly by integer arithmetic: the magnitude's dropped bits with an
increment where the lane rounds away (f32, f64 from 64-bit, the wide path through its
sticky 32-bit fold), f32 to half on the bits (normal, overflow, subnormal, inf, NaN),
double to float by stepping the device's faithful conversion, double to half through
the round-to-odd f32. A conversion that cannot round is the plain one.
- PrecisionNote::NativeConversionRounding (native-conversion-rounding): codec, runtime
Degradation, comparison table (unbounded), fast_paths ledger class, docs/API.md.
- SEMANTICS_VERSION 2021, ARTIFACT_FORMAT_VERSION 501 (the codec gains the note);
api_signatures and the air api_surface blessed.
- Fixture kernel_convert_rounding_modes (owned MSL, air-rename to 64 suffixed intrinsics).
Unverified at this commit: build and tests follow in potluck jobs.
PR #13 (merged as cfe05d0655) made render/reroute.rs's Held keep the
encoder's scissor rectangles beside EncoderState, so a draw recorded again
into a new render pass instance draws through the rectangles it was drawn
through. Nothing tested it.
The device test (tests/rerouted_scissors.rs, under m2v_gpu / m2v_cpu_icd)
draws into a BGRA10_XR color the pass clears: a first draw writes white
through a small scissor rectangle, the rectangle is set to the render area,
and a second draw blends into the color with the blend color 0.5 as both
factors. That blend starts the color's half shadow, which records the first
draw again into an instance in the current one's place. The target must
hold 1.0 (code 894) inside the first rectangle and 0.5 (639) elsewhere; a
first draw recorded through the encoder's latest rectangle leaves 1.0
everywhere.
Evidence that the reroute ran: the blending pass leaves exactly one more
instance unrun than the same pass whose second draw writes
(WorkCounts::unrun_instances_ended), and no
extended-range-blends-stored-codes is announced. A device whose pass holds
no shadow, or that refuses the blending state as FramebufferFetch, prints
SKIPPED.
Verified: see the agent report (lavapipe and a Linux GPU, with the fix and
with reroute.rs's three lines reverted on a scratch commit).
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.
6d67245284 held heap_texture_256's allocations per path, keyed on the count of the tiled route
for the M3 Max. The M3 Max moved neither path's count (its image lies as Metal's tiles, on the
direct route), so its run failed there; and the 5080's extra allocations were not its path's
but redundant work on it, removed by the commit before this one. With that, the M3 Max's bound
of 17.25 is expected to hold on each venue measured, and HELD_ON_PATH holds nothing: removed.
Kept from 6d67245284: the gate notes every breach and fails after the last group, naming them
all, so a call over its bound leaves no group after it unmeasured; and the name check of every
row's count before any group runs.
HELD's docs say what a heap texture's allocations were measured as: 16.25 on the M3 Max (two of
them its mutexes' first locks, which std allocates on macOS), 14.25 under lavapipe; the 5080's
15.25 is the expected figure after the commit before, to be measured.
On a device whose optimal image takes none of a Shared heap's memory types (the RTX 5080), a
heap texture's image is linear, and heap_image asks linear_lack whether the linear tiling has
every feature the optimal one has, in the image's format and each it is viewed as. viewed_formats
collected those formats into a new Vec at every texture; for a mutable-format plan without a list
the collect grew its buffer three times, four allocations a texture, for a list read once.
viewed_formats now returns an iterator over the plan's list or the device's table, filtered in
place, with no list made. Its two callers (tiling_lack and the DRM modifier plan in dma_buf.rs)
chain it as before; the formats and their order are unchanged.
Found by an allocation probe (not committed) of host_ab percall's heap_texture_256 on the 5080:
19.25 allocations a call, 4.00 of them at linear_plan.rs viewed_formats' collect under
linear_lack, against 14.25 under lavapipe, whose optimal image takes the heap's memory. To be
measured after this commit: the 5080's heap_texture_256 allocs (expected 15.25).
On the 5080 the per-call gate stopped at heap_texture_256 (allocs 19.25 a call, held to 17.25),
so no row after it was measured there. The 17.25 is the M3 Max's tiled route
(texture/heap_tiled.rs, counted as heap_textures_tiled); NVIDIA makes the heap texture as the
driver's own image bound in the heap's memory (texture/heap.rs, counted as
heap_texture_untiled_layouts), a different path with its own allocations.
- HELD_ON_PATH holds a count per path: a row applies where its mark (a count the path moves)
moved, whatever the device, and a group with such rows fails where it moved none of the marks.
heap_texture_256's allocs move there: 17.25 on the tiled path, 19.25 on the untiled one (the
5080's measurement).
- The gate collects every breach and fails after the last group, naming them all, so one call
over its bound no longer leaves the groups after it unmeasured.
- check_held checks HELD_ON_PATH's marks and counts by name as it does HELD's.
Not yet run: the 5080 (b5080 entry, previous percall.rs as the control), the M3 Max and
lavapipe percall runs, and the lint configurations. Their results go in the report.
A whole-set cost --runs 8 --write on the M3 Max, then --alone over the cases it
changed: images' blocks at 64 MiB (device_memory_allocated of the cases that
read 68 MiB) and what else moved since 9b046a7cf8 (dv-m3d).
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
The replay encoder of a render-command execution (render/executions.rs) is a RenderLowering of
its own and took no pass_notes, so the runtime did not build. It is no pass of the program's:
the executing encoder's line names the pass.
Verified: cargo fmt; the build runs on potluck after this commit.
The pass log told its lines apart by their whole text, its draw-call and resident counts
included, so a pass a frame repeats with one draw more printed again and the 256-line bound
could fill before the pass that matters ran. A line is now keyed by the pass without those
counts; the line still prints them.
Verified: cargo fmt; tests::pass_log runs on potluck after this commit.
A diagnostic to find which pass draws the white at a widget's glass edges in the 27.0.1 guest:
the runtime sees every pass's attachments, which the consumer's own logs cannot name.
The switch's value is the textures to watch, a comma-separated list of FORMAT:WIDTHxHEIGHT
(the format as the notices print it or as Metal names it, `*` for any format or size). At the end
of each render encoder that renders into a watched texture, binds one to its fragment stage or
makes one resident, the device logs one line (id name metal2vulkan-passes, Info): the render area,
its Vulkan render pass instances and draw calls, each attachment (format, size, object ID, label,
whether it took its storage form, level, slice, load and store actions as the pass ends, its
stand-in and cause), the depth/stencil aspects' actions, the pipeline states its draws drew with,
the textures bound to the fragment stage at a draw, the watched resident textures with their
stages, and what it watched. A line the same as one printed before is not printed again; a process
prints at most 256. Off (unset, empty or 0, or a value it cannot read, said once on stderr), an
encoder notes nothing; no behaviour reads it.
- crates/metal2vulkan/src/env_vars.rs: the registry row and `log_passes()`, the raw value.
- crates/metal2vulkan-runtime/src/pass_log.rs: the filter, the notes, the line and its bound.
- render.rs: an encoder's notes, made where the log is on, noted at each draw call, logged at
the pass's end once its store actions are settled.
- texture.rs: `Texture::took_storage_form`, which the line names.
- docs/API.md and the artifact test's list of the runtime's variables name it.
Verified: cargo fmt; the build, clippy and the tests run on potluck after this commit
(tests::pass_log: the filter's parse and refusals, an entry's match, the once-and-bound rule).
The host-transfer image test (399e8d6d17) landed after the 64 MiB image
blocks (653060d6ee) and still named IMAGE_BLOCK_SLACK, which those removed:
the runtime's tests no longer compiled under m2v_cpu_icd or m2v_gpu
(round d0f0419800, lvp 2/4, gem10, job m3-max-14294, E0432). A block of
images is BLOCK_BYTES now, so two blocks past the heap are 2 * BLOCK_BYTES.
Test only; the runtime-sources pin is unchanged. Verified: cargo fmt; the
CPU-ICD and GPU builds are the next round's.
PR #15's a_ragged_direct_dispatch_runs_each_thread_once_on_the_flat_variant
made a command queue for each of its four grids. On the RTX 5080 Laptop
(one VkQueue in the family, a plan of 14 queues) the second shared VkQueue 0
and the runtime announced metal2vulkan-queue-limits-reached, which the lane's
layer claim fails on (round d0f0419800, msi, job m3-max-14216, 5080 lane 1/2).
The queue limits are not what the test tests: one queue serves every grid.
Test only. Verified: cargo fmt; the 5080 run is the next round's 5080 lane.
653060d6ee's row said 64 MiB image blocks matched the build before the 68 MiB
ones in a macOS guest's page scroll on a Hawk Point 780M, from reims's first
block (4 + 4 boots). Its mirrored second block (m3-max-14080) overturns that:
pooled over 8 + 8 boots, pin 36 with 64 MiB image blocks has 14 rAF gaps of
100 ms or more against pin 30's 8, with twice the ready thread's direct
compaction for the same block count. The row now says what the size choice is
and costs, and no scroll figure; the scroll regression is open and worked
apart. Docs only.
vram3090 landed as ..70042c055a: memory::host_image_types returns only the
class's own types, never the types it overflows into, and an image that finds
no room there is made without host-transfer usage in device-local memory (its
CPU copies through submissions). On a GPU without resizable BAR (the 3090s:
a 246 MiB host-visible device-local heap) a Shared depth texture no longer
overflows into system memory while the device-local heap has room: what a run
places and announces (device-memory-overflow). RUNTIME_VERSION 2020 -> 2021;
the pin was re-pinned by land-pkt.sh (9d3c275ea8). Verified: pin-compute only.
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: round_trip reads the bytes get_bytes returned through as_chunks::<4>.
Why: clippy -D warnings under --cfg m2v_gpu and --cfg m2v_cpu_icd refused
chunks_exact(4) there (potluck m3-max-14208 on msi-laptop); plain clippy, fmt and
rustdoc -D warnings passed in that job. cargo fmt --all.
What: ash here has no Debug for MemoryPropertyFlags, so the test's messages print the
flags' raw bits; its HOST-IMAGE-ROOM line names the type and flags of the host-transfer
images and the types the images made without the usage lie in.
Why: the gpucfg build of the runtime's lib tests failed (E0277, two sites) on
homelab-gem10-1 (potluck m3-max-14193); the default build compiles no device test, so
the msi run of the pure tests did not see it. cargo fmt --all.
What: the host_copy.rs module docs, the host_image_room test's module docs and the
memory test's doc comment state the RTX 3090's BAR heap and device-local heap as they
are, with no account of what the placement did before 597c6e3225.
Why: AGENTS.md, docs say what is true now. Comments only; cargo fmt --all.
What: Memory::host_image_types (now the pure memory::host_image_types, with
class_types beside it) returns the types of the image's class among those allowed,
in both of its branches, instead of every allowed type. A `Shared` or `Managed`
texture's image with host-transfer usage so never overflows into system memory: where
none of its class's types has room, its placement fails and host_placed_image makes the
image without the usage, which lies in device-local memory where that image has room
(and overflows only where none has, as any image does). The unused Memory delegates
host_cached_placement and host_incoherent go. Texture::placed_type and
Memory::type_and_heap are test-only accessors for the new device test.
Why: the RTX 3090 lanes (validation runtime_lane, round at 7d7085f9d0, gem10 and
um870) announced device-memory-overflow for `Shared` Depth32Float textures in six
tests. Those 3090s run without resizable BAR (NVIDIA 620.70.06, vulkaninfo on gem10:
heap 2, DEVICE_LOCAL, 246 MiB; nvidia-smi BAR1 total 256 MiB), and NVIDIA places a
host-transfer image in that BAR heap alone (type 5, its one device-local type for it),
beside system types 3 and 4. With 16 lane tests at once, each device's 68 MiB block of
such images fills the shared 246 MiB heap; the next process's depth texture then
overflowed into types 3/4 while heap 0 (24 GiB, type 1, which the image without the
usage takes) had room. Color textures there copy on the staging queue and take no
host-transfer usage, which is why only depth textures overflowed.
Tests: tests::memory::host_transfer_images_take_no_type_their_class_overflows_into
(pure; on the 3090's memory types the image takes type 5 alone, where the old answer
3..5 overflowed into [3, 4]); tests::host_image_room (device: on a GPU whose
host-transfer heap is at most 1 GiB, fills it with 16 MiB Shared Depth32Float
textures, none may overflow, all lie device-local, CPU copies round-trip). Docs:
host_copy.rs module docs, the FAST-PATHS device-gap row for the copies' submissions.
Builds, clippy and the 3090 runs go to potluck after this commit.
bugs-a landed as 2566b388b5..2c0f3c25dc:
- driver_facts: lavapipe (MESA_LLVMPIPE, every vendor and device) stores
small-float NaNs as Metal does (MetalSmallFloatNans), so a run on lavapipe no
longer announces device-nan-encoding for them: what a run announces.
RUNTIME_VERSION 2019 -> 2020; the pin was re-pinned by land-pkt.sh
(af1591a4c1).
- 7aefa49b7f moved SEMANTICS_VERSION to 2023, not the 2021 its message names:
its branch bumped 2020 -> 2021 on its base, and development held 2022 (the
helper fences); the rebase's conflict was resolved to 2023 so the change under
unchanged keys (a heap element's NaN notes gated by HeapNanFamilies) keeps its
own version.
Verified: pin-compute only.
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.