RUNTIME_VERSION 2137: a draw that reads its own color at its own pixels and writes none of it reads in place

The commits before this one take a draw whose fragment function reads, at its own pixels alone, a texture
its render pass instance renders as a color, and whose pipeline writes no channel of that color, in place:
feedback loop layout, a by-region barrier before it (Vulkan 8.10.5) and a by-region execution barrier
after it, with no copy, snapshot or split, with a Metal barrier before it or without. The Macs disagree on
such a read without a barrier (the M3 answers the texels from before the pass; the 5300M and the UHD 630
the earlier draws' writes, racily without a barrier and always with one): under the owner's rule we take
the cheapest form, the x86 Macs' answer, an accepted difference in docs/API.md. The snapshot route's note
now says why the pass's store after a reader is ordered: its reads run before color output (B2), and the
drawing draw's fetch never executes; so the 37 WRITE_AFTER_READ reports of the consumer's sync-validation
run (ddsync2-xtx) are the layer's shader-access heuristic, not a race.

Verified:
- Radeon 780M (RADV, m3-max-22274, at these commits plus one ignored cost test): runtime_lane::in_place_reads,
  a private target and an IOSurface plane over a no-copy buffer, each with and without a barrier: every cell
  counts Moved { in_place: 1, snapshotted: 0, splits: 0, copies: 0 } (WorkCounts::reading_draws_in_place);
  the reader reads the earlier draw's value, a later draw's write lands after it, the rest stays cleared;
  without attachmentFeedbackLoopLayout the copy (no barrier) or the split (barrier) as before; in_place_reads,
  snapshot_reads and attachment_reads 22/22; in_place_reads under the sync validation layer 2/2, silent.
- lavapipe (msi, debug and under sync, m3-max-22227): 33/34, the one a test expectation fixed in the next
  commit (lavapipe's passes fetch colors as input attachments, so in place is refused there as the
  snapshot is).
Running: lint (default, --cfg m2v_gpu, --cfg m2v_cpu_icd), rustdoc, api tables and the lavapipe rerun
(m3-max-22240). The golden tables and the compile census take the new fixture ipr_reads at the next bless.
This commit is contained in:
Anees Iqbal committed 2026-11-12 11:56:05 -08:00
1 parent 9e84cf9c4b
commit 0c97fb3bfa
1 file changed
+1 -1
+1 -1
View File
@@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 506;
/// changes no behaviour, and then updates that hash alone with the commit saying why, or changes
/// behaviour and also bumps this version. The commit that bumps it says what changed; this comment
/// keeps no history.
pub const RUNTIME_VERSION: u32 = 2136;
pub const RUNTIME_VERSION: u32 = 2137;
/// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex,
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles