A texture over host pages whose usage renders into it (an IOSurface's render target, the guest
desktop's framebuffer) was always a shadow: in_place() refused RenderTarget usage by policy, so
every render pass instance over one copied the whole texture in, kept it and merged it back (on
the Iris Xe of RPL-P, ~3 ms an instance at 3662x2039 in reims's measurements, 90-98% of the
desktop's GPU time a composite). ANV makes the linear image such a texture needs at every pitch
probed (BGRA8 at widths 3662, 1920, 2560, 3840, 1366 and 1440, packed and padded to 16, 64, 128,
256 and 512 bytes, with color attachment and feedback loop usage, for host allocations; job
m3-max-4631), so nothing on the device kept it out.
The owner's rulings (10-27: render targets in place where the driver leaves the bytes alone;
11-07: CPU-visible memory worked on in place even where a linear image is slower) take such a
texture in place where the device's own check shows the operations Vulkan lets touch the bytes
beside the texels leave them alone. So:
- in_place.rs: the check's verdicts are per class and access (Access::Reads, Access::Renders):
a texture that renders asks its class's render verdict; only a shader write (ShaderWrite,
ShaderAtomic, Unknown) is refused by usage. ShadowCause::RenderTarget is gone; the pending,
failed and unchecked causes name the access. The record holds six verdicts (CHECK_VERSION 2).
- in_place_check.rs: rounds of their own for an image that renders: the texture made with
RenderTarget usage, the writer writing the bytes between rows and after the image alone,
through the first move, the moves into ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT and back where the
image has that usage (Texture::settle_feedback_moves, render_target::feedback_moves, recorded as
moved_barriers records them), and a render pass of the check's own queue that clears at load
and stores. Every texel must read zero after, every other byte the CPU's write or the pattern.
- in_place_image.rs: a texture that renders takes the feedback loop usage where the device makes
the image with it (counted feedback_loop_alias_images), so a self-read after a render-target
barrier reads through a snapshot rather than a split; else the declared plan's image.
- texture.rs: on a discrete GPU, the device copy (dirty-log shadow) stays for textures that only
sample or read; one that renders works on the pages in place.
- WorkCounts::host_texture_shadows_render_target now counts, of the shadows counted by cause,
those that render: the render targets still shadowed, whatever the cause.
Docs: in_place.rs and in_place_check.rs module docs, HostPageTexturePolicy, the runtime README,
docs/API.md, docs/FAST-PATHS.md's in-place row and host-pages bullet. Lanes: in_place_textures
(render targets in place where "Pointer renders: Passed", recalled verdicts 6),
no_copy_textures (render targets may alias; passes_blend_load_and_store_as_private_textures runs
under both policies, so in-place render targets are checked byte for byte against a private
texture with the padding untouched), pitched_surfaces (render targets may alias in the _in_place
runs), attachment_read_costs::self_reads (settles the check first, prints textures in place).
Verified: build, clippy and the touched tests in the follow-up jobs named in the tip's report.
(cherry picked from commit 557d9f090525801183aaff5958c4738c0cfabe46)