Instance Method

sparseTileSizeWithTextureType:pixelFormat:sampleCount:

Returns the dimensions of a sparse tile for a specific texture.

Required.

Declaration

- (MTLSize)sparseTileSizeWithTextureType:(MTLTextureType)textureType pixelFormat:(MTLPixelFormat)pixelFormat sampleCount:(NSUInteger)sampleCount;

Parameters

textureType

The type of texture.

pixelFormat

The format of pixels in the texture.

sampleCount

The number of samples for each pixel.

Discussion

The size, in bytes, of a sparse tile is the same for all sparse textures on a given device object. Because the size of pixels may vary, the actual dimensions of a sparse tile vary based on the texture and the pixel format. Use this method to get the dimensions of the tile for a particular format. Use these dimensions when converting regions from pixel-based units to sparse tile units and vice versa.

See Also

Querying Sparse Tile Properties

sparseTileSizeInBytes

The size of sparse tiles created by this device object, measured in bytes.

Required.