Commit Graph
3736 Commits
Author SHA1 Message Date
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
Anees Iqbal 7102a9b1b1 tests::export_dedication: a buffer of the picture's size and one of the check's, failures gathered
What: for each handle type the test makes two exportable buffers, of a 4K NV12 picture's bytes and
of the in-place check's (in_place_check::BUFFER_BYTES, now pub(crate)), asks the device's
dedication answers at each length, and gathers every failed hold (a dedicated allocation where the
device requires none, or the reverse; a texture over shared memory that is not in place or made a
shadow), so every buffer's allocation, placement and the check's notes print before it fails. The
texels' read still fails at once.

Why: on the RTX 3090 (NVIDIA 620.70.06, gem10, job m3-max-14662) the driver prefers no dedicated
allocation for an exportable buffer of the picture's 12,441,600 bytes either, so the test's
dedication hold could not fail there; it prefers one for the check's 40 MiB buffer, which is what
left the exported-fd class unchecked under the old rule. A buffer of that length makes the hold
bite where the driver's preference does.

Verified: the control (this tree with exported_memory.rs as of 789abcbd07) and the fix run on the
3090, the 780M and the 5080 in the jobs after this commit. cargo fmt --all.
2026-11-11 03:56:01 -08:00
Anees Iqbal a91b296bf5 tests::export_dedication: the exportable buffer is a 4K NV12 picture's size
What: the test's exportable buffer, and the buffer whose dedication it asks the device about, are
LENGTH bytes (3840 x 2160 x 3 / 2, the consumer's decoded frame) instead of 1 MiB; the texture
still lies over its first SIDE rows.

Why: the driver's preference follows the size. On the RTX 3090 (NVIDIA 620.70.06, gem10, job
m3-max-14627) the 1 MiB buffer was preferred no dedicated allocation, so at the pre-fix commit
789abcbd07 the test's own buffer lay in a shared block and only the in-place check's 40 MiB
buffer (dedicated, so the class unchecked and the texture Shadow(Unchecked { Reads, OnLines }))
failed it. The dedication assertion was vacuous there; at the consumer's size it is asked of the
buffer the consumer makes.

Verified: the control (this tree with exported_memory.rs as of 789abcbd07) and the fix run on the
3090 and the 5080 in the jobs after this commit. cargo fmt --all.
2026-11-11 03:56:01 -08:00
Anees Iqbal 5a8a1fd0c2 tests::export_dedication: print the device's answers through Display, so each is read
What: Dedication loses its derived Debug and prints through a Display impl that names each answer
(exportable, dedicated only, prefers dedicated, requires dedicated); the EXPORT-DEDICATION line
uses it.

Why: under --cfg m2v_cpu_icd (and m2v_gpu) the lib test build warned that `prefers` is never read
(dead_code ignores derived Debug impls; job m3-max-14523 on ms01), and warnings are errors in CI.
`prefers` is the answer the measurement is for (NVIDIA prefers a dedicated allocation where it
requires none), so it stays, read where it is printed.

Verified: the builds and clippy in the three configurations run in the jobs after this commit.
cargo fmt --all.
2026-11-11 03:56:01 -08:00
Anees Iqbal fcd4dfdc36 HOWTO section 7: what an opaque file descriptor's import names, in a shared block or not
What: docs/HOWTO.md section 7 says how CUDA and another VkDevice import export_memory_fd's
descriptor: ExportedMemory's allocation_size as the import's size, the dedicated flag only where
`dedicated`, the buffer at `offset` for `length` bytes, and that a buffer outside a dedicated
allocation lies at an offset in a block other exportable buffers share, which the import reaches
whole.

Why: the previous commits keep an exportable buffer out of a dedicated allocation where the
driver only prefers one, so on NVIDIA its export now answers dedicated false, a non-zero offset and
the block's size where it answered dedicated true, offset 0 (or the aligned byte's lead) and the
buffer's own size. ExportedMemory and Buffer::export_memory_fd already carried those fields and
said so; the guide showed only the dma-buf import. No API change.

Verified: docs only. cargo fmt --all.
2026-11-11 03:56:01 -08:00
Anees Iqbal abd65c6bdf In-place check: CHECK_VERSION 18, so an exported-fd verdict kept from a dedicated allocation is measured again
What: in_place::CHECK_VERSION goes from 17 to 18.

Why: the check's exported-fd class makes its buffer through exportable_buffer, as the product
does. Before the previous commit, on a driver that only prefers a dedicated allocation for an
exportable buffer (NVIDIA), that buffer was its own dedicated allocation, no image binds there
(VUID-vkBindImageMemory-memory-10926), and exported_pages answered Unmade::lasting: the class was
recorded unchecked for a cause that lasts for the driver's identity, in the record the shader
cache's directory keeps, named by the driver and CHECK_VERSION and not by RUNTIME_VERSION. A device
of the same driver reading that record runs no check of the class again, so every texture over an
exportable buffer would stay a ShadowCause::Unchecked shadow on a host that ran the old runtime
(the consumer's RTX 5080 Laptop, 615.71.09), whatever the fix. With the new version the old record
is never read (its name and the version it holds differ; tests::in_place's record tests hold
that), and the check measures the class over the buffer in its shared block.

Verified: the change is the constant alone; the record tests run with the runtime's touched tests
in the jobs after this commit. cargo fmt --all.
2026-11-11 03:56:01 -08:00
Anees Iqbal d203c0b5f4 Runtime: an exportable buffer takes a dedicated allocation only where the device needs one
What: exportable_buffer's buffer is its own dedicated allocation where the device exports
such memory only so (DEDICATED_ONLY) or requires one (requiresDedicatedAllocation); a
driver's preference (prefersDedicatedAllocation) alone no longer makes one, so the buffer
lies in the block exportable buffers of its handle type share. Docs: exported_memory.rs
(module and Device::new_exportable_buffer), memory.rs (module, NoImage::Dedicated),
texture.rs, the runtime README and docs/HOWTO.md section 7 say the same.

Why: no image may be bound to a dedicated allocation (VUID-vkBindImageMemory-memory-10926)
and a texture over an exportable buffer is an image in its memory, so on NVIDIA (reims's
RTX 5080 Laptop, 615.71.09) every texture over the consumer's exportable caches was a
shadow, ShadowCause::Unchecked (2862 of 4112 IOSurface-plane shadows; 12.4 MB copied in per
plane use, 30 MB back per composite). The owner's rule: a texture over exported memory stays
in place even if slower; a shadow only where in place is impossible.

Verification pending (parked for the 780M regression): tests::export_dedication on the
3090 at c63787840b (the measurement and negative control) and at this commit; clippy and
the 5080 entry still to run. cargo fmt --all.
2026-11-11 03:56:00 -08:00
Anees Iqbal 21876fd551 Tests: an exportable buffer's dedication and the texture over it, per handle type
What: tests::export_dedication asks the device, apart from the runtime, what it answers of
exporting a buffer's memory of the runtime's usage (exportable, DEDICATED_ONLY,
prefersDedicatedAllocation, requiresDedicatedAllocation) and of a linear R8_UNORM image made
for the handle type, prints both (EXPORT-DEDICATION), then makes an exportable Shared buffer
of each handle type the device exports and a texture over it, and prints the allocation and
the texture's placement once the in-place check answered, with the check's notes. It holds
that the buffer is dedicated exactly where the device requires it, and that where its memory
is shared and the image needs no dedicated allocation the texture lies in place with no
shadow.

Why: reims's RTX 5080 (NVIDIA 615.71.09) makes every texture over an exportable buffer a
shadow (ShadowCause::Unchecked, 'the device's check made no image over the runtime's memory
exported as opaque file descriptors'): exported_memory.rs gives the buffer a dedicated
allocation where the driver only prefers one, and no image may be bound there
(VUID-vkBindImageMemory-memory-10926). This commit is the repro and measurement; the fix
follows. Runs on potluck after this commit. cargo fmt --all.
2026-11-11 03:56:00 -08:00
Anees Iqbal de15678626 RUNTIME_VERSION 2023: no-copy buffers take the dma-buf route without the host-pointer extension
12a8a907bc..02a64274c5: on a device without VK_EXT_external_memory_host, a no-copy
buffer or guest RAM with a dma-buf source is imported as its dma-bufs instead of
refused; supportsResourceDetachBacking answers whether the device makes no-copy
buffers at all; Linux bit-24 memory is no longer refused for lack of an import
route. A run of an unchanged artifact can answer otherwise, so cached runtime
results are stale.

Version only; cargo fmt.
2026-11-11 03:35:43 -08:00
Anees Iqbal 1cdfd0edbd 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:35:36 -08:00
Anees Iqbal 02a64274c5 Pages with no route of their own may still lie in a guest RAM's chunk
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.
2026-11-11 03:34:56 -08:00
Anees Iqbal 713b955ccf Device tests: no-copy buffers and guest RAM on a device made without VK_EXT_external_memory_host
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.
2026-11-11 03:34:56 -08:00
Anees Iqbal 12a8a907bc No-copy buffers on a device without VK_EXT_external_memory_host take the dma-buf route
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.
2026-11-11 03:34:56 -08:00
Anees Iqbal 521f778bf6 A read-only device buffer may be a constant-space pointer
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.
2026-11-11 03:13:47 -08:00
Anees Iqbal e9d402a179 The two dispatches past 2^32 threads: their own wait, and they run alone
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.
2026-11-11 03:02:00 -08:00
Anees Iqbal bba03354b8 RUNTIME_VERSION 2022: four runtime messages said once per device and kind
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.
2026-11-11 02:49:39 -08:00