]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/debug.cpp
Use extended alignment in SPIR-V struct layout when necessary
[libs/gl.git] / source / glsl / debug.cpp
index 5ee30e0996c4dfc6ff5331d1c1b200f472c6fcf1..ef7e81f68af289943e7348a81edc8eb407637cf6 100644 (file)
@@ -349,6 +349,8 @@ void DumpTree::visit(BasicTypeDeclaration &type)
                branches.emplace_back(format("Vector: %d", type.size));
        else if(type.kind==BasicTypeDeclaration::MATRIX)
                branches.emplace_back(format("Matrix: %dx%d", type.size&0xFFFF, type.size>>16));
+       if(type.extended_alignment)
+               branches.emplace_back("Extended alignment");
        append_subtree(branches);
 }
 
@@ -370,7 +372,11 @@ void DumpTree::visit(ImageTypeDeclaration &type)
 void DumpTree::visit(StructDeclaration &strct)
 {
        append(strct, format("%s struct %s", get_label(strct), strct.name));
-       append_subtree(strct.members);
+       vector<Branch> branches;
+       if(strct.extended_alignment)
+               branches.emplace_back("Extended alignment");
+       branches.emplace_back(&strct.members);
+       append_subtree(branches);
 }
 
 void DumpTree::visit(VariableDeclaration &var)