GLSL: Add error check for an argument dropping the 'restrict' qualifier

This commit is contained in:
John Kessenich 2019-04-19 04:57:43 -06:00
parent 08d61df040
commit f6873f7e49
2 changed files with 4 additions and 1 deletions

View file

@ -1156,6 +1156,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
error(arguments->getLoc(), message, "readonly", "");
if (argQualifier.writeonly && ! formalQualifier.writeonly)
error(arguments->getLoc(), message, "writeonly", "");
if (!builtIn && argQualifier.restrict && ! formalQualifier.restrict)
error(arguments->getLoc(), message, "restrict", "");
}
if (!builtIn && argQualifier.layoutFormat != formalQualifier.layoutFormat) {
// we have mismatched formats, which should only be allowed if writeonly