docs/REPLAY-STREAM.md says a Managed buffer that plays with two copies has
a GPU copy that starts from the bytes it was made with: a copied buffer's
contents, or a no-copy one's bytes at its making. Neither backend did so.
The player stripped every newBufferWithDescriptor: descriptor's contents
before the backend's making and wrote them afterwards as a CPU write. So
the new runtime's new_buffer, written to take them, never got them, and the
old backend made every such buffer zeroed. Under two copies neither GPU
copy held the bytes, and a draw reading the buffer before any
didModifyRange: read zeros where the recording's GPU read the bytes.
This changes the new runtime's plays too, not only the old runtime's. The
player now passes the descriptor to the backend with its contents and still
writes them once the buffer is made. The new runtime's backend takes them
as it was written to. The old backend's making takes them, both a
descriptor's contents and newBufferWithBytesNoCopy's pages. Where the buffer
plays as the runtime's Managed buffer, it writes them and announces them
(didModifyRange: over them).
Found by synthetic streams of our own on the RX 550 (m3-max-53813): under
a two-copy identity record, a no-copy and a copied Managed buffer made with
7s read zeros through a blit on both backends. The GPU-free count has the
recordings this touches: glbench-3090-r2, r3 and r4, gb-3090-r3, r4 and r5,
web3d-3090-r2 and r3, nvdec-3090 and nvdec-3090-wd.
Tests: a_two_copy_stream_s_managed_buffers_start_from_the_bytes_they_were_
made_with, in rt_replay (new runtime) and replay_streams (old runtime). Both
play one stream, rt_replay::made_with. They fail without the fix on a
device that keeps two copies.