From: Mikko Rasa Date: Sun, 7 Mar 2021 22:24:30 +0000 (+0200) Subject: Apply replacement to variable declaration components in VariableResolver X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ea82ccd16101e8e423fa66aebd581f1963567e8a;p=libs%2Fgl.git Apply replacement to variable declaration components in VariableResolver This got missed on cb8ee1f. --- diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index 4e225ae5..4fd8c6ab 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -398,7 +398,12 @@ void VariableResolver::visit(VariableDeclaration &var) if(!block_interface.empty() && var.interface.empty()) var.interface = block_interface; - TraversingVisitor::visit(var); + if(var.layout) + var.layout->visit(*this); + if(var.array_size) + visit_and_replace(var.array_size); + if(var.init_expression) + visit_and_replace(var.init_expression); current_block->variables.insert(make_pair(var.name, &var)); }