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:
parent
8504d5ae1c
commit
0d3211ff7b
2 changed files with 6 additions and 3 deletions
|
|
@ -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) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue