@@ -43,7 +43,7 @@ VulkanLayoutUtils::decorateType(spirv::StructType structType,
43
43
Size memberSize = 0 ;
44
44
Size memberAlignment = 1 ;
45
45
46
- auto memberType =
46
+ Type memberType =
47
47
decorateType (structType.getElementType (i), memberSize, memberAlignment);
48
48
structMemberOffset = llvm::alignTo (structMemberOffset, memberAlignment);
49
49
memberTypes.push_back (memberType);
@@ -107,12 +107,12 @@ Type VulkanLayoutUtils::decorateType(Type type, VulkanLayoutUtils::Size &size,
107
107
Type VulkanLayoutUtils::decorateType (VectorType vectorType,
108
108
VulkanLayoutUtils::Size &size,
109
109
VulkanLayoutUtils::Size &alignment) {
110
- const auto numElements = vectorType.getNumElements ();
111
- auto elementType = vectorType.getElementType ();
110
+ const unsigned numElements = vectorType.getNumElements ();
111
+ Type elementType = vectorType.getElementType ();
112
112
Size elementSize = 0 ;
113
113
Size elementAlignment = 1 ;
114
114
115
- auto memberType = decorateType (elementType, elementSize, elementAlignment);
115
+ Type memberType = decorateType (elementType, elementSize, elementAlignment);
116
116
// According to the Vulkan spec:
117
117
// 1. "A two-component vector has a base alignment equal to twice its scalar
118
118
// alignment."
@@ -126,12 +126,12 @@ Type VulkanLayoutUtils::decorateType(VectorType vectorType,
126
126
Type VulkanLayoutUtils::decorateType (spirv::ArrayType arrayType,
127
127
VulkanLayoutUtils::Size &size,
128
128
VulkanLayoutUtils::Size &alignment) {
129
- const auto numElements = arrayType.getNumElements ();
130
- auto elementType = arrayType.getElementType ();
129
+ const unsigned numElements = arrayType.getNumElements ();
130
+ Type elementType = arrayType.getElementType ();
131
131
Size elementSize = 0 ;
132
132
Size elementAlignment = 1 ;
133
133
134
- auto memberType = decorateType (elementType, elementSize, elementAlignment);
134
+ Type memberType = decorateType (elementType, elementSize, elementAlignment);
135
135
// According to the Vulkan spec:
136
136
// "An array has a base alignment equal to the base alignment of its element
137
137
// type."
@@ -161,10 +161,10 @@ Type VulkanLayoutUtils::decorateType(spirv::MatrixType matrixType,
161
161
162
162
Type VulkanLayoutUtils::decorateType (spirv::RuntimeArrayType arrayType,
163
163
VulkanLayoutUtils::Size &alignment) {
164
- auto elementType = arrayType.getElementType ();
164
+ Type elementType = arrayType.getElementType ();
165
165
Size elementSize = 0 ;
166
166
167
- auto memberType = decorateType (elementType, elementSize, alignment);
167
+ Type memberType = decorateType (elementType, elementSize, alignment);
168
168
return spirv::RuntimeArrayType::get (memberType, elementSize);
169
169
}
170
170
@@ -175,7 +175,7 @@ VulkanLayoutUtils::getScalarTypeAlignment(Type scalarType) {
175
175
// 2. "A scalar has a base alignment equal to its scalar alignment."
176
176
// 3. "A scalar, vector or matrix type has an extended alignment equal to its
177
177
// base alignment."
178
- auto bitWidth = scalarType.getIntOrFloatBitWidth ();
178
+ unsigned bitWidth = scalarType.getIntOrFloatBitWidth ();
179
179
if (bitWidth == 1 )
180
180
return 1 ;
181
181
return bitWidth / 8 ;
@@ -187,7 +187,7 @@ bool VulkanLayoutUtils::isLegalType(Type type) {
187
187
return true ;
188
188
}
189
189
190
- auto storageClass = ptrType.getStorageClass ();
190
+ const spirv::StorageClass storageClass = ptrType.getStorageClass ();
191
191
auto structType = dyn_cast<spirv::StructType>(ptrType.getPointeeType ());
192
192
if (!structType) {
193
193
return true ;
0 commit comments