Three changes to framebuffer fetch and the pixel interlock.
1. An unordered framebuffer fetch is refused; FramebufferFetchPolicy is deleted. Metal orders a
fragment function's read of its color attachment after every earlier fragment of the pixel,
within a draw and across draws. Where a device offers neither ordered form
(rasterization-order attachment access, or the pixel interlock's storage form where the
pipeline's state lets it be exact), the opt-in FramebufferFetchPolicy::AcceptUnordered
compiled the read as an unordered input attachment with a precision note. An unordered read
can return the attachment before an earlier overlapping fragment's write: a different value
in memory, not a rounding, which the owner's rule allows neither as a default nor as a
switch. No exact form exists on such a device, so the fetch is refused there, as the default
already did. The runtime never ran the unordered form, so no runtime behaviour changes.
- Removed: DevicePolicy::framebuffer_fetch, the enum FramebufferFetchPolicy and its
re-export (and its api_surface row), ProfileFields::framebuffer_fetch,
PrecisionNote::UnorderedFramebufferFetch, and the runtime's note kind of that name, whose
code metal2vulkan-degrade-unordered-framebuffer-fetch is retired; the runtime's
framebuffer_fetch::ordered check; validation's --accept-unordered-fetch on corpus-vulkan,
corpus-moltenvk and corpus-pipeline, and the device worker's framebuffer_fetch field.
- lower::fragment::color refuses a read no ordered form serves (Unsupported{FramebufferFetch},
naming both forms); lower::fragment::fetch refuses a blocked storage form with its blocker.
- The profile's fields change, so every profile fingerprint does.
2. No barrier between interlocked draws' colors on a driver measured to order them. Between two
draws of a render pass instance where the later one reaches a color in the fetch's
interlocked storage form (or an extended-range color's half shadow) that the earlier one
wrote, the runtime recorded a fragment-to-fragment storage barrier on every device. Vulkan
orders such draws by the interlock alone (ordered interlock modes follow rasterization
order, which follows primitive order through a subpass, and the interlocked storage image is
decorated Coherent). A new answer fact, DriverFact::InterlockOrdersDraws, measured on ANV on
the Iris Xe of Raptor Lake-P, drops that barrier there for these colors alone. The fragment
imageblock's storage and the depth stand-in keep their barrier everywhere, as does every
unmeasured driver. RADV on the Radeon 780M still needs the barrier: without it one blend
table case leaves 19 of 495 band results wrong over 5 runs. New lanes:
runtime_lane::interlocked_draw_order (every device, with its owned fixture ido_draw_order) and
the ignored release bench runtime_lane::tile_path_costs (a window server's composite on
Metal's tile path, fixture tgp_composite), with their engine inventory rows. A FAST-PATHS
bullet records the barrier and the fact.
3. A left-out interlock color's framebuffer slot holds a placeholder image. A color attachment
the draws read and write as a storage image in the interlock is left out of their subpass,
but its framebuffer slot held a view of the very image the draws write, which the validation
layer reads as VUID-vkCmdDraw-None-06537 for a draw recorded inline. The slot now holds a view
of a placeholder that nothing reads or writes (DONT_CARE load and store, GENERAL layouts): the
device keeps one for each format and sample count, plus one for each further color of that
shape in the same framebuffer, grown to cover a larger framebuffer and freed once no
framebuffer holds it; none is made per frame. A color whose draws use sample planes, and the
planes' anchor, keep their own image's view. New WorkCounts fields
storage_placeholders_made and storage_placeholder_attachments.
Verified, as the commits state:
- The translator's fetch tests (pipeline::compile ordering, engine_fragment, engine_moved_writers,
device profile fingerprints and serde, fast_paths) keep the refusals; the raster-order-group
read on a device with neither ordered form expects the fetch's own refusal naming both forms.
Validation checks every public fetch case is refused on lunarg-desktop-baseline-2023 and
vk12-floor, and that the command-line flag is gone.
- Iris Xe (ANV) with the fact in place: interlocked_draw_order 3 runs with every texel right,
extended_range_blend_table 17 passed (0 of 495 bands wrong), framebuffer_fetch 49 passed. A
1080p pass of 27 interlocked draws took about 1.08 million GPU cycles with the fact against
1.46 million with the barrier forced (about 9 to 20 us a draw).
- The placeholder lane test (two RGBA32Uint colors over four passes and sizes): placeholders and
slots (2, 2), (2, 4), (4, 6), (4, 8) through the interlock on the RX 7900 XTX (RADV) and the
UHD 770 (ANV), none through input attachments, no validation message. On lavapipe 122 lane
tests and 47 runtime render unit tests passed; on the RX 7900 XTX 94 lane tests passed.
- The engine inventory and llvm_as parts pass for the new fixtures; clippy in every
configuration and Rustdoc -D warnings.