Commit Graph
8762 Commits
Author SHA1 Message Date
Anees Iqbal 3f2be1ea4d Runtime: held work goes only by room, teardown and send-through, never because a completion round runs
The completion thread set Done::busy and then woke the submit thread (complete.rs, at each
round), and a pass that read busy held nothing: every held group and every command buffer held
for room went to the VkQueue at once. The wake that announces a completion is sent right after
busy is set, so whether room held was a race between a round's length and a thread wake: on the
3090 it mostly held, on the Iris and on the XTX's short arm the backlog flooded past room (A/B
jobs m3-max-64198, 64241: B's p90 two to three of A's command buffers).

The planner's ruling (A): busy goes. Done::busy, its two stores, the read in pass and the
parameter through next_ready, waits_for_room, hold's callers, step, Fifo::goes and unheld are
deleted; held work goes when a completion leaves room, at teardown, or on a send-through (a host
wait, send_now, a fence's updater). `completed` is still raised before the submit thread's mark
is read, so a completion is never missed. While a round runs it sees no completion, so held work
waits for the round's end: a completed handler or listener longer than the work in flight
leaves the GPU idle for the rest, where Metal would go on. The README records that known gap
beside the scheduled-handler one and drops "a slow completed handler holds no later
submission".

Test: every_device_holds_work_for_room_while_a_completed_handler_runs parks the completion
thread in a completed handler, commits three on a queue with room for two, and finds the third
held in a group, two submissions sent, once a later commit on another queue is scheduled. With
busy it went at once (3 in flight). The waits for !busy in the two_queues and behind_busy
helpers and the upload test's trace are gone with it.
2026-11-21 10:26:32 -08:00
Anees Iqbal ba859221ff Harness: the two-queue row's A idle leaves B's runs out
A's GPU idle before each of its command buffers was the gap from the end of the one before,
and B's small command buffers that ran in that gap counted as idle. With the room rule B lands
between A's (A keeps two on the VkQueue, not its whole backlog), so the gap grew by B's runs on
the new arm alone: 62-65 us against 22-26 us on the 3090, 77-131 against 23-24 on the XTX (jobs
m3-max-64240, 64241). The idle is now the gap less the parts of B's runs within it.
2026-11-21 10:26:32 -08:00
Anees Iqbal bb42de9428 Harness: the two-queue row's signalled part in the consumer's shape, and A's GPU idle
The signalled part had B commit every 16.7 ms a waiter on A's last committed count. Each of
those waited for A's whole backlog, so B kept about nine uncompleted and B's own queue held
its later waiters: they reached the GPU behind more of A's work, on the old arm and the new
alike (the 3090 OLD read 20 ms at p50 in two of three arms, the Iris NEW in one of three; jobs
m3-max-64199, 64198). That measured B's depth, not the signal's path.

Now, as the consumer's writer and its waiter do, A's thread commits on B, right after each of
A's command buffers (its fills, then the signal at its tail), a waiter on that signal; the main
thread only lets it run as long as the first part's frames. Both parts also time A's GPU idle
before each of its command buffers, from the end of the one before (a_gap_p50, a_gap_p90;
wait_a_gap_p50, wait_a_gap_p90): where room arrives later than the GPU needs it, that idle
grows.
2026-11-21 10:26:32 -08:00
Anees Iqbal 3d247f82e6 Authored compile census: blessed at the pin
The authored compile census re-blessed. Its 290 differences against the old table are the texture-buffer work
landing since the last bless: 230 cells now compile (texture-buffer cases the translator and the runtime now
make), and 60 refusals changed their requirement lists (texture_buffer dropped where the case still refuses
for another requirement, ulong_texture_atomic among them). failed 0, regressions 0.

Verified: census job m3-max-64248 on the M3 at 80b54178df (2376 cases x 10 profiles = 23760 cells; compiles
18740, compiled 17689, refused 6071, failed 0, differences 290, regressions 0). No translator, AIR or
validation source changed between 80b54178df and this commit's parent 0b73ac76e5, so the table holds here.
2026-11-21 10:19:19 -08:00
Anees Iqbal 9c7f8f01fd Runtime tests: the passing pair's Shared arm, a texture over a Shared buffer in an image of its own read by A3 in a group held and by B1 passing it
The texture over a buffer in an image of its own that two queues read is made over a Shared buffer
too (a pitch a texel past its row, which no device's linear image lays): the Shared rules copy it in
for each submission's own commands, so B1, passing A3's group held, reads the buffer's bytes as A3
does. The setup helper makes either kind and prints which.
2026-11-21 10:14:58 -08:00
Anees Iqbal 0b73ac76e5 rt README: the driver's execute cost on indirect executions is measured on one NVIDIA card; RADV's guest frame runs its executions under direct
What: the known gap of NVIDIA's driver's execute cost says its figures ran on one card, an RTX
3090 (620.70.06), that the harness frame's microseconds are its own draws' and not a guest
frame's, and that on a Radeon RX 7900 XTX (RADV) a guest's frame of that shape at a held camera
pose took 4.305 ms of GPU time with its executions against 4.372 ms with the same draws direct,
the executions 1.5% under, so the driver's execute cost is measured on NVIDIA's driver alone.

Why: the gap's scope, as the planner ruled it: rung 4 for the driver's share, its shares kept as
the harness's microseconds (the driver's 539.0 of the 720.9 us gap; the splits about 117 to 128
and the empty parts about 54 to 65), and no percent of a guest frame, since the harness frame's
gap is larger than a guest frame's whole gap and the two do not map one to one.

Verified: README only; the harness figures are job m3-max-64194's (unchanged); the XTX figures
are the consumer's two walks at the held pose, jobs m3-max-64076 (executions) and m3-max-64084
(direct), each a separate run. Docs check: fmt and workspace Rustdoc -D warnings (job below).
2026-11-21 10:11:27 -08:00
Anees Iqbal 696d7ac9cc Runtime tests: the Managed passing pair gives two_queues its held argument (A3 in a group, two held for room)
two_queues takes whether A holds a group and how many command buffers it holds for room since
0a35c20f4b; the passing pair's A holds A3 in a group and A4 and A5 for room.
2026-11-21 10:07:40 -08:00
Anees Iqbal 635a4d8d4e Runtime: a texture over a Managed buffer takes its owed copy in as its first reader's submission goes, not as it joins a group held
A texture over a Managed buffer's device copy in an image of its own owes a copy in at its making
and after submitted device work wrote the buffer (ManagedOvers). That copy was taken as a command
buffer that reads the texture was staged into its queue's group, and the copy rode the group. A
command buffer of another queue committed later could be sent before that group (it passes a
group held), find no copy owed and read the image before the copy ran: on an RTX 5080 B1 read
zeros where the buffer held its bytes (job m3-max-64193; before rule R too, at fbaa5bb777, job
m3-max-64213). Metal's contract: a command buffer committed after the bytes were named and
committed reads them.

Now the copy is taken as a group goes (WorkState::close), for each command buffer of it with
commands that keeps the texture: the device's one VkQueue runs submissions in the order they go,
so the first submission that reads the texture makes the copy, of whichever queue, and nothing
later owes one. Where nothing passes, the one copy is made as before.

Taking the copy at the send would let a capture of a didModifyRange over the texture, committed
between a reader's staging and its send, swallow the copy that reader still needs, as it already
did for a reader held for room: the capture copies the texture in only ahead of the command
buffers numbered at or after it. So the capture no longer clears the owed copy; it records its
commit number on the entry, and a reader numbered at or after it takes none (the capture's copy
runs ahead of it), while one numbered before it takes its own. Device work's later write clears
the number with the copy it owes again.
2026-11-21 10:07:09 -08:00
Anees Iqbal b2e6f1f5c7 Runtime tests: a texture over a Managed buffer read ahead of a later capture over it; the passing pair prints A's group held
Two device tests behind the busy gate on one queue: R reads a texture over a Managed buffer in an
image of its own whose first copy in its making owes; the consumer then writes and names the
texture's last row, and C, committed after on the same queue, takes that capture and reads the
texture. R runs before the capture's copy in and must read the buffer's bytes outside the named row
(Metal leaves the named row undefined for it); C must read the new bytes. R is either in the
queue's group held or, behind four command buffers that join that group first, held for room.

The passing pair (two_queues) now prints and asserts A's submissions in flight and group held as B1
commits, and the shared setup (the Managed buffer, its capture and the texture over it) is one
helper that asserts and prints the texture's form.
2026-11-21 10:07:09 -08:00
Anees Iqbal ee794798f5 Runtime tests: another queue's reader of a texture over a Managed buffer, passing the first reader of the texture's own queue
Two device tests on qroom's two-queue kit: a texture over a Managed buffer in an image of its own
(a pitch a texel past its row, which no device's linear image lays), made once the buffer's named
bytes were captured, is read by A3 (in A's group held) or A4 (held for room), the first of queue
A's to read it, and by B1 of queue B, committed after and run before it. Both must read the buffer's
bytes. On a device with two copies the texture's first copy in is owed by its buffer's entry
(ManagedOvers); each test prints the form, the run order and what each reader read.
2026-11-21 10:07:08 -08:00
Anees Iqbal 80b54178df rt README: indirect executions on NVIDIA's driver cost GPU time inside the execute; the split and empty parts' costs measured on an RTX 3090
What: the known gaps of indirect command buffers gain the RTX 3090's measured costs of an
execution over a range a buffer holds: the driver's own execute cost (a new gap), the split's
cost (about 11 us of GPU time an execution) and a part with count 0 (about 10 us a part).

Why: an execution over a GPU-written range cost more GPU time a frame than the same draws direct
on an RTX 3090. Measured apart, three quarters of that is inside the driver's
vkCmdExecuteGeneratedCommandsEXT, which no form of ours changes (the workaround ladder's rung 4);
the rest is the split around the count kernel and the parts the count leaves empty.

Verified: a probe row (never lands, steelbrain/icbperf-probe 3ad97ab2bd on fbaa5bb777, compile
job m3-max-64187) times a frame of 11 executions over ranges a buffer holds in 6 passes
(buffers of 8,162, 785 and 289 commands, 2,132 commands in range) against the same draws direct,
on an RTX 3090 (NVIDIA 620.70.06, um870, Thunderbolt 3 link, validation layer off), job
m3-max-64194: 6 arms alternating over 9 rounds, each turn at least 300 ms (204 to 334 frames),
every turn at P0 with the SM at 1950 MHz and the memory at 9751 MHz, every image matching its
reference. GPU us a frame, medians of 9 turns: direct 386.0; the runtime's form 1106.9; one
part an execution 1041.7; counts written as the command buffer records, no split 978.9; both
925.0; explicit preprocess 263.9 + executes 592.9 (1080.4 in all). Counts a frame: 11
executions, 11 count kernel dispatches, 11 splits, 17 parts (6 with count 0), 25,305,344
preprocess bytes, against 2,132 draws direct.
2026-11-21 10:05:31 -08:00
Anees Iqbal 50fd77175a Runtime README: a scheduled handler that blocks until held work completes never returns
Scheduled handlers run on the device's one submit thread, so every queue's later submissions
wait while one runs, held groups and command buffers held for room included. A handler that
blocks outside the runtime (the runtime's own waits are refused in it) until such a command
buffer completes therefore never returns, where Metal runs it on a thread of its own. The gap
predates the room rule (any group held behind full in-flight work); signals now waiting for room
widen what can be held, which is how the event-chain test's parked handler hung at 0a35c20f4b
(job m3-max-64168). The README said "the queue's later submissions"; it is every queue's.

Docs only.
2026-11-21 10:02:13 -08:00
Anees Iqbal d43b9a115d Runtime tests: two event tests read a signal that waits for room
The lavapipe rt suite at 0a35c20f4b (job m3-max-64168) hung two tests that held the old rule,
a signal always staged at once:
- The shared-event chain parks the submit thread in a scheduled handler after its links are
  committed; its third link on one queue, behind two links of unknown run, now waits for room
  and could not go while the thread was parked. Each queue's expected run is now set to 1 ms,
  so each has room for its links, and the test's own claims (every link submitted and Scheduled
  before the first runs, none held for a value, the links in order) hold as before.
- The three-deep signal test asserted that a held group never keeps back a signal. It now
  asserts the rule: the signal waits for room with the group, Scheduled, its waiter on another
  queue Committed, nothing more submitted before the busy work ends; then all three go and the
  waiter ends after the signaller, held once for its value. Renamed for what it now shows.
2026-11-21 09:56:48 -08:00
Anees Iqbal 0a35c20f4b Runtime: a command buffer that signals an event waits for room too, in any segment
A segment that signals an event sends its group at once, so a command buffer that signals
went to the VkQueue whenever no group was held, or when the group held would take it: a queue
whose every command buffer signals kept all of it on the VkQueue, and another queue's later
work could not pass it. The lavapipe run of the harness's two-queue row showed it: with each of
A's command buffers signalling, 0 held for room (job m3-max-64136).

Now a head that signals in any segment waits unstaged for room (WorkState::waits_for_room):
with no group held, until its queue has room for it; behind a group held, though the group
would take it. Its signal is staged only then, and as a waiter takes a staged signal as
submitted, a wait for it waits with it: no waiter is submitted ahead of its signal. Covered:
work then a signal at the tail (one segment), a wait at the head (no split: command.rs
Building::wait splits only a segment with commands or signals), and a signal after a wait that
follows work (a later segment). A partly staged command buffer's later signal still goes at
once: one command buffer at most. The fence's held-updater scan no longer needs the other queue
to hold a group, and the completion wake stays on while a queue's head is held for room.

Tests: A's every command buffer signals at its tail (work, then the signal), or after a wait
that follows its work; B1 runs after A1 and A2 as behind unsignalled work, A3 to A5 held for
room. The two_queues helper takes whether A holds a group and how many it holds for room.
2026-11-21 09:46:47 -08:00
Anees Iqbal 5b54f02cad Runtime tests: the held-signal event test guards the order, which held before the room rule too
Its order of A1 to A5 then B1 held on the base before the room rule (5ccd158e6d + the tests,
job m3-max-64094), where every signal went to the VkQueue at once; there only A's held count
failed. Its doc now says so, and names the two-queue and fence tests as the ones that carry the
rule's own order, so nobody reads it as that proof.

Comment only.
2026-11-21 09:44:18 -08:00
Anees Iqbal c5ee8d7919 rt: Error::basis answers each refusal's basis, generated from its Basis: line
What: a public RefusalBasis (MetalDocumented, MetalMeasured, Ours, Device) and Error::basis, which
answers Refused, Limit and Unsupported from the variant's own basis, BelowFloor and
NoDirectDriverLoading as Device, and None for Translation, the platform's and Vulkan's failures and
the consumer's own block, stage or quiesce. Refusal::basis, Limit::basis and Gap::basis live in
crates/metal2vulkan-runtime/src/error/basis.rs, which scripts/refusal-surface/refusal_surface.py
writes from the `Basis:` line each variant's doc comment ends with: 131 arms (Refusal 82, Limit 17,
Gap 32), one per variant in declaration order, no `_` arm. The doc comment stays the one source.

Why: a consumer's census of the refusals its guests meet could only match names, so 67 refusals
whose basis is ours counted as "Metal refuses it". A typed basis tells them apart.

How: the script enumerates the enums structurally (rt_refusal_enums), reads each variant's pattern
(`Name`, `Name(..)`, `Name { .. }`) with enum_arms, and maps the basis value to the RefusalBasis
variant it names. It fails where the enum has no such variant (metal-takes and unknown have none:
the value comes with the first variant that needs it) and where a name is too long for rustfmt to
keep its arm's pattern on one line. It writes the file as `cargo fmt` leaves it (one line per arm,
else rustfmt's block form past 100 columns), so no rustfmt run is needed. `--check` fails where
basis.rs is stale, as for docs/REFUSALS.md, and one run regenerates both. `--selftest` gains three
cases: the arms and the block form, two Basis lines give two files, a missing value fails.

Verified: refusal_surface.py --check and --selftest, signatures.py --check and cargo fmt --check
pass on this tree. The generated forms were checked against rustfmt at five name widths and three
variant shapes. The compile job and the lavapipe rt suite are named in the lane report. Without
the change, the new tests do not build: RefusalBasis is unresolved and `basis` is not found.
2026-11-21 09:41:04 -08:00
Anees Iqbal 1dceeb740d Harness: the two-queue own row, a queue's command buffer beside another queue's backlog
Queue A keeps 8 command buffers uncompleted from a thread of its own, each sized by fills of a
256 MiB Private buffer to about 20 ms on the GPU (one fill's run, the least of three on a queue
of its own); queue B commits 60, one every 16.7 ms, each one 4 KiB fill. Unrelated, B's
commit-to-completed p50, p90 and most, and A's GPU run, are its times (b_p50, b_p90, b_max,
a_run). With each of A's signalling a shared event with its count and each of B's waiting first
for A's last committed, the GPU start of B's after its signaller's GPU end at p50 and p90
(wait_p50, wait_p90). Both parts print Metrics::held_for_room's growth. Every command buffer is
to complete and each waiter to end after its signaller, or the row fails; the harness's rt test
runs it on the cfg's device.

It measures the room rule's landing rows: B's wait behind A's work in flight, and that a waiter
on a signal held for room starts no later after its signaller.
2026-11-21 09:35:12 -08:00
Anees Iqbal 339d8f05c7 Runtime docs: a waiter on a signal held for room reads Committed until it is staged; the 2019 MacBook Pro's order as job 64081 shows it
A wait for an event's value is met once a signal of it is submitted (staged); a signal its
queue holds for room is not yet staged, so its waiter reads Committed for as long as the
signaller's queue takes to reach it. The Scheduled doc, newSharedEvent's and docs/API.md's
accepted difference now say so: within the M3 Max's own hold, which keeps a shared-event
waiter at Committed until the value lands.

The README's 2019 MacBook Pro sentence now states what job 64081 showed and no more: on the
Radeon Pro 5300M an unrelated read of a second process completed 0.99 to 1.97 ms after its
commit beside about 160 ms of another process's submitted work; a dependent read completed
after its writer and 19.06 to 19.26 ms before the first of 4 command buffers committed after
the write (committed, not shown submitted); the UHD 630 ran both processes first in, first
out in all 18 rounds, so its reader-after-writer is not told apart from that order.

Docs only.
2026-11-21 09:35:12 -08:00
Anees Iqbal 1678f29df5 Runtime: a group with command buffers held for room behind it takes them before a send-through sends it
A send-through (send_now, a host wait, a fence's updater) that reached past a full group's
held-for-room command buffers sent the first of them alone, then the next: each now opened a
group of its own that the send-through sent at once, where with room they had joined one group.
A group now goes on a send-through only once no held command buffer is behind it; the next
step takes that one, held ones always ready, or sends the group first where it does not fit.

Found by the lavapipe rt suite (job m3-max-64092): the unseen-joins test sent three groups
for two (6 against 5).
2026-11-21 09:27:59 -08:00
Anees Iqbal 39cc9ccd41 Runtime README: the 2019 MacBook Pro's cross-process order the room follows
Recorded by the consumer on a 2019 MacBook Pro (job 64081): the
Radeon Pro 5300M completed a second process's read of a shared surface
0.7 to 0.8 ms after the writer, behind its whole backlog, then passed the
writer's later work; the UHD 630 ran first in, first out. The room rule
follows the 5300M's order.
2026-11-21 09:20:18 -08:00
Anees Iqbal 7911c011a0 Runtime: a queue keeps on the VkQueue only what it has room for, and another queue's later command buffer passes the rest
A queue sends a group only while it has room (submit::room): with fewer
than two submissions not seen complete always, and with fewer than
IN_FLIGHT while the expected runs behind the oldest, the group's with
them, stay within GROUP_RUN (16 ms). Without room, a command buffer the
held group does not take (by GROUP_RUN, UNSEEN_JOINS or GROUP) waits in
its queue's list, not staged, with the queue's later commits behind it;
the submit thread skips that queue and other queues' later commits go on.
Each held command buffer is scheduled as it would be in a group, in
commit order once its waits are met, its scheduled handlers run: only
its vkQueueSubmit2 waits for room (WorkState::hold). One that presents a
drawable, has nothing for the GPU, or ended sends its queue through to it,
as its group would go at once. Everything that sent a group still sends
it: a signal as staged, a host wait or send_now, stop, a busy completion
thread, an empty command buffer, a conflict with a texture copy.

A group no longer goes at its sixteenth command buffer: the seventeenth
finds it full and waits for room. A queue whose expected run is not yet
known has room for two.

Fences: a wait on another queue also goes after an update in a command
buffer held for room there, scheduled before the waiter was; that queue
goes through to it first. A held head with no group is staged before any
other command buffer, the earliest held first, so the order of holds is
the order fences read.

abandon ends the queue's command buffers not yet scheduled in place, in
the queue's order behind those held for room, which go at once.

Metrics::held_for_room counts the command buffers scheduled while held
for room (api_signatures row).

Why: one queue's backlog no longer delays another queue's command buffer
by more than about GROUP_RUN of that queue's expected GPU time.
2026-11-21 09:18:56 -08:00
Anees Iqbal fbaa5bb777 Translator tests: the bind plan's slot fixture states declared_format
The compile job at ffe36113a1 (m3-max-64102) stopped at the metal2vulkan lib tests: the bind
plan tests' TextureSlot literal lacked the new field.
2026-11-21 09:29:57 -08:00
Anees Iqbal ffe36113a1 rt docs: an undeclared formatless write to a texture buffer cites the Vulkan rule it leaves
The known-gaps bullet and Gap::StorageElement's doc name the undeclared argument-buffer or
resource-ID write to a texture buffer whose format's buffer features lack the formatless write
bit as outside Vulkan's valid usage (VUID-vkCmdDispatch-OpTypeImage-07029), beside the image
precedent for the undeclared formatless read: the atomic's R32ui class and the formatless class
are one storage texel-buffer element (pipeline/link.rs identity_set, binding 6 for every class of
the type; rt arrays.rs STORAGE_TEXELS_BINDING).
2026-11-21 09:23:57 -08:00
Anees Iqbal 139d9ff4f6 Texture atomics declared with their format take no formatless bit: the interface says which slots are declared without one
A slot a texture atomic updates is declared R32ui or R32i (atomic_format), so its accesses need
none of VK_FORMAT_FEATURE_2_STORAGE_{READ,WRITE}_WITHOUT_FORMAT_BIT (VUID-vkCmdDispatch-
OpTypeImage-07027 to -07030 ask them only of an access declared without a format). The runtime
asked them of every storage slot: TextureSlot folds an atomic into read and write, so pipeline.rs
counted the atomic as a formatless read, and a texture buffer had a storage element only where its
format's buffer features hold the formatless write bit. On the Windows UHD 630 (driver 101.2145,
job m3-max-64024: R32_UINT's buffer features hold STORAGE_TEXEL_BUFFER and its atomic, and no
format's hold either formatless bit) the texture-buffer atomic test was Gap::StorageElement at
slot 0 (jobs m3-max-63951, m3-max-64074) though the device runs it. The image side has the same
count in code: an R32Uint texture's atomic was refused wherever R32_UINT's optimal tiling lacks
the formatless read bit, which Vulkan leaves to a device without
shaderStorageImageReadWithoutFormat (no device in the cluster lacks it).

- TextureSlot::declared_format: the slot's storage image is declared with a format (from its
  declaration). ARTIFACT_FORMAT_VERSION 590 for the codec field; no SPIR-V changes.
- The runtime checks a format's formatless bits only at slots declared without a format
  (Interface/Draws `formatless`), for compute and render alike. A written texture buffer's
  storage element is made wherever its format holds the storage texel buffer, and a formatless
  write of one whose format lacks the write bit is refused (unwritten()), at its slot and after a
  use_resource write declaration.
- Tests: DeviceOptions gains a device-test hook, `described`, an edit of the translator's
  description before Device::from_queries (the Vulkan device is the same). The texture-buffer
  atomic test runs on each device's own answers and as a device with no formatless texel-buffer
  bit (the UHD's answer); a new 1D R32Uint texture atomic test runs on its own answers and as a
  device without shaderStorageImageReadWithoutFormat and without R32_UINT's optimal read bit.
  Both edited runs refuse before the fix.
- Gap::StorageElement's doc and the runtime README say what holds now: a texture buffer at an
  atomic's slot runs on the UHD 630; an undeclared resource-ID write to a texture buffer whose
  format lacks the formatless write bit is outside Vulkan's valid usage, as such a read already was.
2026-11-21 09:22:15 -08:00
Anees Iqbal 622438f31f rt README: the Iris Xe's far-row cut of a fractional viewport is a known gap
On the Iris Xe (ANV, Mesa 26.2.6) a viewport whose far edge lies inside a pixel loses that row or
column even where its pixel centre is inside the viewport. Metal draws it: the conformance case
fractional-viewport-coverage, recorded on the M3 (m3-max-64012).

The cause is ANV's own scissor. update_scissors in src/intel/vulkan/genX_gfx_state.c (lines
2164-2169, the same in mesa-26.2.4 and mesa-26.2.6) clamps the hardware scissor to the viewport
and stores the far edge as an integer, MAX2(vp->y, vp->y + vp->height) - 1, truncated. A far edge
at 7.7 keeps rows through 6, so row 7 is not drawn, though its centre 7.5 is inside. That is the
row the old raster test lost on the Iris: its viewport ran from y -0.3 to 7.7 (m3-max-63429,
round ce998742d7).

The planner's ruling: rung 1 has no form and rung 2 no query, so rung 3 (a minimal Vulkan repro
and a report draft, staged outside the tree for the owner to file) and rung 4, this line. The
conformance case's Iris row is added when the next round's replay writes it. The Windows UHD 630
is not named until its own replay row shows the cut. The partial-pixel coverage where the centre
is outside the viewport is a separate accepted difference (docs/API.md) and is not mixed in.

Verified: cargo fmt; the entry adds no link and touches no README section a test reads (the
floor test reads "## Floor" alone).
2026-11-21 09:16:23 -08:00
Anees Iqbal 1b97ca8404 Runtime tests: texture buffer writes refused where the buffer features lack the formatless write; the ring test awaits the block-maker's answer
Two reds of the Windows UHD 630 leg at the pin 5ccd158e6d (job m3-max-63951).

Texture buffers. vulkaninfo on that device (job m3-max-64024, Intel UHD Graphics 630,
driver 101.2145, Vulkan 1.3.215): shaderStorageImageReadWithoutFormat false,
shaderStorageImageWriteWithoutFormat true; R32_UINT's bufferFeatures hold UNIFORM_TEXEL_BUFFER,
STORAGE_TEXEL_BUFFER, STORAGE_TEXEL_BUFFER_ATOMIC and VERTEX_BUFFER, and no format's buffer
features hold STORAGE_READ_WITHOUT_FORMAT or STORAGE_WRITE_WITHOUT_FORMAT (the spec requires
them of image formats only). The read-and-write test's written slot is declared without a
format, so its write needs the buffer write bit (VUID-vkCmdDispatch-OpTypeImage-07029): the
runtime's Gap::StorageElement there is right, and the test expected success on every device.
It now reads R32_UINT's buffer features and expects the refusal at slot 1 exactly where they
lack the bit, success elsewhere. Gap::StorageElement's doc and the runtime README's known gaps
name texture buffers written or read through access::read_write; docs/REFUSALS.md regenerated
(unchanged).

Ring. ring.rs's chunks() is a try_lock that asserts the ring's lock is free. Under
MakerTest::Fail each take that leaves fewer than a block's chunks free asks the block-maker
thread, whose answer (Ring::unasked) takes the ring's lock on its own thread whenever the
host's scheduler runs it; the test read chunks() right after such takes. The test now awaits
the block-maker thread's answers (pool.await_internals) before each read, as the other ring
test already does.
2026-11-21 09:11:25 -08:00
Anees Iqbal 6da9a2bca2 Fractional viewport coverage is an accepted difference beside a point's
The planner's ruling on Metal's recorded answer (fractional-viewport-coverage, m3-max-64012):
MTLRenderCommandEncoder.h's setViewport: states only that fragments outside the viewport are clipped,
not which a pixel the viewport's edge crosses is; the M3 covers every pixel the viewport overlaps, a
partly held pixel included, and a Vulkan device covers a pixel where its sample lies in the clipped
primitive. Rule 1 does not emulate what Metal leaves unstated, and a static note would be decided by a
viewport's value at the draw, so docs/API.md's Draws list gains the entry beside the point's and the
lavapipe row's reason becomes it. The GPU venues' rows come with the next round's replays.
2026-11-21 09:09:38 -08:00
Anees Iqbal 2470d0f5f4 Conformance ledger: fractional-viewport-coverage on lavapipe, open
Metal on the M3 covers every pixel a viewport overlaps for a draw that reaches past it, a pixel the
viewport holds only part of included; the runtime clips at the Vulkan viewport's own edges and
lavapipe covers only pixels whose centres the clipped primitive holds (344 F32 elements, largest
difference 11.25; replay m3-max-64022 at 44c96aa50c). The row names the open bug, which waits on a
ruling: an accepted difference beside a point's, or a clip band past the viewport with a scissor at
its pixel-rounded rectangle. The coverage document is regenerated.
2026-11-21 09:06:40 -08:00
Anees Iqbal 44c96aa50c conformance: Metal's recordings of fractional-viewport-coverage and lines-fill-past-the-viewport
Recorded on the M3 (macOS 27.0.1) by job m3-max-64012 at d55df02bcf: `conformance record` and
`conformance times --runs 8 --write` for the two cases (record-exit 0, times-exit 0, 2 cases carry
their timing). The coverage document is regenerated.
2026-11-21 09:04:17 -08:00
Anees Iqbal d55df02bcf conformance: viewport_cuts tests read texels by as_chunks and state the cover corners by sign
What: the recorded texels split by as_chunks (clippy chunks_exact_to_as_chunks); the cover
rectangle corners are held by their signs rather than a constant assertion
(assertions_on_constants).
Why: clippy -D warnings, all three configurations, on 84d9b840d9 (job m3-max-63978).
2026-11-21 08:56:40 -08:00
Anees Iqbal e9f02f806d conformance: viewport_cuts keeps the 1.5 w band constant in its tests, the one place that reads it
What: KEPT_BAND moves into the tests module; the two docs that linked it name the band in words.
Why: the lib build read it as dead code (clippy -D warnings, job m3-max-63964 on 9cddd2e673).
2026-11-21 08:56:40 -08:00
Anees Iqbal 3051b00b00 conformance: fractional-viewport-coverage and lines-fill-past-the-viewport (unrecorded)
What: one module, cases/viewport_cuts.rs, of two cases. Each is one pass into an RGBA32Float
target cleared to -7.5, every draw its own colour (tob_renders: tob_rect, tob_triangle,
tob_solid), the whole target read back.
- fractional-viewport-coverage: a filled draw over four viewports whose edges lie inside a
  pixel, each in a 12-pixel cell of a 48 by 24 target: far edges .7 into a pixel from an edge on
  a pixel boundary; .3 and .7; .75 and .25 (near and far pixel each a quarter inside, neither
  centre held); both edges on a pixel centre. Each viewport is drawn twice: a rectangle reaching
  to clip 1.25 (inside the 1.5 w band point-viewport-coverage found Metal keeping points in) and
  a triangle reaching to clip 6 (past it).
- lines-fill-past-the-viewport: setTriangleFillMode Lines, three triangles each through an
  integer 8 by 8 viewport in a 16-pixel cell of a 48 by 16 target: one corner inside and two past
  the right and bottom edges, inside the 1.5 w band; the same shape past the band; and a triangle
  the viewport lies wholly inside, every edge more than a pixel outside it.

Why: a fractional viewport's far row or column, whose pixel centre lies inside, is cut on one
Vulkan driver, and a triangle under the Lines fill mode larger than its viewport has no Metal
recording. Both need Metal's own answer before anything is ruled. The M3's next recording batch
records them; until then the replay reports each as "no recording" and nothing is ledgered.

Tests (no device): every viewport lies in its own cell with unreached pixels around it; each
arm's near and far pixel lies against its viewport as its docs say; the geometry reaches past the
viewport inside and past the band; every colour is its own; the line triangles cross or surround
their viewport; every line edge passes at least 1/16 pixel from every pixel centre and diamond
corner of the target. Once recorded, Metal's target is held to what every viewport rule gives
(a pixel held whole is drawn, a pixel not reached is the clear), never to one rule.

docs/CONFORMANCE-COVERAGE.md regenerated (case modules 181).
2026-11-21 08:56:40 -08:00
Anees Iqbal 78a19891d5 docs/VALIDATION.md: a bound texture buffer runs on both executors
The authored-case requirements section still said a bound texture buffer carries texture_buffer, which
the runtime does not make. Texture buffers (817463704e) are made by the runtime, and ed4f8976a5 retired
the texture_buffer and texture_buffer_member requirements; 49eebb4d7f made the census compile the
argument-buffer member. Doc only; found by lane censustb.
2026-11-21 08:58:23 -08:00
Anees Iqbal 49eebb4d7f Validation: an argument-buffer texture buffer binds as a used texture, so the authored compile census compiles it
The authored compile census failed one case, 2631f2da (the public fragment
case reading abt_frag_texel_buffer's texture_buffer member), on every
profile with "argument-buffer texture 2 is a texture buffer, which no heap
array holds" (census job m3-max-63908 at d274b0b474). Since ed4f8976a5
retired texture_buffer_member, the case is no longer refused by a
requirement; a run draws it through the runtime
(runs_render_through_runtime), which makes texture buffers, and the Metal
oracle's observation of it is committed. Only the census still reached the
executor's own bind state: case_compile builds its request's bind shape
with graphics::render_shape -> bind_state -> argument_buffers::used_texture
(argument_buffers.rs:279-283), which refused a texture buffer untyped.

The member is now what Metal's useResource makes resident: a used texture of
Metal's TextureBuffer type and its pixel format
(resources::texture_facts, which bound_texture now uses for image
textures), with its resource id. The translator already plans such a used
resource: bind::heap's members make no heap member of a texture buffer
(heap.rs:931-934), and under the identity domains the census compiles for
(DevicePolicy::default, the runtime's) a texture-buffer member is a set-1
texel-buffer element (817463704e). The executor's own context still
refuses a case holding one, typed, before it binds
(own_context_refuses_members), since its resident-table heap holds no such
member; its docs now say why there rather than in used_texture.

No version moves: ENGINE_EXECUTOR_ABI's rule exempts a change no recorded
row can observe. The runtime route builds no bind state, the own context
refuses the case before binding, and the census never caches a failed
cell, so no recorded row or cached cell held this shape. The case's census
cells change from failed to what the compile gives when main blesses.

Tests: argument_buffer_members_are_written_into_their_owner asserts the
texture buffer member's used texture (type, format, token, resource id)
and that compute_shape plans it (it asserted the refusal before);
the_census_compiles_a_texture_buffer_an_argument_buffer_holds compiles
every committed case holding one through compile_case on lavapipe under
the identity domains, expecting one compiled cell each (the failed cell
before).
2026-11-21 08:47:55 -08:00
Anees Iqbal 5ccd158e6d Bless for the pin: golden hashes, engine expectations, opened chains, the old render key
What moved, each from a commit since the pin 5a04298008, none blessed in its change:
- golden_hashes.tsv (100 lines) and public_fixture_expectations_engine.tsv (6 cells, runtime-floor
  Unsupported{ArgumentBufferTextures} -> ok: rlm_member_texture_buffer and abt_descriptor_sets' texel-buffer
  entries): texture buffers (817463704e) and the runtime-floor profile's texel-buffer features.
  Bless job m3-max-63907 on the M3 at d274b0b474 (inventory=0 golden=0 printouts=0).
- opened_chains.txt, 22 contexts: 20 from 3d841759a8 (the engine contexts no longer enable
  VK_EXT_device_generated_commands; each of the ten profiles listing it loses one member and one
  extension), 2 runtime-floor contexts from 817463704e (four texel-buffer descriptor-indexing members).
  Job m3-max-63909 (bless_opened_chains) at d274b0b474.
- the_old_render_descriptor_key_keeps_its_value: 78157ab4... -> 8f9bcf94..., the value job m3-max-63918
  printed at 3a6d244ae2; the device key moves with the runtime floor's texel-buffer features.

Not here: the authored compile census. At d274b0b474 (m3-max-63908) it has one case failing on every
profile (the validation executor's argument-buffer encoder refuses a texture-buffer member untyped since
ed4f8976a5 retired texture_buffer_member), so it writes nothing; its fix and re-bless follow.
2026-11-21 08:37:38 -08:00
Anees Iqbal b64e3e9f7b Harness: the device tests' module doc says the busy-GPU row's reads stay bounded
The row now asserts an absolute bound at both reads (881f559999), not that
its gauges stay flat between them; the module doc said flat.

Verified: rides the compile job of 881f559999's stack.
2026-11-21 08:32:08 -08:00
Anees Iqbal 881f559999 Harness: the busy-GPU row bounds each gauge at both reads, not their growth
releases_under_work allowed each gauge to grow by eight iterations' worth
between its reads at iterations 100 and 200. A leak of one texture per
iteration passes that. The row now asserts an absolute bound at both reads,
in what the first iteration added:

- releases_waiting and textures: IN_FLIGHT + 1 = 4 iterations' worth (128
  and 64), one for each command buffer in flight and one for the one being
  made;
- texture_block_bytes: 2 * IN_FLIGHT - 1 = 5 iterations' worth (655360 for
  8 images of 16 KiB). In today's runtime an image is held by the upload
  that zeroed it until its own command buffer retires, then its release is
  queued against every command buffer committed so far, so images stay 5
  iterations where views stay 3. A runtime that frees the image sooner only
  lowers the reads.

The row's line prints each gauge's two reads and its bound.

Checked against every recorded read of the row (rounds 5a04298008 and
7c1baad228, 17 legs): the highest were textures 56, releases_waiting 96
(hawkpoint and the Iris Xe) and texture_block_bytes 557056 (34 images; the
2080 and the 3090), all within the new bounds. A four-iteration bytes bound
would have failed those two. The test keeps its name; the round selects it.
2026-11-21 08:31:27 -08:00
Anees Iqbal f380459946 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-21 08:35:39 -08:00
Anees Iqbal 3a6d244ae2 Translator: runtime-floor's recommendation leaves out its texel-buffer update-after-bind pair, and a device made from it refuses texture buffers naming the feature
Texture buffers (817463704e) made runtime-floor the first committed profile that lists texel-buffer
update-after-bind features with robustBufferAccess and without robustBufferAccessUpdateAfterBind,
so recommended_enables keeps robustBufferAccess and leaves those two out by
VUID-VkDeviceCreateInfo-robustBufferAccess-10247. recommendations_are_closed_fixed_points_on_every_
committed_profile asserted the recommendation left out nothing on any committed profile, an
observation over the profiles, which no longer holds; it now names runtime-floor's pair. The
runtime enables those features and never robustBufferAccess (floor.rs), so no product change.

recommended_enables' doc said the core does not read the buffer update-after-bind features. Since
texture buffers it reads the two texel-buffer ones; the doc and docs/API.md now say a device made
from the recommendation on such a device gets no texture buffers, each refused naming the feature,
and how to have them. A new test builds runtime-floor's device from its own recommendation and
shows the typed refusal (Unsupported ArgumentBufferTextures, needs
DescriptorBindingUniformTexelBufferUpdateAfterBind), and the same member compiling once the
features are enabled without robustBufferAccess, as the runtime does.
2026-11-21 08:33:22 -08:00
Anees Iqbal d274b0b474 Conformance ledger: the texture-buffer and held-texture routes of norm-storage-codes on the NVIDIA cards and the Iris Xe
What: 20 rows in known-gaps-rt.tsv, at case/hsw_buffer/texels and case/hsw_held/texels of
norm-storage-codes-{rgba8unorm, rgba8snorm, rgb10a2unorm, rgba16unorm, rgba16snorm}: ten on
NVIDIA, ten on the Iris Xe. Each carries its card's hsw_write row's reason, with one more
sentence:
- the route answers as `hsw_write` does: the same count, the same largest difference, the same
  first differing element;
- the case's pipeline records `device-color-conversion` and `device-nan-encoding` on that card.
docs/CONFORMANCE-COVERAGE.md is regenerated.

Why: texbuf (817463704e onward) builds texture buffers, and the case's `hsw_buffer` route reaches
the device. Its `hsw_held` route answers on the GPU cards too. Their lavapipe rows came with
b7e3247961; the GPU cards' rows did not.
- The bytes are the card's own normalized conversion at a tie (rule 1), the conversion the
  texture route already ledgers:
  - NVIDIA stores the lower code at a unorm tie: Metal 0x1010101, ours 0x0 (rgba8unorm).
  - At an snorm tie NVIDIA stores the code toward zero: Metal 0x81818181, ours 0x82828282.
  - ANV rounds ties to even.
- The RX 7900 XTX (m3-max-63842) and the 780M (63840) answer Metal's bytes on all four routes.
- The store lowering is the texture's own (lower/texture/mod.rs, `ImageDim::Buffer` included):
  it calls `norm_storage_facts`, which records `DeviceColorConversion` for a slot whose storage
  choice is a normalized format of the identity class, or that has none.

Verified: the compile job and the replays on the 3090 and the Iris Xe, named with the sha.
2026-11-21 08:19:35 -08:00
Anees Iqbal 04b76d9dfe Conformance ledger: the sRGB8 blend's one-one-subtract row on lavapipe is keyed by the host's ISA
What: blend-interaction-format-srgb8's case/blended/one-one-subtract row ("81 elements differ (U8),
the largest difference 3") is re-keyed. Its venue was "llvmpipe (LLVM 23.1.1, 256 bits)" and is
now "256 bits) on x86-64 AVX2", the same key the fetch-ordered sRGB x3 rows use. Its reason gains
one sentence saying the count follows the ISA.

Why: ms01's lavapipe (LLVM 23.1.4 on an AVX2 host, Mesa 26.2.6) answers 81 elements, max 3
(m3-max-63645), the AVX2 answer. No row named that venue:
- the 81 row named LLVM 23.1.1, msi's AVX2 lavapipe;
- the 78 row is "on x86-64 AVX-512", the um790 and gem10 hosts at LLVM 23.1.4.
99b3fc685c had moved the old "LLVM 23.1.4" row to the AVX-512 key when only AVX-512 hosts ran
23.1.4. The answer is the device's own (rule 1) under `device-color-conversion`, which the row
already cites. Not a drift: no earlier full lavapipe conformance replay on ms01 is in the job logs.

Verified: the coverage document is unchanged (--check passes; the row count is the same). The
lavapipe replays on msi (AVX2, LLVM 23.1.1) and ms01 (AVX2, LLVM 23.1.4) are named with the sha.
2026-11-21 08:13:37 -08:00
Anees Iqbal c1b0a6d5e2 Conformance ledger: the GPU cards' rows of the pixel-sampler, downscale and vertex-format cases, each with its reason
What: 696 rows in known-gaps-rt.tsv, one per surprise the tip's replays printed:
- NVIDIA: 227 rows (m3-max-63788, RTX 3090). The round at ce998742d7 printed the same rows on the
  2080 and the 5080.
- RX 7900 XTX and 780M: 102 rows each. The two replays (m3-max-63791, 63789) printed the same
  rows, and so did the round's HawkPoint, which the 780M venue also names.
- RX 550: 112 rows (m3-max-63806).
- Iris Xe: 153 rows (m3-max-63801).
These were replayed at 5cd74cc440, the red-3 tip before its rebase onto 583684ebeb. The rows
cover:
- pixel-downscales-* (all seven sizes), pixel-samplers-* and pixel-samplers-subnormal-*:
  - The device's sampler and filter (rule 1), under `device-sampling`, `pixel-sampler-scaling`
    and, for the subnormal coordinates, `device-denormals`.
  - Each row states how our sources' digests split against Metal's, and the measured bound at
    each coordinate set (NVIDIA's `frac` within 1.19/255; RADV's, the RX 550's and the Iris
    Xe's within 0.95/255).
- vertex-format-* and integer-vertex-attributes, each with its first differing element:
  - A NaN in the device's encoding: `device-nan-encoding`, on every card.
  - NVIDIA's compiler folding the `half` round trip: `native-half-conversion`.
  - On the RX 550, which has no `shaderFloat16` (RADV enables it on GFX8 only by drirc),
    `OpQuantizeToF16`: `native-half-quantize`.
    - Four rows (MTLVertexFormatFloat to Float4, the largest difference 0) differ only in a
      zero's sign. Their reasons cite the note's zero-sign sentence.
    - The other 13 rows flush a value below the smallest normal `half` to zero, the note's
      first clause.
- indirect-range-* on the Iris Xe (3 rows, cases from 2614118ccf): the device does not list
  `VK_EXT_device_generated_commands`, so the execution is refused typed
  (`IndirectCommandsKind::Extension`), a known gap in the runtime's README.

docs/CONFORMANCE-COVERAGE.md is regenerated (scripts/conformance-coverage/coverage.py; --check
passes).

Why: red 1 of the round at ce998742d7. Its GPU replays failed on rows no card had. Each row
here gives that card's true reason, which every row's evidence (digests, the first differing
element, the largest difference) supports. No row was copied from another venue's wording
without its own card's evidence.

Verified: the compile job and the replays on each affected card, named with the sha.
2026-11-21 08:08:15 -08:00
Anees Iqbal d20c812bed rt: the idle preprocess bytes' doc names the pool's 64 MiB bound and its quarter-second free
Gauges::preprocess_idle_bytes said at most 128 MiB and zero only once the device is dropped. The
bound is indirect::IDLE_BYTES (64 MiB), and the block-maker thread frees each idle region after
memory::IDLE_AGE_NANOS (250 ms), so the gauge falls to zero at rest. Found from code by the
consumer's gauge lane; read against indirect.rs:58-67 and memory.rs:64. Doc only.
2026-11-21 08:23:43 -08:00
Anees Iqbal 793d321e7e rt tests: the several-parts execution sizes its scene's block from the part, its arms in order
What: the test of an execution of several parts takes its scene's buffers from a block sized from
the device's part (`Buffers::sized`, 64 bytes a command past a 64 KiB floor), prints the part and
its parts, and runs its arms in this order, each printed as it passes: (a) a CPU range across three
parts; (b) a held range at location 0 through all but the last command, every part's count above
0; (c) a held range at location 0 across two parts, later parts' counts 0; then the whole
execution, a held range from inside the second part, one past the commands, and one of length 0,
every part's count 0.

Why: real cards take 1316 to 1784 commands a part against lavapipe's 117, so the scene outgrew
its 64 KiB block and the test failed in its own setup on every GPU leg of the round at
5a04298008 ("BufferPastBlock { offset: 256, length: 449440, block_len: 65536 }"): the multi-part
held-range path never ran on a real card. The order puts the CPU range first and the held ranges
with and without zero counts next, so a run that loses its device still shows which arms passed.

Verified: compile and lavapipe jobs, then one 3090 and one XTX leg, reported with the sha.
2026-11-21 08:16:46 -08:00
Anees Iqbal 70dfe08320 rt: every compute pipeline a command buffer binds goes through one bind that binds set 1 first
What: `Building::bind_compute` binds a compute pipeline where another or none is bound, and set 1
at the compute bind point before the command buffer's first compute pipeline. Both compute bind
sites use it: a dispatch's (encoder.rs `record_dispatch`) and the count kernel's of an execution
over a range a buffer holds (render_encoder.rs `execution_counts`). `Building::unbound` and
`Building::bind` go.

Why: the count kernel bound its pipeline through `Building::bind`, which marked the compute bind
point bound without binding set 1, and `record_dispatch` binds set 1 only before the command
buffer's first compute pipeline. Where a held-range execution came before a command buffer's
first dispatch, every dispatch after it in that command buffer ran with set 1 unbound, its
texture and sampler reads through a descriptor pointer the driver never set. The consumer's walks
of its rendering sample's ICB variant at the pin 5a04298008 lost the device on an RTX 3090 (an MMU
fault in warps on every GPC, a read at 0x4d000) and a 7900 XTX (a scalar data read, client SQC,
in no live range). With one bind for both sites no compute pipeline is bound without set 1.

Verified: the previous commit's test (a dispatch reading a texture through set 1 after held
executions in one command buffer) fails before this fix on lavapipe by a CRASH, not by value: job
m3-max-63866 ran it alone at that commit (then 6b0126de8a, on 583684ebeb) and the test process
died with SIGSEGV (signal 11) in 1.6 s, lavapipe reading the unbound set's descriptors; the
validation layer's VUID-vkCmdDispatch-None-08600 is recorded at the dispatch, but the crash ends
the process before the test's guard reads the layer's log. The compile and lavapipe jobs on this
commit, and one 3090 and one XTX leg, are reported with the sha.
2026-11-21 08:16:46 -08:00
Anees Iqbal fa38eaf92a rt tests: a dispatch after executions over held ranges in one command buffer reads set 1
What: a device test that records, in one command buffer, a pass executing an indirect command
buffer over ranges a buffer holds (all four commands, a range of length 0, and the first record
again), then a compute dispatch of `rows_read` that reads a texture of texels no zero, no other
texel and no earlier contents hold into a buffer. It checks the pass's marks and the texels.

Why: the count kernel of a held-range execution is a compute pipeline the render encoder binds
through `Building::bind`, which marks the compute bind point bound without binding set 1; the
compute encoder binds set 1 only before the command buffer's first compute pipeline
(`unbound()`), so a later dispatch in the same command buffer runs with set 1 unbound. The
consumer's walks of its rendering sample's ICB variant lost the device on an RTX 3090 and a
7900 XTX at the pin 5a04298008, both faulting on shader reads through an unset descriptor
pointer. No test dispatched after a held-range execution in the same command buffer.

The test fails before the fix on every leg through the validation layer every device test runs
under (VUID-vkCmdDispatch-None-08600 in its log), and by value where the unbound read returns
other texels. This commit is the test alone; the fix follows.
2026-11-21 08:16:36 -08:00
Anees Iqbal 3d841759a8 Validation: engine contexts no longer enable VK_EXT_device_generated_commands
The own context enabled VK_EXT_device_generated_commands where its device
supported it so that the device replay of an indirect command buffer could
take the extension's token stream. --without-generated-commands turned that
off so the other replay path could be measured. The replays are gone
(dc03c9e1b5), and nothing the executor runs reads the extension now. In the
translator, only the device replay reads a description's generated-commands
facts (Device::generated_commands). This change removes the enable and its
switch:

- enables.rs: GeneratedCommandsFeatures, Structure::GeneratedCommands (with
  its chain field, link and requirement arms), the deviceGeneratedCommands
  member, the extension's EXTENSIONS row, and enable_generated_commands.
- device.rs: the context never enables the extension. Its opened description
  states no generated-commands facts (description.generated_commands = None,
  now unconditional: with_enabled leaves that field alone).
- candidate.rs: the GENERATED_COMMANDS setting, run_without_generated_commands,
  decide_generated_commands and requested_generated_commands.
- corpus-vulkan (candidate_common.rs): --without-generated-commands, its
  usage text, and its "not stored" line.
- engine::execute_prepared: a row and a refusal on an opened device are
  always stored.
- The device worker: the generated_commands field of its input and report,
  and the parent's check that they agree. One unit test is deleted
  (a_worker_run_on_another_generated_commands_path_is_refused); the
  integration test serve loop and the restriction test drop their no-DGC
  arm.
- The profile bounds over a description's generated_commands facts stay
  (profiles.rs): a queried description still states them, and a restricted
  context compares them.

ENGINE_EXECUTOR_ABI v208 -> v209 (development's number + 1 at this rebase,
after texture buffers took v208).
Why: on a device that lists the extension (lavapipe, RADV, ANV ARL, NVIDIA
RTX 50), the context's enabled extension list and its opened description
change. A row records both, and the row's translator fingerprint derives from
the opened profile.

The member table loses deviceGeneratedCommands, so the members the vocabulary
does not name go from 11 to 10
(a_member_the_vocabulary_does_not_name_carries_its_registry_name).

The pinned opened chains (enables/opened_chains.txt) are blessed at the next
named pin. A bless run at this change (m3-max-63862, bless_opened_chains)
moves 22 of the 32 contexts:
- 20 are the device and restricted contexts of the ten profiles that list the
  extension (amd-780m-radv, amd-780m-hawkpoint-radv, amd-rdna2-apu-radv,
  amd-rdna3-radv, gate-lavapipe, gate-lavapipe-x86_64, intel-arl-anv,
  lavapipe, nvidia-rtx50-linux, nvidia-rtx5080-laptop). Each loses exactly
  one member and one extension.
- The other 2 are runtime-floor's device and restricted contexts, which gain
  4 members (49 -> 53 and 57 -> 61) with the same extensions. That move is not
  from this change, which only removes. It comes from 817463704e (texture
  buffers), which added six texel-buffer descriptor-indexing features to
  profiles/runtime-floor.json after the last chains bless (03d898aac0). Four
  of them are expected to be the ones the engine enables, the update-after-bind
  and non-uniform-indexing members that device/derive.rs lists; that is read
  from the code, not checked.

Verified:
- m3-max-63797 (gem10, at f6f4c015dd, this change before the count fix, on
  b7e3247961): fmt, clippy (all features, --cfg m2v_gpu, --cfg m2v_cpu_icd)
  and Rustdoc green. Validation nextest failed only the unnamed-member count,
  now fixed, and the opened-chains pin.
- m3-max-63862 (um870, at f8479dd1cf, with the fix): fmt and clippy green.
  Validation nextest ran 1328 tests: 1327 passed, and the opened-chains pin
  failed as accounted above. bless_opened_chains passed.
- m3-max-63796 (gem10, at f6f4c015dd): the own context's device tests
  (candidate::tests) on lavapipe passed, 54 tests. Every context opens without
  the extension.
- This commit is the same patch rebased onto 0f2067150f. The commits since
  b7e3247961 touch rt, conformance and one translator file
  (pipeline/artifact.rs), and no validation file.
2026-11-21 08:18:51 -08:00
Anees Iqbal 0f2067150f rt: a draw of lines carries DeviceLineRasterization on every device; the raster test holds the diamond-exit rule's cells
What:
- RenderCommandEncoder::LINE_NOTE (PrecisionNote::DeviceLineRasterization)
  is the static note of a draw of lines or a line strip, and of a draw of
  triangles under the Lines fill mode, on every device.
- A render pipeline state no longer carries the note; it carried it only
  under alpha to coverage or alpha to one.
- The note's text (artifact.rs, docs/API.md's catalogue, its items list
  and the accepted difference on a line's tie-break, the runtime's README)
  names its grounds, and keeps what it said of a state with alpha to
  coverage or alpha to one: there the device's default line rule draws,
  not Bresenham's mode. One note, both facts.
- The conformance side announces LINE_NOTE for each line draw and each
  Lines fill mode set. The note is among replay's NATIVE_NOTES, so it
  loosens the notices site alone.
- known-gaps-rt.tsv: the 12 primitive-type-restart-indices rows (NVIDIA,
  RX 550, Iris Xe) cite the note. Their lines run through the boundary
  point (3.5, 1.0).
- api_signatures.tsv gains the const's two rows
  (scripts/api-signatures/signatures.py --check passes).
- Tests:
  - raster.rs's Lines pass draws the triangle (-0.65, -0.675), (3, -0.675),
    (-0.65, 3) through the target's own viewport. Its edges at x 1.4 and
    y 6.7 lie inside the target with a pixel on each side, and strictly
    inside the clip volume and the viewport.
  - The pass holds the diamond-exit rule's cells exactly, column 1 and
    row 6, on every device. A device that draws another cell fails with
    the target drawn. It does not read the corner where the two lines'
    ends meet.
  - draw.rs's alpha-to-coverage test now holds that no state carries the
    note, and that LINE_NOTE is it.

Why the note: a card draws a line pixel that differs from Metal's. The 12
ledgered rows are lines through the boundary point (3.5, 1.0): Metal on an
Apple M3 Max covers the lower pixel there, NVIDIA's driver the upper. The
runtime draws lines with VK_LINE_RASTERIZATION_MODE_BRESENHAM. Its diamond
is open, so no Vulkan control decides that pixel. The Vulkan
specification's section "Bresenham Line Segment Rasterization" also lets an
implementation's fragments "not deviate by more than one unit in either x or
y framebuffer coordinates from a corresponding fragment produced by the
diamond-exit rule", with a fragment count within one. Rule 1: a line's pixels
are the device's answer, so the operation carries a static note.

Why the test changed: the old Lines pass put its bottom edge at y 7.7 through
a viewport of y -0.3 and height 8. The Iris Xe drew none of row 7 there
(m3-max-63429 at ce998742d7, m3-max-63507 at 7c1baad228). With both edges
strictly inside the clip volume and the viewport, the Iris Xe draws the
diamond-exit rule's cells, as the other cards do. The fractional viewport's
cut row is a separate item, not a line rule.

Verified, column 1 and row 6 at the test's geometry:
- Iris Xe: m3-max-63735
- RTX 2080: m3-max-63736
- lavapipe: m3-max-63737
- RX 7900 XTX: m3-max-63707, at the same edges
The exact-cell form's legs are named with its sha.

Not a regression: the Lines pass came with a5fac6fa9b (11-20 22:51), and its
viewport moved at 2a36291a80 (23:32). No Iris run of the old pass passed.
2026-11-21 08:02:39 -08:00
Anees Iqbal 1fbe4eacdb Conformance ledger: the GPU rows of the fetch and stencil-export cases go; those cards lack the feature
What: 91 refused rows leave known-gaps-rt.tsv: the NVIDIA, 780M, RX 7900 XTX and
Iris(R) Xe rows of the 17 padded-blend-* cases, xr-masked-bgr10xr-{red,blue-green,
srgb-red,srgb-blue-green} and argb8-targets-destination-alpha's refusal at
case/pipeline/argb8, and the NVIDIA rows of stencil-output, stencil-output-loaded and
pass-sequence-aspect-actions. The llvmpipe and UHD Graphics 630 rows stay. The fetch
block's comment says which devices read lacks-feature. docs/CONFORMANCE-COVERAGE.md
regenerated (scripts/conformance-coverage/coverage.py).

Why: round ce998742d7's eight GPU replays (m3-max-63423, 63431, 63464, 63447, 63444,
63446, 63468, 63453) read each of these 141 case-card-site triples as "no longer
refuses ... the ledger still lists it": every one of those cases reads lacks-feature
on those cards (NVIDIA 24 of 27 such cases, the others 21). Since 7e8b93d953 the
translator's refusal names RasterizationOrderColorAttachmentAccess alone for the
computed write over a fetch's read, and ExtShaderStencilExport alone for a stencil
output, and none of these devices reports either, so the case cannot run there. A
lacks-feature reading is never a ledger row. a0f86a2efc had reworded these GPU rows
after the lavapipe replay alone (where the feature is reported and the refusal
stands), so no GPU replay saw them since. These are not fixes: the cards still cannot
run the cases. The UHD 630 rows are left: no replay on it read them.
2026-11-21 08:02:12 -08:00
Anees Iqbal 7e1d69c4c5 Conformance: the replay's summary says which kind each ledger surprise is
What: an unlisted gap names the venue's row at the same case and site where one
exists (Expectation::Unlisted's `listed`: "the row for this card differs: it expects
... with ..."), and says "no row for this card" where none does. A row the venue no
longer holds says what the venue answers there now (Expectation::NoLongerHeld's `now`,
known_gaps::Now): it now lacks the feature (the case read lacks-feature), it now
matches, or it now answers otherwise. `conformance replay` prints its surprises
grouped by that class (Expectation::class), each group under its count. The first
line of each surprise keeps its words, so the tools that read it are unchanged.

Why: the planner's reading of round ce998742d7. Its eight GPU replays listed 1,249
unlisted divergences, every one with no row for its card (the cases' rows were
lavapipe's alone), and 163 stale rows, every one a case the card now lacks the
feature for (the framebuffer fetch and stencil export refusals since 7e8b93d953),
none a fix. Telling those apart took reading each verdict by hand.

Test: a_refusal_at_a_step_of_a_program_is_refused_and_the_ledger_holds_it holds the
four classes: no row, row differs (the same program refusing at another step), now
matches (the program run), now lacks the feature (a lacks-feature verdict), and now
answers otherwise.
2026-11-21 08:01:36 -08:00