Misc semantics fixes:

- don't allow pre-array object versions to return a struct containing an array 
 - special case -2147483648 / -1
 - include "~" in the full integer functionality checks
 - handle multiple function parameters having the same name



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24010 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-12 01:02:51 +00:00
parent 09709c1521
commit 67c9f3a720
9 changed files with 118 additions and 22 deletions

View file

@ -165,9 +165,11 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
break;
case EbtInt:
if (rightUnionArray[i] == 0) {
if (rightUnionArray[i] == 0)
newConstArray[i].setIConst(0x7FFFFFFF);
} else
else if (rightUnionArray[i].getIConst() == -1 && unionArray[i].getIConst() == 0x80000000)
newConstArray[i].setIConst(0x80000000);
else
newConstArray[i].setIConst(unionArray[i].getIConst() / rightUnionArray[i].getIConst());
break;