MultipleArrays.vert[0].position[0]: offset 360, type 1406, size 3, index 1, binding -1, stages 1, arrayStride 4, topLevelArrayStride 24
MultipleArrays.vert[0].normal[0]: offset 372, type 1406, size 3, index 1, binding -1, stages 0, arrayStride 4, topLevelArrayStride 24
MultipleArrays.f[0]: offset 480, type 1406, size 5, index 1, binding -1, stages 1, arrayStride 4, topLevelArrayStride 4
+ArrayedBind[0].a: offset 0, type 1406, size 1, index 4, binding -1, stages 0
+ArrayedBind[0].b: offset 4, type 1406, size 1, index 4, binding -1, stages 1
Buffer block reflection:
VertexCollection: offset -1, type ffffffff, size 400, index -1, binding -1, stages 1, numMembers 7
MultipleArrays: offset -1, type ffffffff, size 500, index -1, binding -1, stages 1, numMembers 9
+ArrayedBind[0]: offset -1, type ffffffff, size 8, index -1, binding -1, stages 1, numMembers 2
+ArrayedBind[1]: offset -1, type ffffffff, size 8, index -1, binding -1, stages 1, numMembers 2
+ArrayedBind[2]: offset -1, type ffffffff, size 8, index -1, binding -1, stages 1, numMembers 2
Pipeline input reflection:
gl_InstanceID: offset 0, type 1404, size 1, index 0, binding -1, stages 1
bool blockParent = (base->getType().getBasicType() == EbtBlock && base->getQualifier().storage == EvqBuffer);
if (strictArraySuffix && blockParent) {
- const TTypeList& typeList = *base->getType().getStruct();
+ TType structDerefType(base->getType(), 0);
+
+ const TType &structType = base->getType().isArray() ? structDerefType : base->getType();
+ const TTypeList& typeList = *structType.getStruct();
TVector<int> memberOffsets;
memberOffsets.resize(typeList.size());
- getOffsets(base->getType(), memberOffsets);
+ getOffsets(structType, memberOffsets);
for (int i = 0; i < (int)typeList.size(); ++i) {
- TType derefType(base->getType(), i);
+ TType derefType(structType, i);
TString name = baseName;
if (name.size() > 0)
name.append(".");
if (derefType.isArray() && derefType.isStruct()) {
name.append("[0]");
blowUpActiveAggregate(TType(derefType, 0), name, derefs, derefs.end(), memberOffsets[i],
- blockIndex, 0, getArrayStride(base->getType(), derefType),
+ blockIndex, 0, getArrayStride(structType, derefType),
base->getQualifier().storage, false);
} else {
blowUpActiveAggregate(derefType, name, derefs, derefs.end(), memberOffsets[i], blockIndex,