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

Method paramCheckFixStorage

glslang/MachineIndependent/ParseHelper.cpp:6324–6346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6322}
6323
6324void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type)
6325{
6326 switch (qualifier) {
6327 case EvqConst:
6328 case EvqConstReadOnly:
6329 type.getQualifier().storage = EvqConstReadOnly;
6330 break;
6331 case EvqIn:
6332 case EvqOut:
6333 case EvqInOut:
6334 case EvqTileImageEXT:
6335 type.getQualifier().storage = qualifier;
6336 break;
6337 case EvqGlobal:
6338 case EvqTemporary:
6339 type.getQualifier().storage = EvqIn;
6340 break;
6341 default:
6342 type.getQualifier().storage = EvqIn;
6343 error(loc, "storage qualifier not allowed on function parameter", GetStorageQualifierString(qualifier), "");
6344 break;
6345 }
6346}
6347
6348void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type)
6349{

Callers 1

yyparseFunction · 0.80

Calls 2

errorFunction · 0.85

Tested by

no test coverage detected