minimumLinearTextureAlignment(for:)
Returns the minimum alignment the GPU device requires to create a linear texture from a buffer.
Declaration
func minimumLinearTextureAlignment(for format: MTLPixelFormat) -> IntParameters
- format:
An Mtlpixelformat instance that can’t be any of the depth, stencil, or compressed pixel formats.
Mentioned in
Discussion
Metal aligns linear textures to their minimum alignment value, which directly affects the makeTexture(descriptor:offset:bytesPerRow:) method’s offset and bytesPerRow parameters.