CommandBuffer::blit_command_encoder (blitCommandEncoder) and BlitCommandEncoder::copy_from_texture
(copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:
destinationLevel:destinationOrigin:, the only texture-to-texture selector the compute recordings
use: 2,736 copies in one, 3 in the other, none multisample, compressed or within one texture).
The copy is recorded at once into the current segment: no staging and no byte beyond the region.
The first barrier moves each texture's level and slice from home to its transfer layout and carries
the global barrier (every earlier write visible to every later command), so it pays what an encoder
owed and the hazard sets start again; the second moves them home with the copy's writes visible to
every later command. A command buffer of one copy is one submission and three barriers (the
segment's end among them), and Metrics::bytes_copied does not move.
Bytes move as they are between formats whose units have the same bytes; a compressed region is
whole blocks or reaches the level's edge on both sides; a 3D image copies to and from a 2D slice.
Refusal::TextureCopyMismatch for units of different bytes or different sample counts (Metal stores
its GPU's own layout there); Gap::TextureCopy for what one vkCmdCopyImage in the floor does not
make (multisample, depth and stencil both, depth or stencil with another format, compressed with
another block extent, A8_UNORM with another format, 1D with another type, one level and slice into
itself). The texture's region check is shared with replace_region and get_bytes (texture::place).
Tests: tests::blit (the rules, no device) and on every device of the cfg's kind
tests::blit::on_device::every_device_copies_between_textures (bytes of a level into an array slice
of another format, a cube face into a 3D image, a 3D image into a 2D texture, one array slice into
another, BC1 blocks where made; 1 submission, 3 barriers, 0 bytes copied, 1 pass for one copy; an
owed barrier paid by the copy: 3 barriers, 4 without the fold).