Contents

minimumTextureBufferAlignment(for:)

Returns the minimum alignment the GPU device requires to create a texture buffer from a buffer.

Declaration

func minimumTextureBufferAlignment(for format: MTLPixelFormat) -> Int

Parameters

Discussion

Metal aligns textures to their minimum alignment value, which directly affects the makeTexture(descriptor:offset:bytesPerRow:) method’s offset and bytesPerRow parameters.

See Also

Creating textures