Front-end: Implement compile-time constant folding for any() and all().
This commit is contained in:
parent
91b7533d70
commit
d8509b3367
3 changed files with 54 additions and 5 deletions
|
|
@ -138,4 +138,11 @@ const cag a0[3] = cag[3](cag(3, 2.0, true), cag(1, 5.0, true), cag(1, 9.0, false
|
|||
void foo4()
|
||||
{
|
||||
int a = int(a0[2].f);
|
||||
}
|
||||
}
|
||||
|
||||
const bool cval1 = all(bvec4(true, true, true, true));
|
||||
const bool cval2 = all(bvec4(false, false, false, false));
|
||||
const bool cval3 = all(bvec4(true, true, false, true));
|
||||
const bool cval4 = any(bvec4(true, true, true, true));
|
||||
const bool cval5 = any(bvec4(false, false, false, false));
|
||||
const bool cval6 = any(bvec4(false, true, false, false));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue