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

Method getPackedArrayStride

source/opt/struct_packing_pass.cpp:304–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304uint32_t StructPackingPass::getPackedArrayStride(
305 const analysis::Array& arrayType) const {
306 // Array stride is equal to aligned size of element type
307 const uint32_t elementSize = getPackedSize(*arrayType.element_type());
308 const uint32_t alignment = getPackedAlignment(arrayType);
309 return alignPow2(elementSize, alignment);
310}
311
312uint32_t StructPackingPass::getArrayLength(
313 const analysis::Array& arrayType) const {

Callers

nothing calls this directly

Calls 2

alignPow2Function · 0.85
element_typeMethod · 0.45

Tested by

no test coverage detected