MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / getPadAlignment

Function getPadAlignment

source/opt/struct_packing_pass.cpp:226–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226static uint32_t getPadAlignment(const analysis::Type& type,
227 uint32_t packedAlignment) {
228 // The next member following a struct member is aligned to the base alignment
229 // of a previous struct member.
230 return type.kind() == analysis::Type::kStruct ? packedAlignment : 1;
231}
232
233uint32_t StructPackingPass::getPackedSize(const analysis::Type& type) const {
234 switch (type.kind()) {

Callers 2

getPackedSizeMethod · 0.85

Calls 1

kindMethod · 0.80

Tested by

no test coverage detected