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:
John Kessenich 2013-03-08 18:49:22 +00:00
parent 9500dff05e
commit 4055816bc9
8 changed files with 42 additions and 23 deletions

View file

@ -178,7 +178,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
switch (getType().getBasicType()) {
case EbtFloat:
if (rightUnionArray[i] == 0.0f) {
infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", getLine());
newConstArray[i].setFConst(FLT_MAX);
} else
newConstArray[i].setFConst(unionArray[i].getFConst() / rightUnionArray[i].getFConst());
@ -186,7 +185,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
case EbtInt:
if (rightUnionArray[i] == 0) {
infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", getLine());
newConstArray[i].setIConst(0xEFFFFFFF);
} else
newConstArray[i].setIConst(unionArray[i].getIConst() / rightUnionArray[i].getIConst());