]> git.tdb.fi Git - libs/gl.git/commitdiff
Visit function definitions while collection dependencies
authorMikko Rasa <tdb@tdb.fi>
Sat, 24 Apr 2021 14:55:49 +0000 (17:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 24 Apr 2021 14:55:49 +0000 (17:55 +0300)
Visiting just the declaration won't do much good.

source/glsl/reflect.cpp

index 8c10acccd697c265063d481a8f1a8b055ac492bb..91e8fa55dde940020c5255e97e48eb69abbf7afb 100644 (file)
@@ -321,7 +321,8 @@ void DependencyCollector::visit(FunctionCall &call)
        if(call.declaration)
        {
                dependencies.insert(call.declaration);
-               call.declaration->visit(*this);
+               if(call.declaration->definition)
+                       call.declaration->definition->visit(*this);
        }
        TraversingVisitor::visit(call);
 }