Commit Graph
3751 Commits
Author SHA1 Message Date
Anees Iqbal 3b9e504e85 Re-pin the runtime sources at the landing tip
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.
2026-11-11 05:11:04 -08:00
Anees Iqbal d6fe1fbd56 RUNTIME_VERSION 2028: a dma-buf texture whose driver answers another plane offset binds at the texels' offset
Where the driver lays an explicit DRM_FORMAT_MOD_LINEAR plane at another offset than asked, the
texture's image takes a plane at offset 0 bound at the texels' offset of a non-dedicated import
of the pages, where the driver requires no dedicated allocation and its alignment divides the
offset, instead of a shadow. Honeykrisp (Mesa 25.3.6, Apple M2 Pro, 16 KiB pages) answers offset 0
for every explicit plane offset; there the route reads the texels in place before and after a CPU
write (Asahi host, the plane-offset probe).
2026-11-11 05:10:23 -08:00
Anees Iqbal 68d70b6bda Tests: dma-buf import cycles of one import freed once the device is idle
A variant of the one-import cycle: its copy waited for, then each queue the
runtime submits to waited idle under its lock and its staging queue's last
submission waited for, then the buffer released, so the import's vkFreeMemory
follows a device-idle wait. For the kernel-side leak probe: whether the frees
a driver keeps are the ones that race a GPU job.
2026-11-11 05:10:16 -08:00
Anees Iqbal 82b0ce1237 Tests: dma-buf import cycles of an import released while idle and imported again from its kept dma-buf
What: tests::dma_buf_import_cycles gains the residency's way: a no-copy buffer made once, each cycle
read by a copy, its import released while idle through Device::release_idle_host_imports (as the
residency thread releases it), the dma-buf's descriptor kept, and imported again from it by the
next cycle's copy; counted (host_imports_released, host_imports_reimported) and checked freed.

Why: the consumer's guest releases idle imports and imports the same dma-bufs again, a pattern the
other ways never run, and the kernel's kept imports may follow it.
2026-11-11 05:10:16 -08:00
Anees Iqbal 94514c4cfc dma_buf.rs: the check's dma-buf class judges an image bound at its texels' offset; which drivers take one
What: the module docs say why the in-place check's dma-buf verdicts (images at their pages' first
byte, dedicated imports) cover an image whose plane starts at 0 bound at the texels' offset (the
same texels and row padding in its subresource; the bytes before the binding outside it), and
what the probe found: lavapipe (Mesa 26.2.6) takes such a binding at 64-byte alignment, RADV
(Mesa 26.2.6, PHOENIX) requires a dedicated allocation of every such image.

Verified: tests::dma_buf_plane_offset on lavapipe and RADV PHOENIX (gem10).
2026-11-11 05:10:16 -08:00
Anees Iqbal ac0fcfa7fd Docs: a texture over dma-buf pages bound at its texels' offset, where the driver answers another plane offset
What: HOWTO's dma-buf section and API.md's in-place and shadow-cause paragraphs say when a texture
over dma-buf pages takes an image of a plane at offset 0 bound at the texels' offset (a driver
that lays the explicit plane out at another offset, Honeykrisp's answer; an image that requires
no dedicated allocation, which RADV requires, and whose alignment divides the offset), counted in
WorkCounts::dma_buf_images_at_offset; WorkCounts::dma_buf_image_memories_live says such an import
is no dedicated one.

Verified: tests::dma_buf_plane_offset on RADV PHOENIX (requires a dedicated allocation: the
forced route is refused, the texture a shadow that reads its texels) and on lavapipe (Mesa
26.2.6: the forced route binds at offset 2048, in place, and reads its texels and the CPU's later
bytes).
2026-11-11 05:10:15 -08:00
Anees Iqbal 815d982c7e Tests: cycles of each way the runtime imports and frees dma-bufs of host pages
What: tests/dma_buf_import_cycles.rs (device cfgs, Linux), one test per way, each runnable alone
by name for a consumer that reads the kernel's dma-buf account before and after: a no-copy
buffer over one dma-buf import (used by a copy, and unused), over several imports bound sparsely
(one chunk per granule of the device's sparse buffers), an image's dedicated import (a texture in
place over a buffer made once), and one import released while other work is in flight on the
queue, or while its own use is (freed by that use's completion). DMA_BUF_CYCLES names the cycles
(200 by default). Each prints the imports made and freed (WorkCounts) and checks that every import
was freed and that its way ran.

Why: a consumer on Honeykrisp (kernel 6.19.14 asahi) finds the kernel keeping about a quarter of
the dma-buf imports the runtime freed; these isolate which userspace pattern does it.
2026-11-11 05:10:15 -08:00
Anees Iqbal 2e28ce467b dma-buf textures: where the driver answers another plane offset, bind a plane at 0 at the texels' offset
What: a texture over dma-buf pages whose texels lie past their first page's first byte takes,
where the driver lays the explicit DRM_FORMAT_MOD_LINEAR plane at that offset out at another
offset (vkGetImageSubresourceLayout), an image whose plane starts at offset 0 bound at the texels'
offset of an import of the pages that is no dedicated allocation, before the shadow. It is tried
only on that answer, so every driver that answers the explicit offset keeps its dedicated import;
the image must require no dedicated allocation (VUID-vkBindImageMemory-image-01445, -02628), its
memory's alignment must divide the offset (-None-10735), and the image format query must not take
dma-bufs for it in a dedicated allocation alone. Counted: WorkCounts::dma_buf_images_at_offset (of
dma_buf_images). Where it is not made the shadow's notice names both reasons.

Why: Honeykrisp (Mesa 25.3.6, M2 Pro, 16 KiB pages) answers offset 0 for a plane 8192 bytes into a
page, so every such texture was a shadow, where the owner's rule keeps textures over the
consumer's memory in place wherever in place is possible.

Test: tests/dma_buf_plane_offset.rs (device cfgs, Linux) is also the probe: it prints the driver's
answers for explicit planes at several offsets and the dma-buf features, then makes the texture by
the product's route, by the explicit plane unchecked (what such an image reads), and by the plane
at 0 bound at the offset forced on a driver that answers the offset (PlaneRoute, a test-only
DeviceShared field), each read back through a blit before and after a CPU write.
2026-11-11 05:10:15 -08:00
Anees Iqbal 43bddd649a Re-pin the runtime sources at the landing tip
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.
2026-11-11 04:58:49 -08:00
Anees Iqbal b3532a452e RUNTIME_VERSION 2027: MoltenVK pushes set 0 for a fragment stage writing a set-0 storage buffer in its interlock
Metal leaves a raster-order-grouped device buffer unordered inside an argument buffer whose other
buffer member the function reads; MoltenVK packs a bound set 0 into one argument buffer, a pushed
one discretely. Such pipelines now push set 0 there (RuntimeDriverDefect::InterlockedBoundBuffersUnordered),
and announce interlocked-buffer-order where they cannot.
2026-11-11 04:58:08 -08:00
Anees Iqbal 88e45b574f tests::interlocked_writes: a synthetic instruction's word count is its opcode and operands 2026-11-11 04:57:58 -08:00
Anees Iqbal 95136c87e9 binds_unordered_interlocked_buffers: name the private rule it reads without a link 2026-11-11 04:57:58 -08:00
Anees Iqbal 26440eaa22 Push set 0 on MoltenVK for a fragment stage that writes a set-0 storage buffer in its interlock
MoltenVK, binding through Metal argument buffers (the state device/argument_buffers.rs reads
from the limits; a device without them is refused at open), makes a bound set 0 one Metal
argument buffer, and marks each storage buffer a fragment stage reaches inside its interlock as a
member in raster_order_group(0). Metal leaves such a member unordered where the function also
reads another buffer member of the same argument buffer. A pushed set is discrete in either of
MoltenVK's modes, and Metal orders a discrete [[buffer(n), raster_order_group(0)]].

RuntimeDriverDefect::InterlockedBoundBuffersUnordered names it, on every MoltenVK GPU (keyed on
the driver, as the push holds however the device binds). There a render variant whose fragment
stage writes a storage buffer of set 0 inside its interlock pushes set 0, read from its words
(pipeline/interlocked_writes.rs: an interlock execution mode, a StorageBuffer variable of set 0
not decorated NonWritable). PushedBufferSizesUnset stays: such a variant pushes only where no
stage reads a buffer's length (OpArrayLength, OpUntypedArrayLengthKHR) and no binding of set 0
lists a stage the pipeline adds; otherwise it binds set 0 as before and announces the new
Degradation::InterlockedBufferOrder (`interlocked-buffer-order`, precision), as it does on a
device without the push command or with a set 0 no push layout takes. Nothing is refused.

Every other path is unchanged: the device now loads the push command on MoltenVK too (and primes
it), but pushes_set_zero there admits only those variants; runtime kernels stay bound
(OwnedKernel::pushed requires pushed sets that hold their sizes); every other driver decides as
before. No new DriverFact or WorkCounts field: the lane reads draws_pushing_set_zero.

Tests:
- tests::interlocked_writes: the translator's own modules of ipo_primitive_order for the
  committed MoltenVK profile (only ipo_rog_buffer's fragment stage interlocks with a writable
  set-0 buffer; no stage reads a length), and synthetic words for each fact.
- runtime_lane::interlocked_primitive_order: a RogBuffer draw must push set 0 where the device
  pushes it (draws_pushing_set_zero), and on a driver whose pushed sets lose their sizes no other
  draw may push; a_bound_set_of_interlocked_buffers_is_announced_once, the bound form with
  VK_KHR_push_descriptor withheld, the degrade site BOUND_INTERLOCKS.
- tests::driver_defects lists the defect for the MoltenVK profile; api_signatures.tsv blessed
  (two rows); docs/REFUSALS.md regenerated: unchanged. docs/API.md: section 5's pushed set 0 and
  the catalogue entry.

Evidence so far, Apple M3 Max, macOS 27.0.1, MoltenVK 1.4.2: Metal itself, our own MSL, 96 passes
each: a raster order group buffer member beside a buffer member the function reads lost writes in
96 of 96, with the width read elsewhere 0 of 96, a texture member 0 of 96, the member alone 0 of
96; MoltenVK's own Metal for the lane's stage 48 of 48, the same with the buffer discrete 0 of 48.
Through the runtime at 83d2d86519 (set 0 bound) the lane's RogBuffer lost writes in 96 of 96
passes (m3-max-14866); with every set 0 pushed (a probe arm) 0 of 96 (m3-max-14930). The fix's
own lane run is reported with the tip.
2026-11-11 04:57:58 -08:00
Anees Iqbal 87e717bb4b ipo_primitive_order: companions of the raster order group variants
From regen-air-fixtures on the M3 (job m3-max-14818).
2026-11-11 04:57:58 -08:00
Anees Iqbal cb440b7259 interlocked_primitive_order: the same draws through raster order group 0
Beside the fetch, ipo_rog_texture and ipo_rog_buffer apply the same maps to
a texture's texel and a buffer's word of the pixel in raster order group 0,
which the translator runs in the pixel interlock as it does the fetch's
storage form. A device without the interlock must refuse them typed
(ROG-SKIP). Companions to regenerate on macOS.
2026-11-11 04:57:58 -08:00
Anees Iqbal 063c83ee1b interlocked_primitive_order: show the interlock ran by its storage placeholders
storage_forms_taken counts only a target made again with STORAGE, and the
lane's R32Uint targets have it from the start (0 on the M3, m3-max-14735).
Each pass that fetches in the interlock leaves the target out of its
subpass for a placeholder; the lane prints those attachments per target
and requires some where the device's fetch takes the storage form.
2026-11-11 04:57:58 -08:00
Anees Iqbal a10e67315a A lane measurement: overlapping fetching primitives of one draw in order
interlocked_primitive_order draws, in one draw, 64 overlapping primitives
whose fragments read color attachment 0 and write it back through one of
two maps that do not commute (ipo_primitive_order's ipo_mix), as fullscreen
triangles or as rectangles from stepped corners, one instance or one per
primitive, over 1920x1080, 64x36 and 61x37. Every texel must hold the
in-order composition; the wrong ones are printed per pass with the 8x4
groups they fall in, and the storage forms each target took. This is the
within-draw counterpart of interlocked_draw_order: the runtime records
nothing between a draw's primitives in the pixel interlock, and Vulkan
orders them by rasterization order.

Companions from regen-air-fixtures on the M3 (job m3-max-14725).
2026-11-11 04:57:58 -08:00
Anees Iqbal d23a5549b9 ipo_primitive_order: an owned fixture of overlapping fetching primitives in one draw
One fragment function reads color attachment 0 and writes it back through
3c + 1 or 5c + 3 by the parity of its primitive's number, so a draw of
overlapping primitives leaves the in-order composition only where each
fragment read what the primitive before it wrote. Companions follow from
regen-air-fixtures on macOS.
2026-11-11 04:57:58 -08:00
Anees Iqbal 27393845cb Re-bless the authored compile census at b4cd0f9f91
Its product fingerprint follows the runtime-sources pin at b4cd0f9f91 (dv-m3).
2026-11-11 04:46:16 -08:00
Anees Iqbal 91f6c94525 Re-bless the golden tables at b4cd0f9f91
What moved since 6898863f3f's bless. Blessed on the M3 (dv-m3).
2026-11-11 04:46:16 -08:00
Anees Iqbal 8de0694727 Re-pin the runtime sources at the landing tip
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.
2026-11-11 04:40:14 -08:00
Anees Iqbal 0ef9b10cf8 Error::NotInPlace: say whose making is refused
What: the variant's doc says the check's own texture's making is refused where a program's
texture would take a shadow, instead of a sentence whose subject read as the check.

Why: wording only; no code changes.

Verified: cargo fmt; rustdoc runs on this commit.
2026-11-11 04:37:26 -08:00
Anees Iqbal 54ee74469a tests::in_place_check: the notes test names the shapes lavapipe notes, one note per class and access
What: on a driver that renders an explicit plane's rows past its height (lavapipe), the test now
looks for the notes of the 20x9 RGBA32Float shape at 512-byte rows over pointer pages and over
the pooled memory (the two refusal sites, texture.rs host_shadowed and the image over the
device's memory), each naming the pitch's words and a cause that lasts, instead of a "DmaBuf
reads:" note of rows inside lines.

Why: the check notes one unmade shape per class and access and cause (lasting or passing),
whatever its row ends (in_place_check.rs check_class, `unmade_noted`), and its shapes whose rows
lie on lines run first: on lavapipe the dma-buf class's reads note is the 20x9 shape's (rows on
lines), and its unchecked reads of rows inside lines take no note of their own. The control run
at the test's first commit (21cac7f7af, lavapipe on msi-laptop) printed all 24 such notes, each
"...(a cause that lasts, kept)" with Shadow(Refused(Pitch)) for these shapes, so the lasting
causes asserted here are the ones before the fix.

Verified: the test at 21cac7f7af failed on lavapipe on its first note ("a note in words, no
\"Internal\": Pointer reads, rows on lines: ... Internal(InternalError { kind: Invariant, ... })");
this tip's run is in the report.
2026-11-11 04:30:04 -08:00
Anees Iqbal 50d2c26a33 In-place check: a texture of its own that takes no image in place is refused as Error::NotInPlace, its note in words
What: on the in-place check's thread, a texture making whose route takes no image in place
(texture.rs: host_shadowed over host pages, and the image over the runtime's pooled or exported
memory) is now refused with a new typed error, Error::NotInPlace(NotInPlace { why }), the cause
in the words a program's shadowed-texture notice names it with, instead of
crate::error::internal(..), an Error::Compile(Internal(Invariant)). The check's note of such a
shape (in_place_check.rs `unmade`, `unplaced`) now names the placement's answer in words
(TexturePlacement::words, new, crate-private, with words for each TextureShadowReason,
InPlaceRefusal, InPlaceAccess and InPlaceRowEnds), then the making's cause, on one line, with no
Debug output. Before, e.g. on the RTX 5080:
  "its making failed: compile failed: Internal(InternalError { kind: Invariant, detail: \"the
   in-place check's texture takes no image in place\" }); it took no image in place:
   Shadow(Refused(Pitch))"
Now: "no image the device makes lays the rows at their pitch: <the making's why>".

Why: an Internal error must mean a broken invariant, and an expected refusal is a typed answer
(AGENTS.md); the consumer reads these notes and could act on none of them. "compile failed" was
only Error::Compile's Display of internal(): no shader is compiled in the making.

Verdicts unchanged: whether an unchecked verdict's cause lasts is still the placement's answer
(`unplaced`), or, for any other making error, that or Unmade::of_error's (Unsupported, Invalid);
NotInPlace is neither, as Compile(Internal) was not. Only the runtime's own check meets the new
variant; no program's call returns it. No change of behaviour beyond the notes' words and the
error's kind on the check's thread.

Public surface: Error::NotInPlace and NotInPlace (re-exported at the crate root);
api_signatures.tsv blessed; docs/REFUSALS.md regenerated (no change: not a refusal of anything
Metal takes). The test of the commit before now looks the pitch's words up
(InPlaceRefusal::words).

Verified: tests::in_place_check on lavapipe and the Radeon 780M (PHOENIX); the commit before is
the negative control (evidence in the report).
2026-11-11 04:28:10 -08:00
Anees Iqbal 21cac7f7af tests::in_place_check: the check's notes of shapes it made no image of say why in words
What: a device test that settles the in-place check on a fresh cache and reads its notes of
shapes it made no image of in place: each must hold no internal error and no value's debug form
("Internal", "compile failed", "Shadow(", "Refused(", " { "); and on a driver that renders an
explicit plane's rows past its height (lavapipe), the dma-buf class's reads of rows inside lines
must stay unchecked, noted for the pitch, a cause that lasts. Every such note is printed
(IN-PLACE-NOTE).

Why: on every device the check notes those shapes as "its making failed: compile failed:
Internal(InternalError { kind: Invariant, ... }); it took no image in place: Shadow(Refused(Pitch))"
(seen on the RTX 5080 and others): an internal invariant error for an expected outcome, and the
placement's debug form for its cause. The consumer reads these notes.

Verified: this commit alone is the negative control: the test fails here, at the base, on
lavapipe (run in the next commit's evidence); the next commit makes it pass.
2026-11-11 04:25:00 -08:00
Anees Iqbal b4cd0f9f91 Regenerate docs/CONFORMANCE-COVERAGE.md for the XTX's ledger rows and read_through's notice
The coverage document counts the ledger's rows and lists each one's gap, and counts the modules
that declare a notice: the 27 RADV NAVI31 rows, the corrected text of the extended-range mipmap
rows, and read_through's `shared_memory_notice` (a module that declares a notice outright now)
move it. Written by `python3 -I scripts/conformance-coverage/coverage.py`; `--check` passes.

Found by the conformance suite's run at 0ef30d74db (potluck m3-max-14873, lavapipe on um790):
`the_conformance_coverage_document_is_what_the_sources_derive` failed, the only failure of 1043.
2026-11-11 04:10:13 -08:00
Anees Iqbal bd11f59efa known-gaps: the XTX's linear alignment and extended-range mipmap rows
The round's replay on the RX 7900 XTX (RADV NAVI31, at 6898863f3f) read 27 rows of two cases'
divergences unlisted. Both are the device's answer, written down as the other venues' rows are.

device-linear-texture-alignments (16 rows): Metal answers 16, the runtime 256. The answer is the
probe of texture/linear_alignment.rs: per format, the smallest power of two from 16 at which the
driver lays every probed width's linear image in place at the asked pitch, its memory alignment
dividing it. RADV takes no smaller one on NAVI31 (llvmpipe's row answers 64 the same way). A
texture over a buffer at a smaller multiple of 16 is still made, in place or shadowed.

blit-generated-mipmaps-bgr10xr / -bgra10xr (11 rows): the extended-range formats' mipmaps are the
runtime's compute filter in the device's float (mipmap_filter.rs: no Vulkan format holds an
extended-range code, so no blit filters one), announced `device-filtered-mipmaps`. Measured from
the case's recording: filtering each of Metal's levels from Metal's own level above by the
filter's IEEE f32 rule differs from Metal's level only at fields whose taps' exact average lies
halfway between two codes, by one code, and no single rule for the codes' average (half up, to
even, down) gives Metal's levels; the f32 chain run on the CPU from level 0 differs from Metal's
levels in exactly the XTX's counts (803, 232, 58, 13, 3 words; 58, 78, 46, 18, 5, 1 fields), the
same as llvmpipe's rows. So the XTX computes the filter's rule exactly; the difference is Apple's
datapath's choice at ties, not our extended-range conversion.

The existing llvmpipe and Apple M3 Max rows of those two cases said the levels were the blit
chain (`vkCmdBlitImage`); they now name the compute filter, which is what runs for these formats
(mipmap_plan.rs `blit_lack`). Their matched fields are unchanged.
2026-11-11 04:10:13 -08:00
Anees Iqbal 0e4d2c225c Conformance: read_through and two footprint cases name the shared-memory notice the XTX announces
The round's replay on the RX 7900 XTX (RADV NAVI31, at 6898863f3f) read 15 cases divergent at the
notices site alone (case/notices, and for three of them case/notices/set and case/notices/counts),
unlisted: the runtime announced `shared-in-system-memory`, which none of them declared.

The placement is the runtime's rule, not a shortage of room: without unified memory a `Shared`
buffer prefers a host-cached memory type, then a device-local one (memory.rs `candidates`), because
the host reads uncached memory, resizable BAR included, slowly, and a discrete Mac's GPU reads a
shared resource across the bus the same way. So the notice is the venue's memory model and never a
wrong answer, and the suite's declaration for it is `replay::shared_memory_notice`, which every
other case that reads back through a `Shared` buffer carries. It loosens the notices site alone.

- read_through: all 13 cases bind their positions and output in `Shared` buffers; each declares it.
- format_footprints: one-plane-ycbcr and padded-wide-channels set `shared_texture_buffers`. The
  runtime now makes their formats' `Shared` texture buffers, as Metal does (the recordings hold
  `makes-texture` Ok for them, and the XTX run matches), which was not so when the 5080's replay
  measured only the plain stragglers announcing it.
- docs/FAST-PATHS.md: the replay paragraph no longer says a card without unified memory makes the
  comparison unreadable; it says how the cases declare the notice.

Verified by the XTX replay of this tip (job ids in the report).
2026-11-11 04:10:13 -08:00
Anees Iqbal 8d66bb52cb Re-pin the runtime sources at the landing tip
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.
2026-11-11 04:10:00 -08:00
Anees Iqbal 8ce6fa4784 RUNTIME_VERSION 2026: sourceless no-copy memory is a copy on a device without VK_EXT_external_memory_host
A no-copy buffer or heap over memory with no dma-buf source, or whose source fails, on a device
that imports no host pointer, is now the copy a refused pointer takes on RADV instead of a
HostMemory refusal; the device's in-place check makes no pointer-pages buffer there.
2026-11-11 04:09:22 -08:00
Anees Iqbal 14eb0642f7 Host RAM window test: wait for the thread's own count, not a sum it passes through
a_copy_takes_its_chunks_as_an_object_does_and_the_window_ahead_moves_past_them
failed on lavapipe under load (job m3-max-14819, msi-laptop, five jobs
there): 'the device's thread went on past the window', 6 against 5.

The thread's import of a chunk counts host_ram_chunks_imported inside
import_chunk (host_ram.rs, Imported::Chunk) and host_ram_chunks_imported_ahead
only after the import ends. The scatter's settle waited for
by_copies + ahead == 2 + WINDOW, a sum that reaches its mark between the
two increments (by_copies 1, ahead 5), so it stopped there and the
thread's later ahead count read as the thread going past the window.

It now waits for ahead == 2 + WINDOW (and no run import live); the
assertion after it still checks by_copies is 0, so a copy that imported
its own chunk still fails it, after the wait.
2026-11-11 04:09:01 -08:00
Anees Iqbal 1f7b2a67cf No-copy memory with no dma-buf source is a copy on a device without VK_EXT_external_memory_host
On a device that imports no host pointer but imports dma-bufs (Honeykrisp
on Asahi lists no VK_EXT_external_memory_host), a no-copy buffer or heap
over memory with no source of dma-bufs was refused, naming the extension.
Metal makes such a buffer, and in place is impossible there, so it now
takes the copy a refused pointer with no source takes on RADV
(CopiedFor::DeviceRefused): announced as copied-host-pages, counted in
copied_host_buffers_device_refused, with every copy's coherence.

How: host_window marks such pages pointerless (the device imports no
pointer, the memory is not dma-buf-only). buffer_over_host_parts no
longer takes the no-route refusal for them, so they reach
import_by_pointer, whose not_importable answer is the device's refusal;
a source that fails counts as the device's refusal there too, as on
RADV. Rebinds to such memory, a guest RAM with no source, and every
no-copy object on a device with neither route stay refused, naming the
extension. The in-place check no longer makes its pointer-class buffer
on a device that imports no pointer (it would be an announced copy now);
its verdict there stays lasting, as before.

Docs: the copied-host-pages detail, CopiedFor, CopiedBecause and the
counter, copied.rs, host_memory.rs, the no-copy buffer and heap calls,
imports_shared_host_pointers, host_ram/copy.rs, the runtime README, the
API catalogue and HOWTO section 6. docs/REFUSALS.md regenerated:
unchanged, as the extension's refusal sites all remain.

Verified by the device test in the previous commit (lavapipe and the
780M, see the hand-off).
2026-11-11 04:09:01 -08:00
Anees Iqbal 472c71ade8 Device tests: sourceless no-copy buffers and heaps on a device without VK_EXT_external_memory_host are copies
A device that imports no host pointer (made withholding the extension, as
a driver that lists none is) but imports dma-bufs refuses a no-copy buffer
or heap over memory with no source of dma-bufs today, naming the
extension. The decision is that such memory takes the copy a refused
pointer without a source takes on RADV.

copied_buffer_and_heap_are_made_on_a_device_that_imports_no_pointer makes,
on that device, a buffer over shared memory with no source, one with a
source that fails, and a heap with no source, and asserts each is a copy
(counted as the device's refusal, announced once, no pointer or dma-buf
imported, the source called once) with the RADV copy path's coherence: a
CPU write before a commit reaches the GPU, those bytes alone copied in,
and a fill reaches the pages at its completion, those bytes alone merged
back. The heap's placed-buffer checks move into placed_lies_in_a_copy,
which the gate-refused heap test now shares, gaining the CPU-write check.
The test that asserted the refusal goes.

Fails at de15678626: the buffer with no source is refused.
2026-11-11 04:09:01 -08:00
Anees Iqbal ddc542474b Re-pin the runtime sources at the landing tip
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.
2026-11-11 04:05:20 -08:00
Anees Iqbal 41d9d35508 Exported memory: the buffer outlives every access through an import, not the import itself
A consumer keeps its imports of exportable buffers (CUDA's cuImportExternalMemory of each
buffer's descriptor) until a reaper thread lets go of them, a short while after the buffer's
release, never using them after it. That is sound: each descriptor vkGetMemoryFdKHR makes holds a
reference to the allocation's payload, and vkFreeMemory releases only the memory object's own
reference, so the payload stays until the import goes. The docs said the buffer must outlive
every import, a stricter rule than the one that holds; they now say every access through one.
Docs only.
2026-11-11 04:04:42 -08:00
Anees Iqbal d6f6ded707 Re-pin the runtime sources at the landing tip
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.
2026-11-11 04:02:44 -08:00
Anees Iqbal 0693cb9f3c RUNTIME_VERSION 2025: fetch barriers between draws, and a fetching draw that writes is not drawn again
The runtime records a by-region self-dependency barrier between draws that fetch and write the
color, and at an instance's first fetch, on a device with neither raster-order access nor pixel
interlock; a draw that both fetches and writes a color is no longer kept for drawing again.
2026-11-11 04:02:05 -08:00
Anees Iqbal 06aa85c0b6 SEMANTICS_VERSION 2026: framebuffer fetch between draws on a device with neither ordered form
The hkfbfetch branch took 2025 from a base at 2024, and development's Core Image
change (521f778bf6) took 2025 too; translation changed in both, so this takes the next.
2026-11-11 04:02:05 -08:00
Anees Iqbal aba3c0969c A render pass instance's first fetch between draws records after its load operations
On RADV on the RX 550 (Polaris, neither ordered fetch form of its own; job m3-max-14807) the first
fetch of a render pass instance read a load-cleared RGBA32Uint attachment as 0: the lane's three
exf_fetch_count draws stored (k + 1) * 13 for c * 27 + (k + 1) * 13, and
fetched_attachments_clear_as_the_load_action_does counted 7, 200, 13, 255 beside the tag for
10, 206, 22, 267. Each read after a barrier between draws was right. Vulkan orders the load
operations before every access of the instance through the attachment, but this driver did not
make the clear visible to the input attachment read; the barrier between draws, inside the
subpass's own dependency, does. So an instance begins with InterlockedStorage::BEGUN, the
fetch-after-writes kind alone set: the first draw that reads input attachments ordered between
draws alone records the barrier too. No draw of another device reaches that kind, so nothing else
changes.

The lane test now counts one more barrier in each pass (4, 3, 1) and states what a first read of
0 leaves. API.md, the runtime's framebuffer_fetch and InterlockedStorage docs and
WorkCounts::fetch_draw_barriers say the load operations are among the writes a fetch records
after. To be verified on the RX 550.
2026-11-11 04:01:36 -08:00
Anees Iqbal f1045dd9e5 A fetching draw that writes a color is not kept for drawing again
On llvmpipe with both ordered forms withheld (job m3-max-14763) the lane's three draws of
exf_fetch_count, each reading its input attachment and writing the color, panicked in the draw
again check (render/draw_again.rs: "a draw again kept no draw"): the first draw, recorded
before any write, was kept, so the second, the same call, would have been drawn again with no
barrier after the first's write; in builds with debug assertions it took every step, recorded
the barrier and kept nothing. A draw whose input attachment reads are ordered between draws alone
and which writes a color of its pass meets its own writes (InterlockedStorage::meets_fetch), so it
is no longer plain: every draw of it takes every step and records after the barrier, as the
storage form's draws do (storage_colors). A draw that only reads, or only writes, is kept as
before: drawing it again needs no barrier, and a draw between that would need one keeps nothing
and forgets the kept draws.
2026-11-11 04:01:36 -08:00
Anees Iqbal 1326854199 between_draws: the note is announced where the fetching pipeline is made
On llvmpipe with both ordered forms withheld (job m3-max-14744) the draws in order read 0.25 at
every texel with three barriers, and the test then found no unordered-fetch-within-draw notice:
the runtime announces a stage's precision notes where its pipeline is made (degrade_stages), as
it does every such note, and the test had taken the notices after making the pipelines and
dropped them. The test now asserts the note once at the first fetching pipeline's making and none
after the draws; the runtime's framebuffer_fetch docs, API.md's catalogue entry and the test's
module docs said it was announced at the first draw that binds the pipeline, and now say so no
more.
2026-11-11 04:01:36 -08:00
Anees Iqbal 768ebf1e8e Padded fetch test: with neither ordered form the read takes the input attachment, noted
engine_padded_blends' a_fetch_of_a_padded_attachment_reads_the_tile_value_of_its_codes expected
pfx_fetch's reads refused FramebufferFetch on the profiles with neither rasterization-order access
nor the pixel interlock (job m3-max-14695). They compile there as on a rasterization-order device,
color 0 an attachment of the raw format read as its input attachment, and only those note
UnorderedFetchWithinDraw; the test asserts both and still counts each kind of profile.
2026-11-11 04:01:36 -08:00
Anees Iqbal 03eb5af335 Tests: a fetch on a device with neither ordered form compiles through input attachments, noted
The core suite at 6bbdbdabc6 (job m3-max-14695, homelab-ms01-1) still expected the refusal on a
device with neither rasterization-order access nor the pixel interlock (vk12-floor,
lunarg-desktop-baseline-2023, roadmap-2022):

- engine_dead_fetch: a live read there reads color 0's input attachment, no storage form, and
  notes UnorderedFetchWithinDraw (an ordered form notes nothing); the three forms partition the
  profiles, so the refusal arm is gone.
- engine_fragment's framebuffer_fetch_reads_in_an_ordered_form_where_the_device_has_one: with
  neither form each entry (fetch_ordered's raster order group included) compiles to one input
  attachment a color with its FramebufferFetch fact, noted; the rasterization-order form notes
  nothing.
- engine_function_constant_interface: the declared color input on vk12-floor compiles, its
  FramebufferFetch fact and the note.
- the runtime's image_plan check: a color attachment is an input attachment exactly where
  framebuffer_fetch::through_inputs holds (rasterization order, or between draws), as the image
  plan decides.
2026-11-11 04:01:36 -08:00
Anees Iqbal 3d18018dad A raster order group on a color read takes no interlock where fetch is ordered between draws alone
On a device with neither rasterization-order color attachment access nor the pixel interlock, a
color input reads its input attachment ordered between draws by the runtime's barriers. A raster
order group on that input (fragment_fetch's fetch_ordered), or on a color output of an attachment
the function reads, asks for the order of that read, which is the read's own form there; it no
longer interlocks the function, so such a function is no longer refused RasterOrderGroups after the
fetch itself stopped being refused. Its overlapping fragments of one draw stay unordered,
PrecisionNote::UnorderedFetchWithinDraw, which the read records. A group on a buffer, texture or
imageblock member still needs the interlock. Devices with an ordered fetch form keep their path
(rog::declared is unchanged where fetch::fetch_unordered is false).

The conformance cases that fetch (fetch_ordered, srgb_fetch: one fullscreen triangle a draw, so
every byte still compares exactly) name unordered-fetch-within-draw among their notice allowances,
so a venue with neither form (RADV on the RX 550) replays them against the M3's recordings.

Tests: the compile test draws fetch_ordered on lavapipe's description without either ordered form
(input attachment, neither feature required, noted) and with the interlock (interlocked, as
before); engine_dead_reads' live dfr_output on vk12-floor now compiles without an interlock,
noted (before, refused RasterOrderGroups). Docs: API.md's fetch paragraph and catalogue entry,
rog.rs's module docs, the note's doc.
2026-11-11 04:01:36 -08:00
Anees Iqbal 5522c8cca9 Compile test: a fetch with neither ordered form reads the input attachment, noted
a_framebuffer_fetch_pipeline_is_ordered_exactly_where_the_device_orders_it asserted the refusal
naming both ordered forms on lavapipe's description with rasterization-order access and the pixel
interlock removed. That device now compiles the fetch as the input attachment without
rasterization-order access, neither feature required, its fragment stage recording
PrecisionNote::UnorderedFetchWithinDraw; the test asserts that, and that neither ordered form
(lavapipe's, the interlocked storage form) records the note.
2026-11-11 04:01:36 -08:00
Anees Iqbal 62d09e2959 between_draws: read each texel's bits through as_chunks
Clippy's chunks_exact_to_as_chunks under --cfg m2v_cpu_icd (job m3-max-14696) refused the
constant-size chunks_exact the one-draw-over-itself check read the R32Float texels through.
2026-11-11 04:01:35 -08:00
Anees Iqbal 22a96f62d4 Docs: framebuffer fetch between draws, its note, REFUSALS and the API signatures
docs/API.md's framebuffer-fetch paragraph says what a device with neither
ordered form does, and the degrade-notice catalogue gains
unordered-fetch-within-draw. docs/FAST-PATHS.md's device-gap table gains its
row. docs/REFUSALS.md regenerated (FramebufferFetch loses the
unsupported_features and family-row sites). api_signatures.tsv blessed: the
PrecisionNote and Degradation variants and WorkCounts::fetch_draw_barriers.

Verified: refusal_surface.py (0 without reach mark or basis), signatures.py
--bless (3 added).
2026-11-11 04:01:35 -08:00
Anees Iqbal 1f68adc9bb Framebuffer fetch without an ordered form: input attachments ordered between draws
A device with neither rasterization-order color attachment access nor the
fragment shader pixel interlock (Honeykrisp on Apple's M2 Pro, Mesa 25.3.6;
RADV on the RX 550) refused every fragment function that reads a color
attachment, Unsupported{FramebufferFetch, AnyOf[[ROAA],[interlock]]}. Metal
compiles those functions, so the device's own scope was narrower than the
refusal: Vulkan orders an earlier draw's color write before a later draw's
input attachment read of a subpass by a barrier of the subpass's dependency
on itself (core Vulkan, the Render Pass chapter's Common Render Pass Data
Races); only the overlapping fragments of one draw stay unordered.

Translator: on such a device a color input reads the input attachment, as on
lavapipe, without rasterization-order access, and the fragment stage records
the new PrecisionNote::UnorderedFetchWithinDraw (device gap). The device's
unsupported_features no longer lists FramebufferFetch. SEMANTICS_VERSION
2024 -> 2025.

Runtime: such a device fetches through input attachments
(framebuffer_fetch::through_inputs, inputs_between_draws); its subpasses and
pipelines take no rasterization-order flags; a draw that reads input
attachments after an earlier draw of its instance wrote a color, or writes a
color after one read them, records after the draws' subpass's whole
self-dependency barrier (InterlockedStorage's two new kinds,
render_target::DrawsBarrier), counted in the new
WorkCounts::fetch_draw_barriers. Devices with an ordered form keep their
paths: the new kinds are set only where inputs_between_draws holds.

Validation: the fetch lane's gate answers whether a device fetches in an
ordered form, and on one without checks the pipeline is made with the note;
framebuffer_fetch::between_draws is the device test of the new form on any
venue, ordered forms withheld.

Verified: cargo fmt only so far (builds and tests follow on potluck).
2026-11-11 04:01:35 -08:00
Anees Iqbal 24e4be9227 RUNTIME_VERSION 2024: an exportable buffer is dedicated only where the device needs it
8bf3842923's cherry-pick on development: an exportable buffer takes a dedicated
allocation only where the device requires one (DEDICATED_ONLY or
requiresDedicatedAllocation), not where it prefers one, so on NVIDIA such
buffers lie in their handle type's shared block and textures over them lie in
place instead of as Shadow(Unchecked). A run of an unchanged artifact allocates
and places otherwise, so cached runtime results are stale. (The kept in-place
record moves with in_place::CHECK_VERSION 18, a separate key.)

Version only; cargo fmt.
2026-11-11 03:56:46 -08:00
Anees Iqbal 60432530da Re-pin the runtime sources at the landing tip
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.
2026-11-11 03:56:39 -08:00