Instance Method


Encodes a kernel into a command buffer, out of place.


func encode(commandBuffer: MTLCommandBuffer, sourceTexture: MTLTexture, destinationTexture: MTLTexture)



A valid command buffer to receive the encoded kernel.


A valid texture containing the source image.


A valid texture to be overwritten by the result image. destinationTexture may not alias sourceTexture.

See Also


typealias MPSCopyAllocator

A block to make a copy of a source texture for filters that can only execute out of place.

func sourceRegion(destinationSize: MTLSize) -> MPSRegion

Determines the region of the source texture that will be read for an encode operation.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software