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];
RET[programIndex] = a;
if (programIndex & 1)
foreach_active (i)
++RET[i];
}
export void result(uniform float RET[]) {
RET[programIndex] = (1 + programIndex) + ((programIndex & 1) ? 1 : 0);
}