]> git.tdb.fi Git - libs/gl.git/commitdiff
Apply replacement to variable declaration components in VariableResolver
authorMikko Rasa <tdb@tdb.fi>
Sun, 7 Mar 2021 22:24:30 +0000 (00:24 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 8 Mar 2021 13:27:33 +0000 (15:27 +0200)
This got missed on cb8ee1f.

source/glsl/generate.cpp

index 4e225ae520569dab6188666ba1bc7a2c026a5bb2..4fd8c6ab79aeb3453c1501332dc19953bf42e8d5 100644 (file)
@@ -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));
 }