MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / arrayError

Method arrayError

glslang/MachineIndependent/ParseHelper.cpp:5582–5602  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

5580// Returns true if there is an error.
5581//
5582bool 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

Callers

nothing calls this directly

Calls 2

isArrayOfArraysMethod · 0.80
isStructMethod · 0.45

Tested by

no test coverage detected