]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix validation checks for interpolation and sampling qualifiers
authorMikko Rasa <tdb@tdb.fi>
Sun, 25 Sep 2022 14:48:51 +0000 (17:48 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 25 Sep 2022 17:21:57 +0000 (20:21 +0300)
source/glsl/validate.cpp

index ce5a85b4a54af5de0fdceed95e9c6e42a6ab8275..f6b11ef22e34f8e019a43c5ff040eb8f05283c08 100644 (file)
@@ -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");