Instance Method

heapTextureSizeAndAlignWithDescriptor:

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

Required.

Declaration

- (MTLSizeAndAlign)heapTextureSizeAndAlignWithDescriptor:(MTLTextureDescriptor *)desc;

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

MTLSizeAndAlign

The size and alignment of a resource, in bytes.

See Also

Creating Resource Heaps

- newHeapWithDescriptor:

Creates a heap.

Required.

- heapBufferSizeAndAlignWithLength:options:

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

Required.