Instance Method

heapTextureSizeAndAlign(descriptor:)

Returns the size and alignment, in bytes, of a texture sub-allocated from a heap.

Required.

Declaration

func heapTextureSizeAndAlign(descriptor desc: MTLTextureDescriptor) -> MTLSizeAndAlign

Parameters

desc

A descriptor object that describes the properties of the texture.

Return Value

A structure representing the size and alignment, in bytes, of a texture that will be sub-allocated from a heap.

Discussion

You can use this method to help you determine the correct size for the heap, specified with the size property of a MTLHeapDescriptor object.

Topics

Size and Align Structure

struct MTLSizeAndAlign

The size and alignment of a resource, in bytes.

See Also

Creating Resource Heaps

func heapBufferSizeAndAlign(length: Int, options: MTLResourceOptions) -> MTLSizeAndAlign

Returns the size and alignment, in bytes, of a buffer sub-allocated from a heap.

Required.