Lines Matching full:alignment

9 // This file implements Utilities used to get alignment and layout information
23 Size alignment = 1; in decorateType() local
24 return decorateType(structType, size, alignment); in decorateType()
30 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
58 // "A structure has a base alignment equal to the largest base alignment of in decorateType()
66 // structure or an array and the next multiple of the alignment of that in decorateType()
69 alignment = maxMemberAlignment; in decorateType()
81 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
83 alignment = getScalarTypeAlignment(type); in decorateType()
85 size = alignment; in decorateType()
89 return decorateType(structType, size, alignment); in decorateType()
91 return decorateType(arrayType, size, alignment); in decorateType()
93 return decorateType(vectorType, size, alignment); in decorateType()
96 return decorateType(arrayType, alignment); in decorateType()
107 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
115 // 1. "A two-component vector has a base alignment equal to twice its scalar in decorateType()
116 // alignment." in decorateType()
117 // 2. "A three- or four-component vector has a base alignment equal to four in decorateType()
118 // times its scalar alignment." in decorateType()
120 alignment = numElements == 2 ? elementAlignment * 2 : elementAlignment * 4; in decorateType()
126 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
134 // "An array has a base alignment equal to the base alignment of its element in decorateType()
137 alignment = elementAlignment; in decorateType()
142 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
146 auto memberType = decorateType(elementType, elementSize, alignment); in decorateType()
153 // 1. "A scalar of size N has a scalar alignment of N." in getScalarTypeAlignment()
154 // 2. "A scalar has a base alignment equal to its scalar alignment." in getScalarTypeAlignment()
155 // 3. "A scalar, vector or matrix type has an extended alignment equal to its in getScalarTypeAlignment()
156 // base alignment." in getScalarTypeAlignment()