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
This commit is contained in:
parent
f78fff94e9
commit
a622cf2dc5
@ -1476,12 +1476,12 @@ void TParseContext::addBlock(int line, TTypeList& typeList, const TString* insta
|
|||||||
if (profile == EEsProfile && arraySizes)
|
if (profile == EEsProfile && arraySizes)
|
||||||
arraySizeRequiredCheck(line, arraySizes->front());
|
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(), "");
|
error(line, "interface blocks cannot be declared with a type", blockName->c_str(), "");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (blockType.qualifier.storage == EvqUniform) {
|
if (publicBlockType.qualifier.storage == EvqUniform) {
|
||||||
requireProfile(line, (EProfileMask)(~ENoProfileMask), "uniform block");
|
requireProfile(line, (EProfileMask)(~ENoProfileMask), "uniform block");
|
||||||
profileRequires(line, EEsProfile, 300, 0, "uniform block");
|
profileRequires(line, EEsProfile, 300, 0, "uniform block");
|
||||||
} else {
|
} 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
|
// check for qualifiers and types that don't belong within a block
|
||||||
for (unsigned int member = 0; member < typeList.size(); ++member) {
|
for (unsigned int member = 0; member < typeList.size(); ++member) {
|
||||||
TQualifier memberQualifier = typeList[member].type->getQualifier();
|
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(), "");
|
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(), "");
|
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();
|
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
|
// Make default block qualification, and adjust the member qualifications
|
||||||
|
|
||||||
TQualifier defaultQualification = defaultGlobalQualification;
|
TQualifier defaultQualification = defaultGlobalQualification;
|
||||||
mergeLayoutQualifiers(line, defaultQualification, blockType.qualifier);
|
mergeLayoutQualifiers(line, defaultQualification, publicBlockType.qualifier);
|
||||||
for (unsigned int member = 0; member < typeList.size(); ++member) {
|
for (unsigned int member = 0; member < typeList.size(); ++member) {
|
||||||
TQualifier memberQualification = defaultQualification;
|
TQualifier memberQualification = defaultQualification;
|
||||||
mergeLayoutQualifiers(line, memberQualification, typeList[member].type->getQualifier());
|
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
|
// 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)
|
if (arraySizes)
|
||||||
blockType.setArraySizes(arraySizes);
|
blockType.setArraySizes(arraySizes);
|
||||||
blockType.getQualifier().layoutPacking = defaultQualification.layoutPacking;
|
blockType.getQualifier().layoutPacking = defaultQualification.layoutPacking;
|
||||||
|
@ -95,7 +95,7 @@ struct TParseContext {
|
|||||||
TString HashErrMsg;
|
TString HashErrMsg;
|
||||||
bool AfterEOF;
|
bool AfterEOF;
|
||||||
const TString* blockName;
|
const TString* blockName;
|
||||||
TPublicType blockType;
|
TPublicType publicBlockType;
|
||||||
|
|
||||||
void initializeExtensionBehavior();
|
void initializeExtensionBehavior();
|
||||||
const char* getPreamble();
|
const char* getPreamble();
|
||||||
|
@ -1137,7 +1137,7 @@ block_structure
|
|||||||
: type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.line); } struct_declaration_list RIGHT_BRACE {
|
: type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.line); } struct_declaration_list RIGHT_BRACE {
|
||||||
--parseContext.structNestingLevel;
|
--parseContext.structNestingLevel;
|
||||||
parseContext.blockName = $2.string;
|
parseContext.blockName = $2.string;
|
||||||
parseContext.blockType = $1;
|
parseContext.publicBlockType = $1;
|
||||||
$$.line = $1.line;
|
$$.line = $1.line;
|
||||||
$$.typeList = $5;
|
$$.typeList = $5;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user