diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index a2b89070cecc998759e87b6882f50400ecb749e4..fe030fd9664323dc935803f84b07240a87e44741 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1476,12 +1476,12 @@ void TParseContext::addBlock(int line, TTypeList& typeList, const TString* insta if (profile == EEsProfile && arraySizes) arraySizeRequiredCheck(line, arraySizes->front()); - if (blockType.basicType != EbtVoid) { + if (publicBlockType.basicType != EbtVoid) { error(line, "interface blocks cannot be declared with a type", blockName->c_str(), ""); return; } - if (blockType.qualifier.storage == EvqUniform) { + if (publicBlockType.qualifier.storage == EvqUniform) { requireProfile(line, (EProfileMask)(~ENoProfileMask), "uniform block"); profileRequires(line, EEsProfile, 300, 0, "uniform block"); } else { @@ -1493,9 +1493,9 @@ void TParseContext::addBlock(int line, TTypeList& typeList, const TString* insta // check for qualifiers and types that don't belong within a block for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier memberQualifier = typeList[member].type->getQualifier(); - if (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal && memberQualifier.storage != blockType.qualifier.storage) + if (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal && memberQualifier.storage != publicBlockType.qualifier.storage) error(line, "member storage qualifier cannot contradict block storage qualifier", typeList[member].type->getFieldName().c_str(), ""); - if (blockType.qualifier.storage == EvqUniform && memberQualifier.isInterpolation() || memberQualifier.isAuxillary()) + if (publicBlockType.qualifier.storage == EvqUniform && memberQualifier.isInterpolation() || memberQualifier.isAuxillary()) error(line, "member of uniform block cannot have an auxillary or interpolation qualifier", typeList[member].type->getFieldName().c_str(), ""); TBasicType basicType = typeList[member].type->getBasicType(); @@ -1506,7 +1506,7 @@ void TParseContext::addBlock(int line, TTypeList& typeList, const TString* insta // Make default block qualification, and adjust the member qualifications TQualifier defaultQualification = defaultGlobalQualification; - mergeLayoutQualifiers(line, defaultQualification, blockType.qualifier); + mergeLayoutQualifiers(line, defaultQualification, publicBlockType.qualifier); for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier memberQualification = defaultQualification; mergeLayoutQualifiers(line, memberQualification, typeList[member].type->getQualifier()); @@ -1515,7 +1515,7 @@ void TParseContext::addBlock(int line, TTypeList& typeList, const TString* insta // Build and add the interface block as a new type named blockName - TType blockType(&typeList, *blockName, blockType.qualifier.storage); + TType blockType(&typeList, *blockName, publicBlockType.qualifier.storage); if (arraySizes) blockType.setArraySizes(arraySizes); blockType.getQualifier().layoutPacking = defaultQualification.layoutPacking; diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h index 70ba6a0d7a1312d4715f6741696d0b868ae462db..dcef72152859197befbc7fb3fd4b2ba3906422a7 100644 --- a/glslang/MachineIndependent/ParseHelper.h +++ b/glslang/MachineIndependent/ParseHelper.h @@ -95,7 +95,7 @@ struct TParseContext { TString HashErrMsg; bool AfterEOF; const TString* blockName; - TPublicType blockType; + TPublicType publicBlockType; void initializeExtensionBehavior(); const char* getPreamble(); diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index 7efbbbfa993362faf310c1839127f1cce7ea0456..afc8e255c18ee5d8f165696a64926bd63f1e91d9 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -1137,7 +1137,7 @@ block_structure : type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.line); } struct_declaration_list RIGHT_BRACE { --parseContext.structNestingLevel; parseContext.blockName = $2.string; - parseContext.blockType = $1; + parseContext.publicBlockType = $1; $$.line = $1.line; $$.typeList = $5; }