0:? 1 (const int)
0:? 9.000000
0:? false (const bool)
+0:? 'cval1' (const bool)
+0:? true (const bool)
+0:? 'cval2' (const bool)
+0:? false (const bool)
+0:? 'cval3' (const bool)
+0:? false (const bool)
+0:? 'cval4' (const bool)
+0:? true (const bool)
+0:? 'cval5' (const bool)
+0:? false (const bool)
+0:? 'cval6' (const bool)
+0:? true (const bool)
Linked fragment stage:
0:? 1 (const int)
0:? 9.000000
0:? false (const bool)
+0:? 'cval1' (const bool)
+0:? true (const bool)
+0:? 'cval2' (const bool)
+0:? false (const bool)
+0:? 'cval3' (const bool)
+0:? false (const bool)
+0:? 'cval4' (const bool)
+0:? true (const bool)
+0:? 'cval5' (const bool)
+0:? false (const bool)
+0:? 'cval6' (const bool)
+0:? true (const bool)
void foo4()\r
{\r
int a = int(a0[2].f);\r
-}
\ No newline at end of file
+}\r
+\r
+const bool cval1 = all(bvec4(true, true, true, true));\r
+const bool cval2 = all(bvec4(false, false, false, false));\r
+const bool cval3 = all(bvec4(true, true, false, true));\r
+const bool cval4 = any(bvec4(true, true, true, true));\r
+const bool cval5 = any(bvec4(false, false, false, false));\r
+const bool cval6 = any(bvec4(false, true, false, false));\r
break;
}
+ case EOpAny:
+ {
+ bool result = false;
+ for (int i = 0; i < objectSize; i++) {
+ if (unionArray[i].getBConst())
+ result = true;
+ }
+ newConstArray[0].setBConst(result);
+ break;
+ }
+ case EOpAll:
+ {
+ bool result = true;
+ for (int i = 0; i < objectSize; i++) {
+ if (! unionArray[i].getBConst())
+ result = false;
+ }
+ newConstArray[0].setBConst(result);
+ break;
+ }
+
// TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
case EOpPackSnorm2x16:
case EOpDeterminant:
case EOpMatrixInverse:
case EOpTranspose:
-
- case EOpAny:
- case EOpAll:
return 0;
-
+
default:
assert(componentWise);
break;