Docs: a fetch may read the texel from before its draw, so overlapping read-modify-writes leave one

UnorderedFetchWithinDraw's words said a pixel that overlapping fragments of one draw fetch and
write "holds the result of some order of the draw's fragments", "not necessarily Metal's". The
Radeon 780M (RADV, Mesa 26.2.6) shows otherwise. Job m3-max-83259 ran the eight authored cases
the ordered_fetch_within_draw gap holds (n instances of the companion's fullscreen triangle in
one draw, so n identical fragments at every pixel or sample) five times at 702916d9d3. All five
outputs were identical. Every differing word is the fragment function applied once to the
texel as it stood before the draw. Each case's chain f^k(initial), computed from its own inputs,
gives Metal's stored output at k = n on every word, and the 780M's at k = 1 on every word that
differs, all four lanes of each texel alike. All n fragments are identical, so every order of
them gives Metal's value: the 780M's value is no order's result. Lavapipe matches Metal on the
seven cases it runs (job m3-max-83255).

The note now says what a fetch can observe there: it may read the texel from before its draw,
so overlapping read-modify-writes of one draw may leave one application. Changed in docs/API.md's
precision-note catalogue, PrecisionNote::UnorderedFetchWithinDraw's doc comment and the runtime
README's known gap. Docs only, no behaviour change. The runtime-sources pin is unchanged
(pin-compute.py gives a92fe0a8...).

Verified: cargo fmt --all; nothing built.
This commit is contained in:
Anees Iqbal committed 2026-12-03 03:35:47 -08:00
1 parent 702916d9d3
commit f683293b4b
3 files changed
+14 -16

No files matched your search

+4 -5
View File
@@ -1943,11 +1943,10 @@ category, and says what makes an operation carry the note and what may differ. E
each fetching draw after the earlier draws of its pass by a barrier between them (the runtime's
`Metrics::attachment_loop_reads`, or its copies into the attachment's shadow on a device without
the attachment feedback loop). Vulkan orders nothing between the overlapping fragments of one draw
there, where Metal orders them in primitive order: a fragment that covers a pixel an earlier
fragment of its own draw covered may read the texel from before that fragment's write. Exact for a
draw whose primitives do not overlap at a pixel; otherwise each such pixel holds the result of
some order of the draw's fragments there. A raster order group on the color input, or on a color
output of an attachment the function reads, takes the same form.
there, where Metal orders them in primitive order: a fetch may read the texel from before its
draw, so overlapping read-modify-writes of one draw may leave one application. Exact for a draw
whose primitives do not overlap at a pixel. A raster order group on the color input, or on a
color output of an attachment the function reads, takes the same form.
- `metal2vulkan-degrade-fp8-value` (precision). `PrecisionNote::Fp8Value`: An 8-bit float converts
to an integer from the format's documented value with Metal's saturating float-to-integer rule,
where Metal's device here answers otherwise: Metal on Apple M3 compiles these reads but extends