]> git.tdb.fi Git - libs/gl.git/commitdiff
Visit structs during unused type removal
authorMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 19:04:54 +0000 (21:04 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 23:00:31 +0000 (01:00 +0200)
Otherwise types which are only used by struct member declarations would
be removed.

source/glsl/optimize.cpp

index 9d9464e4107869b758ca5e0fe8b15e09973bd47c..f4626f3dfde4a30b91658d5e981b458fad9ab7c5 100644 (file)
@@ -646,6 +646,7 @@ void UnusedTypeRemover::visit(ImageTypeDeclaration &type)
 void UnusedTypeRemover::visit(StructDeclaration &strct)
 {
        unused_nodes.insert(&strct);
+       TraversingVisitor::visit(strct);
 }
 
 void UnusedTypeRemover::visit(VariableDeclaration &var)