Instance Property

allowGPUOptimizedContents

A Boolean value indicating whether the GPU is allowed to adjust the contents of the texture to improve GPU performance.

Required.

Declaration

@property(readonly) BOOL allowGPUOptimizedContents;

Discussion

The value is set when the texture is created and never changes.

If the value is true, Metal is allowed to adjust the texture's contents to improve GPU performance. For a shared or managed texture, this optimization can cause slower performance when accessing the texture from the CPU. If the value is false, CPU reads and writes may be improved at the cost of some GPU performance.

See Also

Querying Texture Attributes

textureType

The dimension and arrangement of the texture image data.

Required.

pixelFormat

The format of pixels in the texture.

Required.

width

The width of the texture image for the base level mipmap, in pixels.

Required.

height

The height of the texture image for the base level mipmap, in pixels.

Required.

depth

The depth of the texture image for the base level mipmap, in pixels.

Required.

mipmapLevelCount

The number of mipmap levels in the texture.

Required.

arrayLength

The number of slices in the texture array.

Required.

sampleCount

The number of samples in each pixel.

Required.

framebufferOnly

A Boolean value that indicates whether the texture can only be used as a render target.

Required.

usage

Options that determine how you can use the texture.

Required.

shareable

A Boolean indicating whether this texture can be shared with other processes.

Required.

swizzle

The pattern that the GPU applies to pixels when you read or sample pixels from the texture.

Required.

MTLTextureType

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

MTLTextureUsage

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