glslang front-end: Support relaxed error checking for bug 13724 "...initializer must be a constant expression..." because that change breaks existing shipping applications. (Normal validation for portability testing still gives an error.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31475 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
fae38ee277
commit
4751ce3fc1
1 changed files with 4 additions and 1 deletions
|
|
@ -4160,6 +4160,9 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TIntermTyped* ini
|
||||||
// qualifier any initializer must be a constant expression."
|
// qualifier any initializer must be a constant expression."
|
||||||
if (symbolTable.atGlobalLevel() && initializer->getType().getQualifier().storage != EvqConst) {
|
if (symbolTable.atGlobalLevel() && initializer->getType().getQualifier().storage != EvqConst) {
|
||||||
const char* initFeature = "non-constant global initializer";
|
const char* initFeature = "non-constant global initializer";
|
||||||
|
if (messages & EShMsgRelaxedErrors)
|
||||||
|
warn(loc, "not allowed in this version", initFeature, "");
|
||||||
|
else
|
||||||
requireProfile(loc, ~EEsProfile, initFeature);
|
requireProfile(loc, ~EEsProfile, initFeature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue