Blit passes
Encode a block information transfer pass to adjust and copy data to and from GPU resources, such as buffers and textures.
Overview
Your app can use a block information transfer (blit) pass to manage data within, and copy data between, buffers, textures, and other Metal resources. Start by creating a blit command encoder by calling an MTLCommandBuffer instance’s makeBlitCommandEncoder() method. Then use the MTLBlitCommandEncoder instance’s methods to encode individual commands of your blit pass.
You also have the option to customize a blit pass’s runtime behavior, such as sampling GPU hardware data. To enable these options, configure an MTLBlitPassDescriptor instance and pass it to the command buffer’s makeBlitCommandEncoder(descriptor:) method. For more information about sampling GPU hardware data in a blit pass, see the articles in GPU counters and counter sample buffers, including: