Pooled memory: no bound on a texture's bytes; ShadowCause::LinearCost is gone

The owner, through reims: zero copy, in place where possible, shadow copies a fallback and never
a first option. A tracked texture over a Private buffer of the runtime's pooled memory whose rows
the device's own linear image lays out otherwise was a shadow past 48 KiB to its pitch
(TextureShadowReason::LinearCost), a speed choice measured on an Iris Xe alone that shadowed 1001
of an RTX 2080 guest boot's 1366 textures. It now takes its DRM_FORMAT_MOD_LINEAR image at Metal's
pitch at any size, wherever the device makes one and its check of the pooled memory passed, as a
texture over a Shared buffer already did; it is a shadow only where the device makes no such
image (its format, usage, pitch or limits), its policy is HostPageTexturePolicy::Shadow, or the
check failed or is pending (a pending one still moves in place once it passes).

Removed with the bound: in_place::POOLED_PITCHED_BYTES, ShadowCause::LinearCost and the public
TextureShadowReason::LinearCost (a breaking change of metal2vulkan-runtime's surface:
api_signatures.tsv loses its variant), texture_spans.rs (the runs of bytes textures were made
over, which only the bound read) and the moves it fed (MoveAfter::Aliases, LoneShadow, the
buffer's note and wait), Texels::only_commands_write (the bound's alone), the bench behind the
bound (runtime_lane::pooled_draw_costs, its crossover additions included) and
aliased_surfaces' cost bench. aliased_surfaces' first check now asserts every texture over one
surface's bytes takes the image at Metal's pitch, the first included, and a read copies nothing;
its one-after-another check, about the first texture's shadow, is gone. storage_over_buffer is
one function again (REFUSALS.md regenerated for the name). API.md, HOWTO.md, FAST-PATHS.md (the
in-place row) say "at any size".

RUNTIME_VERSION is not bumped here: the landing bumps it and re-pins the runtime sources.
This commit is contained in:
Anees Iqbal committed 2026-11-12 01:50:58 -08:00
1 parent 20d84ebf33
commit 0d144ec0de
21 files changed
+69 -1597

No files matched your search

+2 -10
View File
@@ -1903,16 +1903,8 @@ bound.
the RX 550 makes no such image);
for one that renders, whose rows each to its
pitch share no line with bytes past them, the check of renders that lets the rows' padding
change, as the declaration does, and no byte past the last row's pitch); past a bound in bytes of its rows to their
pitch, the same on every device, such a texture over a `Private` buffer, tracked, stays a shadow
too (`TextureShadowReason::LinearCost`): there a linear image renders and samples slower than the
shadow's own image with its copies, and over memory only the runtime's commands write both give
the same answer, for one texture over the bytes (over a `Shared` or `Managed` buffer, for an
untracked texture, and over bytes another texture was made over, the image is taken at any size:
there each texture's shadow would be an image of its own, copied in whole at its first use and
again after a write through any other; the first texture's shadow moves to its image once
another texture is made over its bytes, at a quiet commit,
`WorkCounts::pooled_textures_moved_in_place`);
change, as the declaration does, and no byte past the last row's pitch), the image taken at any
size over any buffer of the runtime's own;
or the buffer is over the caller's
`VkBuffer`, whose memory backs no image of the runtime's; or it is a tiled texture of more than
one level (`Buffer::new_tiled_texture`), over any buffer: no image over the buffer's memory holds