---
title: "minimumTextureBufferAlignment(for:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/minimumtexturebufferalignment(for:)"
---

# minimumTextureBufferAlignment(for:)

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

## Declaration

```swift
func minimumTextureBufferAlignment(for format: MTLPixelFormat) -> Int
```

## Parameters

- `format`: An doc://com.apple.metal/documentation/Metal/MTLPixelFormat instance.

## Discussion

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

- [makeTexture(descriptor:)](metal/mtldevice/maketexture(descriptor:).md)
- [makeTexture(descriptor:iosurface:plane:)](metal/mtldevice/maketexture(descriptor:iosurface:plane:).md)
- [makeSharedTexture(descriptor:)](metal/mtldevice/makesharedtexture(descriptor:).md)
- [makeSharedTexture(handle:)](metal/mtldevice/makesharedtexture(handle:).md)
- [minimumLinearTextureAlignment(for:)](metal/mtldevice/minimumlineartexturealignment(for:).md)
