Instance Property

texture

The underlying texture.

Declaration

@property(readonly, nonatomic) id<MTLTexture> texture;

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 initWithTexture:featureChannels: method have already been allocated.

See Also

Properties

device

The device on which the image will be used.

width

The formal width of the image, in pixels.

height

The formal height of the image, in pixels.

featureChannels

The number of feature channels per pixel.

numberOfImages

The number of images for batch processing.

textureType

The type of the underlying texture, typically MTLTextureType2D or MTLTextureType2DArray.

MTLTextureType

The dimension of each image, including whether multiple images are arranged into an array or a cube.

pixelFormat

The pixel format of the underlying texture.

MTLPixelFormat

The data formats that describe the organization and characteristics of individual pixels in a texture.

precision

The number of bits of numeric precision available for each feature channel.

usage

The intended usage of the underlying texture.

MTLTextureUsage

An enumeration for the various options that determine how you can use a texture.

pixelSize

The number of bytes from the first byte of one pixel to the first byte of the next pixel, in storage order. (Includes padding.)

MTLTexture

A resource that holds formatted image data.

label

A string to help identify this object.

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