The runtime now takes a Managed range at the first commit whose encoders name
its buffer, as Metal on an AMD Radeon Pro 5300M does (jobs 81602, 81644). The
player's own second copy, which a two-copy stream's Managed buffers take on a
device with unified memory, took every range named at the next commit of any
command buffer; it now follows the runtime's rule.
- second.rs: Seconds keeps, for each command buffer not yet committed, the
buffers with a second copy its encoders named, themselves or through a
texture over one (made over the buffer, a tiled one, or a view of one), and
a commit takes only those buffers' ranges. A released buffer with ranges
pending stays only while a command buffer not yet committed that named it,
or a texture over it, can take them; otherwise its place goes back at once.
A command buffer released uncommitted takes nothing.
- mod.rs: each encoder call's named objects, a render pass's attachments,
resolve textures and visibility result buffer at its encoder's making, and
the textures and views made over a second copy feed it. render.rs keeps the
pass's resolve textures and visibility result buffer by stream id.
- encoders.rs: copy_named takes the committing command buffer's ranges alone.
- stale.rs: a didModifyRange: is pending until a commit whose uses name the
object takes it, with the bytes written by then (an indirect command
buffer's command takes it where it is encoded); writes between the
announcement and that commit are not stale.
- docs/REPLAY-STREAM.md says so.
Tests: rt_replay a_two_copy_stream_s_announcement_is_taken_at_the_first_
commit_that_names_the_buffer (zeros announced, a commit of another buffer, 7s
written with no announcement, a copy of the buffer reads the 7s); tests
an_announcement_is_taken_at_the_first_commit_that_names_its_buffer (the
census counts one stale use where it counted two). Not yet compiled.