]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/reflect.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / glsl / reflect.cpp
index 64dbbf6e0e140ddc47385b75f6a966a2658fea8b..becc833e28ef7da9c9bbcd5fc5ad6e6fe7d81ce6 100644 (file)
@@ -159,6 +159,25 @@ void TypeComparer::visit(TernaryExpression &ternary)
        }
 }
 
+void TypeComparer::visit(FunctionCall &call)
+{
+       if(FunctionCall *call1 = multi_visit(call))
+       {
+               if(!call1->constructor || !call.constructor)
+                       r_result = false;
+               else if(call1->name!=call.name)
+                       r_result = false;
+               else if(call1->arguments.size()!=call.arguments.size())
+                       r_result = false;
+               else
+               {
+                       r_result = true;
+                       for(unsigned i=0; (r_result && i<call.arguments.size()); ++i)
+                               compare(*call1->arguments[i], *call.arguments[i]);
+               }
+       }
+}
+
 void TypeComparer::visit(BasicTypeDeclaration &basic)
 {
        if(BasicTypeDeclaration *basic1 = multi_visit(basic))
@@ -180,6 +199,8 @@ void TypeComparer::visit(ImageTypeDeclaration &image)
                        r_result = false;
                else if(image1->sampled!=image.sampled || image1->shadow!=image.shadow || image1->multisample!=image.multisample)
                        r_result = false;
+               else if(image1->format!=image.format)
+                       r_result = false;
                else if(image1->base_type && image.base_type)
                        compare(*image1->base_type, *image.base_type);
                else