Allow 'continue' statements in 'foreach' loops.
This commit is contained in:
21
tests/foreach-29.ispc
Normal file
21
tests/foreach-29.ispc
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
uniform int foo(int i);
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float ub) {
|
||||
float b = ub;
|
||||
RET[programIndex] = 0;
|
||||
|
||||
foreach (i = 0 ... 10, j = 0 ... programCount + 1) {
|
||||
if (ub == 12345)
|
||||
ccontinue;
|
||||
if (j > 0)
|
||||
++RET[j-1];
|
||||
}
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 10;
|
||||
}
|
||||
Reference in New Issue
Block a user