Reject non-float inputs/outputs with version < 120

GLSL 1.20 and prior stated that "the attribute qualifier can be used
only with float, floating-point vectors, and matrices" and likewise
for varying.

Fixes: #3111
This commit is contained in:
Arcady Goldmints-Orlov 2023-01-20 10:39:06 -07:00 committed by arcady-lunarg
parent 8504d5ae1c
commit 0d3211ff7b
2 changed files with 6 additions and 3 deletions

View file

@ -3983,8 +3983,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
return;
}
if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble)
profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output");
if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) {
profileRequires(loc, EEsProfile, 300, nullptr, "non-float shader input/output");
profileRequires(loc, ~EEsProfile, 130, nullptr, "non-float shader input/output");
}
if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV() && !qualifier.isPervertexEXT()) {
if (isTypeInt(publicType.basicType) ||