From a622cf2dc53d68f7c1b0729112ee915919c2323e Mon Sep 17 00:00:00 2001 From: John Kessenich <cepheus@frii.com> Date: Fri, 14 Jun 2013 17:32:46 +0000 Subject: [PATCH] Fix linux build problem. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22002 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- glslang/MachineIndependent/ParseHelper.cpp | 12 ++++++------ glslang/MachineIndependent/ParseHelper.h | 2 +- glslang/MachineIndependent/glslang.y | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index a2b89070c..fe030fd96 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 70ba6a0d7..dcef72152 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 7efbbbfa9..afc8e255c 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; } -- GitLab