X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fvalidate.cpp;h=883b950ff07f2e46d9aa0037ddfce2fa2719c425;hp=ce5a85b4a54af5de0fdceed95e9c6e42a6ab8275;hb=HEAD;hpb=79db78e77054cd93e69123b3b6495a561f5cbd10 diff --git a/source/glsl/validate.cpp b/source/glsl/validate.cpp index ce5a85b4..f6b11ef2 100644 --- a/source/glsl/validate.cpp +++ b/source/glsl/validate.cpp @@ -338,9 +338,9 @@ void DeclarationValidator::visit(VariableDeclaration &var) if(!var.interpolation.empty() || !var.sampling.empty()) { - if(var.interface!="in" && stage->type==Stage::VERTEX) + if(var.interface=="in" && stage->type==Stage::VERTEX) error(var, "Interpolation qualifier not allowed on vertex input"); - else if(var.interface!="out" && stage->type==Stage::FRAGMENT) + else if(var.interface=="out" && stage->type==Stage::FRAGMENT) error(var, "Interpolation qualifier not allowed on fragment output"); else if((var.interface!="in" && var.interface!="out") || (scope==FUNCTION_PARAM || scope==FUNCTION)) error(var, "Interpolation qualifier not allowed on non-interpolated variable");