21
tests/foreach-active-4.ispc
Normal file
21
tests/foreach-active-4.ispc
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
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) {
|
||||
if (i == 1)
|
||||
continue;
|
||||
++RET[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = (1 + programIndex) + ((programIndex & 1) ? 1 : 0);
|
||||
--RET[1];
|
||||
}
|
||||
Reference in New Issue
Block a user