]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix the return value of ConstantFolder::apply
authorMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 10:50:11 +0000 (13:50 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 10:50:11 +0000 (13:50 +0300)
This was causing the folded literals to be left without a type in some
specific situations, since a resolve pass did not get run.

source/glsl/optimize.cpp

index b1201e9fb84cec84c8a7236121963f982cfa43cb..ed20bb175dcc9277e1ff84e2e1a1734b2279668f 100644 (file)
@@ -657,6 +657,7 @@ void ConstantFolder::visit(RefPtr<Expression> &expr)
        }
        literal->value = r_constant_value;
        expr = literal;
        }
        literal->value = r_constant_value;
        expr = literal;
+       r_any_folded = true;
 }
 
 void ConstantFolder::visit(Literal &literal)
 }
 
 void ConstantFolder::visit(Literal &literal)