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

Method arrayLimitCheck

glslang/MachineIndependent/ParseHelper.cpp:6611–6623  ·  view source on GitHub ↗

Do limit checks for built-in arrays.

Source from the content-addressed store, hash-verified

6609
6610// Do limit checks for built-in arrays.
6611void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identifier, int size)
6612{
6613 if (identifier.compare("gl_TexCoord") == 0)
6614 limitCheck(loc, size, "gl_MaxTextureCoords", "gl_TexCoord array size");
6615 else if (identifier.compare("gl_ClipDistance") == 0)
6616 limitCheck(loc, size, "gl_MaxClipDistances", "gl_ClipDistance array size");
6617 else if (identifier.compare("gl_CullDistance") == 0)
6618 limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistance array size");
6619 else if (identifier.compare("gl_ClipDistancePerViewNV") == 0)
6620 limitCheck(loc, size, "gl_MaxClipDistances", "gl_ClipDistancePerViewNV array size");
6621 else if (identifier.compare("gl_CullDistancePerViewNV") == 0)
6622 limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistancePerViewNV array size");
6623}
6624
6625// See if the provided value is less than or equal to the symbol indicated by limit,
6626// which should be a constant in the symbol table.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected