Files
metal2vulkan/crates/metal2vulkan-runtime/examples
Anees Iqbal 1443135ad8 RUNTIME 2264: readers after a barrier of a texture without feedback-loop usage take leading snapshots, weighed by area and learned coverage
On NVIDIA's drivers a linear image takes no feedback-loop or input-attachment usage, so a draw
that read such a color at its own pixels after a memory barrier split the pass and copied the
texture's scissor box (the whole surface for a guest that sets no scissor) before the new
instance: in a consumer's autoscroll on an RTX 2080 about 21 readers a present each copied a
3648x2038 surface, ~29 ms of a 45 ms take-to-show.

Such a reader now splits the pass with no copy: its snapshot draws record in an instance of
their own ahead of the reader's (LOAD/STORE_NONE, empty masks), a "leading snapshot". The device
enables VK_KHR_load_store_op_none, else VK_EXT_load_store_op_none, below Vulkan 1.3 (the
runtime's instance is 1.2, so STORE_OP_NONE was core on no device); the version comes from the
device's properties.

A leading snapshot reads the texture at every pixel its draw covers, so over host pages it is
not cheaper than the split at every area: on an RTX 5080 Laptop GPU (split_parts, 8 readers a
frame over a 2648x1658 surface over host pages) whole-surface readers took 22.98 ms a frame
leading against 17.99 split, quarter-surface readers 6.06 against 8.55; the forms cross near
half. weigh_snapshot takes whether the reader leads and skips over_bytes for it, so the area
rule weighs its first pass and, where the device measures readers (occlusionQueryPrecise),
learned coverage decides from the second: a reader keeps the leading form within the existing
bound (SNAPSHOT_PIXEL_COST 20: 20% of a 4-byte color) and splits above it. A rebound kept reader
weighs with the same flag. New WorkCounts: reading_draws_snapshotted_leading,
reading_draws_leading_covered_within / _to_half / _over_half (where the guest's readers fall
against the bound). docs/FAST-PATHS.md's row records the 5080 A/B.

Also: the split_parts lane (ignored by default, run by name) measures what split readers cost and
reads its fixtures from the crate directory the runner names.

From steelbrain/nvscroll (81915c28de..3cdbfe9256, 11 commits). Verified on potluck at 3cdbfe9256:
clippy gpu (28377), cpu_icd and plain (28379) 0; rustdoc -D warnings 0; api_signatures and
api_surface 15/15; lavapipe 478/478 (copy form unchanged there). 5080 A/B nvscroll-ab-233300
(kind t). The tip's 5080 device test and lane (b5080 batch 28393) are pending; the 2080 and XTX
runs wait for um790.
2026-11-14 00:03:40 -08:00
..