See if this qualifier and type combination can be an array. Assumes arrayQualifierError() was also called to catch the type-invariant tests. Returns true if there is an error.
| 5580 | // Returns true if there is an error. |
| 5581 | // |
| 5582 | bool TParseContext::arrayError(const TSourceLoc& loc, const TType& type) |
| 5583 | { |
| 5584 | if (type.getQualifier().storage == EvqVaryingOut && language == EShLangVertex) { |
| 5585 | if (type.isArrayOfArrays()) |
| 5586 | requireProfile(loc, ~EEsProfile, "vertex-shader array-of-array output"); |
| 5587 | else if (type.isStruct()) |
| 5588 | requireProfile(loc, ~EEsProfile, "vertex-shader array-of-struct output"); |
| 5589 | } |
| 5590 | if (type.getQualifier().storage == EvqVaryingIn && language == EShLangFragment) { |
| 5591 | if (type.isArrayOfArrays()) |
| 5592 | requireProfile(loc, ~EEsProfile, "fragment-shader array-of-array input"); |
| 5593 | else if (type.isStruct()) |
| 5594 | requireProfile(loc, ~EEsProfile, "fragment-shader array-of-struct input"); |
| 5595 | } |
| 5596 | if (type.getQualifier().storage == EvqVaryingOut && language == EShLangFragment) { |
| 5597 | if (type.isArrayOfArrays()) |
| 5598 | requireProfile(loc, ~EEsProfile, "fragment-shader array-of-array output"); |
| 5599 | } |
| 5600 | |
| 5601 | return false; |
| 5602 | } |
| 5603 | |
| 5604 | // |
| 5605 | // Require array to be completely sized |
nothing calls this directly
no test coverage detected