Option rationalization and minor clean up.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22907 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
8700e9e6d1
commit
94a81fbd31
7 changed files with 74 additions and 66 deletions
|
|
@ -198,9 +198,10 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
|
|||
newConstArray = new TConstUnion[objectSize];
|
||||
for (int i = 0; i < objectSize; i++) {
|
||||
switch (getType().getBasicType()) {
|
||||
case EbtDouble:
|
||||
case EbtFloat:
|
||||
newConstArray[i].setDConst(unionArray[i].getDConst() / rightUnionArray[i].getDConst());
|
||||
break;
|
||||
break;
|
||||
|
||||
case EbtInt:
|
||||
if (rightUnionArray[i] == 0) {
|
||||
|
|
@ -438,6 +439,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType,
|
|||
switch (op) {
|
||||
case EOpNegative:
|
||||
switch (getType().getBasicType()) {
|
||||
case EbtDouble:
|
||||
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
|
||||
case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break;
|
||||
case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue