Add compilation mode flags for forward-compatible contexts and relaxed error checking. These initiate as arguments to ShCompile() and both default to being off.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20817 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
9500dff05e
commit
4055816bc9
8 changed files with 42 additions and 23 deletions
|
|
@ -39,11 +39,12 @@
|
|||
#include "osinclude.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, int v, EProfile p, EShLanguage L, TInfoSink& is) :
|
||||
TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, int v, EProfile p, EShLanguage L, TInfoSink& is,
|
||||
bool fc, bool rc) :
|
||||
intermediate(interm), symbolTable(symt), infoSink(is), language(L), treeRoot(0),
|
||||
recoveredFromError(false), numErrors(0), lexAfterType(false), loopNestingLevel(0),
|
||||
switchNestingLevel(0), inTypeParen(false),
|
||||
version(v), profile(p), futureCompatibility(false),
|
||||
version(v), profile(p), forwardCompatible(fc), relaxedChecking(rc),
|
||||
contextPragma(true, false)
|
||||
{
|
||||
for (int type = 0; type < EbtNumTypes; ++type)
|
||||
|
|
@ -438,6 +439,7 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
|
|||
if (identifier.find("__") != TString::npos) {
|
||||
//error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
|
||||
//return true;
|
||||
// TODO: make this an error
|
||||
infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue