X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Freflect.cpp;h=643c42e79be90f51f07009df7343ce67df80f09e;hp=21f12d0eb1c57b25491832651d9812aac0beb55b;hb=HEAD;hpb=7d145421b050647a4599ac779e634ce2fa60d3ec diff --git a/source/glsl/reflect.cpp b/source/glsl/reflect.cpp index 21f12d0e..becc833e 100644 --- a/source/glsl/reflect.cpp +++ b/source/glsl/reflect.cpp @@ -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 && iarguments[i], *call.arguments[i]); + } + } +} + void TypeComparer::visit(BasicTypeDeclaration &basic) { if(BasicTypeDeclaration *basic1 = multi_visit(basic)) @@ -178,7 +197,9 @@ void TypeComparer::visit(ImageTypeDeclaration &image) { if(image1->dimensions!=image.dimensions || image1->array!=image.array) r_result = false; - else if(image1->sampled!=image.sampled || image1->shadow!=image.shadow) + 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); @@ -348,15 +369,6 @@ void DependencyCollector::visit(VariableReference &var) } } -void DependencyCollector::visit(InterfaceBlockReference &iface) -{ - if(iface.declaration) - { - dependencies.insert(iface.declaration); - iface.declaration->visit(*this); - } -} - void DependencyCollector::visit(FunctionCall &call) { if(call.declaration) @@ -402,12 +414,6 @@ void AssignmentCollector::visit(VariableReference &var) assigned_variables.insert(var.declaration); } -void AssignmentCollector::visit(InterfaceBlockReference &iface) -{ - if(assignment_target) - assigned_variables.insert(iface.declaration); -} - void AssignmentCollector::visit(UnaryExpression &unary) { SetFlag set_assignment(assignment_target, (unary.oper->token[1]=='+' || unary.oper->token[1]=='-'));