Add foreach_active iteration statement.

Issue #298.
This commit is contained in:
Matt Pharr
2012-06-22 10:35:43 -07:00
parent ed13dd066b
commit b4a078e2f6
15 changed files with 644 additions and 279 deletions

View File

@@ -0,0 +1,16 @@
export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
float a = aFOO[programIndex];
uniform int count = 0;
if (programIndex & 1)
foreach_active (i)
++count;
RET[programIndex] = count;
}
export void result(uniform float RET[]) {
RET[programIndex] = programCount / 2;
}