Instance Method

encodeToCommandBuffer:sourceTexture:destinationTexture:

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

Declaration

- (void)encodeToCommandBuffer:(id<MTLCommandBuffer>)commandBuffer sourceTexture:(id<MTLTexture>)sourceTexture destinationTexture:(id<MTLTexture>)destinationTexture;

Parameters

commandBuffer

A valid command buffer to receive the encoded kernel.

sourceTexture

A valid texture containing the source image.

destinationTexture

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

See Also

Methods

- encodeToCommandBuffer:inPlaceTexture:fallbackCopyAllocator:

This method attempts to apply a kernel in place on a texture.

MPSCopyAllocator

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

- sourceRegionForDestinationSize:

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