]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Add support for function overloading
[libs/gl.git] / source / glsl / compiler.cpp
index 9c1238c029eec1155957b105748ae078767a4437..c5f0a9a3d05b6fd640f9afe5a5cba5a05e0ec5ab 100644 (file)
@@ -282,7 +282,7 @@ void Compiler::resolve(Stage &stage, unsigned flags)
                else if(resolve<FunctionResolver>(stage, flags, RESOLVE_FUNCTIONS))
                        flags |= RESOLVE_EXPRESSIONS;
                else if(resolve<ExpressionResolver>(stage, flags, RESOLVE_EXPRESSIONS))
-                       flags |= RESOLVE_VARIABLES;
+                       flags |= RESOLVE_VARIABLES|RESOLVE_FUNCTIONS;
        }
 }
 
@@ -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))