]> git.tdb.fi Git - libs/gl.git/commitdiff
Resolve functions after inlining functions
authorMikko Rasa <tdb@tdb.fi>
Tue, 9 Mar 2021 12:34:09 +0000 (14:34 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 9 Mar 2021 12:34:09 +0000 (14:34 +0200)
Inlining clones expressions, and the clones FunctionCall nodes don't have
a declaration pointer.

source/glsl/compiler.cpp

index 9c1238c029eec1155957b105748ae078767a4437..332dd331f69b6bc6e287e89306e2e21eeff52e72 100644 (file)
@@ -324,7 +324,7 @@ Compiler::OptimizeResult Compiler::optimize(Stage &stage)
        bool any_inlined = false;
        if(FunctionInliner().apply(stage))
        {
-               resolve(stage, RESOLVE_TYPES|RESOLVE_VARIABLES|RESOLVE_EXPRESSIONS);
+               resolve(stage, RESOLVE_TYPES|RESOLVE_VARIABLES|RESOLVE_FUNCTIONS|RESOLVE_EXPRESSIONS);
                any_inlined = true;
        }
        if(ExpressionInliner().apply(stage))