What changes for the guest and the host: replaceRegion: of a texture over a
Managed buffer whose rows run past the buffer's length now posts
BUFFER_DID_MODIFY_RANGE for the rows' span up to the length, and nothing for
rows wholly past it. Before, it told the whole span, past the buffer's end.
The host refuses a range past the buffer whole (decode/managed.rs,
did_modify_range), so even the bytes the write put inside the length never
reached the GPU's copy, and the next GPU read saw stale texels where Metal's
sees the write.
Such textures are made by both forms: a 2D texture past the length, and since
the commit before last a texture buffer. Their texels past the length lie in
the host's tail of the texture, which no range of the buffer names, so the
range stops at the length. The host's strict check stays as it is.
Test: test_buffer_texture_replace_region_past_the_length_tells_the_length
covers three textures over a 4096-byte Managed buffer:
- a texture buffer of 4 RGBA32Float texels from 32 bytes short of the length
tells 32 bytes;
- one wholly past the length tells nothing;
- a 2D texture whose rows written cross the length tells its span up to the
length.