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

Function GetArrayStride

source/val/validate_decorations.cpp:65–72  ·  view source on GitHub ↗

Returns the array stride of the given array type.

Source from the content-addressed store, hash-verified

63
64// Returns the array stride of the given array type.
65uint32_t GetArrayStride(uint32_t array_id, ValidationState_t& vstate) {
66 for (auto& decoration : vstate.id_decorations(array_id)) {
67 if (spv::Decoration::ArrayStride == decoration.dec_type()) {
68 return decoration.params()[0];
69 }
70 }
71 return 0;
72}
73
74// Returns true if the given structure type has a Block decoration.
75bool isBlock(uint32_t struct_id, ValidationState_t& vstate) {

Callers 2

getSizeFunction · 0.85
CombineAccessChainMethod · 0.85

Calls 1

dec_typeMethod · 0.80

Tested by

no test coverage detected