Metal leaves an aliased resource's contents undefined once another resource is written over
its memory. In a placement heap, a texture write over a buffer's (or another texture's)
recorded range leaves the recording holding its runtime's layout of the texels there, and the
play its own (rt shares the memory as a placement heap does; the old arm makes the heap's
buffers and textures apart and keeps the bytes from before). identity's liveness pass over u4
(to frame 315) found 16,942 covers of a heap buffer's range by a heap texture write and no
read through a covered buffer before its next write or release: the bytes are dead, and a
compare of them is no verdict.
The player now tracks, by structure alone (covers.rs), each object the stream places in a
placement heap (its heap, recorded offset, and length: a buffer's own, a texture's as the
runtime answers its size, read ahead) and the texture writes: a draw's or dispatch's to the
texture slots its pipeline state's interface marks written (Backend::texture_writes; the new
runtime answers from ComputePipelineState / RenderPipelineState::texture_accesses, the old
runtime answers no slot access, so on it only the following count), a render pass's to every
texture its descriptor names, a blit's to its destination, generateMipmapsForTexture:, a
useResource:usage: with write usage and replaceRegion:. A write of a texture over a buffer is
the buffer's. A texture write covers the bytes of every other object placed in its heap that
its range meets; the object is written again by the player's writes into it (m2v.write,
contents at creation, copies from the guest's RAM, a snapshot's bytes before), a blit into it,
and, as the stream carries no buffer access, any binding of it to an encoder, a write-usage
useResource:usage: or a useHeap: of its heap. A check of a covered object reports `covered`
and a snapshot range meeting covered bytes `covered`, neither compared; a `covered N: ...`
line counts the covers and what they left out. REPLAY-STREAM.md says so, and says
gap_pipeline_ids is bookkeeping: nothing is skipped for it.
Test (replay::tests): a placement heap with a buffer and two textures at offset 0; a dispatch
whose state writes slot 0, which holds the first texture, covers the buffer and the second
texture; their checks are `covered`; the buffer written whole is compared again, the second
texture stays covered; a dispatch of a state that only reads the slot covers nothing.