From: Mikko Rasa Date: Sun, 25 Sep 2022 14:48:51 +0000 (+0300) Subject: Fix validation checks for interpolation and sampling qualifiers X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d6a04ea0146ea58c13a10098957e1d48492e26c0;p=libs%2Fgl.git Fix validation checks for interpolation and sampling qualifiers --- 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");