Initializer

init(commandBuffer:textureDescriptor:)

Low-level interface for creating a temporary image using a texture descriptor.

Declaration

convenience init(commandBuffer: MTLCommandBuffer, textureDescriptor: MTLTextureDescriptor)

Parameters

commandBuffer

The command buffer on which the temporary image will be exclusively used.

textureDescriptor

A texture descriptor that describes the temporary image texture to create.

Return Value

A valid MPSTemporaryImage object.

Discussion

The temporary image will be released when the command buffer is committed. The underlying texture will become invalid before this time due to the action of the readCount property.

This function provides access to pixel formats not typically covered by the init(commandBuffer:imageDescriptor:) method. The feature channels will be inferred from the pixel format without changing the width. The following restrictions apply:

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