From eee19f5d5bbf16895fca44090d6491d5c9b504f5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 5 Mar 2021 21:04:54 +0200 Subject: [PATCH] Visit structs during unused type removal Otherwise types which are only used by struct member declarations would be removed. --- source/glsl/optimize.cpp | 1 + 1 file changed, 1 insertion(+) 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) -- 2.45.2