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
|
|
@ -482,7 +482,9 @@ int ShCompile(
|
|||
const EShOptimizationLevel optLevel,
|
||||
const TBuiltInResource* resources,
|
||||
int debugOptions,
|
||||
int defaultVersion
|
||||
int defaultVersion, // use 100 for ES environment, 110 for desktop
|
||||
bool forwardCompatible, // give errors for use of deprecated features
|
||||
bool relaxedChecking // no warnings, reduced errors
|
||||
)
|
||||
{
|
||||
if (!InitThread())
|
||||
|
|
@ -520,7 +522,7 @@ int ShCompile(
|
|||
// they get popped again further down.
|
||||
AddContextSpecificSymbols(resources, compiler->infoSink, &symbolTable, version, profile, compiler->getLanguage());
|
||||
|
||||
TParseContext parseContext(symbolTable, intermediate, version, profile, compiler->getLanguage(), compiler->infoSink);
|
||||
TParseContext parseContext(symbolTable, intermediate, version, profile, compiler->getLanguage(), compiler->infoSink, forwardCompatible, relaxedChecking);
|
||||
|
||||
if (! goodProfile)
|
||||
parseContext.error(1, "incorrect", "#version", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue