From: Mikko Rasa Date: Fri, 5 Mar 2021 19:04:54 +0000 (+0200) Subject: Visit structs during unused type removal X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=eee19f5d5bbf16895fca44090d6491d5c9b504f5;p=libs%2Fgl.git Visit structs during unused type removal Otherwise types which are only used by struct member declarations would be removed. --- diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index 9d9464e4..f4626f3d 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -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)