Contents

texture

The underlying texture.

Declaration

var texture: any MTLTexture { get }

Discussion

This is a 2D texture if numberOfImages=1 and featureChannels<=4. It is a 2D texture array otherwise.

To avoid the high cost of premature allocation of the underlying texture, avoid accessing this property except when strictly necessary. Calls to the encode methods of an MPSCNNKernel object typically cause their arguments to become allocated. Likewise, MPSImage objects initialized with the init(texture:featureChannels:) method have already been allocated.

See Also

Properties