glslang: Correct global precision qualifiers to make the qualifier global instead of temp (local).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30975 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -2217,7 +2217,8 @@ void TParseContext::mergeQualifiers(TSourceLoc loc, TQualifier& dst, const TQual
|
||||
else if ((dst.storage == EvqIn && src.storage == EvqConst) ||
|
||||
(dst.storage == EvqConst && src.storage == EvqIn))
|
||||
dst.storage = EvqConstReadOnly;
|
||||
else if (src.storage != EvqTemporary)
|
||||
else if (src.storage != EvqTemporary &&
|
||||
src.storage != EvqGlobal)
|
||||
error(loc, "too many storage qualifiers", GetStorageQualifierString(src.storage), "");
|
||||
|
||||
// Precision qualifiers
|
||||
@@ -2871,6 +2872,7 @@ void TParseContext::paramCheckFix(TSourceLoc loc, const TStorageQualifier& quali
|
||||
case EvqInOut:
|
||||
type.getQualifier().storage = qualifier;
|
||||
break;
|
||||
case EvqGlobal:
|
||||
case EvqTemporary:
|
||||
type.getQualifier().storage = EvqIn;
|
||||
break;
|
||||
|
||||
@@ -1894,19 +1894,19 @@ type_specifier_nonarray
|
||||
precision_qualifier
|
||||
: HIGH_PRECISION {
|
||||
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "highp precision qualifier");
|
||||
$$.init($1.loc);
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
if (parseContext.profile == EEsProfile)
|
||||
$$.qualifier.precision = EpqHigh;
|
||||
}
|
||||
| MEDIUM_PRECISION {
|
||||
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "mediump precision qualifier");
|
||||
$$.init($1.loc);
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
if (parseContext.profile == EEsProfile)
|
||||
$$.qualifier.precision = EpqMedium;
|
||||
}
|
||||
| LOW_PRECISION {
|
||||
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "lowp precision qualifier");
|
||||
$$.init($1.loc);
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
if (parseContext.profile == EEsProfile)
|
||||
$$.qualifier.precision = EpqLow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user