---
title: constantBlockAlignment
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlargumentdescriptor/constantblockalignment
---

# constantBlockAlignment

The alignment of the constant block.

## Declaration

```swift
var constantBlockAlignment: Int { get set }
```

## Discussion

Discussion If set, this property forces the constant block to be aligned to the specified value. It should be set on the first constant only, and is valid only if a corresponding explicit alignas specifier is applied to the constant in the Metal shader language.

## See Also

### Setting the descriptor’s properties

- [dataType](metal/mtlargumentdescriptor/datatype.md)
- [index](metal/mtlargumentdescriptor/index.md)
- [access](metal/mtlargumentdescriptor/access.md)
- [arrayLength](metal/mtlargumentdescriptor/arraylength.md)
- [textureType](metal/mtlargumentdescriptor/texturetype.md)
